Skip to main content

environments

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

Overview

Nameenvironments
TypeResource
Idgoogle.dataplex.environments

Fields

NameDatatypeDescription
namestringOutput only. The relative resource name of the environment, of the form: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}
descriptionstringOptional. Description of the environment.
createTimestringOutput only. Environment creation time.
displayNamestringOptional. User friendly display name.
endpointsobjectURI Endpoints to access sessions associated with the Environment.
infrastructureSpecobjectConfiguration for the underlying infrastructure used to run workloads.
labelsobjectOptional. User defined labels for the environment.
sessionSpecobjectConfiguration for sessions created for this environment.
sessionStatusobjectStatus of sessions created for this environment.
statestringOutput only. Current state of the environment.
uidstringOutput only. System generated globally unique ID for the environment. This ID will be different if the environment is deleted and re-created with the same name.
updateTimestringOutput only. The time when the environment was last updated.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_lakes_environments_getSELECTenvironmentsId, lakesId, locationsId, projectsIdGet environment resource.
projects_locations_lakes_environments_listSELECTlakesId, locationsId, projectsIdLists environments under the given lake.
projects_locations_lakes_environments_createINSERTlakesId, locationsId, projectsIdCreate an environment resource.
projects_locations_lakes_environments_deleteDELETEenvironmentsId, lakesId, locationsId, projectsIdDelete the environment resource. All the child resources must have been deleted before environment deletion can be initiated.
projects_locations_lakes_environments_patchUPDATEenvironmentsId, lakesId, locationsId, projectsIdUpdate the environment resource.

SELECT examples

Lists environments under the given lake.

SELECT
name,
description,
createTime,
displayName,
endpoints,
infrastructureSpec,
labels,
sessionSpec,
sessionStatus,
state,
uid,
updateTime
FROM google.dataplex.environments
WHERE lakesId = '{{ lakesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new environments resource.

/*+ create */
INSERT INTO google.dataplex.environments (
lakesId,
locationsId,
projectsId,
displayName,
labels,
description,
infrastructureSpec,
sessionSpec
)
SELECT
'{{ lakesId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ displayName }}',
'{{ labels }}',
'{{ description }}',
'{{ infrastructureSpec }}',
'{{ sessionSpec }}'
;

UPDATE example

Updates a environments resource.

/*+ update */
UPDATE google.dataplex.environments
SET
displayName = '{{ displayName }}',
labels = '{{ labels }}',
description = '{{ description }}',
infrastructureSpec = '{{ infrastructureSpec }}',
sessionSpec = '{{ sessionSpec }}'
WHERE
environmentsId = '{{ environmentsId }}'
AND lakesId = '{{ lakesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified environments resource.

/*+ delete */
DELETE FROM google.dataplex.environments
WHERE environmentsId = '{{ environmentsId }}'
AND lakesId = '{{ lakesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';