routing_rules
Creates, updates, deletes or gets a routing_rule resource or lists routing_rules in a region
Overview
| Name | routing_rules |
| Type | Resource |
| Description | Schema for AWS::ApiGatewayV2::RoutingRule |
| Id | awscc.apigatewayv2.routing_rules |
Fields
| Name | Datatype | Description |
|---|---|---|
routing_rule_id | string | RoutingRule Id generated by service |
routing_rule_arn | string | Amazon Resource Name (ARN) of the resource. |
domain_name_arn | string | The amazon resource name (ARN) of the domain name resource. |
priority | integer | |
conditions | array | |
actions | array | |
region | string | AWS region. |
For more information, see AWS::ApiGatewayV2::RoutingRule.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | DomainNameArn, Priority, Conditions, Actions, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, 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 data__Identifier = '<RoutingRuleArn>';
INSERT example
Use the following StackQL query and manifest file to create a new routing_rule resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.apigatewayv2.routing_rules (
DomainNameArn,
Priority,
Conditions,
Actions,
region
)
SELECT
'{{ DomainNameArn }}',
'{{ Priority }}',
'{{ Conditions }}',
'{{ Actions }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.apigatewayv2.routing_rules (
DomainNameArn,
Priority,
Conditions,
Actions,
region
)
SELECT
'{{ DomainNameArn }}',
'{{ Priority }}',
'{{ Conditions }}',
'{{ Actions }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: routing_rule
props:
- name: DomainNameArn
value: '{{ DomainNameArn }}'
- name: Priority
value: '{{ Priority }}'
- name: Conditions
value:
- MatchHeaders:
AnyOf:
- Header: '{{ Header }}'
ValueGlob: '{{ ValueGlob }}'
MatchBasePaths:
AnyOf:
- '{{ AnyOf[0] }}'
- name: Actions
value:
- InvokeApi:
ApiId: '{{ ApiId }}'
Stage: '{{ Stage }}'
StripBasePath: '{{ StripBasePath }}'
DELETE example
/*+ delete */
DELETE FROM awscc.apigatewayv2.routing_rules
WHERE data__Identifier = '<RoutingRuleArn>'
AND region = 'us-east-1';
Permissions
To operate on the routing_rules resource, the following permissions are required:
Create
apigateway:CreateRoutingRule
Read
apigateway:GetRoutingRule
Update
apigateway:UpdateRoutingRule
Delete
apigateway:DeleteRoutingRule
List
apigateway:ListRoutingRules