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::DataZone::Environment Resource Type
Idawscc.datazone.environments

Fields

NameDatatypeDescription
aws_account_idstringThe AWS account in which the Amazon DataZone environment is created.
aws_account_regionstringThe AWS region in which the Amazon DataZone environment is created.
environment_account_identifierstringThe AWS account in which the Amazon DataZone environment is created.
environment_account_regionstringThe AWS region in which the Amazon DataZone environment is created.
created_atstringThe timestamp of when the environment was created.
created_bystringThe Amazon DataZone user who created the environment.
descriptionstringThe description of the Amazon DataZone environment.
domain_idstringThe identifier of the Amazon DataZone domain in which the environment is created.
domain_identifierstringThe identifier of the Amazon DataZone domain in which the environment would be created.
environment_blueprint_idstringThe ID of the blueprint with which the Amazon DataZone environment was created.
environment_profile_idstringThe ID of the environment profile with which the Amazon DataZone environment was created.
environment_profile_identifierstringThe ID of the environment profile with which the Amazon DataZone environment would be created.
glossary_termsarrayThe glossary terms that can be used in the Amazon DataZone environment.
environment_role_arnstringEnvironment role arn for custom aws environment permissions
idstringThe ID of the Amazon DataZone environment.
namestringThe name of the environment.
project_idstringThe ID of the Amazon DataZone project in which the environment is created.
project_identifierstringThe ID of the Amazon DataZone project in which the environment would be created.
providerstringThe provider of the Amazon DataZone environment.
statusstringThe status of the Amazon DataZone environment.
updated_atstringThe timestamp of when the environment was updated.
user_parametersarrayThe user parameters of the Amazon DataZone environment.
regionstringAWS region.

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

Methods

NameResourceAccessible byRequired Params
create_resourceenvironmentsINSERTName, ProjectIdentifier, DomainIdentifier, 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,
aws_account_id,
aws_account_region,
environment_account_identifier,
environment_account_region,
created_at,
created_by,
description,
domain_id,
domain_identifier,
environment_blueprint_id,
environment_profile_id,
environment_profile_identifier,
glossary_terms,
environment_role_arn,
id,
name,
project_id,
project_identifier,
provider,
status,
updated_at,
user_parameters
FROM awscc.datazone.environments
WHERE
region = '{{ region }}' AND
Identifier = '{{ domain_id }}|{{ id }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.datazone.environments (
DomainIdentifier,
Name,
ProjectIdentifier,
region
)
SELECT
'{{ domain_identifier }}',
'{{ name }}',
'{{ project_identifier }}',
'{{ 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.datazone.environments
SET PatchDocument = string('{{ {
"Description": description,
"GlossaryTerms": glossary_terms,
"EnvironmentRoleArn": environment_role_arn,
"Name": name
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ domain_id }}|{{ id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.datazone.environments
WHERE
Identifier = '{{ domain_id }}|{{ 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:

datazone:CreateEnvironment,
datazone:GetEnvironment,
datazone:DeleteEnvironment,
datazone:AssociateEnvironmentRole,
iam:PassRole