# NamespaceAuthConfig

Authorization configuration for the Channel Namespace.

- Source: [`aws-appsync/lib/channel-namespace.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-appsync/lib/channel-namespace.ts#L35)
- Type last changed: v2.178.0 · 6 Feb 2025

## Example

```ts
declare const api: appsync.EventApi;

new appsync.ChannelNamespace(this, 'Namespace', {
  api,
  authorizationConfig: {
    // Override publishing authorization to API Key
    publishAuthModeTypes: [appsync.AppSyncAuthorizationType.API_KEY],
    // Override subscribing authorization to Lambda
    subscribeAuthModeTypes: [appsync.AppSyncAuthorizationType.LAMBDA],
  },
});
```

## Properties

- `publishAuthModeTypes`: [AppSyncAuthorizationType](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.AppSyncAuthorizationType.html)[] — The publish auth modes for this Event Api.

  **Default:** API Key authorization

- `subscribeAuthModeTypes`: [AppSyncAuthorizationType](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.AppSyncAuthorizationType.html)[] — The subscribe auth modes for this Event Api.

  **Default:** API Key authorization
