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 ​

authorizationConfigNamespaceAuthConfigauthorization_configNamespaceAuthConfigauthorizationConfigNamespaceAuthConfigAuthorizationConfigNamespaceAuthConfigAuthorizationConfigNamespaceAuthConfig= defaults to Event API default au…#
Authorization config for channel namespace.
default

Default: defaults to Event API default auth config

channelNamespaceNamestringchannel_namespace_namestrchannelNamespaceNameStringChannelNamespaceNamestringChannelNamespaceName*string= the construct's id will be used#
the name of the channel namespace.
codeCodecodeCodecodeCodeCodeCodeCodeCode= no code is used#
The Event Handler code.
publishHandlerConfigHandlerConfigpublish_handler_configHandlerConfigpublishHandlerConfigHandlerConfigPublishHandlerConfigHandlerConfigPublishHandlerConfigHandlerConfig= no handler config#
onPublish handler config.
subscribeHandlerConfigHandlerConfigsubscribe_handler_configHandlerConfigsubscribeHandlerConfigHandlerConfigSubscribeHandlerConfigHandlerConfigSubscribeHandlerConfigHandlerConfig= no handler config#
onSubscribe handler config.