gcloud alpha asset get-history

NAME
gcloud alpha asset get-history - get the update history of assets that overlaps a time window
SYNOPSIS
gcloud alpha asset get-history --asset-names=[ASSET_NAMES,…] --content-type=CONTENT_TYPE --start-time=START_TIME (--organization=ORGANIZATION_ID     | --project=PROJECT_ID) [--end-time=END_TIME] [--relationship-types=[RELATIONSHIP_TYPES,…]] [GCLOUD_WIDE_FLAG]
DESCRIPTION
(ALPHA) Get the update history of assets that overlaps a time window.
EXAMPLES
To get the history of asset metadata for '//compute.googleapis.com/projects/test-project/zones/us-central1-f/instances/instance1' between '2018-10-02T15:01:23.045Z' and '2018-12-05T13:01:21.045Z', run:
gcloud alpha asset get-history --project='test-project' --asset-names='//compute.googleapis.com/projects/test-project/zones/us-central1-f/instances/instance1' --start-time='2018-10-02T15:01:23.045Z' --end-time='2018-12-05T13:01:21.045Z' --content-type='resource'

To get the history of asset iam policy for '//cloudresourcemanager.googleapis.com/projects/10179387634' between '2018-10-02T15:01:23.045Z' and '2018-12-05T13:01:21.045Z', and project '10179387634' is in organization '1060499660910', run:

gcloud alpha asset get-history --organization='1060499660910' --asset-names='//cloudresourcemanager.googleapis.com/projects/10179387634' --start-time='2018-10-02T15:01:23.045Z' --end-time='2018-12-05T13:01:21.045Z' --content-type='iam-policy'
REQUIRED FLAGS
--asset-names=[ASSET_NAMES,…]
A list of full names of the assets to get the history for. For more information, see: https://cloud.google.com/apis/design/resource_names#full_resource_name
--content-type=CONTENT_TYPE
Asset content type. Specifying resource will export resource metadata, specifying iam-policy will export the IAM policy for each child asset, specifying org-policy will export the Org Policy set on child assets, specifying access-policy will export the Access Policy set on child assets, specifying os-inventory will export the OS inventory of VM instances, and specifying relationship will export relationships of the assets. CONTENT_TYPE must be one of: resource, iam-policy, org-policy, access-policy, os-inventory, relationship.
--start-time=START_TIME
Start time of the time window (inclusive) for the asset history. Must be after the current time minus 35 days. See $ gcloud topic datetimes for information on time formats.
Exactly one of these must be specified:
--organization=ORGANIZATION_ID
The ID of the organization which is the root asset.
--project=PROJECT_ID
The project which is the root asset.

The Google Cloud project ID to use for this invocation. If omitted, then the current project is assumed; the current project can be listed using gcloud config list --format='text(core.project)' and can be set using gcloud config set project PROJECTID.

--project and its fallback core/project property play two roles in the invocation. It specifies the project of the resource to operate on. It also specifies the project for API enablement check, quota, and billing. To specify a different project for quota and billing, use --billing-project or billing/quota_project property.

OPTIONAL FLAGS
--end-time=END_TIME
End time of the time window (exclusive) for the asset history. Defaults to current time if not specified. See $ gcloud topic datetimes for information on time formats.
--relationship-types=[RELATIONSHIP_TYPES,…]
A list of relationship types (i.e., "INSTANCE_TO_INSTANCEGROUP") to take a snapshot. This argument will only be honoured if content_type=RELATIONSHIP. If specified and non-empty, only relationships matching the specified types will be returned. See http://cloud.google.com/asset-inventory/docs/supported-asset-types for supported relationship types.
GCLOUD WIDE FLAGS
These flags are available to all commands: --access-token-file, --account, --billing-project, --configuration, --flags-file, --flatten, --format, --help, --impersonate-service-account, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity.

Run $ gcloud help for details.

NOTES
This command is currently in alpha and might change without notice. If this command fails with API permission errors despite specifying the correct project, you might be trying to access an API with an invitation-only early access allowlist. These variants are also available:
gcloud asset get-history
gcloud beta asset get-history