assets
Creates, updates, deletes, gets or lists an assets
resource.
Overview
Name | assets |
Type | Resource |
Id | google.dataplex.assets |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_lakes_zones_assets_get
- projects_locations_lakes_zones_assets_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output 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}. |
createTime | string (google-datetime) | Output only. The time when the asset was created. |
description | string | Optional. Description of the asset. |
discoverySpec | object | Optional. 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) |
discoveryStatus | object | Output only. Status of the discovery feature applied to data referenced by this asset. (id: GoogleCloudDataplexV1AssetDiscoveryStatus) |
displayName | string | Optional. User friendly display name. |
labels | object | Optional. User defined labels for the asset. |
resourceSpec | object | Required. Specification of the resource that is referenced by this asset. (id: GoogleCloudDataplexV1AssetResourceSpec) |
resourceStatus | object | Output only. Status of the resource referenced by this asset. (id: GoogleCloudDataplexV1AssetResourceStatus) |
securityStatus | object | Output only. Status of the security policy applied to resource referenced by this asset. (id: GoogleCloudDataplexV1AssetSecurityStatus) |
state | string | Output only. Current state of the asset. |
uid | string | Output 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. |
updateTime | string (google-datetime) | Output only. The time when the asset was last updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output 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}. |
createTime | string (google-datetime) | Output only. The time when the asset was created. |
description | string | Optional. Description of the asset. |
discoverySpec | object | Optional. 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) |
discoveryStatus | object | Output only. Status of the discovery feature applied to data referenced by this asset. (id: GoogleCloudDataplexV1AssetDiscoveryStatus) |
displayName | string | Optional. User friendly display name. |
labels | object | Optional. User defined labels for the asset. |
resourceSpec | object | Required. Specification of the resource that is referenced by this asset. (id: GoogleCloudDataplexV1AssetResourceSpec) |
resourceStatus | object | Output only. Status of the resource referenced by this asset. (id: GoogleCloudDataplexV1AssetResourceStatus) |
securityStatus | object | Output only. Status of the security policy applied to resource referenced by this asset. (id: GoogleCloudDataplexV1AssetSecurityStatus) |
state | string | Output only. Current state of the asset. |
uid | string | Output 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. |
updateTime | string (google-datetime) | Output only. The time when the asset was last updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_lakes_zones_assets_get | select | projectsId , locationsId , lakesId , zonesId , assetsId | Retrieves an asset resource. | |
projects_locations_lakes_zones_assets_list | select | projectsId , locationsId , lakesId , zonesId | pageSize , pageToken , filter , orderBy | Lists asset resources in a zone. |
projects_locations_lakes_zones_assets_create | insert | projectsId , locationsId , lakesId , zonesId | assetId , validateOnly | Creates an asset resource. |
projects_locations_lakes_zones_assets_patch | update | projectsId , locationsId , lakesId , zonesId , assetsId | updateMask , validateOnly | Updates an asset resource. |
projects_locations_lakes_zones_assets_delete | delete | projectsId , locationsId , lakesId , zonesId , assetsId | Deletes 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.
Name | Datatype | Description |
---|---|---|
assetsId | string | |
lakesId | string | |
locationsId | string | |
projectsId | string | |
zonesId | string | |
assetId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) | |
validateOnly | boolean |
SELECT
examples
- projects_locations_lakes_zones_assets_get
- projects_locations_lakes_zones_assets_list
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;
Lists asset resources in a zone.
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 pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- projects_locations_lakes_zones_assets_create
- Manifest
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
;
# Description fields are for documentation purposes
- name: assets
props:
- name: projectsId
value: string
description: Required parameter for the assets resource.
- name: locationsId
value: string
description: Required parameter for the assets resource.
- name: lakesId
value: string
description: Required parameter for the assets resource.
- name: zonesId
value: string
description: Required parameter for the assets resource.
- name: displayName
value: string
description: >
Optional. User friendly display name.
- name: labels
value: object
description: >
Optional. User defined labels for the asset.
- name: description
value: string
description: >
Optional. Description of the asset.
- name: resourceSpec
value: object
description: >
Required. Specification of the resource that is referenced by this asset.
- name: discoverySpec
value: object
description: >
Optional. 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.
- name: assetId
value: string
- name: validateOnly
value: boolean
UPDATE
examples
- projects_locations_lakes_zones_assets_patch
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
- projects_locations_lakes_zones_assets_delete
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;