Skip to main content

environments

Creates, updates, deletes, gets or lists an environments resource.

Overview

Nameenvironments
TypeResource
Idaws.datazone.environments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe identifier of the environment. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>)
namestringThe name of the environment. (pattern: <code>[\w -]+</code>)
aws_account_idstringThe identifier of the Amazon Web Services account in which an environment exists. (pattern: <code>\d{12}</code>)
aws_account_regionstringThe Amazon Web Services Region in which an environment exists. (pattern: <code>[a-z]{2}-[a-z]{4,10}-\d</code>)
created_atstring (date-time)The timestamp of when the environment was created.
created_bystringThe Amazon DataZone user who created the environment.
descriptionstringThe description of the environment.
domain_idstringThe identifier of the Amazon DataZone domain in which the environment exists. (pattern: <code>dzd[-][a-zA-Z0-9-]{1,36}</code>)
environment_configuration_idstringThe configuration ID with which the environment is created. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>)
environment_configuration_namestringThe configuration name with which the environment is created. (pattern: <code>[\w -]+</code>)
environment_profile_idstringThe identifier of the environment profile with which the environment was created. (pattern: <code>[a-zA-Z0-9_-]{0,36}</code>)
project_idstringThe identifier of the project in which the environment exists. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>)
providerstringThe provider of the environment.
statusstringThe status of the environment. (ACTIVE, CREATING, UPDATING, DELETING, CREATE_FAILED, UPDATE_FAILED, DELETE_FAILED, VALIDATION_FAILED, SUSPENDED, DISABLED, EXPIRED, DELETED, INACCESSIBLE)
updated_atstring (date-time)The timestamp of when the environment was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_environmentsselectdomain_identifier, projectIdentifier, regionawsAccountId, status, awsAccountRegion, environmentProfileIdentifier, environmentBlueprintIdentifier, provider, name, maxResults, nextTokenLists Amazon DataZone environments.
get_environmentselectdomain_identifier, identifier, regionGets an Amazon DataZone environment.
create_environmentinsertdomain_identifier, region, projectIdentifier, nameCreate an Amazon DataZone environment.
associate_environment_roleupdatedomain_identifier, environment_identifier, environment_role_arn, regionAssociates the environment role in Amazon DataZone.
update_environmentupdatedomain_identifier, identifier, regionUpdates the specified environment in Amazon DataZone.
delete_environmentdeletedomain_identifier, identifier, regionDeletes an environment in Amazon DataZone.
disassociate_environment_roleexecdomain_identifier, environment_identifier, environment_role_arn, regionDisassociates the environment role in Amazon DataZone.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
domain_identifierstringThe ID of the Amazon DataZone domain in which an environment role is disassociated.
environment_identifierstringThe ID of the environment.
environment_role_arnstringThe ARN of the environment role.
identifierstringThe identifier of the environment that is to be deleted.
projectIdentifierstringThe identifier of the Amazon DataZone project.
regionstringAWS region (default: us-east-1)
awsAccountIdstringThe identifier of the Amazon Web Services account where you want to list environments.
awsAccountRegionstringThe Amazon Web Services region where you want to list environments.
environmentBlueprintIdentifierstringThe identifier of the Amazon DataZone blueprint.
environmentProfileIdentifierstringThe identifier of the environment profile.
maxResultsintegerThe maximum number of environments to return in a single call to ListEnvironments. When the number of environments to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to ListEnvironments to list the next set of environments.
namestringThe name of the environment.
nextTokenstringWhen the number of environments is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of environments, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListEnvironments to list the next set of environments.
providerstringThe provider of the environment.
statusstringThe status of the environments that you want to list.

SELECT examples

Lists Amazon DataZone environments.

SELECT
id,
name,
aws_account_id,
aws_account_region,
created_at,
created_by,
description,
domain_id,
environment_configuration_id,
environment_configuration_name,
environment_profile_id,
project_id,
provider,
status,
updated_at
FROM aws.datazone.environments
WHERE domain_identifier = '{{ domain_identifier }}' -- required
AND projectIdentifier = '{{ projectIdentifier }}' -- required
AND region = '{{ region }}' -- required
AND awsAccountId = '{{ awsAccountId }}'
AND status = '{{ status }}'
AND awsAccountRegion = '{{ awsAccountRegion }}'
AND environmentProfileIdentifier = '{{ environmentProfileIdentifier }}'
AND environmentBlueprintIdentifier = '{{ environmentBlueprintIdentifier }}'
AND provider = '{{ provider }}'
AND name = '{{ name }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;

INSERT examples

Create an Amazon DataZone environment.

INSERT INTO aws.datazone.environments (
projectIdentifier,
description,
name,
environmentProfileIdentifier,
userParameters,
glossaryTerms,
environmentAccountIdentifier,
environmentAccountRegion,
environmentBlueprintIdentifier,
deploymentOrder,
environmentConfigurationId,
environmentConfigurationName,
domain_identifier,
region
)
SELECT
'{{ projectIdentifier }}' /* required */,
'{{ description }}',
'{{ name }}' /* required */,
'{{ environmentProfileIdentifier }}',
'{{ userParameters }}',
'{{ glossaryTerms }}',
'{{ environmentAccountIdentifier }}',
'{{ environmentAccountRegion }}',
'{{ environmentBlueprintIdentifier }}',
{{ deploymentOrder }},
'{{ environmentConfigurationId }}',
'{{ environmentConfigurationName }}',
'{{ domain_identifier }}',
'{{ region }}'
RETURNING
id,
name,
aws_account_id,
aws_account_region,
created_at,
created_by,
deployment_properties,
description,
domain_id,
environment_actions,
environment_blueprint_id,
environment_configuration_id,
environment_configuration_name,
environment_profile_id,
glossary_terms,
last_deployment,
project_id,
provider,
provisioned_resources,
provisioning_properties,
status,
updated_at,
user_parameters
;

UPDATE examples

Associates the environment role in Amazon DataZone.

UPDATE aws.datazone.environments
SET
-- No updatable properties
WHERE
domain_identifier = '{{ domain_identifier }}' --required
AND environment_identifier = '{{ environment_identifier }}' --required
AND environment_role_arn = '{{ environment_role_arn }}' --required
AND region = '{{ region }}' --required;

DELETE examples

Deletes an environment in Amazon DataZone.

DELETE FROM aws.datazone.environments
WHERE domain_identifier = '{{ domain_identifier }}' --required
AND identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Disassociates the environment role in Amazon DataZone.

EXEC aws.datazone.environments.disassociate_environment_role
@domain_identifier='{{ domain_identifier }}' --required,
@environment_identifier='{{ environment_identifier }}' --required,
@environment_role_arn='{{ environment_role_arn }}' --required,
@region='{{ region }}' --required
;