Skip to main content

routing_rules

Creates, updates, deletes or gets a routing_rule resource or lists routing_rules in a region

Overview

Namerouting_rules
TypeResource
DescriptionSchema for AWS::ApiGatewayV2::RoutingRule
Idawscc.apigatewayv2.routing_rules

Fields

NameDatatypeDescription
routing_rule_idstringRoutingRule Id generated by service
routing_rule_arnstringAmazon Resource Name (ARN) of the resource.
domain_name_arnstringThe amazon resource name (ARN) of the domain name resource.
priorityinteger
conditionsarray
actionsarray
regionstringAWS region.

For more information, see AWS::ApiGatewayV2::RoutingRule.

Methods

NameResourceAccessible byRequired Params
create_resourcerouting_rulesINSERTDomainNameArn, Priority, Conditions, Actions, region
delete_resourcerouting_rulesDELETEIdentifier, region
update_resourcerouting_rulesUPDATEIdentifier, PatchDocument, region
list_resourcesrouting_rules_list_onlySELECTregion
get_resourcerouting_rulesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual routing_rule.

SELECT
region,
routing_rule_id,
routing_rule_arn,
domain_name_arn,
priority,
conditions,
actions
FROM awscc.apigatewayv2.routing_rules
WHERE
region = 'us-east-1' AND
Identifier = '{{ routing_rule_arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new routing_rule resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.apigatewayv2.routing_rules (
DomainNameArn,
Priority,
Conditions,
Actions,
region
)
SELECT
'{{ domain_name_arn }}',
'{{ priority }}',
'{{ conditions }}',
'{{ actions }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a routing_rule resource, using stack-deploy.

/*+ update */
UPDATE awscc.apigatewayv2.routing_rules
SET PatchDocument = string('{{ {
"Priority": priority,
"Conditions": conditions,
"Actions": actions
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ routing_rule_arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.apigatewayv2.routing_rules
WHERE
Identifier = '{{ routing_rule_arn }}' AND
region = 'us-east-1';

Permissions

To operate on the routing_rules resource, the following permissions are required:

apigateway:CreateRoutingRule