---
title: "GET /gateways/{gatewayIdentifier}/rules"
method: GET
path: "/gateways/{gatewayIdentifier}/rules"
---

# GET /gateways/{gatewayIdentifier}/rules

`GET /gateways/{gatewayIdentifier}/rules`

Lists all rules for a gateway.

## Path parameters

- `gatewayIdentifier` string, required

## Query parameters

- `maxResults` integer
- `nextToken` string

## Response `200`

Success

- ListGatewayRulesResponse
  - `gatewayRules` GatewayRuleDetail[], required — The list of gateway rules.
    - `ruleId` string, required — The unique identifier of the gateway rule.
    - `gatewayArn` string, required — The Amazon Resource Name (ARN) of the gateway that the rule belongs to.
    - `priority` integer, required — The priority of the rule. Rules are evaluated in order of priority, with lower numbers evaluated first.
    - `conditions` Condition[] — The conditions that must be met for the rule to apply.
      - `matchPrincipals` object — A condition that matches on the identity of the caller making the request.
        - `anyOf` MatchPrincipalEntry[], required — A list of principal entries. The condition is met if any of the entries match the caller's identity.
          - `iamPrincipal` object — An IAM principal to match against, specified by ARN.
            - `arn` string, required — The Amazon Resource Name (ARN) of the IAM principal. Supports user, role, and assumed-role ARNs. Wildcards can be used with the <code>StringLike</code> operator.
            - `operator` 'StringEquals' | 'StringLike' — The match operator. <code>StringEquals</code> requires an exact match. <code>StringLike</code> supports wildcard patterns using <code>*</code> and <code>?</code>.
      - `matchPaths` object — A condition that matches on the request path.
        - `anyOf` MatchPathPattern[], required — A list of path patterns. The condition is met if the request path matches any of the patterns.
    - `actions` Action[], required — The actions to take when the rule conditions are met.
      - `configurationBundle` object — An action that applies a configuration bundle override to the request.
        - `staticOverride` object — A static configuration bundle override that applies a single bundle version to all matching requests.
          - `bundleArn` string, required — The Amazon Resource Name (ARN) of the configuration bundle to apply.
          - `bundleVersion` string, required — The version of the configuration bundle to apply.
        - `weightedOverride` object — A weighted configuration bundle override that splits traffic between multiple bundle versions based on configured weights.
          - `trafficSplit` TrafficSplitEntry[], required — The traffic split entries defining how traffic is distributed between configuration bundle versions.
            - `name` string, required — The name of this traffic split variant.
            - `weight` integer, required — The percentage of traffic to route to this variant. Weights across all entries must sum to 100.
            - `configurationBundle` object, required — The configuration bundle reference for this variant.
              - …
            - `description` string — The description of this traffic split variant.
            - `metadata` object — Key-value metadata associated with this traffic split variant.
      - `routeToTarget` object — An action that routes the request to a specific target.
        - `staticRoute` object — A static route that sends all matching requests to a single target.
          - `targetName` string, password, required — The name of the target to route requests to.
        - `weightedRoute` object — A weighted route that splits traffic between multiple targets.
          - `trafficSplit` TargetTrafficSplitEntry[], required — The traffic split entries defining how traffic is distributed between targets.
            - `name` string, required — The name of this traffic split variant.
            - `weight` integer, required — The percentage of traffic to route to this variant.
            - `targetName` string, password, required — The name of the target to route traffic to.
            - `description` string — The description of this traffic split variant.
            - `metadata` object — Key-value metadata associated with this traffic split variant.
    - `description` string — The description of the gateway rule.
    - `createdAt` string, date-time, required — The timestamp when the rule was created.
    - `status` 'CREATING' | 'ACTIVE' | 'UPDATING' | 'DELETING', required — The current status of the rule.
    - `system` object — System-managed metadata for rules created by automated processes.
      - `managedBy` string, required — The identifier of the system or process that manages this rule.
    - `updatedAt` string, date-time — The timestamp when the rule was last updated.
  - `nextToken` string — The pagination token to use in a subsequent request.

## Other responses

- `480` — ValidationException
- `481` — AccessDeniedException
- `482` — ResourceNotFoundException
- `483` — ThrottlingException
- `484` — InternalServerException

---

[API](https://skmtc.net/aws/apis/bedrock-agentcore-control.md) · [All operations](https://skmtc.net/aws/apis/bedrock-agentcore-control/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/bedrock-agentcore-control/versions/0ebde766792b/schema)
