Skip to main content

environments

Creates, updates, deletes or gets an environment resource or lists environments in a region

Overview

Nameenvironments
TypeResource
DescriptionDefinition of AWS::RefactorSpaces::Environment Resource Type
Idaws.refactorspaces.environments

Fields

NameDatatypeDescription
descriptionstring
environment_identifierstring
namestring
network_fabric_typestring
arnstring
transit_gateway_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_resourceINSERTName, NetworkFabricType, region
delete_resourceDELETEdata__Identifier, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.refactorspaces.environments (
Name,
NetworkFabricType,
region
)
SELECT
'{{ Name }}',
'{{ NetworkFabricType }}',
'{{ region }}';

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