Service Client: Google::Cloud::Asset::V1::AssetService::AssetServiceClient
Client stub representing the remote AssetService gRPC service. Delegates call dispatching to Google::gRPC::Client.
target
The endpoint target address. Defaults to asset.googleapis.com:443.
credentials
The authentication credentials provider. Defaults to application default credentials via Google::Auth.
NAME
Google::Cloud::Asset::V1::AssetService - Compiled Protocol Buffers messages for google/cloud/asset/v1/asset_service.proto
SYNOPSIS
use Google::Cloud::Asset::V1::AssetService;
my $msg = Google::Cloud::Asset::V1::AssetService::AnalyzeIamPolicyLongrunningMetadata->new({
create_time => $create_time,
});
# Read or update a field
my $val = $msg->create_time();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Asset::V1::AssetService::AnalyzeIamPolicyLongrunningMetadata->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/asset/v1/asset_service.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Asset::V1::AssetService::AnalyzeIamPolicyLongrunningMetadata
Represents the metadata of the longrunning operation for the AnalyzeIamPolicyLongrunning RPC.
Inherits from Protobuf::Message.
Accessors
$msg->create_time()/$msg->create_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The time the operation was created.
Google::Cloud::Asset::V1::AssetService::ExportAssetsRequest
Export asset request.
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. 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").
$msg->read_time()/$msg->read_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)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.
$msg->asset_types()/$msg->asset_types($value)Type:
StringA list of asset types to take a snapshot for. For example: "compute.googleapis.com/Disk".
Regular expressions are also supported. For example:
* "compute.googleapis.com.*" snapshots resources whose asset type starts with "compute.googleapis.com". * ".*Instance" snapshots resources whose asset type ends with "Instance". * ".*Instance.*" snapshots resources whose asset type contains "Instance".
See [RE2](https://github.com/google/re2/wiki/Syntax) 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](https://cloud.google.com/asset-inventory/docs/overview) for all supported asset types.
$msg->content_type()/$msg->content_type($value)Type:
Enum(Google::Cloud::Asset::V1::ContentType)Asset content type. If not specified, no content but the asset name will be returned.
$msg->output_config()/$msg->output_config($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::OutputConfig)Required. Output configuration indicating where the results will be output to.
$msg->relationship_types()/$msg->relationship_types($value)Type:
StringA list of relationship types to export, for example: `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if content_type=RELATIONSHIP. * If specified: it snapshots specified relationships. It returns an error if any of the [relationship_types] doesn't belong to the supported relationship types of the [asset_types] or if any of the [asset_types] doesn't belong to the source types of the [relationship_types]. * Otherwise: it snapshots the supported relationships for all [asset_types] or returns an error if any of the [asset_types] has no relationship support. An unspecified asset types field means all supported asset_types. See [Introduction to Cloud Asset Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all supported asset types and relationship types.
Google::Cloud::Asset::V1::AssetService::ExportAssetsResponse
The export asset response. This message is returned by the [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] method in the returned [google.longrunning.Operation.response][google.longrunning.Operation.response] field.
Inherits from Protobuf::Message.
Accessors
$msg->read_time()/$msg->read_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Time the snapshot was taken.
$msg->output_config()/$msg->output_config($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::OutputConfig)Output configuration indicating where the results were output to.
$msg->output_result()/$msg->output_result($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::OutputResult)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.
Google::Cloud::Asset::V1::AssetService::ListAssetsRequest
ListAssets request.
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. Name of the organization, folder, or project the assets belong to. Format: "organizations/[organization-number]" (such as "organizations/123"), "projects/[project-id]" (such as "projects/my-project-id"), "projects/[project-number]" (such as "projects/12345"), or "folders/[folder-number]" (such as "folders/12345").
$msg->read_time()/$msg->read_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)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.
$msg->asset_types()/$msg->asset_types($value)Type:
StringA list of asset types to take a snapshot for. For example: "compute.googleapis.com/Disk".
Regular expression is also supported. For example:
* "compute.googleapis.com.*" snapshots resources whose asset type starts with "compute.googleapis.com". * ".*Instance" snapshots resources whose asset type ends with "Instance". * ".*Instance.*" snapshots resources whose asset type contains "Instance".
See [RE2](https://github.com/google/re2/wiki/Syntax) 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](https://cloud.google.com/asset-inventory/docs/overview) for all supported asset types.
$msg->content_type()/$msg->content_type($value)Type:
Enum(Google::Cloud::Asset::V1::ContentType)Asset content type. If not specified, no content but the asset name will be returned.
$msg->page_size()/$msg->page_size($value)Type:
Int32The maximum number of assets to be returned in a single response. Default is 100, minimum is 1, and maximum is 1000.
$msg->page_token()/$msg->page_token($value)Type:
StringThe `next_page_token` returned from the previous `ListAssetsResponse`, or unspecified for the first `ListAssetsRequest`. It is a continuation of a prior `ListAssets` call, and the API should return the next page of assets.
$msg->relationship_types()/$msg->relationship_types($value)Type:
StringA list of relationship types to output, for example: `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if content_type=RELATIONSHIP. * If specified: it snapshots specified relationships. It returns an error if any of the [relationship_types] doesn't belong to the supported relationship types of the [asset_types] or if any of the [asset_types] doesn't belong to the source types of the [relationship_types]. * Otherwise: it snapshots the supported relationships for all [asset_types] or returns an error if any of the [asset_types] has no relationship support. An unspecified asset types field means all supported asset_types. See [Introduction to Cloud Asset Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all supported asset types and relationship types.
Google::Cloud::Asset::V1::AssetService::ListAssetsResponse
ListAssets response.
Inherits from Protobuf::Message.
Accessors
$msg->read_time()/$msg->read_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Time the snapshot was taken.
$msg->assets()/$msg->assets($value)Type:
Message(Google::Cloud::Asset::V1::Assets::Asset)Assets.
$msg->next_page_token()/$msg->next_page_token($value)Type:
StringToken to retrieve the next page of results. It expires 72 hours after the page token for the first page is generated. Set to empty if there are no remaining results.
Google::Cloud::Asset::V1::AssetService::BatchGetAssetsHistoryRequest
Batch get assets history request.
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The relative name of the root asset. It 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").
$msg->asset_names()/$msg->asset_names($value)Type:
StringA list of the full names of the assets. See: https://cloud.google.com/asset-inventory/docs/resource-name-format Example:
`//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
The request becomes a no-op if the asset name list is empty, and the max size of the asset name list is 100 in one request.
$msg->content_type()/$msg->content_type($value)Type:
Enum(Google::Cloud::Asset::V1::ContentType)Optional. The content type.
$msg->read_time_window()/$msg->read_time_window($value)Type:
Message(Google::Cloud::Asset::V1::Assets::TimeWindow)Optional. The time window for the asset history. Both start_time and end_time are optional and if set, it must be after the current time minus 35 days. If end_time is not set, it is default to current timestamp. If start_time is not set, the snapshot of the assets at end_time will be returned. The returned results contain all temporal assets whose time window overlap with read_time_window.
$msg->relationship_types()/$msg->relationship_types($value)Type:
StringOptional. A list of relationship types to output, for example: `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if content_type=RELATIONSHIP. * If specified: it outputs specified relationships' history on the [asset_names]. It returns an error if any of the [relationship_types] doesn't belong to the supported relationship types of the [asset_names] or if any of the [asset_names]'s types doesn't belong to the source types of the [relationship_types]. * Otherwise: it outputs the supported relationships' history on the [asset_names] or returns an error if any of the [asset_names]'s types has no relationship support. See [Introduction to Cloud Asset Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all supported asset types and relationship types.
Google::Cloud::Asset::V1::AssetService::BatchGetAssetsHistoryResponse
Batch get assets history response.
Inherits from Protobuf::Message.
Accessors
$msg->assets()/$msg->assets($value)Type:
Message(Google::Cloud::Asset::V1::Assets::TemporalAsset)A list of assets with valid time windows.
Google::Cloud::Asset::V1::AssetService::CreateFeedRequest
Create asset feed request.
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The name of the project/folder/organization where this feed should be created in. It can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id"), or a project number (such as "projects/12345").
$msg->feed_id()/$msg->feed_id($value)Type:
StringRequired. This is the client-assigned asset feed identifier and it needs to be unique under a specific parent project/folder/organization.
$msg->feed()/$msg->feed($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::Feed)Required. The feed details. The field `name` must be empty and it will be generated in the format of: projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id
Google::Cloud::Asset::V1::AssetService::GetFeedRequest
Get asset feed request.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The name of the Feed and it must be in the format of: projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id
Google::Cloud::Asset::V1::AssetService::ListFeedsRequest
List asset feeds request.
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The parent project/folder/organization whose feeds are to be listed. It can only be using project/folder/organization number (such as "folders/12345")", or a project ID (such as "projects/my-project-id").
Google::Cloud::Asset::V1::AssetService::ListFeedsResponse
Inherits from Protobuf::Message.
Accessors
$msg->feeds()/$msg->feeds($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::Feed)A list of feeds.
Google::Cloud::Asset::V1::AssetService::UpdateFeedRequest
Update asset feed request.
Inherits from Protobuf::Message.
Accessors
$msg->feed()/$msg->feed($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::Feed)Required. The new values of feed details. It must match an existing feed and the field `name` must be in the format of: projects/project_number/feeds/feed_id or folders/folder_number/feeds/feed_id or organizations/organization_number/feeds/feed_id.
$msg->update_mask()/$msg->update_mask($value)Type:
Message(Google::Protobuf::FieldMask::FieldMask)Required. Only updates the `feed` fields indicated by this mask. The field mask must not be empty, and it must not contain fields that are immutable or only set by the server.
Google::Cloud::Asset::V1::AssetService::DeleteFeedRequest
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The name of the feed and it must be in the format of: projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id
Google::Cloud::Asset::V1::AssetService::OutputConfig
Output configuration for export assets destination.
Inherits from Protobuf::Message.
Accessors
$msg->gcs_destination()/$msg->gcs_destination($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::GcsDestination)Destination on Cloud Storage.
$msg->bigquery_destination()/$msg->bigquery_destination($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::BigQueryDestination)Destination on BigQuery. The output table stores the fields in asset Protobuf as columns in BigQuery.
Google::Cloud::Asset::V1::AssetService::OutputResult
Output result of export assets.
Inherits from Protobuf::Message.
Accessors
$msg->gcs_result()/$msg->gcs_result($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::GcsOutputResult)Export result on Cloud Storage.
Google::Cloud::Asset::V1::AssetService::GcsOutputResult
A Cloud Storage output result.
Inherits from Protobuf::Message.
Accessors
$msg->uris()/$msg->uris($value)Type:
StringList of URIs of the Cloud Storage objects. Example: "gs://bucket_name/object_name".
Google::Cloud::Asset::V1::AssetService::GcsDestination
A Cloud Storage location.
Inherits from Protobuf::Message.
Accessors
$msg->uri()/$msg->uri($value)Type:
StringThe 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](https://cloud.google.com/storage/docs/viewing-editing-metadata) for more information.
If the specified Cloud Storage object already exists and there is no [hold](https://cloud.google.com/storage/docs/object-holds), it will be overwritten with the exported result.
$msg->uri_prefix()/$msg->uri_prefix($value)Type:
StringThe 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. <shard number> starts from 0. Example: "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is the first shard of output objects containing all compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be returned if file with the same name "gs://bucket_name/object_name_prefix" already exists.
Google::Cloud::Asset::V1::AssetService::BigQueryDestination
A BigQuery destination for exporting assets to.
Inherits from Protobuf::Message.
Accessors
$msg->dataset()/$msg->dataset($value)Type:
StringRequired. 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. Setting the `contentType` for `exportAssets` determines the [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema) of the BigQuery table. Setting `separateTablesPerAssetType` to `TRUE` also influences the schema.
$msg->table()/$msg->table($value)Type:
StringRequired. 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.
$msg->force()/$msg->force($value)Type:
BoolIf the destination table already exists and this flag is `TRUE`, the table will be overwritten by the contents of assets snapshot. If the flag is `FALSE` or unset and the destination table already exists, the export call returns an INVALID_ARGUMEMT error.
$msg->partition_spec()/$msg->partition_spec($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::PartitionSpec)[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 `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to non-partitioned table(s). [force] will decide whether to overwrite existing table(s).
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 `TRUE`, the corresponding partition will be overwritten by the snapshot results (data in different partitions will remain intact); if [force] is unset or `FALSE`, it will append the data. An error will be returned if the schema update or data appension fails.
$msg->separate_tables_per_asset_type()/$msg->separate_tables_per_asset_type($value)Type:
BoolIf this flag is `TRUE`, the snapshot results will be written to one or multiple tables, each of which contains results of one asset type. The [force] and [partition_spec] fields will apply to each of them.
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 `RESOURCE`, the schema of each table will include RECORD-type columns mapped to the nested fields in the Asset.resource.data field of that asset type (up to the 15 nested level BigQuery supports (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The fields in >15 nested levels will be stored in JSON format string as a child column of its parent RECORD column.
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.
Google::Cloud::Asset::V1::AssetService::PartitionSpec
Specifications of BigQuery partitioned table as export destination.
Inherits from Protobuf::Message.
Accessors
$msg->partition_key()/$msg->partition_key($value)Type:
Enum(Google::Cloud::Asset::V1::PartitionSpec::PartitionKey)The partition key for BigQuery partitioned table.
Enum: PartitionSpec::PartitionKey
PARTITION_KEY_UNSPECIFIED=>0READ_TIME=>1REQUEST_TIME=>2
Google::Cloud::Asset::V1::AssetService::PubsubDestination
A Pub/Sub destination.
Inherits from Protobuf::Message.
Accessors
$msg->topic()/$msg->topic($value)Type:
StringThe name of the Pub/Sub topic to publish to. Example: `projects/PROJECT_ID/topics/TOPIC_ID`.
Google::Cloud::Asset::V1::AssetService::FeedOutputConfig
Output configuration for asset feed destination.
Inherits from Protobuf::Message.
Accessors
$msg->pubsub_destination()/$msg->pubsub_destination($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::PubsubDestination)Destination on Pub/Sub.
Google::Cloud::Asset::V1::AssetService::Feed
An asset feed used to export asset updates to a destinations. An asset feed filter controls what updates are exported. The asset feed must be created within a project, organization, or folder. Supported destinations are: Pub/Sub topics.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The format will be projects/{project_number}/feeds/{client-assigned_feed_identifier} or folders/{folder_number}/feeds/{client-assigned_feed_identifier} or organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
The client-assigned feed identifier must be unique within the parent project/folder/organization.
$msg->asset_names()/$msg->asset_names($value)Type:
StringA list of the full names of the assets to receive updates. You must specify either or both of asset_names and asset_types. Only asset updates matching specified asset_names or asset_types are exported to the feed. Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. For a list of the full names for supported asset types, see [Resource name format](/asset-inventory/docs/resource-name-format).
$msg->asset_types()/$msg->asset_types($value)Type:
StringA list of types of the assets to receive updates. You must specify either or both of asset_names and asset_types. Only asset updates matching specified asset_names or asset_types are exported to the feed. Example: `"compute.googleapis.com/Disk"`
For a list of all supported asset types, see [Supported asset types](/asset-inventory/docs/supported-asset-types).
$msg->content_type()/$msg->content_type($value)Type:
Enum(Google::Cloud::Asset::V1::ContentType)Asset content type. If not specified, no content but the asset name and type will be returned.
$msg->feed_output_config()/$msg->feed_output_config($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::FeedOutputConfig)Required. Feed output configuration defining where the asset updates are published to.
$msg->condition()/$msg->condition($value)Type:
Message(Google::Type::Expr::Expr)A condition which determines whether an asset update should be published. If specified, an asset will be returned only when the expression evaluates to true. When set, `expression` field in the `Expr` must be a valid [CEL expression] (https://github.com/google/cel-spec) on a TemporalAsset with name `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted == true") will only publish Asset deletions. Other fields of `Expr` are optional.
See our [user guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition) for detailed instructions.
$msg->relationship_types()/$msg->relationship_types($value)Type:
StringA list of relationship types to output, for example: `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if content_type=RELATIONSHIP. * If specified: it outputs specified relationship updates on the [asset_names] or the [asset_types]. It returns an error if any of the [relationship_types] doesn't belong to the supported relationship types of the [asset_names] or [asset_types], or any of the [asset_names] or the [asset_types] doesn't belong to the source types of the [relationship_types]. * Otherwise: it outputs the supported relationships of the types of [asset_names] and [asset_types] or returns an error if any of the [asset_names] or the [asset_types] has no replationship support. See [Introduction to Cloud Asset Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all supported asset types and relationship types.
Google::Cloud::Asset::V1::AssetService::SearchAllResourcesRequest
Search all resources request.
Inherits from Protobuf::Message.
Accessors
$msg->scope()/$msg->scope($value)Type:
StringRequired. A scope can be a project, a folder, or an organization. The search is limited to the resources within the `scope`. The caller must be granted the [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) permission on the desired scope.
The allowed values are:
* projects/{PROJECT_ID} (e.g., "projects/foo-bar") * projects/{PROJECT_NUMBER} (e.g., "projects/12345678") * folders/{FOLDER_NUMBER} (e.g., "folders/1234567") * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
$msg->query()/$msg->query($value)Type:
StringOptional. The query statement. See [how to construct a query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query) for more information. If not specified or empty, it will search all the resources within the specified `scope`.
Examples:
* `name:Important` to find Google Cloud resources whose name contains `Important` as a word. * `name=Important` to find the Google Cloud resource whose name is exactly `Important`. * `displayName:Impor*` to find Google Cloud resources whose display name contains `Impor` as a prefix of any word in the field. * `location:us-west*` to find Google Cloud resources whose location contains both `us` and `west` as prefixes. * `labels:prod` to find Google Cloud resources whose labels contain `prod` as a key or value. * `labels.env:prod` to find Google Cloud resources that have a label `env` and its value is `prod`. * `labels.env:*` to find Google Cloud resources that have a label `env`. * `tagKeys:env` to find Google Cloud resources that have directly attached tags where the [`TagKey.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys#resource:-tagkey) contains `env`. * `tagValues:prod*` to find Google Cloud resources that have directly attached tags where the [`TagValue.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) contains a word prefixed by `prod`. * `tagValueIds=tagValues/123` to find Google Cloud resources that have directly attached tags where the [`TagValue.name`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) is exactly `tagValues/123`. * `effectiveTagKeys:env` to find Google Cloud resources that have directly attached or inherited tags where the [`TagKey.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys#resource:-tagkey) contains `env`. * `effectiveTagValues:prod*` to find Google Cloud resources that have directly attached or inherited tags where the [`TagValue.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) contains a word prefixed by `prod`. * `effectiveTagValueIds=tagValues/123` to find Google Cloud resources that have directly attached or inherited tags where the [`TagValue.name`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) is exactly `tagValues/123`. * `kmsKey:key` to find Google Cloud resources encrypted with a customer-managed encryption key whose name contains `key` as a word. This field is deprecated. Use the `kmsKeys` field to retrieve Cloud KMS key information. * `kmsKeys:key` to find Google Cloud resources encrypted with customer-managed encryption keys whose name contains the word `key`. * `relationships:instance-group-1` to find Google Cloud resources that have relationships with `instance-group-1` in the related resource name. * `relationships:INSTANCE_TO_INSTANCEGROUP` to find Compute Engine instances that have relationships of type `INSTANCE_TO_INSTANCEGROUP`. * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find Compute Engine instances that have relationships with `instance-group-1` in the Compute Engine instance group resource name, for relationship type `INSTANCE_TO_INSTANCEGROUP`. * `sccSecurityMarks.key=value` to find Cloud resources that are attached with security marks whose key is `key` and value is `value`. * `sccSecurityMarks.key:*` to find Cloud resources that are attached with security marks whose key is `key`. * `state:ACTIVE` to find Google Cloud resources whose state contains `ACTIVE` as a word. * `NOT state:ACTIVE` to find Google Cloud resources whose state doesn't contain `ACTIVE` as a word. * `createTime<1609459200` to find Google Cloud resources that were created before `2021-01-01 00:00:00 UTC`. `1609459200` is the epoch timestamp of `2021-01-01 00:00:00 UTC` in seconds. * `updateTime>1609459200` to find Google Cloud resources that were updated after `2021-01-01 00:00:00 UTC`. `1609459200` is the epoch timestamp of `2021-01-01 00:00:00 UTC` in seconds. * `Important` to find Google Cloud resources that contain `Important` as a word in any of the searchable fields. * `Impor*` to find Google Cloud resources that contain `Impor` as a prefix of any word in any of the searchable fields. * `Important location:(us-west1 OR global)` to find Google Cloud resources that contain `Important` as a word in any of the searchable fields and are also located in the `us-west1` region or the `global` location.
$msg->asset_types()/$msg->asset_types($value)Type:
StringOptional. A list of asset types that this request searches for. If empty, it will search all the asset types [supported by search APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types).
Regular expressions are also supported. For example:
* "compute.googleapis.com.*" snapshots resources whose asset type starts with "compute.googleapis.com". * ".*Instance" snapshots resources whose asset type ends with "Instance". * ".*Instance.*" snapshots resources whose asset type contains "Instance".
See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported regular expression syntax. If the regular expression does not match any supported asset type, an INVALID_ARGUMENT error will be returned.
$msg->page_size()/$msg->page_size($value)Type:
Int32Optional. The page size for search result pagination. Page size is capped at 500 even if a larger value is given. If set to zero or a negative value, server will pick an appropriate default. Returned results may be fewer than requested. When this happens, there could be more results as long as `next_page_token` is returned.
$msg->page_token()/$msg->page_token($value)Type:
StringOptional. If present, then retrieve the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of all other method parameters, must be identical to those in the previous call.
$msg->order_by()/$msg->order_by($value)Type:
StringOptional. A comma-separated list of fields specifying the sorting order of the results. The default order is ascending. Add " DESC" after the field name to indicate descending order. Redundant space characters are ignored. Example: "location DESC, name". Only the following fields in the response are sortable:
* name * assetType * project * displayName * description * location * createTime * updateTime * state * parentFullResourceName * parentAssetType$msg->read_mask()/$msg->read_mask($value)Type:
Message(Google::Protobuf::FieldMask::FieldMask)Optional. A comma-separated list of fields that you want returned in the results. The following fields are returned by default if not specified:
* `name` * `assetType` * `project` * `folders` * `organization` * `displayName` * `description` * `location` * `labels` * `tags` * `effectiveTags` * `networkTags` * `kmsKeys` * `createTime` * `updateTime` * `state` * `additionalAttributes` * `parentFullResourceName` * `parentAssetType`Some fields of large size, such as `versionedResources`, `attachedResources`, `effectiveTags` etc., are not returned by default, but you can specify them in the `read_mask` parameter if you want to include them. If `"*"` is specified, all [available fields](https://cloud.google.com/asset-inventory/docs/reference/rest/v1/TopLevel/searchAllResources#resourcesearchresult) are returned. Examples: `"name,location"`, `"name,versionedResources"`, `"*"`. Any invalid field path will trigger INVALID_ARGUMENT error.
Google::Cloud::Asset::V1::AssetService::SearchAllResourcesResponse
Search all resources response.
Inherits from Protobuf::Message.
Accessors
$msg->results()/$msg->results($value)Type:
Message(Google::Cloud::Asset::V1::Assets::ResourceSearchResult)A list of Resources that match the search query. It contains the resource standard metadata information.
$msg->next_page_token()/$msg->next_page_token($value)Type:
StringIf there are more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.
Google::Cloud::Asset::V1::AssetService::SearchAllIamPoliciesRequest
Search all IAM policies request.
Inherits from Protobuf::Message.
Accessors
$msg->scope()/$msg->scope($value)Type:
StringRequired. A scope can be a project, a folder, or an organization. The search is limited to the IAM policies within the `scope`. The caller must be granted the [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) permission on the desired scope.
The allowed values are:
* projects/{PROJECT_ID} (e.g., "projects/foo-bar") * projects/{PROJECT_NUMBER} (e.g., "projects/12345678") * folders/{FOLDER_NUMBER} (e.g., "folders/1234567") * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
$msg->query()/$msg->query($value)Type:
StringOptional. The query statement. See [how to construct a query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) for more information. If not specified or empty, it will search all the IAM policies within the specified `scope`. Note that the query string is compared against each IAM policy binding, including its principals, roles, and IAM conditions. The returned IAM policies will only contain the bindings that match your query. To learn more about the IAM policy structure, see the [IAM policy documentation](https://cloud.google.com/iam/help/allow-policies/structure).
Examples:
* `policy:amy@gmail.com` to find IAM policy bindings that specify user "amy@gmail.com". * `policy:roles/compute.admin` to find IAM policy bindings that specify the Compute Admin role. * `policy:comp*` to find IAM policy bindings that contain "comp" as a prefix of any word in the binding. * `policy.role.permissions:storage.buckets.update` to find IAM policy bindings that specify a role containing "storage.buckets.update" permission. Note that if callers don't have `iam.roles.get` access to a role's included permissions, policy bindings that specify this role will be dropped from the search results. * `policy.role.permissions:upd*` to find IAM policy bindings that specify a role containing "upd" as a prefix of any word in the role permission. Note that if callers don't have `iam.roles.get` access to a role's included permissions, policy bindings that specify this role will be dropped from the search results. * `resource:organizations/123456` to find IAM policy bindings that are set on "organizations/123456". * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to find IAM policy bindings that are set on the project named "myproject". * `Important` to find IAM policy bindings that contain "Important" as a word in any of the searchable fields (except for the included permissions). * `resource:(instance1 OR instance2) policy:amy` to find IAM policy bindings that are set on resources "instance1" or "instance2" and also specify user "amy". * `roles:roles/compute.admin` to find IAM policy bindings that specify the Compute Admin role. * `memberTypes:user` to find IAM policy bindings that contain the principal type "user".
$msg->page_size()/$msg->page_size($value)Type:
Int32Optional. The page size for search result pagination. Page size is capped at 500 even if a larger value is given. If set to zero or a negative value, server will pick an appropriate default. Returned results may be fewer than requested. When this happens, there could be more results as long as `next_page_token` is returned.
$msg->page_token()/$msg->page_token($value)Type:
StringOptional. If present, retrieve the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of all other method parameters must be identical to those in the previous call.
$msg->asset_types()/$msg->asset_types($value)Type:
StringOptional. A list of asset types that the IAM policies are attached to. If empty, it will search the IAM policies that are attached to all the asset types [supported by search APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
Regular expressions are also supported. For example:
* "compute.googleapis.com.*" snapshots IAM policies attached to asset type starts with "compute.googleapis.com". * ".*Instance" snapshots IAM policies attached to asset type ends with "Instance". * ".*Instance.*" snapshots IAM policies attached to asset type contains "Instance".
See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported regular expression syntax. If the regular expression does not match any supported asset type, an INVALID_ARGUMENT error will be returned.
$msg->order_by()/$msg->order_by($value)Type:
StringOptional. A comma-separated list of fields specifying the sorting order of the results. The default order is ascending. Add " DESC" after the field name to indicate descending order. Redundant space characters are ignored. Example: "assetType DESC, resource". Only singular primitive fields in the response are sortable: * resource * assetType * project All the other fields such as repeated fields (e.g., `folders`) and non-primitive fields (e.g., `policy`) are not supported.
Google::Cloud::Asset::V1::AssetService::SearchAllIamPoliciesResponse
Search all IAM policies response.
Inherits from Protobuf::Message.
Accessors
$msg->results()/$msg->results($value)Type:
Message(Google::Cloud::Asset::V1::Assets::IamPolicySearchResult)A list of IAM policies that match the search query. Related information such as the associated resource is returned along with the policy.
$msg->next_page_token()/$msg->next_page_token($value)Type:
StringSet if there are more results than those appearing in this response; to get the next set of results, call this method again, using this value as the `page_token`.
Google::Cloud::Asset::V1::AssetService::IamPolicyAnalysisQuery
IAM policy analysis query message.
Inherits from Protobuf::Message.
Accessors
$msg->scope()/$msg->scope($value)Type:
StringRequired. The relative name of the root asset. Only resources and IAM policies within the scope will be analyzed.
This can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id"), or a project number (such as "projects/12345").
To know how to get organization ID, visit [here ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
To know how to get folder or project ID, visit [here ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
$msg->resource_selector()/$msg->resource_selector($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::IamPolicyAnalysisQuery::ResourceSelector)Optional. Specifies a resource for analysis.
$msg->identity_selector()/$msg->identity_selector($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::IamPolicyAnalysisQuery::IdentitySelector)Optional. Specifies an identity for analysis.
$msg->access_selector()/$msg->access_selector($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::IamPolicyAnalysisQuery::AccessSelector)Optional. Specifies roles or permissions for analysis. This is optional.
$msg->options()/$msg->options($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::IamPolicyAnalysisQuery::Options)Optional. The query options.
$msg->condition_context()/$msg->condition_context($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::IamPolicyAnalysisQuery::ConditionContext)Optional. The hypothetical context for IAM conditions evaluation.
Google::Cloud::Asset::V1::AssetService::AnalyzeIamPolicyRequest
A request message for [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy].
Inherits from Protobuf::Message.
Accessors
$msg->analysis_query()/$msg->analysis_query($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::IamPolicyAnalysisQuery)Required. The request query.
$msg->saved_analysis_query()/$msg->saved_analysis_query($value)Type:
StringOptional. The name of a saved query, which must be in the format of:
* projects/project_number/savedQueries/saved_query_id * folders/folder_number/savedQueries/saved_query_id * organizations/organization_number/savedQueries/saved_query_id
If both `analysis_query` and `saved_analysis_query` are provided, they will be merged together with the `saved_analysis_query` as base and the `analysis_query` as overrides. For more details of the merge behavior, refer to the [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details) page.
Note that you cannot override primitive fields with default value, such as 0 or empty string, etc., because we use proto3, which doesn't support field presence yet.
$msg->execution_timeout()/$msg->execution_timeout($value)Type:
Message(Google::Protobuf::Duration::Duration)Optional. Amount of time executable has to complete. See JSON representation of [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
If this field is set with a value less than the RPC deadline, and the execution of your query hasn't finished in the specified execution timeout, you will get a response with partial result. Otherwise, your query's execution will continue until the RPC deadline. If it's not finished until then, you will get a DEADLINE_EXCEEDED error.
Default is empty.
Google::Cloud::Asset::V1::AssetService::AnalyzeIamPolicyResponse
A response message for [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy].
Inherits from Protobuf::Message.
Accessors
$msg->main_analysis()/$msg->main_analysis($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::AnalyzeIamPolicyResponse::IamPolicyAnalysis)The main analysis that matches the original request.
$msg->service_account_impersonation_analysis()/$msg->service_account_impersonation_analysis($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::AnalyzeIamPolicyResponse::IamPolicyAnalysis)The service account impersonation analysis if [IamPolicyAnalysisQuery.Options.analyze_service_account_impersonation][google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.analyze_service_account_impersonation] is enabled.
$msg->fully_explored()/$msg->fully_explored($value)Type:
BoolRepresents whether all entries in the [main_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.main_analysis] and [service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis] have been fully explored to answer the query in the request.
Google::Cloud::Asset::V1::AssetService::IamPolicyAnalysisOutputConfig
Output configuration for export IAM policy analysis destination.
Inherits from Protobuf::Message.
Accessors
$msg->gcs_destination()/$msg->gcs_destination($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::IamPolicyAnalysisOutputConfig::GcsDestination)Destination on Cloud Storage.
$msg->bigquery_destination()/$msg->bigquery_destination($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::IamPolicyAnalysisOutputConfig::BigQueryDestination)Destination on BigQuery.
Google::Cloud::Asset::V1::AssetService::AnalyzeIamPolicyLongrunningRequest
A request message for [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning].
Inherits from Protobuf::Message.
Accessors
$msg->analysis_query()/$msg->analysis_query($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::IamPolicyAnalysisQuery)Required. The request query.
$msg->saved_analysis_query()/$msg->saved_analysis_query($value)Type:
StringOptional. The name of a saved query, which must be in the format of:
* projects/project_number/savedQueries/saved_query_id * folders/folder_number/savedQueries/saved_query_id * organizations/organization_number/savedQueries/saved_query_id
If both `analysis_query` and `saved_analysis_query` are provided, they will be merged together with the `saved_analysis_query` as base and the `analysis_query` as overrides. For more details of the merge behavior, refer to the [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details) doc.
Note that you cannot override primitive fields with default value, such as 0 or empty string, etc., because we use proto3, which doesn't support field presence yet.
$msg->output_config()/$msg->output_config($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::IamPolicyAnalysisOutputConfig)Required. Output configuration indicating where the results will be output to.
Google::Cloud::Asset::V1::AssetService::AnalyzeIamPolicyLongrunningResponse
A response message for [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning].
Inherits from Protobuf::Message.
Google::Cloud::Asset::V1::AssetService::SavedQuery
A saved query which can be shared with others or used later.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringThe resource name of the saved query. The format must be:
* projects/project_number/savedQueries/saved_query_id * folders/folder_number/savedQueries/saved_query_id * organizations/organization_number/savedQueries/saved_query_id
$msg->description()/$msg->description($value)Type:
StringThe description of this saved query. This value should be fewer than 255 characters.
$msg->create_time()/$msg->create_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The create time of this saved query.
$msg->creator()/$msg->creator($value)Type:
StringOutput only. The account's email address who has created this saved query.
$msg->last_update_time()/$msg->last_update_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The last update time of this saved query.
$msg->last_updater()/$msg->last_updater($value)Type:
StringOutput only. The account's email address who has updated this saved query most recently.
$msg->labels()/$msg->labels($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::SavedQuery::LabelsEntry)Labels applied on the resource. This value should not contain more than 10 entries. The key and value of each entry must be non-empty and fewer than 64 characters.
$msg->content()/$msg->content($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::SavedQuery::QueryContent)The query content.
Google::Cloud::Asset::V1::AssetService::CreateSavedQueryRequest
Request to create a saved query.
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The name of the project/folder/organization where this saved_query should be created in. It can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id"), or a project number (such as "projects/12345").
$msg->saved_query()/$msg->saved_query($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::SavedQuery)Required. The saved_query details. The `name` field must be empty as it will be generated based on the parent and saved_query_id.
$msg->saved_query_id()/$msg->saved_query_id($value)Type:
StringRequired. The ID to use for the saved query, which must be unique in the specified parent. It will become the final component of the saved query's resource name.
This value should be 4-63 characters, and valid characters are `[a-z][0-9]-`.
Notice that this field is required in the saved query creation, and the `name` field of the `saved_query` will be ignored.
Google::Cloud::Asset::V1::AssetService::GetSavedQueryRequest
Request to get a saved query.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The name of the saved query and it must be in the format of:
* projects/project_number/savedQueries/saved_query_id * folders/folder_number/savedQueries/saved_query_id * organizations/organization_number/savedQueries/saved_query_id
Google::Cloud::Asset::V1::AssetService::ListSavedQueriesRequest
Request to list saved queries.
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The parent project/folder/organization whose savedQueries are to be listed. It can only be using project/folder/organization number (such as "folders/12345")", or a project ID (such as "projects/my-project-id").
$msg->filter()/$msg->filter($value)Type:
StringOptional. The expression to filter resources. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. When `AND` and `OR` are both used in the expression, parentheses must be appropriately used to group the combinations. The expression may also contain regular expressions.
See https://google.aip.dev/160 for more information on the grammar.
$msg->page_size()/$msg->page_size($value)Type:
Int32Optional. The maximum number of saved queries to return per page. The service may return fewer than this value. If unspecified, at most 50 will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
$msg->page_token()/$msg->page_token($value)Type:
StringOptional. A page token, received from a previous `ListSavedQueries` call. Provide this to retrieve the subsequent page.
When paginating, all other parameters provided to `ListSavedQueries` must match the call that provided the page token.
Google::Cloud::Asset::V1::AssetService::ListSavedQueriesResponse
Response of listing saved queries.
Inherits from Protobuf::Message.
Accessors
$msg->saved_queries()/$msg->saved_queries($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::SavedQuery)A list of savedQueries.
$msg->next_page_token()/$msg->next_page_token($value)Type:
StringA token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
Google::Cloud::Asset::V1::AssetService::UpdateSavedQueryRequest
Request to update a saved query.
Inherits from Protobuf::Message.
Accessors
$msg->saved_query()/$msg->saved_query($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::SavedQuery)Required. The saved query to update.
The saved query's `name` field is used to identify the one to update, which has format as below:
* projects/project_number/savedQueries/saved_query_id * folders/folder_number/savedQueries/saved_query_id * organizations/organization_number/savedQueries/saved_query_id
$msg->update_mask()/$msg->update_mask($value)Type:
Message(Google::Protobuf::FieldMask::FieldMask)Required. The list of fields to update.
Google::Cloud::Asset::V1::AssetService::DeleteSavedQueryRequest
Request to delete a saved query.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The name of the saved query to delete. It must be in the format of:
* projects/project_number/savedQueries/saved_query_id * folders/folder_number/savedQueries/saved_query_id * organizations/organization_number/savedQueries/saved_query_id
Google::Cloud::Asset::V1::AssetService::AnalyzeMoveRequest
The request message for performing resource move analysis.
Inherits from Protobuf::Message.
Accessors
$msg->resource()/$msg->resource($value)Type:
StringRequired. Name of the resource to perform the analysis against. Only Google Cloud projects are supported as of today. Hence, this can only be a project ID (such as "projects/my-project-id") or a project number (such as "projects/12345").
$msg->destination_parent()/$msg->destination_parent($value)Type:
StringRequired. Name of the Google Cloud folder or organization to reparent the target resource. The analysis will be performed against hypothetically moving the resource to this specified destination parent. This can only be a folder number (such as "folders/123") or an organization number (such as "organizations/123").
$msg->view()/$msg->view($value)Type:
Enum(Google::Cloud::Asset::V1::AnalyzeMoveRequest::AnalysisView)Analysis view indicating what information should be included in the analysis response. If unspecified, the default view is FULL.
Enum: AnalyzeMoveRequest::AnalysisView
ANALYSIS_VIEW_UNSPECIFIED=>0FULL=>1BASIC=>2
Google::Cloud::Asset::V1::AssetService::AnalyzeMoveResponse
The response message for resource move analysis.
Inherits from Protobuf::Message.
Accessors
$msg->move_analysis()/$msg->move_analysis($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::MoveAnalysis)The list of analyses returned from performing the intended resource move analysis. The analysis is grouped by different Google Cloud services.
Google::Cloud::Asset::V1::AssetService::MoveAnalysis
A message to group the analysis information.
Inherits from Protobuf::Message.
Accessors
$msg->display_name()/$msg->display_name($value)Type:
StringThe user friendly display name of the analysis. E.g. IAM, organization policy etc.
$msg->analysis()/$msg->analysis($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::MoveAnalysisResult)Analysis result of moving the target resource.
$msg->error()/$msg->error($value)Type:
Message(Google::Rpc::Status::Status)Description of error encountered when performing the analysis.
Google::Cloud::Asset::V1::AssetService::MoveAnalysisResult
An analysis result including blockers and warnings.
Inherits from Protobuf::Message.
Accessors
$msg->blockers()/$msg->blockers($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::MoveImpact)Blocking information that would prevent the target resource from moving to the specified destination at runtime.
$msg->warnings()/$msg->warnings($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::MoveImpact)Warning information indicating that moving the target resource to the specified destination might be unsafe. This can include important policy information and configuration changes, but will not block moves at runtime.
Google::Cloud::Asset::V1::AssetService::MoveImpact
A message to group impacts of moving the target resource.
Inherits from Protobuf::Message.
Accessors
$msg->detail()/$msg->detail($value)Type:
StringUser friendly impact detail in a free form message.
Google::Cloud::Asset::V1::AssetService::QueryAssetsOutputConfig
Output configuration query assets.
Inherits from Protobuf::Message.
Accessors
$msg->bigquery_destination()/$msg->bigquery_destination($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::QueryAssetsOutputConfig::BigQueryDestination)BigQuery destination where the query results will be saved.
Google::Cloud::Asset::V1::AssetService::QueryAssetsRequest
QueryAssets request.
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. 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").
Only assets belonging to the `parent` will be returned.
$msg->statement()/$msg->statement($value)Type:
StringOptional. A SQL statement that's compatible with [BigQuery SQL](https://cloud.google.com/bigquery/docs/introduction-sql).
$msg->job_reference()/$msg->job_reference($value)Type:
StringOptional. Reference to the query job, which is from the `QueryAssetsResponse` of previous `QueryAssets` call.
$msg->page_size()/$msg->page_size($value)Type:
Int32Optional. The maximum number of rows to return in the results. Responses are limited to 10 MB and 1000 rows.
By default, the maximum row count is 1000. When the byte or row count limit is reached, the rest of the query results will be paginated.
The field will be ignored when [output_config] is specified.
$msg->page_token()/$msg->page_token($value)Type:
StringOptional. A page token received from previous `QueryAssets`.
The field will be ignored when [output_config] is specified.
$msg->timeout()/$msg->timeout($value)Type:
Message(Google::Protobuf::Duration::Duration)Optional. Specifies the maximum amount of time that the client is willing to wait for the query to complete. By default, this limit is 5 min for the first query, and 1 minute for the following queries. If the query is complete, the `done` field in the `QueryAssetsResponse` is true, otherwise false.
Like BigQuery [jobs.query API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest) The call is not guaranteed to wait for the specified timeout; it typically returns after around 200 seconds (200,000 milliseconds), even if the query is not complete.
The field will be ignored when [output_config] is specified.
$msg->read_time_window()/$msg->read_time_window($value)Type:
Message(Google::Cloud::Asset::V1::Assets::TimeWindow)Optional. [start_time] is required. [start_time] must be less than [end_time] Defaults [end_time] to now if [start_time] is set and [end_time] isn't. Maximum permitted time range is 7 days.
$msg->read_time()/$msg->read_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Optional. Queries cloud assets as they appeared at the specified point in time.
$msg->output_config()/$msg->output_config($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::QueryAssetsOutputConfig)Optional. Destination where the query results will be saved.
When this field is specified, the query results won't be saved in the [QueryAssetsResponse.query_result]. Instead [QueryAssetsResponse.output_config] will be set.
Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used to check the status of the query job when passed to a following [QueryAssets] API call.
Google::Cloud::Asset::V1::AssetService::QueryAssetsResponse
QueryAssets response.
Inherits from Protobuf::Message.
Accessors
$msg->job_reference()/$msg->job_reference($value)Type:
StringReference to a query job.
$msg->done()/$msg->done($value)Type:
BoolThe query response, which can be either an `error` or a valid `response`.
If `done` == `false` and the query result is being saved in an output, the output_config field will be set. If `done` == `true`, exactly one of `error`, `query_result` or `output_config` will be set. [done] is unset unless the [QueryAssetsResponse] contains a [QueryAssetsResponse.job_reference].
$msg->error()/$msg->error($value)Type:
Message(Google::Rpc::Status::Status)Error status.
$msg->query_result()/$msg->query_result($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::QueryResult)Result of the query.
$msg->output_config()/$msg->output_config($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::QueryAssetsOutputConfig)Output configuration, which indicates that instead of being returned in an API response on the fly, the query result will be saved in a specific output.
Google::Cloud::Asset::V1::AssetService::QueryResult
Execution results of the query.
The result is formatted as rows represented by BigQuery compatible [schema]. When pagination is necessary, it will contains the page token to retrieve the results of following pages.
Inherits from Protobuf::Message.
Accessors
$msg->rows()/$msg->rows($value)Type:
Message(Google::Protobuf::Struct::Struct)Each row hold a query result in the format of `Struct`.
$msg->schema()/$msg->schema($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::TableSchema)Describes the format of the [rows].
$msg->next_page_token()/$msg->next_page_token($value)Type:
StringToken to retrieve the next page of the results.
$msg->total_rows()/$msg->total_rows($value)Type:
Int64Total rows of the whole query results.
Google::Cloud::Asset::V1::AssetService::TableSchema
BigQuery Compatible table schema.
Inherits from Protobuf::Message.
Accessors
$msg->fields()/$msg->fields($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::TableFieldSchema)Describes the fields in a table.
Google::Cloud::Asset::V1::AssetService::TableFieldSchema
A field in TableSchema.
Inherits from Protobuf::Message.
Accessors
$msg->field()/$msg->field($value)Type:
StringThe field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters.
$msg->type()/$msg->type($value)Type:
StringThe field data type. Possible values include * STRING * BYTES * INTEGER * FLOAT * BOOLEAN * TIMESTAMP * DATE * TIME * DATETIME * GEOGRAPHY, * NUMERIC, * BIGNUMERIC, * RECORD (where RECORD indicates that the field contains a nested schema).
$msg->mode()/$msg->mode($value)Type:
StringThe field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
$msg->fields()/$msg->fields($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::TableFieldSchema)Describes the nested schema fields if the type property is set to RECORD.
Google::Cloud::Asset::V1::AssetService::BatchGetEffectiveIamPoliciesRequest
A request message for [AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies].
Inherits from Protobuf::Message.
Accessors
$msg->scope()/$msg->scope($value)Type:
StringRequired. Only IAM policies on or below the scope will be returned.
This can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id"), or a project number (such as "projects/12345").
To know how to get organization ID, visit [here ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
To know how to get folder or project ID, visit [here ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
$msg->names()/$msg->names($value)Type:
StringRequired. The names refer to the [full_resource_names] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of the asset types [supported by search APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types). A maximum of 20 resources' effective policies can be retrieved in a batch.
Google::Cloud::Asset::V1::AssetService::BatchGetEffectiveIamPoliciesResponse
A response message for [AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies].
Inherits from Protobuf::Message.
Accessors
$msg->policy_results()/$msg->policy_results($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy)The effective policies for a batch of resources. Note that the results order is the same as the order of [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]. When a resource does not have any effective IAM policies, its corresponding policy_result will contain empty [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
Google::Cloud::Asset::V1::AssetService::AnalyzerOrgPolicy
This organization policy message is a modified version of the one defined in the Organization Policy system. This message contains several fields defined in the original organization policy with some new fields for analysis purpose.
Inherits from Protobuf::Message.
Accessors
$msg->attached_resource()/$msg->attached_resource($value)Type:
StringThe [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of an organization/folder/project resource where this organization policy is set.
Notice that some type of constraints are defined with default policy. This field will be empty for them.
$msg->applied_resource()/$msg->applied_resource($value)Type:
StringThe [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of an organization/folder/project resource where this organization policy applies to.
For any user defined org policies, this field has the same value as the [attached_resource] field. Only for default policy, this field has the different value.
$msg->rules()/$msg->rules($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::AnalyzerOrgPolicy::Rule)List of rules for this organization policy.
$msg->inherit_from_parent()/$msg->inherit_from_parent($value)Type:
BoolIf `inherit_from_parent` is true, Rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the effective root for evaluation.
$msg->reset()/$msg->reset($value)Type:
BoolIgnores policies set above this resource and restores the default behavior of the constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
Google::Cloud::Asset::V1::AssetService::AnalyzerOrgPolicyConstraint
The organization policy constraint definition.
Inherits from Protobuf::Message.
Accessors
$msg->google_defined_constraint()/$msg->google_defined_constraint($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::AnalyzerOrgPolicyConstraint::Constraint)The definition of the canned constraint defined by Google.
$msg->custom_constraint()/$msg->custom_constraint($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::AnalyzerOrgPolicyConstraint::CustomConstraint)The definition of the custom constraint.
Google::Cloud::Asset::V1::AssetService::AnalyzeOrgPoliciesRequest
A request message for [AssetService.AnalyzeOrgPolicies][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicies].
Inherits from Protobuf::Message.
Accessors
$msg->scope()/$msg->scope($value)Type:
StringRequired. The organization to scope the request. Only organization policies within the scope will be analyzed.
* organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
$msg->constraint()/$msg->constraint($value)Type:
StringRequired. The name of the constraint to analyze organization policies for. The response only contains analyzed organization policies for the provided constraint.
$msg->filter()/$msg->filter($value)Type:
StringThe expression to filter [AnalyzeOrgPoliciesResponse.org_policy_results][google.cloud.asset.v1.AnalyzeOrgPoliciesResponse.org_policy_results]. Filtering is currently available for bare literal values and the following fields: * consolidated_policy.attached_resource * consolidated_policy.rules.enforce
When filtering by a specific field, the only supported operator is `=`. For example, filtering by consolidated_policy.attached_resource="//cloudresourcemanager.googleapis.com/folders/001" will return all the Organization Policy results attached to "folders/001".
$msg->page_size()/$msg->page_size($value)Type:
Int32The maximum number of items to return per page. If unspecified, [AnalyzeOrgPoliciesResponse.org_policy_results][google.cloud.asset.v1.AnalyzeOrgPoliciesResponse.org_policy_results] will contain 20 items with a maximum of 200.
$msg->page_token()/$msg->page_token($value)Type:
StringThe pagination token to retrieve the next page.
Google::Cloud::Asset::V1::AssetService::AnalyzeOrgPoliciesResponse
The response message for [AssetService.AnalyzeOrgPolicies][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicies].
Inherits from Protobuf::Message.
Accessors
$msg->org_policy_results()/$msg->org_policy_results($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::AnalyzeOrgPoliciesResponse::OrgPolicyResult)The organization policies under the [AnalyzeOrgPoliciesRequest.scope][google.cloud.asset.v1.AnalyzeOrgPoliciesRequest.scope] with the [AnalyzeOrgPoliciesRequest.constraint][google.cloud.asset.v1.AnalyzeOrgPoliciesRequest.constraint].
$msg->constraint()/$msg->constraint($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::AnalyzerOrgPolicyConstraint)The definition of the constraint in the request.
$msg->next_page_token()/$msg->next_page_token($value)Type:
StringThe page token to fetch the next page for [AnalyzeOrgPoliciesResponse.org_policy_results][google.cloud.asset.v1.AnalyzeOrgPoliciesResponse.org_policy_results].
Google::Cloud::Asset::V1::AssetService::AnalyzeOrgPolicyGovernedContainersRequest
A request message for [AssetService.AnalyzeOrgPolicyGovernedContainers][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicyGovernedContainers].
Inherits from Protobuf::Message.
Accessors
$msg->scope()/$msg->scope($value)Type:
StringRequired. The organization to scope the request. Only organization policies within the scope will be analyzed. The output containers will also be limited to the ones governed by those in-scope organization policies.
* organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
$msg->constraint()/$msg->constraint($value)Type:
StringRequired. The name of the constraint to analyze governed containers for. The analysis only contains organization policies for the provided constraint.
$msg->filter()/$msg->filter($value)Type:
StringThe expression to filter [AnalyzeOrgPolicyGovernedContainersResponse.governed_containers][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.governed_containers]. Filtering is currently available for bare literal values and the following fields: * parent * consolidated_policy.rules.enforce
When filtering by a specific field, the only supported operator is `=`. For example, filtering by parent="//cloudresourcemanager.googleapis.com/folders/001" will return all the containers under "folders/001".
$msg->page_size()/$msg->page_size($value)Type:
Int32The maximum number of items to return per page. If unspecified, [AnalyzeOrgPolicyGovernedContainersResponse.governed_containers][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.governed_containers] will contain 100 items with a maximum of 200.
$msg->page_token()/$msg->page_token($value)Type:
StringThe pagination token to retrieve the next page.
Google::Cloud::Asset::V1::AssetService::AnalyzeOrgPolicyGovernedContainersResponse
The response message for [AssetService.AnalyzeOrgPolicyGovernedContainers][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicyGovernedContainers].
Inherits from Protobuf::Message.
Accessors
$msg->governed_containers()/$msg->governed_containers($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer)The list of the analyzed governed containers.
$msg->constraint()/$msg->constraint($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::AnalyzerOrgPolicyConstraint)The definition of the constraint in the request.
$msg->next_page_token()/$msg->next_page_token($value)Type:
StringThe page token to fetch the next page for [AnalyzeOrgPolicyGovernedContainersResponse.governed_containers][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.governed_containers].
Google::Cloud::Asset::V1::AssetService::AnalyzeOrgPolicyGovernedAssetsRequest
A request message for [AssetService.AnalyzeOrgPolicyGovernedAssets][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicyGovernedAssets].
Inherits from Protobuf::Message.
Accessors
$msg->scope()/$msg->scope($value)Type:
StringRequired. The organization to scope the request. Only organization policies within the scope will be analyzed. The output assets will also be limited to the ones governed by those in-scope organization policies.
* organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
$msg->constraint()/$msg->constraint($value)Type:
StringRequired. The name of the constraint to analyze governed assets for. The analysis only contains analyzed organization policies for the provided constraint.
$msg->filter()/$msg->filter($value)Type:
StringThe expression to filter [AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets].
For governed resources, filtering is currently available for bare literal values and the following fields: * governed_resource.project * governed_resource.folders * consolidated_policy.rules.enforce When filtering by `governed_resource.project` or `consolidated_policy.rules.enforce`, the only supported operator is `=`. When filtering by `governed_resource.folders`, the supported operators are `=` and `:`. For example, filtering by `governed_resource.project="projects/12345678"` will return all the governed resources under "projects/12345678", including the project itself if applicable.
For governed IAM policies, filtering is currently available for bare literal values and the following fields: * governed_iam_policy.project * governed_iam_policy.folders * consolidated_policy.rules.enforce When filtering by `governed_iam_policy.project` or `consolidated_policy.rules.enforce`, the only supported operator is `=`. When filtering by `governed_iam_policy.folders`, the supported operators are `=` and `:`. For example, filtering by `governed_iam_policy.folders:"folders/12345678"` will return all the governed IAM policies under "folders/001".
$msg->page_size()/$msg->page_size($value)Type:
Int32The maximum number of items to return per page. If unspecified, [AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets] will contain 100 items with a maximum of 200.
$msg->page_token()/$msg->page_token($value)Type:
StringThe pagination token to retrieve the next page.
Google::Cloud::Asset::V1::AssetService::AnalyzeOrgPolicyGovernedAssetsResponse
The response message for [AssetService.AnalyzeOrgPolicyGovernedAssets][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicyGovernedAssets].
Inherits from Protobuf::Message.
Accessors
$msg->governed_assets()/$msg->governed_assets($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset)The list of the analyzed governed assets.
$msg->constraint()/$msg->constraint($value)Type:
Message(Google::Cloud::Asset::V1::AssetService::AnalyzerOrgPolicyConstraint)The definition of the constraint in the request.
$msg->next_page_token()/$msg->next_page_token($value)Type:
StringThe page token to fetch the next page for [AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets].
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Asset::V1::AssetService::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.