- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization Scopes
- TimeWindow
- TemporalAsset
- Asset
- Resource
- Inventory
- OsInfo
- PriorAssetState
- Try it!
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.
HTTP request
GET https://cloudasset.googleapis.com/v1/{parent=*/*}:batchGetAssetsHistory
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
parent |
Required. The relative name of the root asset. It can only be an organization number (such as "organizations/123"), a project ID (such as "projects/my-project-id")", or a project number (such as "projects/12345"). Authorization requires one or more of the following IAM permissions on the specified resource
|
Query parameters
Parameters | |
---|---|
assetNames[] |
A list of the full names of the assets. See: https://cloud.google.com/asset-inventory/docs/resource-name-format Example:
The request becomes a no-op if the asset name list is empty, and the max size of the asset name list is 100 in one request. |
contentType |
Optional. The content type. |
readTimeWindow |
Optional. The time window for the asset history. Both startTime and endTime are optional and if set, it must be after the current time minus 35 days. If endTime is not set, it is default to current timestamp. If startTime is not set, the snapshot of the assets at endTime will be returned. The returned results contain all temporal assets whose time window overlap with readTimeWindow. |
Request body
The request body must be empty.
Response body
If successful, the response body contains data with the following structure:
Batch get assets history response.
JSON representation | |
---|---|
{
"assets": [
{
object ( |
Fields | |
---|---|
assets[] |
A list of assets with valid time windows. |
Authorization Scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
TimeWindow
A time window specified by its startTime
and endTime
.
JSON representation | |
---|---|
{ "startTime": string, "endTime": string } |
Fields | |
---|---|
startTime |
Start time of the time window (exclusive). A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
endTime |
End time of the time window (inclusive). If not specified, the current timestamp is used instead. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
TemporalAsset
An asset in Google Cloud and its temporal metadata, including the time window when it was observed and its status during that window.
JSON representation | |
---|---|
{ "window": { object ( |
Fields | |
---|---|
window |
The time window when the asset data and state was observed. |
deleted |
Whether the asset has been deleted or not. |
asset |
An asset in Google Cloud. |
priorAssetState |
State of priorAsset. |
priorAsset |
Prior copy of the asset. Populated if priorAssetState is PRESENT. Currently this is only set for responses in Real-Time Feed. |
Asset
An asset in Google Cloud. An asset can be any resource in the Google Cloud resource hierarchy, a resource outside the Google Cloud resource hierarchy (such as Google Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy). See Supported asset types for more information.
JSON representation | |
---|---|
{ "updateTime": string, "name": string, "assetType": string, "resource": { object ( |
Fields | ||
---|---|---|
updateTime |
The last update timestamp of an asset. updateTime is updated when create/update/delete operation is performed. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
|
name |
The full name of the asset. Example: See Resource names for more information. |
|
assetType |
The type of the asset. Example: See Supported asset types for more information. |
|
resource |
A representation of the resource. |
|
iamPolicy |
A representation of the Cloud IAM policy set on a Google Cloud resource. There can be a maximum of one Cloud IAM policy set on any given resource. In addition, Cloud IAM policies inherit their granted access scope from any policies set on parent resources in the resource hierarchy. Therefore, the effectively policy is the union of both the policy set on this resource and each policy set on all of the resource's ancestry resource levels in the hierarchy. See this topic for more information. |
|
orgPolicy[] |
A representation of an organization policy. There can be more than one organization policy with different constraints set on a given resource. |
|
osInventory |
A representation of runtime OS Inventory information. See this topic for more information. |
|
ancestors[] |
The ancestry path of an asset in Google Cloud resource hierarchy, represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. If the asset is a project, folder, or organization, the ancestry path starts from the asset itself. Example: |
|
Union field access_context_policy . A representation of an access policy. access_context_policy can be only one of the following: |
||
accessPolicy |
Please also refer to the access policy user guide. |
|
accessLevel |
Please also refer to the access level user guide. |
|
servicePerimeter |
Please also refer to the service perimeter user guide. |
Resource
A representation of a Google Cloud resource.
JSON representation | |
---|---|
{ "version": string, "discoveryDocumentUri": string, "discoveryName": string, "resourceUrl": string, "parent": string, "data": { object }, "location": string } |
Fields | |
---|---|
version |
The API version. Example: |
discoveryDocumentUri |
The URL of the discovery document containing the resource's JSON schema. Example: This value is unspecified for resources that do not have an API based on a discovery document, such as Cloud Bigtable. |
discoveryName |
The JSON schema name listed in the discovery document. Example: This value is unspecified for resources that do not have an API based on a discovery document, such as Cloud Bigtable. |
resourceUrl |
The REST URL for accessing the resource. An HTTP This value is unspecified for resources without a REST API. |
parent |
The full name of the immediate parent of this resource. See Resource Names for more information. For Google Cloud assets, this value is the parent resource defined in the Cloud IAM policy hierarchy. Example: For third-party assets, this field may be set differently. |
data |
The content of the resource, in which some sensitive fields are removed and may not be present. |
location |
The location of the resource in Google Cloud, such as its zone and region. For more information, see https://cloud.google.com/about/locations/. |
Inventory
The inventory details of a VM.
JSON representation | |
---|---|
{ "osInfo": { object ( |
Fields | |
---|---|
osInfo |
Base level operating system information for the VM. |
items |
Inventory items related to the VM keyed by an opaque unique identifier for each inventory item. The identifier is unique to each distinct and addressable inventory item and will change, when there is a new package version. An object containing a list of |
OsInfo
Operating system information for the VM.
JSON representation | |
---|---|
{ "hostname": string, "longName": string, "shortName": string, "version": string, "architecture": string, "kernelVersion": string, "kernelRelease": string, "osconfigAgentVersion": string } |
Fields | |
---|---|
hostname |
The VM hostname. |
longName |
The operating system long name. For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019 Datacenter'. |
shortName |
The operating system short name. For example, 'windows' or 'debian'. |
version |
The version of the operating system. |
architecture |
The system architecture of the operating system. |
kernelVersion |
The kernel version of the operating system. |
kernelRelease |
The kernel release of the operating system. |
osconfigAgentVersion |
The current version of the OS Config agent running on the VM. |
PriorAssetState
State of prior asset.
Enums | |
---|---|
PRIOR_ASSET_STATE_UNSPECIFIED |
priorAsset is not applicable for the current asset. |
PRESENT |
priorAsset is populated correctly. |
INVALID |
Failed to set priorAsset. |
DOES_NOT_EXIST |
Current asset is the first known state. |
DELETED |
priorAsset is a deletion. |