Skip to content
This repository was archived by the owner on Jul 13, 2023. It is now read-only.

Commit 567ccbd

Browse files
feat: add a new searchable field kmsKeys (#665)
- [ ] Regenerate this pull request now. fix: deprecate searchable field kmsKey PiperOrigin-RevId: 479103182 Source-Link: https://togithub.com/googleapis/googleapis/commit/7b5a467b978ff2dde6cd34717ebad5728d05f2bb Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/417aefa0fb633d0f171a607779e9f0e19c8b8b7f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDE3YWVmYTBmYjYzM2QwZjE3MWE2MDc3NzllOWYwZTE5YzhiOGI3ZiJ9
1 parent 35bb44c commit 567ccbd

19 files changed

Lines changed: 656 additions & 665 deletions

protos/google/cloud/asset/v1/asset_service.proto

Lines changed: 219 additions & 277 deletions
Large diffs are not rendered by default.

protos/google/cloud/asset/v1/assets.proto

Lines changed: 80 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ syntax = "proto3";
1616

1717
package google.cloud.asset.v1;
1818

19+
import "google/api/field_behavior.proto";
1920
import "google/api/resource.proto";
2021
import "google/cloud/orgpolicy/v1/orgpolicy.proto";
2122
import "google/cloud/osconfig/v1/inventory.proto";
@@ -150,8 +151,7 @@ message Asset {
150151

151152
// Please also refer to the [service perimeter user
152153
// guide](https://cloud.google.com/vpc-service-controls/docs/overview).
153-
google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter =
154-
9;
154+
google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9;
155155
}
156156

157157
// A representation of runtime OS Inventory information. See [this
@@ -282,8 +282,8 @@ message RelatedAsset {
282282
// names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
283283
// for more information.
284284
string asset = 1 [(google.api.resource_reference) = {
285-
type: "cloudasset.googleapis.com/Asset"
286-
}];
285+
type: "cloudasset.googleapis.com/Asset"
286+
}];
287287

288288
// The type of the asset. Example: `compute.googleapis.com/Disk`
289289
//
@@ -306,7 +306,7 @@ message RelatedAsset {
306306
}
307307

308308
// A result of Resource Search, containing information of a cloud resource.
309-
// Next ID: 29
309+
// Next ID: 31
310310
message ResourceSearchResult {
311311
// The full resource name of this resource. Example:
312312
// `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
@@ -316,15 +316,15 @@ message ResourceSearchResult {
316316
//
317317
// To search against the `name`:
318318
//
319-
// * use a field query. Example: `name:instance1`
320-
// * use a free text query. Example: `instance1`
319+
// * Use a field query. Example: `name:instance1`
320+
// * Use a free text query. Example: `instance1`
321321
string name = 1;
322322

323323
// The type of this resource. Example: `compute.googleapis.com/Disk`.
324324
//
325325
// To search against the `asset_type`:
326326
//
327-
// * specify the `asset_type` field in your search request.
327+
// * Specify the `asset_type` field in your search request.
328328
string asset_type = 2;
329329

330330
// The project that this resource belongs to, in the form of
@@ -333,9 +333,9 @@ message ResourceSearchResult {
333333
//
334334
// To search against `project`:
335335
//
336-
// * use a field query. Example: `project:12345`
337-
// * use a free text query. Example: `12345`
338-
// * specify the `scope` field as this project in your search request.
336+
// * Use a field query. Example: `project:12345`
337+
// * Use a free text query. Example: `12345`
338+
// * Specify the `scope` field as this project in your search request.
339339
string project = 3;
340340

341341
// The folder(s) that this resource belongs to, in the form of
@@ -344,9 +344,9 @@ message ResourceSearchResult {
344344
//
345345
// To search against `folders`:
346346
//
347-
// * use a field query. Example: `folders:(123 OR 456)`
348-
// * use a free text query. Example: `123`
349-
// * specify the `scope` field as this folder in your search request.
347+
// * Use a field query. Example: `folders:(123 OR 456)`
348+
// * Use a free text query. Example: `123`
349+
// * Specify the `scope` field as this folder in your search request.
350350
repeated string folders = 17;
351351

352352
// The organization that this resource belongs to, in the form of
@@ -355,18 +355,18 @@ message ResourceSearchResult {
355355
//
356356
// To search against `organization`:
357357
//
358-
// * use a field query. Example: `organization:123`
359-
// * use a free text query. Example: `123`
360-
// * specify the `scope` field as this organization in your search request.
358+
// * Use a field query. Example: `organization:123`
359+
// * Use a free text query. Example: `123`
360+
// * Specify the `scope` field as this organization in your search request.
361361
string organization = 18;
362362

363363
// The display name of this resource. This field is available only when the
364364
// resource's Protobuf contains it.
365365
//
366366
// To search against the `display_name`:
367367
//
368-
// * use a field query. Example: `displayName:"My Instance"`
369-
// * use a free text query. Example: `"My Instance"`
368+
// * Use a field query. Example: `displayName:"My Instance"`
369+
// * Use a free text query. Example: `"My Instance"`
370370
string display_name = 4;
371371

372372
// One or more paragraphs of text description of this resource. Maximum length
@@ -375,8 +375,8 @@ message ResourceSearchResult {
375375
//
376376
// To search against the `description`:
377377
//
378-
// * use a field query. Example: `description:"important instance"`
379-
// * use a free text query. Example: `"important instance"`
378+
// * Use a field query. Example: `description:"important instance"`
379+
// * Use a free text query. Example: `"important instance"`
380380
string description = 5;
381381

382382
// Location can be `global`, regional like `us-east1`, or zonal like
@@ -385,8 +385,8 @@ message ResourceSearchResult {
385385
//
386386
// To search against the `location`:
387387
//
388-
// * use a field query. Example: `location:us-west*`
389-
// * use a free text query. Example: `us-west*`
388+
// * Use a field query. Example: `location:us-west*`
389+
// * Use a free text query. Example: `us-west*`
390390
string location = 6;
391391

392392
// Labels associated with this resource. See [Labelling and grouping GCP
@@ -396,11 +396,11 @@ message ResourceSearchResult {
396396
//
397397
// To search against the `labels`:
398398
//
399-
// * use a field query:
399+
// * Use a field query:
400400
// - query on any label's key or value. Example: `labels:prod`
401401
// - query by a given label. Example: `labels.env:prod`
402402
// - query by a given label's existence. Example: `labels.env:*`
403-
// * use a free text query. Example: `prod`
403+
// * Use a free text query. Example: `prod`
404404
map<string, string> labels = 7;
405405

406406
// Network tags associated with this resource. Like labels, network tags are a
@@ -411,30 +411,49 @@ message ResourceSearchResult {
411411
//
412412
// To search against the `network_tags`:
413413
//
414-
// * use a field query. Example: `networkTags:internal`
415-
// * use a free text query. Example: `internal`
414+
// * Use a field query. Example: `networkTags:internal`
415+
// * Use a free text query. Example: `internal`
416416
repeated string network_tags = 8;
417417

418418
// The Cloud KMS
419419
// [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
420420
// name or
421421
// [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.
422+
// name.
423+
//
424+
// This field only presents for the purpose of backward compatibility. Please
425+
// use the `kms_keys` field to retrieve KMS key information. This field is
426+
// available only when the resource's Protobuf contains it and will only be
427+
// populated for [these resource
428+
// types](https://cloud.google.com/asset-inventory/docs/legacy-field-names#resource_types_with_the_to_be_deprecated_kmskey_field)
429+
// for backward compatible purposes.
424430
//
425431
// To search against the `kms_key`:
426432
//
427-
// * use a field query. Example: `kmsKey:key`
428-
// * use a free text query. Example: `key`
429-
string kms_key = 10;
433+
// * Use a field query. Example: `kmsKey:key`
434+
// * Use a free text query. Example: `key`
435+
string kms_key = 10 [deprecated = true];
436+
437+
// The Cloud KMS
438+
// [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
439+
// names or
440+
// [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
441+
// names. This field is available only when the resource's Protobuf contains
442+
// it.
443+
//
444+
// To search against the `kms_keys`:
445+
//
446+
// * Use a field query. Example: `kmsKeys:key`
447+
// * Use a free text query. Example: `key`
448+
repeated string kms_keys = 28;
430449

431450
// The create timestamp of this resource, at which the resource was created.
432451
// The granularity is in seconds. Timestamp.nanos will always be 0. This field
433452
// is available only when the resource's Protobuf contains it.
434453
//
435454
// To search against `create_time`:
436455
//
437-
// * use a field query.
456+
// * Use a field query.
438457
// - value in seconds since unix epoch. Example: `createTime > 1609459200`
439458
// - value in date string. Example: `createTime > 2021-01-01`
440459
// - value in date-time string (must be quoted). Example: `createTime >
@@ -448,7 +467,7 @@ message ResourceSearchResult {
448467
//
449468
// To search against `update_time`:
450469
//
451-
// * use a field query.
470+
// * Use a field query.
452471
// - value in seconds since unix epoch. Example: `updateTime < 1609459200`
453472
// - value in date string. Example: `updateTime < 2021-01-01`
454473
// - value in date-time string (must be quoted). Example: `updateTime <
@@ -473,8 +492,8 @@ message ResourceSearchResult {
473492
//
474493
// To search against the `state`:
475494
//
476-
// * use a field query. Example: `state:RUNNING`
477-
// * use a free text query. Example: `RUNNING`
495+
// * Use a field query. Example: `state:RUNNING`
496+
// * Use a free text query. Example: `RUNNING`
478497
string state = 13;
479498

480499
// The additional searchable attributes of this resource. The attributes may
@@ -493,17 +512,17 @@ message ResourceSearchResult {
493512
//
494513
// To search against the `additional_attributes`:
495514
//
496-
// * use a free text query to match the attributes values. Example: to search
515+
// * Use a free text query to match the attributes values. Example: to search
497516
// `additional_attributes = { dnsName: "foobar" }`, you can issue a query
498517
// `foobar`.
499518
google.protobuf.Struct additional_attributes = 9;
500519

501520
// The full resource name of this resource's parent, if it has one.
502521
// To search against the `parent_full_resource_name`:
503522
//
504-
// * use a field query. Example:
523+
// * Use a field query. Example:
505524
// `parentFullResourceName:"project-name"`
506-
// * use a free text query. Example:
525+
// * Use a free text query. Example:
507526
// `project-name`
508527
string parent_full_resource_name = 19;
509528

@@ -536,47 +555,47 @@ message ResourceSearchResult {
536555
// TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
537556
// To search against the `tagKeys`:
538557
//
539-
// * use a field query. Example:
558+
// * Use a field query. Example:
540559
// - `tagKeys:"123456789/env*"`
541560
// - `tagKeys="123456789/env"`
542561
// - `tagKeys:"env"`
543562
//
544-
// * use a free text query. Example:
563+
// * Use a free text query. Example:
545564
// - `env`
546565
repeated string tag_keys = 23;
547566

548567
// TagValue namespaced names, in the format of
549568
// {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
550569
// To search against the `tagValues`:
551570
//
552-
// * use a field query. Example:
571+
// * Use a field query. Example:
553572
// - `tagValues:"env"`
554573
// - `tagValues:"env/prod"`
555574
// - `tagValues:"123456789/env/prod*"`
556575
// - `tagValues="123456789/env/prod"`
557576
//
558-
// * use a free text query. Example:
577+
// * Use a free text query. Example:
559578
// - `prod`
560579
repeated string tag_values = 25;
561580

562581
// TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
563582
// To search against the `tagValueIds`:
564583
//
565-
// * use a field query. Example:
584+
// * Use a field query. Example:
566585
// - `tagValueIds:"456"`
567586
// - `tagValueIds="tagValues/456"`
568587
//
569-
// * use a free text query. Example:
588+
// * Use a free text query. Example:
570589
// - `456`
571590
repeated string tag_value_ids = 26;
572591

573592
// The type of this resource's immediate parent, if there is one.
574593
//
575594
// To search against the `parent_asset_type`:
576595
//
577-
// * use a field query. Example:
596+
// * Use a field query. Example:
578597
// `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
579-
// * use a free text query. Example:
598+
// * Use a free text query. Example:
580599
// `cloudresourcemanager.googleapis.com/Project`
581600
string parent_asset_type = 103;
582601
}
@@ -857,10 +876,8 @@ message IamPolicyAnalysisResult {
857876
repeated Access accesses = 2;
858877

859878
// Resource edges of the graph starting from the policy attached
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]
879+
// resource to any descendant resources. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
880+
// the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
864881
// contains the full resource name of a child resource. This field is
865882
// present only if the output_resource_edges option is enabled in request.
866883
repeated Edge resource_edges = 3;
@@ -879,41 +896,32 @@ message IamPolicyAnalysisResult {
879896
repeated Identity identities = 1;
880897

881898
// Group identity edges of the graph starting from the binding's
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]
899+
// 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]
886900
// contains a group, such as `group:[email protected]`. The
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.
901+
// [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node] contains a member of the group,
902+
// such as `group:[email protected]` or `user:[email protected]`.
903+
// This field is present only if the output_group_edges option is enabled in
904+
// request.
891905
repeated Edge group_edges = 2;
892906
}
893907

894908
// The [full resource
895909
// name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
896-
// of the resource to which the
897-
// [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
898-
// policy attaches.
910+
// of the resource to which the [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] policy attaches.
899911
string attached_resource_full_name = 1;
900912

901913
// The Cloud IAM policy binding under analysis.
902914
google.iam.v1.Binding iam_binding = 2;
903915

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.
916+
// The access control lists derived from the [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] that match or
917+
// potentially match resource and access selectors specified in the request.
908918
repeated AccessControlList access_control_lists = 3;
909919

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.
920+
// The identity list derived from members of the [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] that match or
921+
// potentially match identity selector specified in the request.
913922
IdentityList identity_list = 4;
914923

915-
// Represents whether all analyses on the
916-
// [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
917-
// have successfully finished.
924+
// Represents whether all analyses on the [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] have successfully
925+
// finished.
918926
bool fully_explored = 5;
919927
}

protos/protos.d.ts

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)