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 | awscc.appsync.channel_namespaces |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
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 Domain Name. |
handler_configs | object | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
name | string | Namespace indentifier. |
channel_namespace_arn | string | The Amazon Resource Name (ARN) for the Channel Namespace. |
region | string | AWS region. |
For more information, see AWS::AppSync::ChannelNamespace.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | channel_namespaces | INSERT | ApiId, Name, region |
delete_resource | channel_namespaces | DELETE | Identifier, region |
update_resource | channel_namespaces | UPDATE | Identifier, PatchDocument, region |
list_resources | channel_namespaces_list_only | SELECT | region |
get_resource | channel_namespaces | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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,
handler_configs
FROM awscc.appsync.channel_namespaces
WHERE
region = 'us-east-1' AND
Identifier = '{{ channel_namespace_arn }}';
Lists all channel_namespaces in a region.
SELECT
region,
channel_namespace_arn
FROM awscc.appsync.channel_namespaces_list_only
WHERE
region = 'us-east-1';
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 awscc.appsync.channel_namespaces (
ApiId,
Name,
region
)
SELECT
'{{ api_id }}',
'{{ name }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.appsync.channel_namespaces (
ApiId,
Name,
SubscribeAuthModes,
PublishAuthModes,
CodeHandlers,
CodeS3Location,
Tags,
HandlerConfigs,
region
)
SELECT
'{{ api_id }}',
'{{ name }}',
'{{ subscribe_auth_modes }}',
'{{ publish_auth_modes }}',
'{{ code_handlers }}',
'{{ code_s3_location }}',
'{{ tags }}',
'{{ handler_configs }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: channel_namespace
props:
- name: api_id
value: '{{ api_id }}'
- name: name
value: '{{ name }}'
- name: subscribe_auth_modes
value:
- auth_type: '{{ auth_type }}'
- name: publish_auth_modes
value: null
- name: code_handlers
value: '{{ code_handlers }}'
- name: code_s3_location
value: '{{ code_s3_location }}'
- name: tags
value:
- value: '{{ value }}'
key: '{{ key }}'
- name: handler_configs
value:
on_publish:
behavior: '{{ behavior }}'
integration:
data_source_name: '{{ data_source_name }}'
lambda_config:
lambda_function_arn: '{{ lambda_function_arn }}'
on_subscribe: null
UPDATE example
Use the following StackQL query and manifest file to update a channel_namespace resource, using stack-deploy.
/*+ update */
UPDATE awscc.appsync.channel_namespaces
SET PatchDocument = string('{{ {
"SubscribeAuthModes": subscribe_auth_modes,
"PublishAuthModes": publish_auth_modes,
"CodeHandlers": code_handlers,
"CodeS3Location": code_s3_location,
"Tags": tags,
"HandlerConfigs": handler_configs
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ channel_namespace_arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.appsync.channel_namespaces
WHERE
Identifier = '{{ channel_namespace_arn }}' AND
region = 'us-east-1';
Permissions
To operate on the channel_namespaces resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
appsync:CreateChannelNamespace,
appsync:TagResource,
appsync:GetChannelNamespace,
s3:GetObject
appsync:GetChannelNamespace,
appsync:ListTagsForResource
appsync:UpdateChannelNamespace,
appsync:TagResource,
appsync:UntagResource,
appsync:GetChannelNamespace,
s3:GetObject
appsync:DeleteChannelNamespace,
appsync:UntagResource
appsync:ListChannelNamespaces