HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/394/help/man/man1/gcloud_asset_get-history.1
.TH "GCLOUD_ASSET_GET\-HISTORY" 1



.SH "NAME"
.HP
gcloud asset get\-history \- get the update history of assets that overlaps a time window



.SH "SYNOPSIS"
.HP
\f5gcloud asset get\-history\fR \fB\-\-asset\-names\fR=[\fIASSET_NAMES\fR,...] \fB\-\-content\-type\fR=\fICONTENT_TYPE\fR \fB\-\-start\-time\fR=\fISTART_TIME\fR (\fB\-\-organization\fR=\fIORGANIZATION_ID\fR\ |\ \fB\-\-project\fR=\fIPROJECT_ID\fR) [\fB\-\-end\-time\fR=\fIEND_TIME\fR] [\fB\-\-relationship\-types\fR=[\fIRELATIONSHIP_TYPES\fR,...]] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "DESCRIPTION"

Get the update history of assets that overlaps a time window.



.SH "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:

.RS 2m
$ gcloud asset get\-history \-\-project='test\-project' \e
    \-\-asset\-names='//compute.googleapis.com/projects/test\-project/zo\e
nes/us\-central1\-f/instances/instance1' \e
    \-\-start\-time='2018\-10\-02T15:01:23.045Z' \e
    \-\-end\-time='2018\-12\-05T13:01:21.045Z' \-\-content\-type='resource'
.RE

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:

.RS 2m
$ gcloud asset get\-history \-\-organization='1060499660910' \e
    \-\-asset\-names='//cloudresourcemanager.googleapis.com/projects/10\e
179387634' \-\-start\-time='2018\-10\-02T15:01:23.045Z' \e
    \-\-end\-time='2018\-12\-05T13:01:21.045Z' \e
    \-\-content\-type='iam\-policy'
.RE



.SH "REQUIRED FLAGS"

.RS 2m
.TP 2m
\fB\-\-asset\-names\fR=[\fIASSET_NAMES\fR,...]

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

.TP 2m
\fB\-\-content\-type\fR=\fICONTENT_TYPE\fR

Asset content type. Specifying \f5resource\fR will export resource metadata,
specifying \f5iam\-policy\fR will export the IAM policy for each child asset,
specifying \f5org\-policy\fR will export the Org Policy set on child assets,
specifying \f5access\-policy\fR will export the Access Policy set on child
assets, specifying \f5os\-inventory\fR will export the OS inventory of VM
instances, and specifying \f5relationship\fR will export relationships of the
assets. \fICONTENT_TYPE\fR must be one of: \fBresource\fR, \fBiam\-policy\fR,
\fBorg\-policy\fR, \fBaccess\-policy\fR, \fBos\-inventory\fR,
\fBrelationship\fR.

.TP 2m
\fB\-\-start\-time\fR=\fISTART_TIME\fR

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.

.TP 2m

Exactly one of these must be specified:


.RS 2m
.TP 2m
\fB\-\-organization\fR=\fIORGANIZATION_ID\fR

The ID of the organization which is the root asset.

.TP 2m
\fB\-\-project\fR=\fIPROJECT_ID\fR

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 \f5gcloud
config list \-\-format='text(core.project)'\fR and can be set using \f5gcloud
config set project PROJECTID\fR.

\f5\-\-project\fR and its fallback \f5core/project\fR 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 \f5\-\-billing\-project\fR or
\f5billing/quota_project\fR property.


.RE
.RE
.sp

.SH "OPTIONAL FLAGS"

.RS 2m
.TP 2m
\fB\-\-end\-time\fR=\fIEND_TIME\fR

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.

.TP 2m
\fB\-\-relationship\-types\fR=[\fIRELATIONSHIP_TYPES\fR,...]

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.


.RE
.sp

.SH "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 \fB$ gcloud help\fR for details.



.SH "NOTES"

These variants are also available:

.RS 2m
$ gcloud alpha asset get\-history
.RE

.RS 2m
$ gcloud beta asset get\-history
.RE