gcloud asset get-history

NAME
gcloud asset get-history - get the update history of assets that overlaps a time window
SYNOPSIS
gcloud 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] [GCLOUD_WIDE_FLAG]
DESCRIPTION
Get the update history of assets that overlaps a time window.
REQUIRED FLAGS
--asset-names=[ASSET_NAMES,…]
A list of full names of the assets to get the history for. See https://cloud.google.com/apis/design/resource_names#full_resource_name for name format.
--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, and specifying access-policy will export the Access Policy set on child assets. CONTENT_TYPE must be one of: resource, iam-policy, org-policy, access-policy.
--start-time=START_TIME
Start time of the time window (inclusive) for the asset history. Must be later than 2018-10-02T00:00:00Z. 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 Platform project name 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.
GCLOUD WIDE FLAGS
These flags are available to all commands: --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.

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 asset get-history --project='test-project' \
      --asset-names='//compute.googleapis.com/projects/test-project/zo\
  nes/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 asset get-history --organization='1060499660910' \
      --asset-names='//cloudresourcemanager.googleapis.com/projects/10\
  179387634' --start-time='2018-10-02T15:01:23.045Z' \
      --end-time='2018-12-05T13:01:21.045Z' \
      --content-type='iam-policy'
NOTES
These variants are also available:
  $ gcloud alpha asset get-history
  $ gcloud beta asset get-history