Index
AssetService
(interface)Asset
(message)BigQueryDestination
(message)ContentType
(enum)ExportAssetsRequest
(message)ExportAssetsResponse
(message)GcsDestination
(message)GcsOutputResult
(message)OutputConfig
(message)OutputResult
(message)PartitionSpec
(message)PartitionSpec.PartitionKey
(enum)RelatedAsset
(message)RelatedAssets
(message)RelationshipAttributes
(message)Resource
(message)
AssetService
Asset service definition.
ExportAssets |
---|
Exports assets with time and resource types to a given Cloud Storage location/BigQuery table. For Cloud Storage location destinations, the output format is newline-delimited JSON. Each line represents a
|
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. IAM policy). See Supported asset types for more information.
Fields | |
---|---|
update_time |
The last update timestamp of an asset. update_time is updated when create/update/delete operation is performed. |
name |
The full name of the asset. Example: See Resource names for more information. |
asset_type |
The type of the asset. Example: See Supported asset types for more information. |
resource |
A representation of the resource. |
iam_policy |
A representation of the IAM policy set on a Google Cloud resource. There can be a maximum of one IAM policy set on any given resource. In addition, 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. |
org_policy[] |
A representation of an organization policy. There can be more than one organization policy with different constraints set on a given resource. |
related_assets |
The related assets of the asset of one relationship type. One asset only represents one type of relationship. |
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: |
|
access_policy |
Please also refer to the access policy user guide. |
access_level |
Please also refer to the access level user guide. |
service_perimeter |
Please also refer to the service perimeter user guide. |
BigQueryDestination
A BigQuery destination for exporting assets to.
Fields | |
---|---|
dataset |
Required. The BigQuery dataset in format "projects/projectId/datasets/datasetId", to which the snapshot result should be exported. If this dataset does not exist, the export call returns an INVALID_ARGUMENT error. |
table |
Required. The BigQuery table to which the snapshot result should be written. If this table does not exist, a new table with the given name will be created. |
force |
If the destination table already exists and this flag is |
partition_spec |
[partition_spec] determines whether to export to partitioned table(s) and how to partition the data. If [partition_spec] is unset or [partition_spec.partition_key] is unset or If [partition_spec] is specified. First, the snapshot results will be written to partitioned table(s) with two additional timestamp columns, readTime and requestTime, one of which will be the partition key. Secondly, in the case when any destination table already exists, it will first try to update existing table's schema as necessary by appending additional columns. Then, if [force] is |
separate_tables_per_asset_type |
If this flag is Field [table] will be concatenated with "_" and the asset type names (see https://cloud.google.com/asset-inventory/docs/supported-asset-types for supported asset types) to construct per-asset-type table names, in which all non-alphanumeric characters like "." and "/" will be substituted by "_". Example: if field [table] is "mytable" and snapshot results contain "storage.googleapis.com/Bucket" assets, the corresponding table name will be "mytable_storage_googleapis_com_Bucket". If any of these tables does not exist, a new table with the concatenated name will be created. When [content_type] in the ExportAssetsRequest is If error occurs when exporting to any table, the whole export call will return an error but the export results that already succeed will persist. Example: if exporting to table_type_A succeeds when exporting to table_type_B fails during one export call, the results in table_type_A will persist and there will not be partial results persisting in a table. |
ContentType
Asset content type.
Enums | |
---|---|
CONTENT_TYPE_UNSPECIFIED |
Unspecified content type. |
RESOURCE |
Resource metadata. |
IAM_POLICY |
The actual IAM policy set on a resource. |
ORG_POLICY |
The organization policy set on an asset. |
ACCESS_POLICY |
The Access Context Manager policy set on an asset. |
RELATIONSHIP |
The related resources. |
ExportAssetsRequest
Export asset request.
Fields | |
---|---|
parent |
Required. The relative name of the root asset. This 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"), or a folder number (such as "folders/123"). Authorization requires one or more of the following IAM permissions on the specified resource
|
read_time |
Timestamp to take an asset snapshot. This can only be set to a timestamp between the current time and the current time minus 35 days (inclusive). If not specified, the current time will be used. Due to delays in resource data collection and indexing, there is a volatile window during which running the same query may get different results. |
asset_types[] |
A list of asset types to take a snapshot for. For example: "compute.googleapis.com/Disk". Regular expressions are also supported. For example:
See RE2 for all supported regular expression syntax. If the regular expression does not match any supported asset type, an INVALID_ARGUMENT error will be returned. If specified, only matching assets will be returned, otherwise, it will snapshot all asset types. See Introduction to Cloud Asset Inventory for all supported asset types. |
content_type |
Asset content type. If not specified, no content but the asset name will be returned. |
output_config |
Required. Output configuration indicating where the results will be output to. |
relationship_types[] |
A list of relationship types to export, for example: |
ExportAssetsResponse
The export asset response. This message is returned by the google.longrunning.Operations.GetOperation
method in the returned google.longrunning.Operation.response
field.
Fields | |
---|---|
read_time |
Time the snapshot was taken. |
output_config |
Output configuration indicating where the results were output to. |
output_result |
Output result indicating where the assets were exported to. For example, a set of actual Cloud Storage object URIs where the assets are exported to. The URIs can be different from what [output_config] has specified, as the service will split the output object into multiple ones once it exceeds a single Cloud Storage object limit. |
GcsDestination
A Cloud Storage location.
Fields | |
---|---|
Union field object_uri . Required. object_uri can be only one of the following: |
|
uri |
The URI of the Cloud Storage object. It's the same URI that is used by gsutil. Example: "gs://bucket_name/object_name". See Viewing and Editing Object Metadata for more information. |
uri_prefix |
The URI prefix of all generated Cloud Storage objects. Example: "gs://bucket_name/object_name_prefix". Each object URI is in format: "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only contains assets for that type. |
GcsOutputResult
A Cloud Storage output result.
Fields | |
---|---|
uris[] |
List of URIs of the Cloud Storage objects. Example: "gs://bucket_name/object_name". |
OutputConfig
Output configuration for export assets destination.
Fields | |
---|---|
Union field destination . Asset export destination. destination can be only one of the following: |
|
gcs_destination |
Destination on Cloud Storage. |
bigquery_destination |
Destination on BigQuery. The output table stores the fields in asset proto as columns in BigQuery. |
OutputResult
Output result of export assets.
Fields | |
---|---|
Union field result . Asset export result. result can be only one of the following: |
|
gcs_result |
Export result on Cloud Storage. |
PartitionSpec
Specifications of BigQuery partitioned table as export destination.
Fields | |
---|---|
partition_key |
The partition key for BigQuery partitioned table. |
PartitionKey
This enum is used to determine the partition key column when exporting assets to BigQuery partitioned table(s). Note that, if the partition key is a timestamp column, the actual partition is based on its date value (expressed in UTC. see details in https://cloud.google.com/bigquery/docs/partitioned-tables#date_timestamp_partitioned_tables).
Enums | |
---|---|
PARTITION_KEY_UNSPECIFIED |
Unspecified partition key. If used, it means using non-partitioned table. |
READ_TIME |
The time when the snapshot is taken. If specified as partition key, the result table(s) is partitoned by the additional timestamp column, readTime. If [read_time] in ExportAssetsRequest is specified, the readTime column's value will be the same as it. Otherwise, its value will be the current time that is used to take the snapshot. |
REQUEST_TIME |
The time when the request is received and started to be processed. If specified as partition key, the result table(s) is partitoned by the requestTime column, an additional timestamp column representing when the request was received. |
RelatedAsset
An asset identify in Google Cloud which contains its name, type and ancestors. 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. IAM policy). See Supported asset types for more information.
Fields | |
---|---|
asset |
The full name of the asset. Example: See Resource names for more information. |
asset_type |
The type of the asset. Example: See Supported asset types for more information. |
ancestors[] |
The ancestors 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. Example: |
RelatedAssets
The detailed related assets with the relationship_type
.
Fields | |
---|---|
relationship_attributes |
The detailed relation attributes. |
assets[] |
The peer resources of the relationship. |
RelationshipAttributes
The relationship attributes which include type
, source_resource_type
, target_resource_type
and action
.
Fields | |
---|---|
type |
The unique identifier of the relationship type. Example: |
source_resource_type |
The source asset type. Example: |
target_resource_type |
The target asset type. Example: |
action |
The detail of the relationship, e.g. |
Resource
A representation of a Google Cloud resource.
Fields | |
---|---|
version |
The API version. Example: |
discovery_document_uri |
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. |
discovery_name |
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. |
resource_url |
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 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/. |