Skip to main content

channel_namespaces

Creates, updates, deletes or gets a channel_namespace resource or lists channel_namespaces in a region

Overview

Namechannel_namespaces
TypeResource
DescriptionResource schema for AppSync ChannelNamespace
Idawscc.appsync.channel_namespaces

Fields

NameDatatypeDescription
api_idstringAppSync Api Id that this Channel Namespace belongs to.
namestringNamespace indentifier.
subscribe_auth_modesarrayList of AuthModes supported for Subscribe operations.
code_handlersstringString of APPSYNC_JS code to be used by the handlers.
code_s3_locationstringThe Amazon S3 endpoint where the code is located.
channel_namespace_arnstringThe Amazon Resource Name (ARN) for the Channel Namespace.
tagsarrayAn arbitrary set of tags (key-value pairs) for this Domain Name.
handler_configsobject
regionstringAWS region.

For more information, see AWS::AppSync::ChannelNamespace.

Methods

NameResourceAccessible byRequired Params
create_resourcechannel_namespacesINSERTApiId, Name, region
delete_resourcechannel_namespacesDELETEIdentifier, region
update_resourcechannel_namespacesUPDATEIdentifier, PatchDocument, region
list_resourceschannel_namespaces_list_onlySELECTregion
get_resourcechannel_namespacesSELECTIdentifier, region

SELECT examples

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 = '{{ region }}' AND
Identifier = '{{ channel_namespace_arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new channel_namespace resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.appsync.channel_namespaces (
ApiId,
Name,
region
)
SELECT
'{{ api_id }}',
'{{ name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.appsync.channel_namespaces
WHERE
Identifier = '{{ channel_namespace_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the channel_namespaces resource, the following permissions are required:

appsync:CreateChannelNamespace,
appsync:TagResource,
appsync:GetChannelNamespace,
s3:GetObject