environments
Creates, updates, deletes or gets an environment
resource or lists environments
in a region
Overview
Name | environments |
Type | Resource |
Description | Definition of AWS::RefactorSpaces::Environment Resource Type |
Id | aws.refactorspaces.environments |
Fields
Name | Datatype | Description |
---|---|---|
description | string | |
environment_identifier | string | |
name | string | |
network_fabric_type | string | |
arn | string | |
transit_gateway_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 | Name, NetworkFabricType, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all environments
in a region.
SELECT
region,
description,
environment_identifier,
name,
network_fabric_type,
arn,
transit_gateway_id,
tags
FROM aws.refactorspaces.environments
WHERE region = 'us-east-1';
Gets all properties from an individual environment
.
SELECT
region,
description,
environment_identifier,
name,
network_fabric_type,
arn,
transit_gateway_id,
tags
FROM aws.refactorspaces.environments
WHERE region = 'us-east-1' AND data__Identifier = '<EnvironmentIdentifier>';
INSERT
example
Use the following StackQL query and manifest file to create a new environment
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.refactorspaces.environments (
Name,
NetworkFabricType,
region
)
SELECT
'{{ Name }}',
'{{ NetworkFabricType }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.refactorspaces.environments (
Description,
Name,
NetworkFabricType,
Tags,
region
)
SELECT
'{{ Description }}',
'{{ Name }}',
'{{ NetworkFabricType }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: environment
props:
- name: Description
value: '{{ Description }}'
- name: Name
value: '{{ Name }}'
- name: NetworkFabricType
value: '{{ NetworkFabricType }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.refactorspaces.environments
WHERE data__Identifier = '<EnvironmentIdentifier>'
AND region = 'us-east-1';
Permissions
To operate on the environments
resource, the following permissions are required:
Create
refactor-spaces:CreateEnvironment,
refactor-spaces:GetEnvironment,
refactor-spaces:TagResource,
ec2:CreateTransitGateway,
ec2:AuthorizeSecurityGroupIngress,
ec2:CreateSecurityGroup,
ec2:CreateTags,
ec2:DescribeNetworkInterfaces,
ec2:DescribeRouteTables,
ec2:DescribeSecurityGroups,
ec2:DescribeSubnets,
ec2:DescribeTags,
ec2:DescribeTransitGateways,
ec2:DescribeTransitGatewayVpcAttachments,
ec2:DescribeVpcEndpointServiceConfigurations,
ec2:ModifyVpcEndpointServicePermissions,
ec2:RevokeSecurityGroupIngress,
ram:AssociateResourceShare,
ram:CreateResourceShare,
ram:GetResourceShareAssociations,
ram:GetResourceShares,
ram:TagResource,
ram:GetResourceShareInvitations,
ram:AcceptResourceShareInvitation,
ram:DisassociateResourceShare,
tag:GetResources,
iam:CreateServiceLinkedRole
Read
refactor-spaces:GetEnvironment,
refactor-spaces:ListTagsForResource
Delete
refactor-spaces:GetEnvironment,
refactor-spaces:DeleteEnvironment,
refactor-spaces:UntagResource,
ec2:DescribeTransitGateways,
ec2:DescribeTransitGatewayVpcAttachments,
ec2:DeleteTransitGateway,
ec2:DeleteTransitGatewayVpcAttachment,
ec2:DeleteTags,
ram:GetResourceShareAssociations,
ram:DeleteResourceShare
List
refactor-spaces:ListEnvironments,
refactor-spaces:ListTagsForResource