UsagePlanPerApiStage

class aws_cdk.aws_apigateway.UsagePlanPerApiStage(*, api=None, stage=None, throttle=None)

Bases: object

Represents the API stages that a usage plan applies to.

Parameters:
  • api (Optional[IRestApi]) – Default: none

  • stage (Optional[Stage]) – [disable-awslint:ref-via-interface]. Default: none

  • throttle (Optional[Sequence[Union[ThrottlingPerMethod, Dict[str, Any]]]]) – Default: none

ExampleMetadata:

infused

Example:

# plan: apigateway.UsagePlan
# api: apigateway.RestApi
# echo_method: apigateway.Method


plan.add_api_stage(
    stage=api.deployment_stage,
    throttle=[apigateway.ThrottlingPerMethod(
        method=echo_method,
        throttle=apigateway.ThrottleSettings(
            rate_limit=10,
            burst_limit=2
        )
    )
    ]
)

Attributes

api

none

Type:

default

stage

ref-via-interface].

Default:

none

Type:

[disable-awslint

throttle

none

Type:

default