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
apiKeyNameoptionalstringapi_key_nameoptionalstrapiKeyNameoptionalStringApiKeyNameoptionalstringApiKeyNameoptional*string#A name for the API key.
Default: automatically generated name
If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name.
apiStagesoptionalUsagePlanPerApiStage[]api_stagesoptionaltyping.List[UsagePlanPerApiStage]apiStagesoptionalList<UsagePlanPerApiStage>ApiStagesoptionalUsagePlanPerApiStage[]ApiStagesoptional*[]UsagePlanPerApiStage= none#API Stages to be associated with the RateLimitedApiKey.
customerIdoptionalstringcustomer_idoptionalstrcustomerIdoptionalStringCustomerIdoptionalstringCustomerIdoptional*string= none#An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string= none#A description of the purpose of the API key.
enabledoptionalbooleanenabledoptionalboolenabledoptionalBooleanEnabledoptionalboolEnabledoptional*bool= true#Indicates whether the API key can be used by clients.
generateDistinctIdoptionalbooleangenerate_distinct_idoptionalboolgenerateDistinctIdoptionalBooleanGenerateDistinctIdoptionalboolGenerateDistinctIdoptional*bool= false#Specifies whether the key identifier is distinct from the created API key value.
quotaoptionalQuotaSettingsquotaoptionalQuotaSettingsquotaoptionalQuotaSettingsQuotaoptionalQuotaSettingsQuotaoptionalQuotaSettings= none#Number of requests clients can make in a given time period.
throttleoptionalThrottleSettingsthrottleoptionalThrottleSettingsthrottleoptionalThrottleSettingsThrottleoptionalThrottleSettingsThrottleoptionalThrottleSettings= none#Overall throttle settings for the API.
valueoptionalstringvalueoptionalstrvalueoptionalStringValueoptionalstringValueoptional*string= none#The value of the API key.
Must be at least 20 characters long.