BedrockAgentCoreControl / Client / update_gateway_rate_limit

update_gateway_rate_limit

BedrockAgentCoreControl.Client.update_gateway_rate_limit(**kwargs)

Updates the entries of a gateway rate limit. The dimension keys are immutable after creation.

See also: AWS API Documentation

Request Syntax

response = client.update_gateway_rate_limit(
    gatewayIdentifier='string',
    rateLimitId='string',
    description='string',
    entries=[
        {
            'dimensions': {
                'string': 'string'
            },
            'requests': [
                {
                    'rate': 123.0,
                    'period': 'second'|'minute'
                },
            ],
            'tokens': [
                {
                    'rate': 123.0,
                    'period': 'second'|'minute'
                },
            ],
            'connections': [
                {
                    'rate': 123.0,
                    'period': 'second'|'minute'
                },
            ]
        },
    ]
)
Parameters:
  • gatewayIdentifier (string) –

    [REQUIRED]

    The unique identifier of the gateway.

  • rateLimitId (string) –

    [REQUIRED]

    The unique identifier of the rate limit to update.

  • description (string) – Optional human-readable description for this limit.

  • entries (list) –

    [REQUIRED]

    Updated rule entries. key and dimensionKeys are immutable and cannot be changed.

    • (dict) –

      A single rule entry within a limit, mapping dimension values to rate configurations

      • dimensions (dict) – [REQUIRED]

        Map of dimension name to dimension value, matching the parent limit’s dimensionKeys. Keys must exactly match the dimensionKeys. Values may be “” as a wildcard. “” may only appear at trailing positions (based on dimensionKeys ordering).

        • (string) –

          A dimension key specifying the scope dimension for rate limiting. Allowed values: “targetName”, “toolName”, “qualifiedModelId”, or context-path expressions: “$.context.iam.principal”, “$.context.iam.sourceIdentity”, “$.context.jwt.” where is a JWT claim name (e.g., “$.context.jwt.sub”). Validated server-side to enforce allowed prefixes and patterns.

          • (string) –

            A dimension value in a rule entry (exact value or “*” wildcard)

      • requests (list) –

        Request rate limits (RPS or RPM). Limited to 1 entry for now.

        • (dict) –

          Rate configuration for a metric (requests or tokens)

          • rate (float) – [REQUIRED]

            The rate value for the limit. For request limits, this is the number of requests allowed per period. For token limits, this is the number of tokens allowed per period. For connection limits, this is the number of concurrent connections allowed.

          • period (string) – [REQUIRED]

            Time period for rate limiting

      • tokens (list) –

        Token rate limits (TPM). Limited to 1 entry for now. — P1

        • (dict) –

          Rate configuration for a metric (requests or tokens)

          • rate (float) – [REQUIRED]

            The rate value for the limit. For request limits, this is the number of requests allowed per period. For token limits, this is the number of tokens allowed per period. For connection limits, this is the number of concurrent connections allowed.

          • period (string) – [REQUIRED]

            Time period for rate limiting

      • connections (list) –

        Connection rate limits (per second only). Limited to 1 entry for now. — P2

        • (dict) –

          Rate configuration for a metric (requests or tokens)

          • rate (float) – [REQUIRED]

            The rate value for the limit. For request limits, this is the number of requests allowed per period. For token limits, this is the number of tokens allowed per period. For connection limits, this is the number of concurrent connections allowed.

          • period (string) – [REQUIRED]

            Time period for rate limiting

Return type:

dict

Returns:

Response Syntax

{
    'rateLimitId': 'string',
    'gatewayIdentifier': 'string',
    'description': 'string',
    'dimensionKeys': [
        'string',
    ],
    'entries': [
        {
            'dimensions': {
                'string': 'string'
            },
            'requests': [
                {
                    'rate': 123.0,
                    'period': 'second'|'minute'
                },
            ],
            'tokens': [
                {
                    'rate': 123.0,
                    'period': 'second'|'minute'
                },
            ],
            'connections': [
                {
                    'rate': 123.0,
                    'period': 'second'|'minute'
                },
            ]
        },
    ],
    'status': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING',
    'createdAt': datetime(2015, 1, 1),
    'updatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) –

    Shared fields for GatewayRateLimit responses

    • rateLimitId (string) –

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

    • gatewayIdentifier (string) –

      The unique identifier of the gateway.

    • description (string) –

      Optional human-readable description for this limit.

    • dimensionKeys (list) –

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

      • (string) –

        A dimension key specifying the scope dimension for rate limiting. Allowed values: “targetName”, “toolName”, “qualifiedModelId”, or context-path expressions: “$.context.iam.principal”, “$.context.iam.sourceIdentity”, “$.context.jwt.” where is a JWT claim name (e.g., “$.context.jwt.sub”). Validated server-side to enforce allowed prefixes and patterns.

    • entries (list) –

      List of rule entries within a limit

      • (dict) –

        A single rule entry within a limit, mapping dimension values to rate configurations

        • dimensions (dict) –

          Map of dimension name to dimension value, matching the parent limit’s dimensionKeys. Keys must exactly match the dimensionKeys. Values may be “” as a wildcard. “” may only appear at trailing positions (based on dimensionKeys ordering).

          • (string) –

            A dimension key specifying the scope dimension for rate limiting. Allowed values: “targetName”, “toolName”, “qualifiedModelId”, or context-path expressions: “$.context.iam.principal”, “$.context.iam.sourceIdentity”, “$.context.jwt.” where is a JWT claim name (e.g., “$.context.jwt.sub”). Validated server-side to enforce allowed prefixes and patterns.

            • (string) –

              A dimension value in a rule entry (exact value or “*” wildcard)

        • requests (list) –

          Request rate limits (RPS or RPM). Limited to 1 entry for now.

          • (dict) –

            Rate configuration for a metric (requests or tokens)

            • rate (float) –

              The rate value for the limit. For request limits, this is the number of requests allowed per period. For token limits, this is the number of tokens allowed per period. For connection limits, this is the number of concurrent connections allowed.

            • period (string) –

              Time period for rate limiting

        • tokens (list) –

          Token rate limits (TPM). Limited to 1 entry for now. — P1

          • (dict) –

            Rate configuration for a metric (requests or tokens)

            • rate (float) –

              The rate value for the limit. For request limits, this is the number of requests allowed per period. For token limits, this is the number of tokens allowed per period. For connection limits, this is the number of concurrent connections allowed.

            • period (string) –

              Time period for rate limiting

        • connections (list) –

          Connection rate limits (per second only). Limited to 1 entry for now. — P2

          • (dict) –

            Rate configuration for a metric (requests or tokens)

            • rate (float) –

              The rate value for the limit. For request limits, this is the number of requests allowed per period. For token limits, this is the number of tokens allowed per period. For connection limits, this is the number of concurrent connections allowed.

            • period (string) –

              Time period for rate limiting

    • status (string) –

      Status of a gateway limit

    • createdAt (datetime) –

      The timestamp when the rate limit was created.

    • updatedAt (datetime) –

      The timestamp when the rate limit was last updated.

Exceptions

  • BedrockAgentCoreControl.Client.exceptions.ConflictException

  • BedrockAgentCoreControl.Client.exceptions.ValidationException

  • BedrockAgentCoreControl.Client.exceptions.AccessDeniedException

  • BedrockAgentCoreControl.Client.exceptions.ResourceNotFoundException

  • BedrockAgentCoreControl.Client.exceptions.ThrottlingException

  • BedrockAgentCoreControl.Client.exceptions.InternalServerException