Skip to content
v2.274.0

BaseChannelNamespaceProps Struct ​

the base properties for a channel namespace.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appsync as appsync } from 'aws-cdk-lib';

declare const appSyncBackedDataSource: appsync.AppSyncBackedDataSource;
declare const code: appsync.Code;
const baseChannelNamespaceProps: appsync.BaseChannelNamespaceProps = {
  authorizationConfig: {
    publishAuthModeTypes: [appsync.AppSyncAuthorizationType.API_KEY],
    subscribeAuthModeTypes: [appsync.AppSyncAuthorizationType.API_KEY],
  },
  channelNamespaceName: 'channelNamespaceName',
  code: code,
  publishHandlerConfig: {
    dataSource: appSyncBackedDataSource,
    direct: false,
    lambdaInvokeType: appsync.LambdaInvokeType.EVENT,
  },
  subscribeHandlerConfig: {
    dataSource: appSyncBackedDataSource,
    direct: false,
    lambdaInvokeType: appsync.LambdaInvokeType.EVENT,
  },
};

Properties ​

authorizationConfigoptionalNamespaceAuthConfigauthorization_configoptionalNamespaceAuthConfigauthorizationConfigoptionalNamespaceAuthConfigAuthorizationConfigoptionalNamespaceAuthConfigAuthorizationConfigoptionalNamespaceAuthConfig#
Authorization config for channel namespace.

Default: defaults to Event API default auth config

channelNamespaceNameoptionalstringchannel_namespace_nameoptionalstrchannelNamespaceNameoptionalStringChannelNamespaceNameoptionalstringChannelNamespaceNameoptional*string#
the name of the channel namespace.

Default: the construct's id will be used

codeoptionalCodecodeoptionalCodecodeoptionalCodeCodeoptionalCodeCodeoptionalCode#
The Event Handler code.

Default: no code is used

publishHandlerConfigoptionalHandlerConfigpublish_handler_configoptionalHandlerConfigpublishHandlerConfigoptionalHandlerConfigPublishHandlerConfigoptionalHandlerConfigPublishHandlerConfigoptionalHandlerConfig#
onPublish handler config.

Default: no handler config

subscribeHandlerConfigoptionalHandlerConfigsubscribe_handler_configoptionalHandlerConfigsubscribeHandlerConfigoptionalHandlerConfigSubscribeHandlerConfigoptionalHandlerConfigSubscribeHandlerConfigoptionalHandlerConfig#
onSubscribe handler config.

Default: no handler config