environments
Creates, updates, deletes or gets an environment resource or lists environments in a region
Overview
| Name | environments |
| Type | Resource |
| Description | An environment created within the EVS service |
| Id | awscc.evs.environments |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
environment_name | string | The name of an EVS environment |
kms_key_id | string | |
vpc_id | string | |
service_access_subnet_id | string | |
vcf_version | string | |
terms_accepted | boolean | |
license_info | object | The license information for an EVS environment |
initial_vlans | object | The initial Vlan configuration only required upon creation. Modification after creation will have no effect |
hosts | array | The initial hosts for environment only required upon creation. Modification after creation will have no effect |
connectivity_info | object | |
vcf_hostnames | object | |
site_id | string | |
environment_id | string | |
environment_arn | string | |
environment_state | string | |
state_details | string | |
checks | array | |
credentials | array | |
service_access_security_groups | object | |
tags | array | An array of key-value pairs to apply to this resource. |
created_at | string | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
environment_id | string | |
region | string | AWS region. |
For more information, see AWS::EVS::Environment.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | environments | INSERT | VpcId, ServiceAccessSubnetId, VcfVersion, TermsAccepted, LicenseInfo, ConnectivityInfo, VcfHostnames, SiteId, 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,
environment_name,
kms_key_id,
vpc_id,
service_access_subnet_id,
vcf_version,
terms_accepted,
license_info,
initial_vlans,
hosts,
connectivity_info,
vcf_hostnames,
site_id,
environment_id,
environment_arn,
environment_state,
state_details,
checks,
credentials,
service_access_security_groups,
tags,
created_at,
modified_at
FROM awscc.evs.environments
WHERE
region = 'us-east-1' AND
Identifier = '{{ environment_id }}';
Lists all environments in a region.
SELECT
region,
environment_id
FROM awscc.evs.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.evs.environments (
VpcId,
ServiceAccessSubnetId,
VcfVersion,
TermsAccepted,
LicenseInfo,
ConnectivityInfo,
VcfHostnames,
SiteId,
region
)
SELECT
'{{ vpc_id }}',
'{{ service_access_subnet_id }}',
'{{ vcf_version }}',
'{{ terms_accepted }}',
'{{ license_info }}',
'{{ connectivity_info }}',
'{{ vcf_hostnames }}',
'{{ site_id }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.evs.environments (
EnvironmentName,
KmsKeyId,
VpcId,
ServiceAccessSubnetId,
VcfVersion,
TermsAccepted,
LicenseInfo,
InitialVlans,
Hosts,
ConnectivityInfo,
VcfHostnames,
SiteId,
ServiceAccessSecurityGroups,
Tags,
region
)
SELECT
'{{ environment_name }}',
'{{ kms_key_id }}',
'{{ vpc_id }}',
'{{ service_access_subnet_id }}',
'{{ vcf_version }}',
'{{ terms_accepted }}',
'{{ license_info }}',
'{{ initial_vlans }}',
'{{ hosts }}',
'{{ connectivity_info }}',
'{{ vcf_hostnames }}',
'{{ site_id }}',
'{{ service_access_security_groups }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: environment
props:
- name: environment_name
value: '{{ environment_name }}'
- name: kms_key_id
value: '{{ kms_key_id }}'
- name: vpc_id
value: '{{ vpc_id }}'
- name: service_access_subnet_id
value: '{{ service_access_subnet_id }}'
- name: vcf_version
value: '{{ vcf_version }}'
- name: terms_accepted
value: '{{ terms_accepted }}'
- name: license_info
value:
solution_key: '{{ solution_key }}'
vsan_key: '{{ vsan_key }}'
- name: initial_vlans
value:
vmk_management:
cidr: '{{ cidr }}'
vm_management: null
v_motion: null
v_san: null
v_tep: null
edge_vtep: null
nsx_up_link: null
hcx: null
expansion_vlan1: null
expansion_vlan2: null
- name: hosts
value:
- host_name: '{{ host_name }}'
key_name: '{{ key_name }}'
instance_type: '{{ instance_type }}'
placement_group_id: '{{ placement_group_id }}'
dedicated_host_id: '{{ dedicated_host_id }}'
- name: connectivity_info
value:
private_route_server_peerings:
- '{{ private_route_server_peerings[0] }}'
- name: vcf_hostnames
value:
v_center: null
nsx: null
nsx_manager1: null
nsx_manager2: null
nsx_manager3: null
nsx_edge1: null
nsx_edge2: null
sddc_manager: null
cloud_builder: null
- name: site_id
value: '{{ site_id }}'
- name: service_access_security_groups
value:
security_groups:
- '{{ security_groups[0] }}'
- 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.evs.environments
SET PatchDocument = string('{{ {
"InitialVlans": initial_vlans,
"Hosts": hosts,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ environment_id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.evs.environments
WHERE
Identifier = '{{ environment_id }}' AND
region = 'us-east-1';
Permissions
To operate on the environments resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
evs:CreateEnvironment,
evs:GetEnvironment,
evs:TagResource,
evs:ListTagsForResource,
iam:CreateServiceLinkedRole,
support:DescribeServices,
support:DescribeSupportLevel,
servicequotas:GetServiceQuota,
servicequotas:ListServiceQuotas,
ec2:CreateNetworkInterface,
ec2:AllocateHosts,
ec2:ModifyNetworkInterfaceAttribute,
ec2:DeleteNetworkInterface,
ec2:RunInstances,
ec2:CreatePlacementGroup,
ec2:CreateSubnet,
ec2:CreateTags,
secretsmanager:GetRandomPassword,
secretsmanager:CreateSecret,
secretsmanager:GetSecretValue,
secretsmanager:BatchGetSecretValue,
secretsmanager:TagResource,
kms:ListKeysForService,
kms:DescribeKey,
secretsmanager:UpdateSecret,
ec2:DeleteVolume,
ec2:DetachVolume
evs:GetEnvironment,
evs:ListTagsForResource
evs:TagResource,
evs:UntagResource,
evs:ListTagsForResource,
evs:GetEnvironment
evs:DeleteEnvironment,
evs:GetEnvironment,
evs:UntagResource,
ec2:TerminateInstances,
ec2:ReleaseHosts,
ec2:DescribeHosts,
ec2:DeleteSubnet,
ec2:DetachNetworkInterface,
ec2:DeletePlacementGroup,
secretsmanager:DeleteSecret
evs:ListEnvironments