AWS::ApiGateway::ApiKeyThe `AWS::ApiGateway::ApiKey` resource creates a unique key that you can distribute to clients who are executing API Gateway `Method` resources that require an API key. To specify which API key clients must use, map the API key with the `RestApi` and `Stage` resources that include the methods that require a key.
import { CfnApiKey } from 'aws-cdk-lib/aws-apigateway';Or use the module namespace:
import * as apigateway from 'aws-cdk-lib/aws-apigateway';
// apigateway.CfnApiKeyConfiguration passed to the constructor as CfnApiKeyProps.
customerIdOptionalstringAn AWS Marketplace customer identifier, when integrating with the AWS SaaS Marketplace.
descriptionOptionalstringThe description of the ApiKey.
enabledOptionalboolean | IResolvableSpecifies whether the ApiKey can be used by callers.
Default: - false
generateDistinctIdOptionalboolean | IResolvableSpecifies whether ( `true` ) or not ( `false` ) the key identifier is distinct from the created API key value. This parameter is deprecated and should not be used.
nameOptionalstringA name for the API key. If you don't specify a name, CloudFormation generates a unique physical ID and uses that ID for the API key name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html) . > If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
stageKeysOptionalIResolvable | IResolvable | StageKeyProperty[]DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
tagsOptionalCfnTag[]The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with `aws:` . The tag value can be up to 256 characters.
valueOptionalstringSpecifies a value of the API key.
This L1 construct maps directly to the following CloudFormation resource type.
Everything you need to know about Amazon API Gateway on one page. HD quality, print-friendly.
Download Free Infographicaws-apigatewayAWS::ApiGateway::ApiKey