Skip to main content

gateway_rules

Creates, updates, deletes, gets or lists a gateway_rules resource.

Overview

Namegateway_rules
TypeResource
Idaws.bedrock_agentcore_control.gateway_rules

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
actionsarrayThe actions to take when the rule conditions are met.
conditionsarrayThe conditions that must be met for the rule to apply.
created_atstring (date-time)The timestamp when the rule was created.
descriptionstringThe description of the gateway rule.
gateway_arnstringThe 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>)
priorityintegerThe priority of the rule. Rules are evaluated in order of priority, with lower numbers evaluated first.
rule_idstringThe 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>)
statusstringThe current status of the rule. (CREATING, ACTIVE, UPDATING, DELETING)
systemobjectSystem-managed metadata for rules created by automated processes.
updated_atstring (date-time)The timestamp when the rule was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_gateway_ruleselectgateway_identifier, rule_id, regionRetrieves detailed information about a specific gateway rule.
list_gateway_rulesselectgateway_identifier, regionmaxResults, nextTokenLists all rules for a gateway.
create_gateway_ruleinsertgateway_identifier, region, priority, actionsCreates 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_ruleupdategateway_identifier, rule_id, regionUpdates a gateway rule's priority, conditions, actions, or description.
delete_gateway_ruledeletegateway_identifier, rule_id, regionDeletes 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.

NameDatatypeDescription
gateway_identifierstringThe identifier of the gateway containing the rule.
regionstringAWS region (default: us-east-1)
rule_idstringThe unique identifier of the rule to delete.
maxResultsintegerThe 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.
nextTokenstringThe pagination token from a previous request.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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
;