Cloud Asset Inventory overview (original) (raw)

Cloud Asset Inventory is a global metadata inventory service that lets you view, search, export, monitor, and analyze your Google Cloud asset metadata. Tasks that you might use Cloud Asset Inventory for include the following:

Create, update, and delete history for assets is kept for up to 35 days. Assets that haven't changed in the past 35 days return their latest status.

Work with assets in Google Cloud

Here's how you can work with your assets:

Asset metadata can come from the following places:

Asset types, asset names, and content types

Cloud Asset Inventory offers multiple methods to interact with your assets. Depending on the method you use and the response detail you want, you might need to specify asset types, asset names, and content types in your requests.

Asset types

Some Cloud Asset Inventory methods return results based on asset types. Asset types include Google Cloud resources, policies, OS inventory runtime information, and relationships. The available asset types and the Cloud Asset Inventory methods that support them are detailed inAsset types.

Asset names

Some Cloud Asset Inventory methods return results based on asset names. When specifying an asset name, you must use its full resource name. SeeAsset names for a list of full resource names.

Content types

You can request additional metadata on a resource by specifying a metadata content type. If you don't specify a content type, then only a basic response is returned, which contains information such as the asset name, the last time it was updated, and the projects, folders, and organizations it belongs to.

Content type names differ depending on how you interact with Cloud Asset Inventory. The RPC and REST API names are the same. However, the gcloud CLI content type names follow a different pattern. For consistency and ease of explanation, the rest of this documentation refers to content types by their RPC and REST names.

The following table details the content types and their descriptions:

Content type Description
RPC and REST name gcloud CLI name
ACCESS_POLICY access-policy The Access Context Manager policy set on an asset.
IAM_POLICY iam-policy The IAM policy metadata binding to the resource.
ORG_POLICY org-policy The organization policy metadata set on an asset. This content type outputs legacy organization policy v1. For organization policy v2, try the resource content type and a resource type oforgpolicy.googleapis.com/Policy.
OS_INVENTORY os-inventory The runtime OS inventory information. To enable OS inventory, complete the relevant steps inSet up VM Manager.
RELATIONSHIP relationship Requires access to the Security Command Center Premium or Enterprise tier. Many Google Cloud assets are connected to each other by relationships. For example, aCompute instance group can contain a Compute instance, or a GKE cluster can contain a node. Relationship data is available from May 30th, 2022. A relationship might have its own update timestamp, because it might be inferred at a different time than the source asset updates. See Relationship types for a list of the supported relationships.
RESOURCE resource The resource's metadata.

How responses change with content type

The following examples show how responses change when listing VM instances in a project through Cloud Asset Inventory with different content types.

No content type

If you specify no content type when listing VM instances, you receive only the instance names, the last time they were updated, and what projects, folders, and organizations they belong to.

Expand for response example


ancestors:

IAM_POLICY content type

If you specify the IAM_POLICY content type, you also receive the IAM bindings on the VM, if there are any.

Expand for response example


ancestors:

RELATIONSHIP content type

Relationships require access to theSecurity Command Center Premium or Enterprise tier.

If you specify the RELATIONSHIP content type, you also receive metadata associated with the VM instance's related assets.

Expand for response example


ancestors:

When using the RELATIONSHIP content type, instead of requesting all relationships, you can request specificrelationship types.

RESOURCE content type

If you specify the RESOURCE content type, you also receive all the metadata associated with the VM.

Expand for response example


ancestors:

Data freshness

Cloud Asset Inventory provides eventual consistency on current data and best-effort consistency on historical data. While rare, it's possible that Cloud Asset Inventory can miss some data updates.

Unless noted in theresource typestable, almost all asset updates are available in minutes.

What's next