interface ApiKeyProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Apigatewayv2.ApiKeyProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsapigatewayv2#ApiKeyProps |
Java | software.amazon.awscdk.services.apigatewayv2.ApiKeyProps |
Python | aws_cdk.aws_apigatewayv2.ApiKeyProps |
TypeScript (source) | aws-cdk-lib » aws_apigatewayv2 » ApiKeyProps |
ApiKey Properties.
Example
// Auto-generated name and value
const autoKey = new apigwv2.ApiKey(this, 'AutoKey');
// Explicit name and value
const explicitKey = new apigwv2.ApiKey(this, 'ExplicitKey', {
apiKeyName: 'MyWebSocketApiKey',
value: 'MyApiKeyThatIsAtLeast20Characters',
});
Properties
| Name | Type | Description |
|---|---|---|
| api | string | A name for the API key. |
| customer | string | An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace. |
| description? | string | A description of the purpose of the API key. |
| enabled? | boolean | Indicates whether the API key can be used by clients. |
| generate | boolean | Specifies whether the key identifier is distinct from the created API key value. |
| value? | string | The value of the API key. |
apiKeyName?
Type:
string
(optional, default: automatically generated name)
A name for the API key.
If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name.
customerId?
Type:
string
(optional, default: none)
An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.
description?
Type:
string
(optional, default: none)
A description of the purpose of the API key.
enabled?
Type:
boolean
(optional, default: true)
Indicates whether the API key can be used by clients.
generateDistinctId?
Type:
boolean
(optional, default: false)
Specifies whether the key identifier is distinct from the created API key value.
value?
Type:
string
(optional, default: none)
The value of the API key.
Must be at least 20 characters long.

.NET
Go
Java
Python
TypeScript (