gateway_rules
Creates, updates, deletes, gets or lists a gateway_rules resource.
Overview
| Name | gateway_rules |
| Type | Resource |
| Id | aws.bedrock_agentcore_control.gateway_rules |
Fields
The following fields are returned by SELECT queries:
- get_gateway_rule
- list_gateway_rules
| Name | Datatype | Description |
|---|---|---|
actions | array | The actions to take when the rule conditions are met. |
conditions | array | The conditions that must be met for the rule to apply. |
created_at | string (date-time) | The timestamp when the rule was created. |
description | string | The description of the gateway rule. |
gateway_arn | string | The Amazon Resource Name (ARN) of the gateway that the rule belongs to. (pattern: <code>arn:aws(|-cn|-us-gov):bedrock-agentcore:[a-z0-9-]{1,20}:[0-9]{12}:gateway/([0-9a-z][-]?){1,48}-[a-z0-9]{10}</code>) |
priority | integer | The priority of the rule. Rules are evaluated in order of priority, with lower numbers evaluated first. |
rule_id | string | The unique identifier of the gateway rule. (pattern: <code>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}</code>) |
status | string | The current status of the rule. (CREATING, ACTIVE, UPDATING, DELETING) |
system | object | System-managed metadata for rules created by automated processes. |
updated_at | string (date-time) | The timestamp when the rule was last updated. |
| Name | Datatype | Description |
|---|---|---|
actions | array | The actions to take when the rule conditions are met. |
conditions | array | The conditions that must be met for the rule to apply. |
created_at | string (date-time) | The timestamp when the rule was created. |
description | string | The description of the gateway rule. |
gateway_arn | string | The Amazon Resource Name (ARN) of the gateway that the rule belongs to. (pattern: <code>arn:aws(|-cn|-us-gov):bedrock-agentcore:[a-z0-9-]{1,20}:[0-9]{12}:gateway/([0-9a-z][-]?){1,48}-[a-z0-9]{10}</code>) |
priority | integer | The priority of the rule. Rules are evaluated in order of priority, with lower numbers evaluated first. |
rule_id | string | The unique identifier of the gateway rule. (pattern: <code>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}</code>) |
status | string | The current status of the rule. (CREATING, ACTIVE, UPDATING, DELETING) |
system | object | System-managed metadata for rules created by automated processes. |
updated_at | string (date-time) | The timestamp when the rule was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_gateway_rule | select | gateway_identifier, rule_id, region | Retrieves detailed information about a specific gateway rule. | |
list_gateway_rules | select | gateway_identifier, region | maxResults, nextToken | Lists all rules for a gateway. |
create_gateway_rule | insert | gateway_identifier, region, priority, actions | Creates a rule for a gateway. Rules define conditions and actions that control how requests are routed and processed through the gateway, including principal-based access control and path-based routing. | |
update_gateway_rule | update | gateway_identifier, rule_id, region | Updates a gateway rule's priority, conditions, actions, or description. | |
delete_gateway_rule | delete | gateway_identifier, rule_id, region | Deletes a gateway rule. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
gateway_identifier | string | The identifier of the gateway containing the rule. |
region | string | AWS region (default: us-east-1) |
rule_id | string | The unique identifier of the rule to delete. |
maxResults | integer | The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the nextToken field when making another request to return the next batch of results. |
nextToken | string | The pagination token from a previous request. |
SELECT examples
- get_gateway_rule
- list_gateway_rules
Retrieves detailed information about a specific gateway rule.
SELECT
actions,
conditions,
created_at,
description,
gateway_arn,
priority,
rule_id,
status,
system,
updated_at
FROM aws.bedrock_agentcore_control.gateway_rules
WHERE gateway_identifier = '{{ gateway_identifier }}' -- required
AND rule_id = '{{ rule_id }}' -- required
AND region = '{{ region }}' -- required
;
Lists all rules for a gateway.
SELECT
actions,
conditions,
created_at,
description,
gateway_arn,
priority,
rule_id,
status,
system,
updated_at
FROM aws.bedrock_agentcore_control.gateway_rules
WHERE gateway_identifier = '{{ gateway_identifier }}' -- required
AND region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_gateway_rule
- Manifest
Creates a rule for a gateway. Rules define conditions and actions that control how requests are routed and processed through the gateway, including principal-based access control and path-based routing.
INSERT INTO aws.bedrock_agentcore_control.gateway_rules (
clientToken,
priority,
conditions,
actions,
description,
gateway_identifier,
region
)
SELECT
'{{ clientToken }}',
{{ priority }} /* required */,
'{{ conditions }}',
'{{ actions }}' /* required */,
'{{ description }}',
'{{ gateway_identifier }}',
'{{ region }}'
RETURNING
actions,
conditions,
created_at,
description,
gateway_arn,
priority,
rule_id,
status,
system
;
# Description fields are for documentation purposes
- name: gateway_rules
props:
- name: gateway_identifier
value: "{{ gateway_identifier }}"
description: Required parameter for the gateway_rules resource.
- name: region
value: "{{ region }}"
description: Required parameter for the gateway_rules resource.
- name: clientToken
value: "{{ clientToken }}"
- name: priority
value: {{ priority }}
- name: conditions
value:
- matchPrincipals:
anyOf_:
- iamPrincipal:
arn: "{{ arn }}"
operator: "{{ operator }}"
matchPaths:
anyOf_:
- "{{ anyOf_ }}"
- name: actions
value:
- configurationBundle:
staticOverride:
bundleArn: "{{ bundleArn }}"
bundleVersion: "{{ bundleVersion }}"
weightedOverride:
trafficSplit:
- name: "{{ name }}"
weight: {{ weight }}
configurationBundle:
bundleArn: "{{ bundleArn }}"
bundleVersion: "{{ bundleVersion }}"
description: "{{ description }}"
metadata: "{{ metadata }}"
routeToTarget:
staticRoute:
targetName: "{{ targetName }}"
weightedRoute:
trafficSplit:
- name: "{{ name }}"
weight: {{ weight }}
targetName: "{{ targetName }}"
description: "{{ description }}"
metadata: "{{ metadata }}"
- name: description
value: "{{ description }}"
UPDATE examples
- update_gateway_rule
Updates a gateway rule's priority, conditions, actions, or description.
UPDATE aws.bedrock_agentcore_control.gateway_rules
SET
priority = {{ priority }},
conditions = '{{ conditions }}',
actions = '{{ actions }}',
description = '{{ description }}'
WHERE
gateway_identifier = '{{ gateway_identifier }}' --required
AND rule_id = '{{ rule_id }}' --required
AND region = '{{ region }}' --required
RETURNING
actions,
conditions,
created_at,
description,
gateway_arn,
priority,
rule_id,
status,
system,
updated_at;
DELETE examples
- delete_gateway_rule
Deletes a gateway rule.
DELETE FROM aws.bedrock_agentcore_control.gateway_rules
WHERE gateway_identifier = '{{ gateway_identifier }}' --required
AND rule_id = '{{ rule_id }}' --required
AND region = '{{ region }}' --required
;