channel_namespaces
Creates, updates, deletes or gets a channel_namespace
resource or lists channel_namespaces
in a region
Overview
Name | channel_namespaces |
Type | Resource |
Description | Resource schema for AppSync ChannelNamespace |
Id | aws.appsync.channel_namespaces |
Fields
Name | Datatype | Description |
---|---|---|
api_id | string | AppSync Api Id that this Channel Namespace belongs to. |
name | string | Namespace indentifier. |
subscribe_auth_modes | array | List of AuthModes supported for Subscribe operations. |
publish_auth_modes | array | List of AuthModes supported for Publish operations. |
code_handlers | string | String of APPSYNC_JS code to be used by the handlers. |
code_s3_location | string | The Amazon S3 endpoint where the code is located. |
channel_namespace_arn | string | The Amazon Resource Name (ARN) for the Channel Namespace. |
tags | array | An arbitrary set of tags (key-value pairs) for this AppSync API. |
region | string | AWS region. |
For more information, see AWS::AppSync::ChannelNamespace
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ApiId, Name, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all channel_namespaces
in a region.
SELECT
region,
api_id,
name,
subscribe_auth_modes,
publish_auth_modes,
code_handlers,
code_s3_location,
channel_namespace_arn,
tags
FROM aws.appsync.channel_namespaces
WHERE region = 'us-east-1';
Gets all properties from an individual channel_namespace
.
SELECT
region,
api_id,
name,
subscribe_auth_modes,
publish_auth_modes,
code_handlers,
code_s3_location,
channel_namespace_arn,
tags
FROM aws.appsync.channel_namespaces
WHERE region = 'us-east-1' AND data__Identifier = '<ChannelNamespaceArn>';
INSERT
example
Use the following StackQL query and manifest file to create a new channel_namespace
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.appsync.channel_namespaces (
ApiId,
Name,
region
)
SELECT
'{{ ApiId }}',
'{{ Name }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.appsync.channel_namespaces (
ApiId,
Name,
SubscribeAuthModes,
PublishAuthModes,
CodeHandlers,
CodeS3Location,
Tags,
region
)
SELECT
'{{ ApiId }}',
'{{ Name }}',
'{{ SubscribeAuthModes }}',
'{{ PublishAuthModes }}',
'{{ CodeHandlers }}',
'{{ CodeS3Location }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: channel_namespace
props:
- name: ApiId
value: '{{ ApiId }}'
- name: Name
value: '{{ Name }}'
- name: SubscribeAuthModes
value:
- AuthType: '{{ AuthType }}'
- name: PublishAuthModes
value: null
- name: CodeHandlers
value: '{{ CodeHandlers }}'
- name: CodeS3Location
value: '{{ CodeS3Location }}'
- name: Tags
value:
- Value: '{{ Value }}'
Key: '{{ Key }}'
DELETE
example
/*+ delete */
DELETE FROM aws.appsync.channel_namespaces
WHERE data__Identifier = '<ChannelNamespaceArn>'
AND region = 'us-east-1';
Permissions
To operate on the channel_namespaces
resource, the following permissions are required:
Create
appsync:CreateChannelNamespace,
appsync:TagResource,
appsync:GetChannelNamespace,
s3:GetObject
Read
appsync:GetChannelNamespace,
appsync:ListTagsForResource
Update
appsync:UpdateChannelNamespace,
appsync:TagResource,
appsync:UntagResource,
appsync:GetChannelNamespace,
s3:GetObject
Delete
appsync:DeleteChannelNamespace,
appsync:UntagResource
List
appsync:ListChannelNamespaces