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 = '{{ region }}' 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.apigatewayv2.routing_rules
WHERE
Identifier = '{{ routing_rule_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

apigateway:CreateRoutingRule