# BaseChannelNamespaceProps

the base properties for a channel namespace.

- Source: [`aws-appsync/lib/channel-namespace.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-appsync/lib/channel-namespace.ts#L92)
- 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';

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

- `authorizationConfig`: [NamespaceAuthConfig](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.NamespaceAuthConfig.html) — Authorization config for channel namespace.

  **Default:** defaults to Event API default auth config

- `channelNamespaceName`: string — the name of the channel namespace.

  **Default:** the construct's id will be used

- `code`: [Code](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.Code.html) — The Event Handler code.

  **Default:** no code is used

- `publishHandlerConfig`: [HandlerConfig](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.HandlerConfig.html) — onPublish handler config.

  **Default:** no handler config

- `subscribeHandlerConfig`: [HandlerConfig](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.HandlerConfig.html) — onSubscribe handler config.

  **Default:** no handler config
