Skip to main content

zones

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

Overview

Namezones
TypeResource
Idgoogle.dataplex.zones

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. The relative resource name of the zone, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.
assetStatusobjectOutput only. Aggregated status of the underlying assets of the zone. (id: GoogleCloudDataplexV1AssetStatus)
createTimestring (google-datetime)Output only. The time when the zone was created.
descriptionstringOptional. Description of the zone.
discoverySpecobjectOptional. Specification of the discovery feature applied to data in this zone. (id: GoogleCloudDataplexV1ZoneDiscoverySpec)
displayNamestringOptional. User friendly display name.
labelsobjectOptional. User defined labels for the zone.
resourceSpecobjectRequired. Specification of the resources that are referenced by the assets within this zone. (id: GoogleCloudDataplexV1ZoneResourceSpec)
statestringOutput only. Current state of the zone.
typestringRequired. Immutable. The type of the zone.
uidstringOutput only. System generated globally unique ID for the zone. This ID will be different if the zone is deleted and re-created with the same name.
updateTimestring (google-datetime)Output only. The time when the zone was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_lakes_zones_getselectprojectsId, locationsId, lakesId, zonesIdRetrieves a zone resource.
projects_locations_lakes_zones_listselectprojectsId, locationsId, lakesIdpageSize, pageToken, filter, orderByLists zone resources in a lake.
projects_locations_lakes_zones_createinsertprojectsId, locationsId, lakesIdzoneId, validateOnlyCreates a zone resource within a lake.
projects_locations_lakes_zones_patchupdateprojectsId, locationsId, lakesId, zonesIdupdateMask, validateOnlyUpdates a zone resource.
projects_locations_lakes_zones_deletedeleteprojectsId, locationsId, lakesId, zonesIdDeletes a zone resource. All assets within a zone must be deleted before the zone can be deleted.

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

SELECT examples

Retrieves a zone resource.

SELECT
name,
assetStatus,
createTime,
description,
discoverySpec,
displayName,
labels,
resourceSpec,
state,
type,
uid,
updateTime
FROM google.dataplex.zones
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND lakesId = '{{ lakesId }}' -- required
AND zonesId = '{{ zonesId }}' -- required;

INSERT examples

Creates a zone resource within a lake.

INSERT INTO google.dataplex.zones (
data__displayName,
data__labels,
data__description,
data__type,
data__discoverySpec,
data__resourceSpec,
projectsId,
locationsId,
lakesId,
zoneId,
validateOnly
)
SELECT
'{{ displayName }}',
'{{ labels }}',
'{{ description }}',
'{{ type }}',
'{{ discoverySpec }}',
'{{ resourceSpec }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ lakesId }}',
'{{ zoneId }}',
'{{ validateOnly }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates a zone resource.

UPDATE google.dataplex.zones
SET
data__displayName = '{{ displayName }}',
data__labels = '{{ labels }}',
data__description = '{{ description }}',
data__type = '{{ type }}',
data__discoverySpec = '{{ discoverySpec }}',
data__resourceSpec = '{{ resourceSpec }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND lakesId = '{{ lakesId }}' --required
AND zonesId = '{{ zonesId }}' --required
AND updateMask = '{{ updateMask}}'
AND validateOnly = {{ validateOnly}}
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a zone resource. All assets within a zone must be deleted before the zone can be deleted.

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