Skip to content

Bedrock Agentcore Control  >  Operations  >  create_gateway_rate_limit

create_gateway_rate_limit

Operation

create_gateway_rate_limit async

create_gateway_rate_limit(input: CreateGatewayRateLimitInput, plugins: list[Plugin] | None = None) -> CreateGatewayRateLimitOutput

Creates a rate limit for a gateway. Rate limits define throttling rules for each dimension that control request rates, token consumption rates, and concurrent connections through the gateway.

Parameters:

Name Type Description Default
input CreateGatewayRateLimitInput

An instance of CreateGatewayRateLimitInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
CreateGatewayRateLimitOutput

An instance of CreateGatewayRateLimitOutput.

Input

CreateGatewayRateLimitInput dataclass

Dataclass for CreateGatewayRateLimitInput structure.

Attributes

client_token class-attribute instance-attribute
client_token: str | None = None

A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see Ensuring idempotency.

description class-attribute instance-attribute
description: str | None = None

Optional human-readable description for this limit.

dimension_keys class-attribute instance-attribute
dimension_keys: list[str] | None = None

Ordered list of dimension names defining the scope of this limit. Unique per gateway --- no two limits can share the same dimensionKeys.

entries class-attribute instance-attribute
entries: list[LimitEntry] | None = None

Rule entries mapping dimension values to rate configurations.

gateway_identifier class-attribute instance-attribute
gateway_identifier: str | None = None

The unique identifier of the gateway to create the rate limit for.

rate_limit_id class-attribute instance-attribute
rate_limit_id: str | None = None

Optional customer-defined limit ID. If not provided, system generates one.

Output

CreateGatewayRateLimitOutput dataclass

Shared fields for GatewayRateLimit responses

Attributes

created_at instance-attribute
created_at: datetime

The timestamp when the rate limit was created.

description class-attribute instance-attribute
description: str | None = None

Optional human-readable description for this limit.

dimension_keys instance-attribute
dimension_keys: list[str]

Ordered list of dimension key names defining the scope of a limit

entries instance-attribute
entries: list[LimitEntry]

List of rule entries within a limit

gateway_identifier instance-attribute
gateway_identifier: str

The unique identifier of the gateway.

rate_limit_id instance-attribute
rate_limit_id: str

Limit identifier. Optional on Create (system-generates if not provided by customer). Always present in responses.

status instance-attribute

Status of a gateway limit

updated_at instance-attribute
updated_at: datetime

The timestamp when the rate limit was last updated.