services
Creates, updates, deletes or gets a service
resource or lists services
in a region
Overview
Name | services |
Type | Resource |
Description | Definition of AWS::RefactorSpaces::Service Resource Type |
Id | aws.refactorspaces.services |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | |
application_identifier | string | |
description | string | |
endpoint_type | string | |
environment_identifier | string | |
lambda_endpoint | object | |
name | string | |
service_identifier | string | |
url_endpoint | object | |
vpc_id | string | |
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, EndpointType, Name, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.refactorspaces.services (
ApplicationIdentifier,
EndpointType,
EnvironmentIdentifier,
Name,
region
)
SELECT
'{{ ApplicationIdentifier }}',
'{{ EndpointType }}',
'{{ EnvironmentIdentifier }}',
'{{ Name }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.refactorspaces.services (
ApplicationIdentifier,
Description,
EndpointType,
EnvironmentIdentifier,
LambdaEndpoint,
Name,
UrlEndpoint,
VpcId,
Tags,
region
)
SELECT
'{{ ApplicationIdentifier }}',
'{{ Description }}',
'{{ EndpointType }}',
'{{ EnvironmentIdentifier }}',
'{{ LambdaEndpoint }}',
'{{ Name }}',
'{{ UrlEndpoint }}',
'{{ VpcId }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: service
props:
- name: ApplicationIdentifier
value: '{{ ApplicationIdentifier }}'
- name: Description
value: '{{ Description }}'
- name: EndpointType
value: '{{ EndpointType }}'
- name: EnvironmentIdentifier
value: '{{ EnvironmentIdentifier }}'
- name: LambdaEndpoint
value:
Arn: '{{ Arn }}'
- name: Name
value: '{{ Name }}'
- name: UrlEndpoint
value:
HealthUrl: '{{ HealthUrl }}'
Url: '{{ Url }}'
- name: VpcId
value: '{{ VpcId }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
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