aws-cdk-lib.aws_apigateway.CfnApiKeyProps

interface CfnApiKeyProps

LanguageType name
.NETAmazon.CDK.AWS.APIGateway.CfnApiKeyProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsapigateway#CfnApiKeyProps
Javasoftware.amazon.awscdk.services.apigateway.CfnApiKeyProps
Pythonaws_cdk.aws_apigateway.CfnApiKeyProps
TypeScript aws-cdk-lib » aws_apigateway » CfnApiKeyProps

Properties for defining a CfnApiKey.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_apigateway as apigateway } from 'aws-cdk-lib';
const cfnApiKeyProps: apigateway.CfnApiKeyProps = {
  customerId: 'customerId',
  description: 'description',
  enabled: false,
  generateDistinctId: false,
  name: 'name',
  stageKeys: [{
    restApiId: 'restApiId',
    stageName: 'stageName',
  }],
  tags: [{
    key: 'key',
    value: 'value',
  }],
  value: 'value',
};

Properties

NameTypeDescription
customerId?stringAn AWS Marketplace customer identifier, when integrating with the AWS SaaS Marketplace.
description?stringThe description of the ApiKey.
enabled?boolean | IResolvableSpecifies whether the ApiKey can be used by callers.
generateDistinctId?boolean | IResolvableSpecifies whether ( true ) or not ( false ) the key identifier is distinct from the created API key value.
name?stringA name for the API key.
stageKeys?IResolvable | IResolvable | StageKeyProperty[]DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
tags?CfnTag[]The key-value map of strings.
value?stringSpecifies a value of the API key.

customerId?

Type: string (optional)

An AWS Marketplace customer identifier, when integrating with the AWS SaaS Marketplace.


description?

Type: string (optional)

The description of the ApiKey.


enabled?

Type: boolean | IResolvable (optional)

Specifies whether the ApiKey can be used by callers.


generateDistinctId?

Type: boolean | IResolvable (optional)

Specifies 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.


name?

Type: string (optional)

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. For more information, see Name Type .

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.


stageKeys?

Type: IResolvable | IResolvable | StageKeyProperty[] (optional)

DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.


tags?

Type: CfnTag[] (optional)

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.


value?

Type: string (optional)

Specifies a value of the API key.