# AddApiKeyOptions

Options to the UsagePlan.addApiKey() method.

- Source: [`aws-apigatewayv2/lib/websocket/usage-plan.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-apigatewayv2/lib/websocket/usage-plan.ts#L118)
- Type last changed: v2.212.0 · 20 Aug 2025

## Example

```ts
declare const usagePlan: apigwv2.UsagePlan;
declare const apiKey: apigwv2.ApiKey;

usagePlan.addApiKey(apiKey, {
 overrideLogicalId: 'MyCustomLogicalId',
});
```

## Properties

- `overrideLogicalId`: string — Override the CloudFormation logical id of the AWS::ApiGateway::UsagePlanKey resource.

  **Default:** autogenerated by the CDK
