Skip to main content

routes

Creates, updates, deletes or gets a route resource or lists routes in a region

Overview

Nameroutes
TypeResource
DescriptionDefinition of AWS::RefactorSpaces::Route Resource Type
Idawscc.refactorspaces.routes

Fields

NameDatatypeDescription
path_resource_to_idstring
arnstring
application_identifierstring
environment_identifierstring
route_identifierstring
route_typestring
service_identifierstring
default_routeobject
uri_path_routeobject
tagsarrayMetadata that you can assign to help organize the frameworks that you create. Each tag is a key-value pair.
regionstringAWS region.

For more information, see AWS::RefactorSpaces::Route.

Methods

NameResourceAccessible byRequired Params
create_resourceroutesINSERTEnvironmentIdentifier, ApplicationIdentifier, ServiceIdentifier, RouteType, region
delete_resourceroutesDELETEIdentifier, region
update_resourceroutesUPDATEIdentifier, PatchDocument, region
list_resourcesroutes_list_onlySELECTregion
get_resourceroutesSELECTIdentifier, region

SELECT examples

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 }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.refactorspaces.routes (
ApplicationIdentifier,
EnvironmentIdentifier,
RouteType,
ServiceIdentifier,
region
)
SELECT
'{{ application_identifier }}',
'{{ environment_identifier }}',
'{{ route_type }}',
'{{ service_identifier }}',
'{{ region }}';

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:

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