asset_history
Creates, updates, deletes, gets or lists an asset_history resource.
Overview
| Name | asset_history |
| Type | Resource |
| Id | google.cloudasset.asset_history |
Fields
The following fields are returned by SELECT queries:
- batch_get_assets_history
| Name | Datatype | Description |
|---|---|---|
assets | array | A list of assets with valid time windows. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
batch_get_assets_history | select | parentType, parent | assetNames, contentType, readTimeWindow.startTime, readTimeWindow.endTime, relationshipTypes | Batch gets the update history of assets that overlap a time window. For IAM_POLICY content, this API outputs history when the asset and its attached IAM POLICY both exist. This can create gaps in the output history. Otherwise, this API outputs history with asset in both non-delete or deleted status. If a specified asset does not exist, this API returns an INVALID_ARGUMENT error. |
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 |
|---|---|---|
parent | string | |
parentType | string | |
assetNames | string | |
contentType | string | |
readTimeWindow.endTime | string (google-datetime) | |
readTimeWindow.startTime | string (google-datetime) | |
relationshipTypes | string |
SELECT examples
- batch_get_assets_history
Batch gets the update history of assets that overlap a time window. For IAM_POLICY content, this API outputs history when the asset and its attached IAM POLICY both exist. This can create gaps in the output history. Otherwise, this API outputs history with asset in both non-delete or deleted status. If a specified asset does not exist, this API returns an INVALID_ARGUMENT error.
SELECT
assets
FROM google.cloudasset.asset_history
WHERE parentType = '{{ parentType }}' -- required
AND parent = '{{ parent }}' -- required
AND assetNames = '{{ assetNames }}'
AND contentType = '{{ contentType }}'
AND readTimeWindow.startTime = '{{ readTimeWindow.startTime }}'
AND readTimeWindow.endTime = '{{ readTimeWindow.endTime }}'
AND relationshipTypes = '{{ relationshipTypes }}'
;