Skip to main content

environments

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

Overview

Nameenvironments
TypeResource
DescriptionAn environment created within the EVS service
Idawscc.evs.environments

Fields

NameDatatypeDescription
environment_namestringThe name of an EVS environment
kms_key_idstring
vpc_idstring
service_access_subnet_idstring
vcf_versionstring
terms_acceptedboolean
license_infoobjectThe license information for an EVS environment
initial_vlansobjectThe initial Vlan configuration only required upon creation. Modification after creation will have no effect
hostsarrayThe initial hosts for environment only required upon creation. Modification after creation will have no effect
connectivity_infoobject
vcf_hostnamesobject
site_idstring
environment_idstring
environment_arnstring
environment_statestring
state_detailsstring
checksarray
credentialsarray
service_access_security_groupsobject
tagsarrayAn array of key-value pairs to apply to this resource.
created_atstring
regionstringAWS region.

For more information, see AWS::EVS::Environment.

Methods

NameResourceAccessible byRequired Params
create_resourceenvironmentsINSERTVpcId, ServiceAccessSubnetId, VcfVersion, TermsAccepted, LicenseInfo, ConnectivityInfo, VcfHostnames, SiteId, region
delete_resourceenvironmentsDELETEIdentifier, region
update_resourceenvironmentsUPDATEIdentifier, PatchDocument, region
list_resourcesenvironments_list_onlySELECTregion
get_resourceenvironmentsSELECTIdentifier, region

SELECT examples

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 = '{{ region }}' AND
Identifier = '{{ environment_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new environment resource, using stack-deploy.

/*+ 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.evs.environments
WHERE
Identifier = '{{ environment_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the environments resource, the following permissions are required:

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