aws-cdk-lib.aws_apigateway.RateLimitedApiKeyProps

interface RateLimitedApiKeyProps

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

RateLimitedApiKey properties.

Example

declare const api: apigateway.RestApi;

const key = new apigateway.RateLimitedApiKey(this, 'rate-limited-api-key', {
  customerId: 'hello-customer',
  stages: [api.deploymentStage],
  quota: {
    limit: 10000,
    period: apigateway.Period.MONTH
  }
});

Properties

NameTypeDescription
apiKeyName?stringA name for the API key.
apiStages?UsagePlanPerApiStage[]API Stages to be associated with the RateLimitedApiKey.
customerId?stringAn AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.
defaultCorsPreflightOptions?CorsOptionsAdds a CORS preflight OPTIONS method to this resource and all child resources.
defaultIntegration?IntegrationAn integration to use as a default for all methods created within this API unless an integration is specified.
defaultMethodOptions?MethodOptionsMethod options to use as a default for all methods created within this API unless custom options are specified.
description?stringA description of the purpose of the API key.
enabled?booleanIndicates whether the API key can be used by clients.
generateDistinctId?booleanSpecifies whether the key identifier is distinct from the created API key value.
quota?QuotaSettingsNumber of requests clients can make in a given time period.
resources?⚠️IRestApi[]A list of resources this api key is associated with.
stages?IStage[]A list of Stages this api key is associated with.
throttle?ThrottleSettingsOverall throttle settings for the API.
value?stringThe value of the API key.

apiKeyName?

Type: string (optional, default: automically 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.


apiStages?

Type: UsagePlanPerApiStage[] (optional, default: none)

API Stages to be associated with the RateLimitedApiKey.


customerId?

Type: string (optional, default: none)

An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.


defaultCorsPreflightOptions?

Type: CorsOptions (optional, default: CORS is disabled)

Adds a CORS preflight OPTIONS method to this resource and all child resources.

You can add CORS at the resource-level using addCorsPreflight.


defaultIntegration?

Type: Integration (optional, default: Inherited from parent.)

An integration to use as a default for all methods created within this API unless an integration is specified.


defaultMethodOptions?

Type: MethodOptions (optional, default: Inherited from parent.)

Method options to use as a default for all methods created within this API unless custom options are specified.


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.


quota?

Type: QuotaSettings (optional, default: none)

Number of requests clients can make in a given time period.


resources?⚠️

⚠️ Deprecated: - use stages instead

Type: IRestApi[] (optional, default: none)

A list of resources this api key is associated with.


stages?

Type: IStage[] (optional, default: the api key is not associated with any stages)

A list of Stages this api key is associated with.


throttle?

Type: ThrottleSettings (optional, default: none)

Overall throttle settings for the API.


value?

Type: string (optional, default: none)

The value of the API key.

Must be at least 20 characters long.