routes
Creates, updates, deletes or gets a route resource or lists routes in a region
Overview
| Name | routes |
| Type | Resource |
| Description | Definition of AWS::RefactorSpaces::Route Resource Type |
| Id | awscc.refactorspaces.routes |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
path_resource_to_id | string | |
arn | string | |
application_identifier | string | |
environment_identifier | string | |
route_identifier | string | |
route_type | string | |
service_identifier | string | |
default_route | object | |
uri_path_route | object | |
tags | array | Metadata that you can assign to help organize the frameworks that you create. Each tag is a key-value pair. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
application_identifier | string | |
environment_identifier | string | |
route_identifier | string | |
region | string | AWS region. |
For more information, see AWS::RefactorSpaces::Route.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | routes | INSERT | EnvironmentIdentifier, ApplicationIdentifier, ServiceIdentifier, RouteType, region |
delete_resource | routes | DELETE | Identifier, region |
update_resource | routes | UPDATE | Identifier, PatchDocument, region |
list_resources | routes_list_only | SELECT | region |
get_resource | routes | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual route.
SELECT
region,
path_resource_to_id,
arn,
application_identifier,
environment_identifier,
route_identifier,
route_type,
service_identifier,
default_route,
uri_path_route,
tags
FROM awscc.refactorspaces.routes
WHERE
region = 'us-east-1' AND
Identifier = '{{ environment_identifier }}|{{ application_identifier }}|{{ route_identifier }}';
Lists all routes in a region.
SELECT
region,
environment_identifier,
application_identifier,
route_identifier
FROM awscc.refactorspaces.routes_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new route resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.refactorspaces.routes (
ApplicationIdentifier,
EnvironmentIdentifier,
RouteType,
ServiceIdentifier,
region
)
SELECT
'{{ application_identifier }}',
'{{ environment_identifier }}',
'{{ route_type }}',
'{{ service_identifier }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.refactorspaces.routes (
ApplicationIdentifier,
EnvironmentIdentifier,
RouteType,
ServiceIdentifier,
DefaultRoute,
UriPathRoute,
Tags,
region
)
SELECT
'{{ application_identifier }}',
'{{ environment_identifier }}',
'{{ route_type }}',
'{{ service_identifier }}',
'{{ default_route }}',
'{{ uri_path_route }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: route
props:
- name: application_identifier
value: '{{ application_identifier }}'
- name: environment_identifier
value: '{{ environment_identifier }}'
- name: route_type
value: '{{ route_type }}'
- name: service_identifier
value: '{{ service_identifier }}'
- name: default_route
value:
activation_state: '{{ activation_state }}'
- name: uri_path_route
value:
source_path: '{{ source_path }}'
activation_state: null
methods:
- '{{ methods[0] }}'
include_child_paths: '{{ include_child_paths }}'
append_source_path: '{{ append_source_path }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a route resource, using stack-deploy.
/*+ update */
UPDATE awscc.refactorspaces.routes
SET PatchDocument = string('{{ {
"DefaultRoute": default_route,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ environment_identifier }}|{{ application_identifier }}|{{ route_identifier }}';
DELETE example
/*+ delete */
DELETE FROM awscc.refactorspaces.routes
WHERE
Identifier = '{{ environment_identifier }}|{{ application_identifier }}|{{ route_identifier }}' AND
region = 'us-east-1';
Permissions
To operate on the routes resource, the following permissions are required:
- Create
- Read
- Delete
- List
- Update
refactor-spaces:CreateRoute,
refactor-spaces:GetRoute,
refactor-spaces:TagResource,
iam:CreateServiceLinkedRole,
apigateway:GET,
apigateway:PATCH,
apigateway:POST,
apigateway:PUT,
apigateway:DELETE,
apigateway:UpdateRestApiPolicy,
lambda:GetFunctionConfiguration,
lambda:AddPermission,
elasticloadbalancing:DescribeListeners,
elasticloadbalancing:DescribeTargetGroups,
elasticloadbalancing:CreateListener,
elasticloadbalancing:CreateTargetGroup,
elasticloadbalancing:DescribeTags,
elasticloadbalancing:AddTags,
elasticloadbalancing:RegisterTargets,
elasticloadbalancing:DescribeTargetHealth,
ec2:DescribeSubnets,
tag:GetResources
refactor-spaces:GetRoute,
refactor-spaces:ListTagsForResource
refactor-spaces:DeleteRoute,
refactor-spaces:GetRoute,
refactor-spaces:UntagResource,
apigateway:GET,
apigateway:PATCH,
apigateway:POST,
apigateway:PUT,
apigateway:DELETE,
apigateway:UpdateRestApiPolicy,
lambda:GetFunctionConfiguration,
lambda:AddPermission,
elasticloadbalancing:DescribeListeners,
elasticloadbalancing:DescribeTargetGroups,
elasticloadbalancing:CreateListener,
elasticloadbalancing:CreateTargetGroup,
elasticloadbalancing:DeleteListener,
elasticloadbalancing:DeleteTargetGroup,
elasticloadbalancing:DescribeTags,
elasticloadbalancing:AddTags,
elasticloadbalancing:RegisterTargets,
elasticloadbalancing:DescribeTargetHealth,
ec2:DescribeSubnets,
tag:GetResources
refactor-spaces:ListRoutes,
refactor-spaces:ListTagsForResource
refactor-spaces:UpdateRoute,
refactor-spaces:GetRoute,
refactor-spaces:TagResource,
iam:CreateServiceLinkedRole,
apigateway:GET,
apigateway:PATCH,
apigateway:POST,
apigateway:PUT,
apigateway:DELETE,
apigateway:UpdateRestApiPolicy,
lambda:GetFunctionConfiguration,
lambda:AddPermission,
elasticloadbalancing:DescribeListeners,
elasticloadbalancing:DescribeTargetGroups,
elasticloadbalancing:CreateListener,
elasticloadbalancing:CreateTargetGroup,
elasticloadbalancing:DeleteListener,
elasticloadbalancing:DeleteTargetGroup,
elasticloadbalancing:DescribeTags,
elasticloadbalancing:AddTags,
elasticloadbalancing:RegisterTargets,
elasticloadbalancing:DescribeTargetHealth,
ec2:DescribeSubnets,
ec2:DescribeSubnets,
tag:GetResources