Skip to content
v2.274.0

ApiKeyOptions Struct ​

The options for creating an API Key.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_apigatewayv2 as apigatewayv2 } from 'aws-cdk-lib';
const apiKeyOptions: apigatewayv2.ApiKeyOptions = {
  apiKeyName: 'apiKeyName',
  description: 'description',
  value: 'value',
};

Properties ​

apiKeyNameoptionalstringapi_key_nameoptionalstrapiKeyNameoptionalStringApiKeyNameoptionalstringApiKeyNameoptional*string#
A name for the API key.

Default: automatically generated name

If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name.

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string= none#
A description of the purpose of the API key.
valueoptionalstringvalueoptionalstrvalueoptionalStringValueoptionalstringValueoptional*string= none#
The value of the API key.

Must be at least 20 characters long.