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 | aws.refactorspaces.routes |
Fields
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. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | EnvironmentIdentifier, ApplicationIdentifier, ServiceIdentifier, RouteType, 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 routes
in a region.
SELECT
region,
path_resource_to_id,
arn,
application_identifier,
environment_identifier,
route_identifier,
route_type,
service_identifier,
default_route,
uri_path_route,
tags
FROM aws.refactorspaces.routes
WHERE region = 'us-east-1';
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 aws.refactorspaces.routes
WHERE region = 'us-east-1' AND data__Identifier = '<EnvironmentIdentifier>|<ApplicationIdentifier>|<RouteIdentifier>';
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 aws.refactorspaces.routes (
ApplicationIdentifier,
EnvironmentIdentifier,
RouteType,
ServiceIdentifier,
region
)
SELECT
'{{ ApplicationIdentifier }}',
'{{ EnvironmentIdentifier }}',
'{{ RouteType }}',
'{{ ServiceIdentifier }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.refactorspaces.routes (
ApplicationIdentifier,
EnvironmentIdentifier,
RouteType,
ServiceIdentifier,
DefaultRoute,
UriPathRoute,
Tags,
region
)
SELECT
'{{ ApplicationIdentifier }}',
'{{ EnvironmentIdentifier }}',
'{{ RouteType }}',
'{{ ServiceIdentifier }}',
'{{ DefaultRoute }}',
'{{ UriPathRoute }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: route
props:
- name: ApplicationIdentifier
value: '{{ ApplicationIdentifier }}'
- name: EnvironmentIdentifier
value: '{{ EnvironmentIdentifier }}'
- name: RouteType
value: '{{ RouteType }}'
- name: ServiceIdentifier
value: '{{ ServiceIdentifier }}'
- name: DefaultRoute
value:
ActivationState: '{{ ActivationState }}'
- name: UriPathRoute
value:
SourcePath: '{{ SourcePath }}'
ActivationState: null
Methods:
- '{{ Methods[0] }}'
IncludeChildPaths: '{{ IncludeChildPaths }}'
AppendSourcePath: '{{ AppendSourcePath }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.refactorspaces.routes
WHERE data__Identifier = '<EnvironmentIdentifier|ApplicationIdentifier|RouteIdentifier>'
AND region = 'us-east-1';
Permissions
To operate on the routes
resource, the following permissions are required:
Create
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
Read
refactor-spaces:GetRoute,
refactor-spaces:ListTagsForResource
Delete
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
List
refactor-spaces:ListRoutes,
refactor-spaces:ListTagsForResource
Update
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