Skip to main content

services

Creates, updates, deletes or gets a service resource or lists services in a region

Overview

Nameservices
TypeResource
DescriptionDefinition of AWS::RefactorSpaces::Service Resource Type
Idaws.refactorspaces.services

Fields

NameDatatypeDescription
arnstring
application_identifierstring
descriptionstring
endpoint_typestring
environment_identifierstring
lambda_endpointobject
namestring
service_identifierstring
url_endpointobject
vpc_idstring
tagsarrayMetadata that you can assign to help organize the frameworks that you create. Each tag is a key-value pair.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTEnvironmentIdentifier, ApplicationIdentifier, EndpointType, Name, region
delete_resourceDELETEdata__Identifier, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all services in a region.

SELECT
region,
arn,
application_identifier,
description,
endpoint_type,
environment_identifier,
lambda_endpoint,
name,
service_identifier,
url_endpoint,
vpc_id,
tags
FROM aws.refactorspaces.services
WHERE region = 'us-east-1';

Gets all properties from an individual service.

SELECT
region,
arn,
application_identifier,
description,
endpoint_type,
environment_identifier,
lambda_endpoint,
name,
service_identifier,
url_endpoint,
vpc_id,
tags
FROM aws.refactorspaces.services
WHERE region = 'us-east-1' AND data__Identifier = '<EnvironmentIdentifier>|<ApplicationIdentifier>|<ServiceIdentifier>';

INSERT example

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

/*+ create */
INSERT INTO aws.refactorspaces.services (
ApplicationIdentifier,
EndpointType,
EnvironmentIdentifier,
Name,
region
)
SELECT
'{{ ApplicationIdentifier }}',
'{{ EndpointType }}',
'{{ EnvironmentIdentifier }}',
'{{ Name }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.refactorspaces.services
WHERE data__Identifier = '<EnvironmentIdentifier|ApplicationIdentifier|ServiceIdentifier>'
AND region = 'us-east-1';

Permissions

To operate on the services resource, the following permissions are required:

Create

refactor-spaces:CreateService,
refactor-spaces:GetService,
refactor-spaces:TagResource,
ec2:DescribeVpcs,
ec2:DescribeSubnets,
ec2:DescribeRouteTables,
ec2:CreateTags,
ec2:CreateTransitGatewayVpcAttachment,
ec2:DescribeTransitGatewayVpcAttachments,
ec2:CreateSecurityGroup,
ec2:AuthorizeSecurityGroupIngress,
ec2:CreateRoute,
lambda:GetFunctionConfiguration

Read

refactor-spacess:GetService,
refactor-spaces:ListTagsForResource

Delete

refactor-spaces:DeleteService,
refactor-spaces:GetService,
refactor-spaces:UntagResource,
ram:DisassociateResourceShare,
ec2:DescribeNetworkInterfaces,
ec2:DescribeRouteTables,
ec2:DescribeTransitGatewayVpcAttachments,
ec2:DescribeSecurityGroups,
ec2:DeleteSecurityGroup,
ec2:DeleteRoute,
ec2:RevokeSecurityGroupIngress,
ec2:DeleteTransitGatewayVpcAttachment,
ec2:DeleteTags

List

refactor-spaces:ListServices,
refactor-spaces:ListTagsForResource