UsagePlanProps

class aws_cdk.aws_apigatewayv2.UsagePlanProps(*, api_stages=None, description=None, quota=None, throttle=None, usage_plan_name=None)

Bases: object

Properties for defining an API Gateway Usage Plan for WebSocket APIs.

Parameters:
  • api_stages (Optional[Sequence[Union[UsagePlanPerApiStage, Dict[str, Any]]]]) – API Stages to be associated with the usage plan. Default: none

  • description (Optional[str]) – Represents usage plan purpose. Default: none

  • quota (Union[QuotaSettings, Dict[str, Any], None]) – Number of requests clients can make in a given time period. Default: none

  • throttle (Union[ThrottleSettings, Dict[str, Any], None]) – Overall throttle settings for the API. Default: none

  • usage_plan_name (Optional[str]) – Name for this usage plan. Default: none

ExampleMetadata:

infused

Example:

api = apigwv2.WebSocketApi(self, "my-api")
stage = apigwv2.WebSocketStage(self, "my-stage",
    web_socket_api=api,
    stage_name="dev"
)

usage_plan = apigwv2.UsagePlan(self, "my-usage-plan",
    usage_plan_name="Basic"
)

usage_plan.add_api_stage(
    api=api,
    stage=stage
)

Attributes

api_stages

API Stages to be associated with the usage plan.

Default:

none

description

Represents usage plan purpose.

Default:

none

quota

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

Default:

none

throttle

Overall throttle settings for the API.

Default:

none

usage_plan_name

Name for this usage plan.

Default:

none