QuotaSettings

class aws_cdk.aws_apigatewayv2.QuotaSettings(*, limit=None, offset=None, period=None)

Bases: object

Specifies the maximum number of requests that clients can make to API Gateway APIs.

Parameters:
  • limit (Union[int, float, None]) – The maximum number of requests that users can make within the specified time period. Default: none

  • offset (Union[int, float, None]) – For the initial time period, the number of requests to subtract from the specified limit. Default: none

  • period (Optional[Period]) – The time period for which the maximum limit of requests applies. Default: none

ExampleMetadata:

infused

Example:

# api: apigwv2.WebSocketApi
# stage: apigwv2.WebSocketStage


key = apigwv2.RateLimitedApiKey(self, "rate-limited-api-key",
    customer_id="test-customer",
    api_stages=[apigwv2.UsagePlanPerApiStage(
        api=api,
        stage=stage
    )],
    quota=apigwv2.QuotaSettings(
        limit=10000,
        period=apigwv2.Period.MONTH
    ),
    throttle=apigwv2.ThrottleSettings(
        rate_limit=100,
        burst_limit=200
    )
)

Attributes

limit

The maximum number of requests that users can make within the specified time period.

Default:

none

offset

For the initial time period, the number of requests to subtract from the specified limit.

Default:

none

period

The time period for which the maximum limit of requests applies.

Default:

none