Skip to main content

environments

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

Overview

Nameenvironments
TypeResource
Idgoogle.dataplex.environments

Fields

The following fields are returned by SELECT queries:

Successful response

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}
createTimestring (google-datetime)Output only. Environment creation time.
descriptionstringOptional. Description of the environment.
displayNamestringOptional. User friendly display name.
endpointsobjectOutput only. URI Endpoints to access sessions associated with the Environment. (id: GoogleCloudDataplexV1EnvironmentEndpoints)
infrastructureSpecobjectRequired. Infrastructure specification for the Environment. (id: GoogleCloudDataplexV1EnvironmentInfrastructureSpec)
labelsobjectOptional. User defined labels for the environment.
sessionSpecobjectOptional. Configuration for sessions created for this environment. (id: GoogleCloudDataplexV1EnvironmentSessionSpec)
sessionStatusobjectOutput only. Status of sessions created for this environment. (id: GoogleCloudDataplexV1EnvironmentSessionStatus)
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.
updateTimestring (google-datetime)Output only. The time when the environment was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_lakes_environments_getselectprojectsId, locationsId, lakesId, environmentsIdGet environment resource.
projects_locations_lakes_environments_listselectprojectsId, locationsId, lakesIdpageSize, pageToken, filter, orderByLists environments under the given lake.
projects_locations_lakes_environments_createinsertprojectsId, locationsId, lakesIdenvironmentId, validateOnlyCreate an environment resource.
projects_locations_lakes_environments_patchupdateprojectsId, locationsId, lakesId, environmentsIdupdateMask, validateOnlyUpdate the environment resource.
projects_locations_lakes_environments_deletedeleteprojectsId, locationsId, lakesId, environmentsIdDelete the environment resource. All the child resources must have been deleted before environment deletion can be initiated.

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
environmentsIdstring
lakesIdstring
locationsIdstring
projectsIdstring
environmentIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)
validateOnlyboolean

SELECT examples

Get environment resource.

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

INSERT examples

Create an environment resource.

INSERT INTO google.dataplex.environments (
data__displayName,
data__labels,
data__description,
data__infrastructureSpec,
data__sessionSpec,
projectsId,
locationsId,
lakesId,
environmentId,
validateOnly
)
SELECT
'{{ displayName }}',
'{{ labels }}',
'{{ description }}',
'{{ infrastructureSpec }}',
'{{ sessionSpec }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ lakesId }}',
'{{ environmentId }}',
'{{ validateOnly }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Update the environment resource.

UPDATE google.dataplex.environments
SET
data__displayName = '{{ displayName }}',
data__labels = '{{ labels }}',
data__description = '{{ description }}',
data__infrastructureSpec = '{{ infrastructureSpec }}',
data__sessionSpec = '{{ sessionSpec }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND lakesId = '{{ lakesId }}' --required
AND environmentsId = '{{ environmentsId }}' --required
AND updateMask = '{{ updateMask}}'
AND validateOnly = {{ validateOnly}}
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Delete the environment resource. All the child resources must have been deleted before environment deletion can be initiated.

DELETE FROM google.dataplex.environments
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND lakesId = '{{ lakesId }}' --required
AND environmentsId = '{{ environmentsId }}' --required;