Skip to content
v2.274.0

RateLimitedApiKeyProps Struct ​

RateLimitedApiKey properties.

Example ​

ts
declare const api: apigwv2.WebSocketApi;
declare const stage: apigwv2.WebSocketStage;

const key = new apigwv2.RateLimitedApiKey(this, 'rate-limited-api-key', {
  customerId: 'test-customer',
  apiStages: [{
    api: api,
    stage: stage
  }],
  quota: {
    limit: 10000,
    period: apigwv2.Period.MONTH
  },
  throttle: {
    rateLimit: 100,
    burstLimit: 200
  }
});

Properties ​

apiKeyNamestringapi_key_namestrapiKeyNameStringApiKeyNamestringApiKeyName*string= 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.

apiStagesUsagePlanPerApiStage[]api_stagestyping.List[UsagePlanPerApiStage]apiStagesList<UsagePlanPerApiStage>ApiStagesUsagePlanPerApiStage[]ApiStages*[]UsagePlanPerApiStage= none#
API Stages to be associated with the RateLimitedApiKey.
customerIdstringcustomer_idstrcustomerIdStringCustomerIdstringCustomerId*string= none#
An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.
descriptionstringdescriptionstrdescriptionStringDescriptionstringDescription*string= none#
A description of the purpose of the API key.
enabledbooleanenabledboolenabledBooleanEnabledboolEnabled*bool= true#
Indicates whether the API key can be used by clients.
generateDistinctIdbooleangenerate_distinct_idboolgenerateDistinctIdBooleanGenerateDistinctIdboolGenerateDistinctId*bool= false#
Specifies whether the key identifier is distinct from the created API key value.
Number of requests clients can make in a given time period.
Overall throttle settings for the API.
valuestringvaluestrvalueStringValuestringValue*string= none#
The value of the API key.

Must be at least 20 characters long.