Skip to content
v2.274.0

CfnChannelNamespaceProps Struct ​

Properties for defining a CfnChannelNamespace.

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';
const cfnChannelNamespaceProps: appsync.CfnChannelNamespaceProps = {
  apiId: 'apiId',
  name: 'name',

  // the properties below are optional
  codeHandlers: 'codeHandlers',
  codeS3Location: 'codeS3Location',
  handlerConfigs: {
    onPublish: {
      behavior: 'behavior',
      integration: {
        dataSourceName: 'dataSourceName',

        // the properties below are optional
        lambdaConfig: {
          invokeType: 'invokeType',
        },
      },
    },
    onSubscribe: {
      behavior: 'behavior',
      integration: {
        dataSourceName: 'dataSourceName',

        // the properties below are optional
        lambdaConfig: {
          invokeType: 'invokeType',
        },
      },
    },
  },
  publishAuthModes: [{
    authType: 'authType',
  }],
  subscribeAuthModes: [{
    authType: 'authType',
  }],
  tags: [{
    key: 'key',
    value: 'value',
  }],
};

Properties ​

apiIdstringapi_idstrapiIdStringApiIdstringApiId*stringrequired#
The `Api` ID.
codeHandlersstringcode_handlersstrcodeHandlersStringCodeHandlersstringCodeHandlers*string#
The event handler functions that run custom business logic to process published events and subscribe requests.
codeS3Locationstringcode_s3_locationstrcodeS3LocationStringCodeS3LocationstringCodeS3Location*string#
The Amazon S3 endpoint where the code is located.
handlerConfigsIResolvable | CfnChannelNamespace.HandlerConfigsPropertyhandler_configstyping.Union[IResolvable, HandlerConfigsProperty]handlerConfigsIResolvableHandlerConfigsIResolvableHandlerConfigsinterface{}#
The configuration for the `OnPublish` and `OnSubscribe` handlers.
namestringnamestrnameStringNamestringName*stringrequired#
The name of the channel namespace.

This name must be unique within the Api .

publishAuthModesIResolvable | IResolvable | CfnChannelNamespace.AuthModeProperty[]publish_auth_modestyping.Union[IResolvable, typing.List[typing.Union[IResolvable, AuthModeProperty]]]publishAuthModesIResolvablePublishAuthModesIResolvablePublishAuthModesinterface{}#
The authorization mode to use for publishing messages on the channel namespace.

This configuration overrides the default Api authorization configuration.

subscribeAuthModesIResolvable | IResolvable | CfnChannelNamespace.AuthModeProperty[]subscribe_auth_modestyping.Union[IResolvable, typing.List[typing.Union[IResolvable, AuthModeProperty]]]subscribeAuthModesIResolvableSubscribeAuthModesIResolvableSubscribeAuthModesinterface{}#
The authorization mode to use for subscribing to messages on the channel namespace.

This configuration overrides the default Api authorization configuration.

tagsCfnTag[]tagstyping.List[CfnTag]tagsList<CfnTag>TagsCfnTag[]Tags*[]CfnTag#
A set of tags (key-value pairs) for this channel namespace.

Used as props by ​