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

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

DELETE example

/*+ delete */
DELETE FROM awscc.refactorspaces.routes
WHERE
Identifier = '{{ environment_identifier }}|{{ application_identifier }}|{{ route_identifier }}' 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 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