assets
Creates, updates, deletes, gets or lists a assets
resource.
Overview
Name | assets |
Type | Resource |
Id | google.dataplex.assets |
Fields
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}. |
description | string | Optional. Description of the asset. |
createTime | string | Output only. The time when the asset was created. |
discoverySpec | object | Settings to manage the metadata discovery and publishing for an asset. |
discoveryStatus | object | Status of discovery for an asset. |
displayName | string | Optional. User friendly display name. |
labels | object | Optional. User defined labels for the asset. |
resourceSpec | object | Identifies the cloud resource that is referenced by this asset. |
resourceStatus | object | Status of the resource referenced by an asset. |
securityStatus | object | Security policy status of the asset. Data security policy, i.e., readers, writers & owners, should be specified in the lake/zone/asset IAM policy. |
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 | Output only. The time when the asset was last updated. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_locations_lakes_zones_assets_get | SELECT | assetsId, lakesId, locationsId, projectsId, zonesId | Retrieves an asset resource. |
projects_locations_lakes_zones_assets_list | SELECT | lakesId, locationsId, projectsId, zonesId | Lists asset resources in a zone. |
projects_locations_lakes_zones_assets_create | INSERT | lakesId, locationsId, projectsId, zonesId | Creates an asset resource. |
projects_locations_lakes_zones_assets_delete | DELETE | assetsId, lakesId, locationsId, projectsId, zonesId | Deletes an asset resource. The referenced storage resource is detached (default) or deleted based on the associated Lifecycle policy. |
projects_locations_lakes_zones_assets_patch | UPDATE | assetsId, lakesId, locationsId, projectsId, zonesId | Updates an asset resource. |
SELECT
examples
Lists asset resources in a zone.
SELECT
name,
description,
createTime,
discoverySpec,
discoveryStatus,
displayName,
labels,
resourceSpec,
resourceStatus,
securityStatus,
state,
uid,
updateTime
FROM google.dataplex.assets
WHERE lakesId = '{{ lakesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND zonesId = '{{ zonesId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new assets
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.dataplex.assets (
lakesId,
locationsId,
projectsId,
zonesId,
displayName,
labels,
description,
resourceSpec,
discoverySpec
)
SELECT
'{{ lakesId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ zonesId }}',
'{{ displayName }}',
'{{ labels }}',
'{{ description }}',
'{{ resourceSpec }}',
'{{ discoverySpec }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: displayName
value: string
- name: uid
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: labels
value: object
- name: description
value: string
- name: state
value: string
- name: resourceSpec
value:
- name: name
value: string
- name: type
value: string
- name: readAccessMode
value: string
- name: resourceStatus
value:
- name: state
value: string
- name: message
value: string
- name: updateTime
value: string
- name: managedAccessIdentity
value: string
- name: securityStatus
value:
- name: state
value: string
- name: message
value: string
- name: updateTime
value: string
- name: discoverySpec
value:
- name: enabled
value: boolean
- name: includePatterns
value:
- string
- name: excludePatterns
value:
- string
- name: csvOptions
value:
- name: headerRows
value: integer
- name: delimiter
value: string
- name: encoding
value: string
- name: disableTypeInference
value: boolean
- name: jsonOptions
value:
- name: encoding
value: string
- name: disableTypeInference
value: boolean
- name: schedule
value: string
- name: discoveryStatus
value:
- name: state
value: string
- name: message
value: string
- name: updateTime
value: string
- name: lastRunTime
value: string
- name: stats
value:
- name: dataItems
value: string
- name: dataSize
value: string
- name: tables
value: string
- name: filesets
value: string
- name: lastRunDuration
value: string
UPDATE
example
Updates a assets
resource.
/*+ update */
UPDATE google.dataplex.assets
SET
displayName = '{{ displayName }}',
labels = '{{ labels }}',
description = '{{ description }}',
resourceSpec = '{{ resourceSpec }}',
discoverySpec = '{{ discoverySpec }}'
WHERE
assetsId = '{{ assetsId }}'
AND lakesId = '{{ lakesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND zonesId = '{{ zonesId }}';
DELETE
example
Deletes the specified assets
resource.
/*+ delete */
DELETE FROM google.dataplex.assets
WHERE assetsId = '{{ assetsId }}'
AND lakesId = '{{ lakesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND zonesId = '{{ zonesId }}';