REST Resource: projects.locations.lakes.zones.assets

Resource: Asset

An asset represents a cloud resource that is being managed within a lake as a member of a zone.

JSON representation
{
  "name": string,
  "displayName": string,
  "uid": string,
  "createTime": string,
  "updateTime": string,
  "labels": {
    string: string,
    ...
  },
  "description": string,
  "state": enum (State),
  "resourceSpec": {
    object (ResourceSpec)
  },
  "resourceStatus": {
    object (ResourceStatus)
  },
  "securityStatus": {
    object (SecurityStatus)
  },
  "discoverySpec": {
    object (DiscoverySpec)
  },
  "discoveryStatus": {
    object (DiscoveryStatus)
  }
}
Fields
name

string

Output only. The relative resource name of the asset, of the form: projects/{project_number}/locations/{locationId}/lakes/{lakeId}/zones/{zoneId}/assets/{assetId}.

displayName

string

Optional. User friendly display name.

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.

createTime

string (Timestamp format)

Output only. The time when the asset was created.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. The time when the asset was last updated.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

labels

map (key: string, value: string)

Optional. User defined labels for the asset.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

description

string

Optional. Description of the asset.

state

enum (State)

Output only. Current state of the asset.

resourceSpec

object (ResourceSpec)

Required. Specification of the resource that is referenced by this asset.

resourceStatus

object (ResourceStatus)

Output only. Status of the resource referenced by this asset.

securityStatus

object (SecurityStatus)

Output only. Status of the security policy applied to resource referenced by this asset.

discoverySpec

object (DiscoverySpec)

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.

discoveryStatus

object (DiscoveryStatus)

Output only. Status of the discovery feature applied to data referenced by this asset.

ResourceSpec

Identifies the cloud resource that is referenced by this asset.

JSON representation
{
  "name": string,
  "type": enum (Type),
  "readAccessMode": enum (AccessMode)
}
Fields
name

string

Immutable. Relative name of the cloud resource that contains the data that is being managed within a lake. For example: projects/{project_number}/buckets/{bucket_id} projects/{project_number}/datasets/{dataset_id}

type

enum (Type)

Required. Immutable. Type of resource.

readAccessMode

enum (AccessMode)

Optional. Determines how read permissions are handled for each asset and their associated tables. Only available to storage buckets assets.

Type

Type of resource.

Enums
TYPE_UNSPECIFIED Type not specified.
STORAGE_BUCKET Cloud Storage bucket.
BIGQUERY_DATASET BigQuery dataset.

AccessMode

Access Mode determines how data stored within the resource is read. This is only applicable to storage bucket assets.

Enums
ACCESS_MODE_UNSPECIFIED Access mode unspecified.
DIRECT Default. Data is accessed directly using storage APIs.
MANAGED Data is accessed through a managed interface using BigQuery APIs.

ResourceStatus

Status of the resource referenced by an asset.

JSON representation
{
  "state": enum (State),
  "message": string,
  "updateTime": string,
  "managedAccessIdentity": string
}
Fields
state

enum (State)

The current state of the managed resource.

message

string

Additional information about the current state.

updateTime

string (Timestamp format)

Last update time of the status.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

managedAccessIdentity

string

Output only. Service account associated with the BigQuery Connection.

State

The state of a resource.

Enums
STATE_UNSPECIFIED State unspecified.
READY Resource does not have any errors.
ERROR Resource has errors.

SecurityStatus

Security policy status of the asset. Data security policy, i.e., readers, writers & owners, should be specified in the lake/zone/asset IAM policy.

JSON representation
{
  "state": enum (State),
  "message": string,
  "updateTime": string
}
Fields
state

enum (State)

The current state of the security policy applied to the attached resource.

message

string

Additional information about the current state.

updateTime

string (Timestamp format)

Last update time of the status.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

State

The state of the security policy.

Enums
STATE_UNSPECIFIED State unspecified.
READY Security policy has been successfully applied to the attached resource.
APPLYING Security policy is in the process of being applied to the attached resource.
ERROR Security policy could not be applied to the attached resource due to errors.

DiscoverySpec

Settings to manage the metadata discovery and publishing for an asset.

JSON representation
{
  "enabled": boolean,
  "includePatterns": [
    string
  ],
  "excludePatterns": [
    string
  ],
  "csvOptions": {
    object (CsvOptions)
  },
  "jsonOptions": {
    object (JsonOptions)
  },

  // Union field trigger can be only one of the following:
  "schedule": string
  // End of list of possible types for union field trigger.
}
Fields
enabled

boolean

Optional. Whether discovery is enabled.

includePatterns[]

string

Optional. The list of patterns to apply for selecting data to include during discovery if only a subset of the data should considered. For Cloud Storage bucket assets, these are interpreted as glob patterns used to match object names. For BigQuery dataset assets, these are interpreted as patterns to match table names.

excludePatterns[]

string

Optional. The list of patterns to apply for selecting data to exclude during discovery. For Cloud Storage bucket assets, these are interpreted as glob patterns used to match object names. For BigQuery dataset assets, these are interpreted as patterns to match table names.

csvOptions

object (CsvOptions)

Optional. Configuration for CSV data.

jsonOptions

object (JsonOptions)

Optional. Configuration for Json data.

Union field trigger. Determines when discovery is triggered. trigger can be only one of the following:
schedule

string

Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for running discovery periodically. Successive discovery runs must be scheduled at least 60 minutes apart. The default value is to run discovery every 60 minutes. To explicitly set a timezone to the cron tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone database. For example, CRON_TZ=America/New_York 1 * * * *, or TZ=America/New_York 1 * * * *.

CsvOptions

Describe CSV and similar semi-structured data formats.

JSON representation
{
  "headerRows": integer,
  "delimiter": string,
  "encoding": string,
  "disableTypeInference": boolean
}
Fields
headerRows

integer

Optional. The number of rows to interpret as header rows that should be skipped when reading data rows.

delimiter

string

Optional. The delimiter being used to separate values. This defaults to ','.

encoding

string

Optional. The character encoding of the data. The default is UTF-8.

disableTypeInference

boolean

Optional. Whether to disable the inference of data type for CSV data. If true, all columns will be registered as strings.

JsonOptions

Describe JSON data format.

JSON representation
{
  "encoding": string,
  "disableTypeInference": boolean
}
Fields
encoding

string

Optional. The character encoding of the data. The default is UTF-8.

disableTypeInference

boolean

Optional. Whether to disable the inference of data type for Json data. If true, all columns will be registered as their primitive types (strings, number or boolean).

DiscoveryStatus

Status of discovery for an asset.

JSON representation
{
  "state": enum (State),
  "message": string,
  "updateTime": string,
  "lastRunTime": string,
  "stats": {
    object (Stats)
  },
  "lastRunDuration": string
}
Fields
state

enum (State)

The current status of the discovery feature.

message

string

Additional information about the current state.

updateTime

string (Timestamp format)

Last update time of the status.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

lastRunTime

string (Timestamp format)

The start time of the last discovery run.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

stats

object (Stats)

Data Stats of the asset reported by discovery.

lastRunDuration

string (Duration format)

The duration of the last discovery run.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

State

Current state of discovery.

Enums
STATE_UNSPECIFIED State is unspecified.
SCHEDULED Discovery for the asset is scheduled.
IN_PROGRESS Discovery for the asset is running.
PAUSED Discovery for the asset is currently paused (e.g. due to a lack of available resources). It will be automatically resumed.
DISABLED Discovery for the asset is disabled.

Stats

The aggregated data statistics for the asset reported by discovery.

JSON representation
{
  "dataItems": string,
  "dataSize": string,
  "tables": string,
  "filesets": string
}
Fields
dataItems

string (int64 format)

The count of data items within the referenced resource.

dataSize

string (int64 format)

The number of stored data bytes within the referenced resource.

tables

string (int64 format)

The count of table entities within the referenced resource.

filesets

string (int64 format)

The count of fileset entities within the referenced resource.

Methods

create

Creates an asset resource.

delete

Deletes an asset resource.

get

Retrieves an asset resource.

getIamPolicy

Gets the access control policy for a resource.

list

Lists asset resources in a zone.

patch

Updates an asset resource.

setIamPolicy

Sets the access control policy on the specified resource.

testIamPermissions

Returns permissions that a caller has on the specified resource.