1- // Copyright 2021 Google LLC
1+ // Copyright 2022 Google LLC
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -16,18 +16,17 @@ syntax = "proto3";
1616
1717package google.cloud.asset.v1 ;
1818
19+ import "google/api/field_behavior.proto" ;
1920import "google/api/resource.proto" ;
2021import "google/cloud/orgpolicy/v1/orgpolicy.proto" ;
22+ import "google/cloud/osconfig/v1/inventory.proto" ;
2123import "google/iam/v1/policy.proto" ;
2224import "google/identity/accesscontextmanager/v1/access_level.proto" ;
2325import "google/identity/accesscontextmanager/v1/access_policy.proto" ;
24- import "google/cloud/osconfig/v1/inventory.proto" ;
2526import "google/identity/accesscontextmanager/v1/service_perimeter.proto" ;
26- import "google/protobuf/any.proto" ;
2727import "google/protobuf/struct.proto" ;
2828import "google/protobuf/timestamp.proto" ;
2929import "google/rpc/code.proto" ;
30- import "google/api/annotations.proto" ;
3130
3231option cc_enable_arenas = true ;
3332option csharp_namespace = "Google.Cloud.Asset.V1" ;
@@ -152,17 +151,24 @@ message Asset {
152151
153152 // Please also refer to the [service perimeter user
154153 // guide](https://cloud.google.com/vpc-service-controls/docs/overview).
155- google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9 ;
154+ google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter =
155+ 9;
156156 }
157157
158158 // A representation of runtime OS Inventory information. See [this
159159 // topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
160160 // for more information.
161161 google.cloud.osconfig.v1.Inventory os_inventory = 12 ;
162162
163- // The related assets of the asset of one relationship type.
164- // One asset only represents one type of relationship.
165- RelatedAssets related_assets = 13 ;
163+ // DEPRECATED. This field only presents for the purpose of
164+ // backward-compatibility. The server will never generate responses with this
165+ // field.
166+ // The related assets of the asset of one relationship type. One asset
167+ // only represents one type of relationship.
168+ RelatedAssets related_assets = 13 [deprecated = true ];
169+
170+ // One related asset of the current asset.
171+ RelatedAsset related_asset = 15 ;
166172
167173 // The ancestry path of an asset in Google Cloud [resource
168174 // hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
@@ -225,18 +231,28 @@ message Resource {
225231 string location = 8 ;
226232}
227233
234+ // DEPRECATED. This message only presents for the purpose of
235+ // backward-compatibility. The server will never populate this message in
236+ // responses.
228237// The detailed related assets with the `relationship_type`.
229238message RelatedAssets {
239+ option deprecated = true ;
240+
230241 // The detailed relationship attributes.
231242 RelationshipAttributes relationship_attributes = 1 ;
232243
233244 // The peer resources of the relationship.
234245 repeated RelatedAsset assets = 2 ;
235246}
236247
248+ // DEPRECATED. This message only presents for the purpose of
249+ // backward-compatibility. The server will never populate this message in
250+ // responses.
237251// The relationship attributes which include `type`, `source_resource_type`,
238252// `target_resource_type` and `action`.
239253message RelationshipAttributes {
254+ option deprecated = true ;
255+
240256 // The unique identifier of the relationship type. Example:
241257 // `INSTANCE_TO_INSTANCEGROUP`
242258 string type = 4 ;
@@ -251,7 +267,7 @@ message RelationshipAttributes {
251267 string action = 3 ;
252268}
253269
254- // An asset identify in Google Cloud which contains its name, type and
270+ // An asset identifier in Google Cloud which contains its name, type and
255271// ancestors. An asset can be any resource in the Google Cloud [resource
256272// hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
257273// a resource outside the Google Cloud resource hierarchy (such as Google
@@ -267,8 +283,8 @@ message RelatedAsset {
267283 // names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
268284 // for more information.
269285 string asset = 1 [(google.api.resource_reference ) = {
270- type : "cloudasset.googleapis.com/Asset"
271- }];
286+ type : "cloudasset.googleapis.com/Asset"
287+ }];
272288
273289 // The type of the asset. Example: `compute.googleapis.com/Disk`
274290 //
@@ -284,6 +300,10 @@ message RelatedAsset {
284300 //
285301 // Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
286302 repeated string ancestors = 3 ;
303+
304+ // The unique identifier of the relationship type. Example:
305+ // `INSTANCE_TO_INSTANCEGROUP`
306+ string relationship_type = 4 ;
287307}
288308
289309// A result of Resource Search, containing information of a cloud resource.
@@ -341,7 +361,7 @@ message ResourceSearchResult {
341361 string organization = 18 ;
342362
343363 // The display name of this resource. This field is available only when the
344- // resource's proto contains it.
364+ // resource's Protobuf contains it.
345365 //
346366 // To search against the `display_name`:
347367 //
@@ -351,7 +371,7 @@ message ResourceSearchResult {
351371
352372 // One or more paragraphs of text description of this resource. Maximum length
353373 // could be up to 1M bytes. This field is available only when the resource's
354- // proto contains it.
374+ // Protobuf contains it.
355375 //
356376 // To search against the `description`:
357377 //
@@ -360,7 +380,7 @@ message ResourceSearchResult {
360380 string description = 5 ;
361381
362382 // Location can be `global`, regional like `us-east1`, or zonal like
363- // `us-west1-b`. This field is available only when the resource's proto
383+ // `us-west1-b`. This field is available only when the resource's Protobuf
364384 // contains it.
365385 //
366386 // To search against the `location`:
@@ -372,7 +392,7 @@ message ResourceSearchResult {
372392 // Labels associated with this resource. See [Labelling and grouping GCP
373393 // resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
374394 // for more information. This field is available only when the resource's
375- // proto contains it.
395+ // Protobuf contains it.
376396 //
377397 // To search against the `labels`:
378398 //
@@ -387,7 +407,7 @@ message ResourceSearchResult {
387407 // type of annotations used to group GCP resources. See [Labelling GCP
388408 // resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
389409 // for more information. This field is available only when the resource's
390- // proto contains it.
410+ // Protobuf contains it.
391411 //
392412 // To search against the `network_tags`:
393413 //
@@ -396,10 +416,11 @@ message ResourceSearchResult {
396416 repeated string network_tags = 8 ;
397417
398418 // The Cloud KMS
399- // [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys?hl=en )
419+ // [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
400420 // name or
401- // [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en)
402- // name. This field is available only when the resource's proto contains it.
421+ // [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
422+ // name. This field is available only when the resource's Protobuf contains
423+ // it.
403424 //
404425 // To search against the `kms_key`:
405426 //
@@ -409,7 +430,7 @@ message ResourceSearchResult {
409430
410431 // The create timestamp of this resource, at which the resource was created.
411432 // The granularity is in seconds. Timestamp.nanos will always be 0. This field
412- // is available only when the resource's proto contains it.
433+ // is available only when the resource's Protobuf contains it.
413434 //
414435 // To search against `create_time`:
415436 //
@@ -422,7 +443,7 @@ message ResourceSearchResult {
422443
423444 // The last update timestamp of this resource, at which the resource was last
424445 // modified or deleted. The granularity is in seconds. Timestamp.nanos will
425- // always be 0. This field is available only when the resource's proto
446+ // always be 0. This field is available only when the resource's Protobuf
426447 // contains it.
427448 //
428449 // To search against `update_time`:
@@ -436,7 +457,8 @@ message ResourceSearchResult {
436457
437458 // The state of this resource. Different resources types have different state
438459 // definitions that are mapped from various fields of different resource
439- // types. This field is available only when the resource's proto contains it.
460+ // types. This field is available only when the resource's Protobuf contains
461+ // it.
440462 //
441463 // Example:
442464 // If the resource is an instance provided by Compute Engine,
@@ -511,6 +533,43 @@ message ResourceSearchResult {
511533 // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
512534 map <string , RelatedResources > relationships = 21 ;
513535
536+ // TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
537+ // To search against the `tagKeys`:
538+ //
539+ // * use a field query. Example:
540+ // - `tagKeys:"123456789/env*"`
541+ // - `tagKeys="123456789/env"`
542+ // - `tagKeys:"env"`
543+ //
544+ // * use a free text query. Example:
545+ // - `env`
546+ repeated string tag_keys = 23 ;
547+
548+ // TagValue namespaced names, in the format of
549+ // {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
550+ // To search against the `tagValues`:
551+ //
552+ // * use a field query. Example:
553+ // - `tagValues:"env"`
554+ // - `tagValues:"env/prod"`
555+ // - `tagValues:"123456789/env/prod*"`
556+ // - `tagValues="123456789/env/prod"`
557+ //
558+ // * use a free text query. Example:
559+ // - `prod`
560+ repeated string tag_values = 25 ;
561+
562+ // TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
563+ // To search against the `tagValueIds`:
564+ //
565+ // * use a field query. Example:
566+ // - `tagValueIds:"456"`
567+ // - `tagValueIds="tagValues/456"`
568+ //
569+ // * use a free text query. Example:
570+ // - `456`
571+ repeated string tag_value_ids = 26 ;
572+
514573 // The type of this resource's immediate parent, if there is one.
515574 //
516575 // To search against the `parent_asset_type`:
@@ -798,8 +857,10 @@ message IamPolicyAnalysisResult {
798857 repeated Access accesses = 2 ;
799858
800859 // Resource edges of the graph starting from the policy attached
801- // resource to any descendant resources. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
802- // the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
860+ // resource to any descendant resources. The
861+ // [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
862+ // contains the full resource name of a parent resource and
863+ // [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
803864 // contains the full resource name of a child resource. This field is
804865 // present only if the output_resource_edges option is enabled in request.
805866 repeated Edge resource_edges = 3 ;
@@ -818,32 +879,41 @@ message IamPolicyAnalysisResult {
818879 repeated Identity identities = 1 ;
819880
820881 // Group identity edges of the graph starting from the binding's
821- // group members to any node of the [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
882+ // group members to any node of the
883+ // [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
884+ // The
885+ // [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
822886 // contains a group, such as `group:[email protected] `. The 823- // [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node] contains a member of the group,
824- 825- // This field is present only if the output_group_edges option is enabled in
826- // request.
887+ // [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
888+ // contains a member of the group, such as `group:[email protected] ` or 889+ // `user:[email protected] `. This field is present only if the 890+ // output_group_edges option is enabled in request.
827891 repeated Edge group_edges = 2 ;
828892 }
829893
830894 // The [full resource
831895 // name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
832- // of the resource to which the [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] policy attaches.
896+ // of the resource to which the
897+ // [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
898+ // policy attaches.
833899 string attached_resource_full_name = 1 ;
834900
835901 // The Cloud IAM policy binding under analysis.
836902 google.iam.v1.Binding iam_binding = 2 ;
837903
838- // The access control lists derived from the [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] that match or
839- // potentially match resource and access selectors specified in the request.
904+ // The access control lists derived from the
905+ // [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
906+ // that match or potentially match resource and access selectors specified in
907+ // the request.
840908 repeated AccessControlList access_control_lists = 3 ;
841909
842- // The identity list derived from members of the [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] that match or
843- // potentially match identity selector specified in the request.
910+ // The identity list derived from members of the
911+ // [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
912+ // that match or potentially match identity selector specified in the request.
844913 IdentityList identity_list = 4 ;
845914
846- // Represents whether all analyses on the [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] have successfully
847- // finished.
915+ // Represents whether all analyses on the
916+ // [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
917+ // have successfully finished.
848918 bool fully_explored = 5 ;
849919}
0 commit comments