Skip to main content

assets

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

Overview

Nameassets
TypeResource
Idgoogle.dataplex.assets

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. The relative resource name of the asset, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}.
createTimestring (google-datetime)Output only. The time when the asset was created.
descriptionstringOptional. Description of the asset.
discoverySpecobjectOptional. Specification of the discovery feature applied to data referenced by this asset. When this spec is left unset, the asset will use the spec set on the parent zone. (id: GoogleCloudDataplexV1AssetDiscoverySpec)
discoveryStatusobjectOutput only. Status of the discovery feature applied to data referenced by this asset. (id: GoogleCloudDataplexV1AssetDiscoveryStatus)
displayNamestringOptional. User friendly display name.
labelsobjectOptional. User defined labels for the asset.
resourceSpecobjectRequired. Specification of the resource that is referenced by this asset. (id: GoogleCloudDataplexV1AssetResourceSpec)
resourceStatusobjectOutput only. Status of the resource referenced by this asset. (id: GoogleCloudDataplexV1AssetResourceStatus)
securityStatusobjectOutput only. Status of the security policy applied to resource referenced by this asset. (id: GoogleCloudDataplexV1AssetSecurityStatus)
statestringOutput only. Current state of the asset.
uidstringOutput only. System generated globally unique ID for the asset. This ID will be different if the asset is deleted and re-created with the same name.
updateTimestring (google-datetime)Output only. The time when the asset was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_lakes_zones_assets_getselectprojectsId, locationsId, lakesId, zonesId, assetsIdRetrieves an asset resource.
projects_locations_lakes_zones_assets_listselectprojectsId, locationsId, lakesId, zonesIdpageSize, pageToken, filter, orderByLists asset resources in a zone.
projects_locations_lakes_zones_assets_createinsertprojectsId, locationsId, lakesId, zonesIdassetId, validateOnlyCreates an asset resource.
projects_locations_lakes_zones_assets_patchupdateprojectsId, locationsId, lakesId, zonesId, assetsIdupdateMask, validateOnlyUpdates an asset resource.
projects_locations_lakes_zones_assets_deletedeleteprojectsId, locationsId, lakesId, zonesId, assetsIdDeletes an asset resource. The referenced storage resource is detached (default) or deleted based on the associated Lifecycle policy.

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

SELECT examples

Retrieves an asset resource.

SELECT
name,
createTime,
description,
discoverySpec,
discoveryStatus,
displayName,
labels,
resourceSpec,
resourceStatus,
securityStatus,
state,
uid,
updateTime
FROM google.dataplex.assets
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND lakesId = '{{ lakesId }}' -- required
AND zonesId = '{{ zonesId }}' -- required
AND assetsId = '{{ assetsId }}' -- required;

INSERT examples

Creates an asset resource.

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

UPDATE examples

Updates an asset resource.

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

DELETE examples

Deletes an asset resource. The referenced storage resource is detached (default) or deleted based on the associated Lifecycle policy.

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