Skip to content
This repository was archived by the owner on Feb 28, 2024. It is now read-only.

Commit 07dd6cc

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

File tree

4 files changed

+105
-61
lines changed

4 files changed

+105
-61
lines changed

google/cloud/asset_v1/services/asset_service/async_client.py

+12-5
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,12 @@ async def sample_search_all_resources():
12091209
label "env".
12101210
- ``kmsKey:key`` to find Cloud resources encrypted with
12111211
a customer-managed encryption key whose name contains
1212-
the word "key".
1212+
"key" as a word. This field is deprecated. Please use
1213+
the ``kmsKeys`` field to retrieve KMS key
1214+
information.
1215+
- ``kmsKeys:key`` to find Cloud resources encrypted
1216+
with customer-managed encryption keys whose name
1217+
contains the word "key".
12131218
- ``relationships:instance-group-1`` to find Cloud
12141219
resources that have relationships with
12151220
"instance-group-1" in the related resource name.
@@ -1597,7 +1602,7 @@ async def sample_analyze_iam_policy():
15971602
Returns:
15981603
google.cloud.asset_v1.types.AnalyzeIamPolicyResponse:
15991604
A response message for
1600-
[AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy].
1605+
[AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy].
16011606
16021607
"""
16031608
# Create or coerce a protobuf request object.
@@ -1711,8 +1716,10 @@ async def sample_analyze_iam_policy_longrunning():
17111716
google.api_core.operation_async.AsyncOperation:
17121717
An object representing a long-running operation.
17131718
1714-
The result type for the operation will be :class:`google.cloud.asset_v1.types.AnalyzeIamPolicyLongrunningResponse` A response message for
1715-
[AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning].
1719+
The result type for the operation will be
1720+
:class:`google.cloud.asset_v1.types.AnalyzeIamPolicyLongrunningResponse`
1721+
A response message for
1722+
[AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning].
17161723
17171724
"""
17181725
# Create or coerce a protobuf request object.
@@ -2593,7 +2600,7 @@ async def sample_batch_get_effective_iam_policies():
25932600
Returns:
25942601
google.cloud.asset_v1.types.BatchGetEffectiveIamPoliciesResponse:
25952602
A response message for
2596-
[AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies].
2603+
[AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies].
25972604
25982605
"""
25992606
# Create or coerce a protobuf request object.

google/cloud/asset_v1/services/asset_service/client.py

+12-5
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,12 @@ def sample_search_all_resources():
14701470
label "env".
14711471
- ``kmsKey:key`` to find Cloud resources encrypted with
14721472
a customer-managed encryption key whose name contains
1473-
the word "key".
1473+
"key" as a word. This field is deprecated. Please use
1474+
the ``kmsKeys`` field to retrieve KMS key
1475+
information.
1476+
- ``kmsKeys:key`` to find Cloud resources encrypted
1477+
with customer-managed encryption keys whose name
1478+
contains the word "key".
14741479
- ``relationships:instance-group-1`` to find Cloud
14751480
resources that have relationships with
14761481
"instance-group-1" in the related resource name.
@@ -1840,7 +1845,7 @@ def sample_analyze_iam_policy():
18401845
Returns:
18411846
google.cloud.asset_v1.types.AnalyzeIamPolicyResponse:
18421847
A response message for
1843-
[AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy].
1848+
[AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy].
18441849
18451850
"""
18461851
# Create or coerce a protobuf request object.
@@ -1946,8 +1951,10 @@ def sample_analyze_iam_policy_longrunning():
19461951
google.api_core.operation.Operation:
19471952
An object representing a long-running operation.
19481953
1949-
The result type for the operation will be :class:`google.cloud.asset_v1.types.AnalyzeIamPolicyLongrunningResponse` A response message for
1950-
[AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning].
1954+
The result type for the operation will be
1955+
:class:`google.cloud.asset_v1.types.AnalyzeIamPolicyLongrunningResponse`
1956+
A response message for
1957+
[AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning].
19511958
19521959
"""
19531960
# Create or coerce a protobuf request object.
@@ -2794,7 +2801,7 @@ def sample_batch_get_effective_iam_policies():
27942801
Returns:
27952802
google.cloud.asset_v1.types.BatchGetEffectiveIamPoliciesResponse:
27962803
A response message for
2797-
[AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies].
2804+
[AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies].
27982805
27992806
"""
28002807
# Create or coerce a protobuf request object.

google/cloud/asset_v1/types/asset_service.py

+16-9
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,11 @@ class SearchAllResourcesRequest(proto.Message):
10631063
- ``labels.env:*`` to find Cloud resources that have a
10641064
label "env".
10651065
- ``kmsKey:key`` to find Cloud resources encrypted with a
1066-
customer-managed encryption key whose name contains the
1066+
customer-managed encryption key whose name contains "key"
1067+
as a word. This field is deprecated. Please use the
1068+
``kmsKeys`` field to retrieve KMS key information.
1069+
- ``kmsKeys:key`` to find Cloud resources encrypted with
1070+
customer-managed encryption keys whose name contains the
10671071
word "key".
10681072
- ``relationships:instance-group-1`` to find Cloud
10691073
resources that have relationships with "instance-group-1"
@@ -1140,16 +1144,16 @@ class SearchAllResourcesRequest(proto.Message):
11401144
- displayName
11411145
- description
11421146
- location
1143-
- kmsKey
11441147
- createTime
11451148
- updateTime
11461149
- state
11471150
- parentFullResourceName
11481151
- parentAssetType
11491152
11501153
All the other fields such as repeated fields (e.g.,
1151-
``networkTags``), map fields (e.g., ``labels``) and struct
1152-
fields (e.g., ``additionalAttributes``) are not supported.
1154+
``networkTags``, ``kmsKeys``), map fields (e.g., ``labels``)
1155+
and struct fields (e.g., ``additionalAttributes``) are not
1156+
supported.
11531157
read_mask (google.protobuf.field_mask_pb2.FieldMask):
11541158
Optional. A comma-separated list of fields specifying which
11551159
fields to be returned in ResourceSearchResult. Only '*' or
@@ -1172,7 +1176,9 @@ class SearchAllResourcesRequest(proto.Message):
11721176
- tagValueIds
11731177
- labels
11741178
- networkTags
1175-
- kmsKey
1179+
- kmsKey (This field is deprecated. Please use the
1180+
``kmsKeys`` field to retrieve KMS key information.)
1181+
- kmsKeys
11761182
- createTime
11771183
- updateTime
11781184
- state
@@ -2203,9 +2209,8 @@ class ListSavedQueriesRequest(proto.Message):
22032209
Optional. The maximum number of saved queries
22042210
to return per page. The service may return fewer
22052211
than this value. If unspecified, at most 50 will
2206-
be returned.
2207-
The maximum value is 1000; values above 1000
2208-
will be coerced to 1000.
2212+
be returned. The maximum value is 1000; values
2213+
above 1000 will be coerced to 1000.
22092214
page_token (str):
22102215
Optional. A page token, received from a previous
22112216
``ListSavedQueries`` call. Provide this to retrieve the
@@ -2493,7 +2498,9 @@ class BigQueryDestination(proto.Message):
24932498
BigQuery appends the data to the table or the latest
24942499
partition.
24952500
- WRITE_EMPTY: If the table already exists and contains
2496-
data, an error is returned.
2501+
data, a 'duplicate' error is returned in the job result.
2502+
2503+
The default value is WRITE_EMPTY.
24972504
"""
24982505

24992506
dataset = proto.Field(

0 commit comments

Comments
 (0)