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 | awscc.refactorspaces.environments |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
| Name | Datatype | Description |
|---|---|---|
environment_identifier | string | |
region | string | AWS region. |
For more information, see AWS::RefactorSpaces::Environment.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | environments | INSERT | region |
delete_resource | environments | DELETE | Identifier, region |
update_resource | environments | UPDATE | Identifier, PatchDocument, region |
list_resources | environments_list_only | SELECT | region |
get_resource | environments | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual environment.
SELECT
region,
description,
environment_identifier,
name,
network_fabric_type,
arn,
transit_gateway_id,
tags
FROM awscc.refactorspaces.environments
WHERE
region = 'us-east-1' AND
Identifier = '{{ environment_identifier }}';
Lists all environments in a region.
SELECT
region,
environment_identifier
FROM awscc.refactorspaces.environments_list_only
WHERE
region = 'us-east-1';
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 awscc.refactorspaces.environments (
Description,
Name,
NetworkFabricType,
Tags,
region
)
SELECT
'{{ description }}',
'{{ name }}',
'{{ network_fabric_type }}',
'{{ tags }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.refactorspaces.environments (
Description,
Name,
NetworkFabricType,
Tags,
region
)
SELECT
'{{ description }}',
'{{ name }}',
'{{ network_fabric_type }}',
'{{ 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: network_fabric_type
value: '{{ network_fabric_type }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a environment resource, using stack-deploy.
/*+ update */
UPDATE awscc.refactorspaces.environments
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ environment_identifier }}';
DELETE example
/*+ delete */
DELETE FROM awscc.refactorspaces.environments
WHERE
Identifier = '{{ environment_identifier }}' AND
region = 'us-east-1';
Permissions
To operate on the environments resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
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
refactor-spaces:GetEnvironment,
refactor-spaces:ListTagsForResource
refactor-spaces:GetEnvironment,
refactor-spaces:TagResource,
refactor-spaces:UntagResource
refactor-spaces:GetEnvironment,
refactor-spaces:DeleteEnvironment,
refactor-spaces:UntagResource,
ec2:DescribeTransitGateways,
ec2:DescribeTransitGatewayVpcAttachments,
ec2:DeleteTransitGateway,
ec2:DeleteTransitGatewayVpcAttachment,
ec2:DeleteTags,
ram:GetResourceShareAssociations,
ram:DeleteResourceShare
refactor-spaces:ListEnvironments,
refactor-spaces:ListTagsForResource