# CfnChannelNamespaceProps

Properties for defining a `CfnChannelNamespace`.

Extends: CfnChannelNamespaceProps
Used as props by: CfnChannelNamespace

- Source: Generated code
- Type last changed: v2.193.0 · 30 Apr 2025

## 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

- `apiId`: string (required) — The `Api` ID.

- `codeHandlers`: string — The event handler functions that run custom business logic to process published events and subscribe requests.

- `codeS3Location`: string — The Amazon S3 endpoint where the code is located.

- `handlerConfigs`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnChannelNamespace.HandlerConfigsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.CfnChannelNamespace.HandlerConfigsProperty.html) — The configuration for the `OnPublish` and `OnSubscribe` handlers.

- `name`: string (required) — The name of the channel namespace.

  This name must be unique within the `Api` .

- `publishAuthModes`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnChannelNamespace.AuthModeProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.CfnChannelNamespace.AuthModeProperty.html)[] — The authorization mode to use for publishing messages on the channel namespace.

  This configuration overrides the default `Api` authorization configuration.

- `subscribeAuthModes`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnChannelNamespace.AuthModeProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.CfnChannelNamespace.AuthModeProperty.html)[] — The authorization mode to use for subscribing to messages on the channel namespace.

  This configuration overrides the default `Api` authorization configuration.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — A set of tags (key-value pairs) for this channel namespace.
