environments
Creates, updates, deletes, gets or lists an environments resource.
Overview
| Name | environments |
| Type | Resource |
| Id | aws.datazone.environments |
Fields
The following fields are returned by SELECT queries:
- list_environments
- get_environment
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier of the environment. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
name | string | The name of the environment. (pattern: <code>[\w -]+</code>) |
aws_account_id | string | The identifier of the Amazon Web Services account in which an environment exists. (pattern: <code>\d{12}</code>) |
aws_account_region | string | The Amazon Web Services Region in which an environment exists. (pattern: <code>[a-z]{2}-[a-z]{4,10}-\d</code>) |
created_at | string (date-time) | The timestamp of when the environment was created. |
created_by | string | The Amazon DataZone user who created the environment. |
description | string | The description of the environment. |
domain_id | string | The identifier of the Amazon DataZone domain in which the environment exists. (pattern: <code>dzd[-][a-zA-Z0-9-]{1,36}</code>) |
environment_configuration_id | string | The configuration ID with which the environment is created. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
environment_configuration_name | string | The configuration name with which the environment is created. (pattern: <code>[\w -]+</code>) |
environment_profile_id | string | The identifier of the environment profile with which the environment was created. (pattern: <code>[a-zA-Z0-9_-]{0,36}</code>) |
project_id | string | The identifier of the project in which the environment exists. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
provider | string | The provider of the environment. |
status | string | The status of the environment. (ACTIVE, CREATING, UPDATING, DELETING, CREATE_FAILED, UPDATE_FAILED, DELETE_FAILED, VALIDATION_FAILED, SUSPENDED, DISABLED, EXPIRED, DELETED, INACCESSIBLE) |
updated_at | string (date-time) | The timestamp of when the environment was updated. |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the environment. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
name | string | The name of the environment. (pattern: <code>[\w -]+</code>) |
aws_account_id | string | The ID of the Amazon Web Services account where the environment exists. (pattern: <code>\d{12}</code>) |
aws_account_region | string | The Amazon Web Services region where the environment exists. (pattern: <code>[a-z]{2}-[a-z]{4,10}-\d</code>) |
created_at | string (date-time) | The timestamp of when the environment was created. |
created_by | string | The Amazon DataZone user who created the environment. |
deployment_properties | object | The deployment properties of the environment. |
description | string | The description of the environment. |
domain_id | string | The ID of the Amazon DataZone domain where the environment exists. (pattern: <code>dzd[-][a-zA-Z0-9-]{1,36}</code>) |
environment_actions | array | The actions of the environment. |
environment_blueprint_id | string | The blueprint with which the environment is created. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
environment_configuration_id | string | The configuration ID that is used to create the environment. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
environment_configuration_name | string | The configuration name that is used to create the environment. (pattern: <code>[\w -]+</code>) |
environment_profile_id | string | The ID of the environment profile with which the environment is created. (pattern: <code>[a-zA-Z0-9_-]{0,36}</code>) |
glossary_terms | array | The business glossary terms that can be used in this environment. |
last_deployment | object | The details of the last deployment of the environment. |
project_id | string | The ID of the Amazon DataZone project in which this environment is created. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
provider | string | The provider of this Amazon DataZone environment. |
provisioned_resources | array | The provisioned resources of this Amazon DataZone environment. |
provisioning_properties | object | The provisioning properties of an environment blueprint. |
status | string | The status of this Amazon DataZone environment. (ACTIVE, CREATING, UPDATING, DELETING, CREATE_FAILED, UPDATE_FAILED, DELETE_FAILED, VALIDATION_FAILED, SUSPENDED, DISABLED, EXPIRED, DELETED, INACCESSIBLE) |
updated_at | string (date-time) | The timestamp of when this environment was updated. |
user_parameters | array | The user parameters of this Amazon DataZone environment. |
Methods
The following methods are available for this resource:
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.
| Name | Datatype | Description |
|---|---|---|
domain_identifier | string | The ID of the Amazon DataZone domain in which an environment role is disassociated. |
environment_identifier | string | The ID of the environment. |
environment_role_arn | string | The ARN of the environment role. |
identifier | string | The identifier of the environment that is to be deleted. |
projectIdentifier | string | The identifier of the Amazon DataZone project. |
region | string | AWS region (default: us-east-1) |
awsAccountId | string | The identifier of the Amazon Web Services account where you want to list environments. |
awsAccountRegion | string | The Amazon Web Services region where you want to list environments. |
environmentBlueprintIdentifier | string | The identifier of the Amazon DataZone blueprint. |
environmentProfileIdentifier | string | The identifier of the environment profile. |
maxResults | integer | The 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. |
name | string | The name of the environment. |
nextToken | string | When 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. |
provider | string | The provider of the environment. |
status | string | The status of the environments that you want to list. |
SELECT examples
- list_environments
- get_environment
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 }}'
;
Gets an Amazon DataZone environment.
SELECT
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
FROM aws.datazone.environments
WHERE domain_identifier = '{{ domain_identifier }}' -- required
AND identifier = '{{ identifier }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples
- create_environment
- Manifest
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
;
# Description fields are for documentation purposes
- name: environments
props:
- name: domain_identifier
value: "{{ domain_identifier }}"
description: Required parameter for the environments resource.
- name: region
value: "{{ region }}"
description: Required parameter for the environments resource.
- name: projectIdentifier
value: "{{ projectIdentifier }}"
- name: description
value: "{{ description }}"
- name: name
value: "{{ name }}"
- name: environmentProfileIdentifier
value: "{{ environmentProfileIdentifier }}"
- name: userParameters
value:
- name: "{{ name }}"
value: "{{ value }}"
- name: glossaryTerms
value:
- "{{ glossaryTerms }}"
- name: environmentAccountIdentifier
value: "{{ environmentAccountIdentifier }}"
- name: environmentAccountRegion
value: "{{ environmentAccountRegion }}"
- name: environmentBlueprintIdentifier
value: "{{ environmentBlueprintIdentifier }}"
- name: deploymentOrder
value: {{ deploymentOrder }}
- name: environmentConfigurationId
value: "{{ environmentConfigurationId }}"
- name: environmentConfigurationName
value: "{{ environmentConfigurationName }}"
UPDATE examples
- associate_environment_role
- update_environment
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;
Updates the specified environment in Amazon DataZone.
UPDATE aws.datazone.environments
SET
name = '{{ name }}',
description = '{{ description }}',
glossaryTerms = '{{ glossaryTerms }}',
blueprintVersion = '{{ blueprintVersion }}',
userParameters = '{{ userParameters }}',
environmentConfigurationName = '{{ environmentConfigurationName }}'
WHERE
domain_identifier = '{{ domain_identifier }}' --required
AND identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
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;
DELETE examples
- delete_environment
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
- disassociate_environment_role
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
;