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

Commit

Permalink
feat: add a new searchable field kmsKeys (#506)
Browse files Browse the repository at this point in the history
- [ ] 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
  • Loading branch information
gcf-owl-bot[bot] committed Oct 6, 2022
1 parent eb2a362 commit 07dd6cc
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 61 deletions.
17 changes: 12 additions & 5 deletions google/cloud/asset_v1/services/asset_service/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,12 @@ async def sample_search_all_resources():
label "env".
- ``kmsKey:key`` to find Cloud resources encrypted with
a customer-managed encryption key whose name contains
the word "key".
"key" as a word. This field is deprecated. Please use
the ``kmsKeys`` field to retrieve KMS key
information.
- ``kmsKeys:key`` to find Cloud resources encrypted
with customer-managed encryption keys whose name
contains the word "key".
- ``relationships:instance-group-1`` to find Cloud
resources that have relationships with
"instance-group-1" in the related resource name.
Expand Down Expand Up @@ -1597,7 +1602,7 @@ async def sample_analyze_iam_policy():
Returns:
google.cloud.asset_v1.types.AnalyzeIamPolicyResponse:
A response message for
[AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy].
[AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy].
"""
# Create or coerce a protobuf request object.
Expand Down Expand Up @@ -1711,8 +1716,10 @@ async def sample_analyze_iam_policy_longrunning():
google.api_core.operation_async.AsyncOperation:
An object representing a long-running operation.
The result type for the operation will be :class:`google.cloud.asset_v1.types.AnalyzeIamPolicyLongrunningResponse` A response message for
[AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning].
The result type for the operation will be
:class:`google.cloud.asset_v1.types.AnalyzeIamPolicyLongrunningResponse`
A response message for
[AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning].
"""
# Create or coerce a protobuf request object.
Expand Down Expand Up @@ -2593,7 +2600,7 @@ async def sample_batch_get_effective_iam_policies():
Returns:
google.cloud.asset_v1.types.BatchGetEffectiveIamPoliciesResponse:
A response message for
[AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies].
[AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies].
"""
# Create or coerce a protobuf request object.
Expand Down
17 changes: 12 additions & 5 deletions google/cloud/asset_v1/services/asset_service/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1470,7 +1470,12 @@ def sample_search_all_resources():
label "env".
- ``kmsKey:key`` to find Cloud resources encrypted with
a customer-managed encryption key whose name contains
the word "key".
"key" as a word. This field is deprecated. Please use
the ``kmsKeys`` field to retrieve KMS key
information.
- ``kmsKeys:key`` to find Cloud resources encrypted
with customer-managed encryption keys whose name
contains the word "key".
- ``relationships:instance-group-1`` to find Cloud
resources that have relationships with
"instance-group-1" in the related resource name.
Expand Down Expand Up @@ -1840,7 +1845,7 @@ def sample_analyze_iam_policy():
Returns:
google.cloud.asset_v1.types.AnalyzeIamPolicyResponse:
A response message for
[AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy].
[AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy].
"""
# Create or coerce a protobuf request object.
Expand Down Expand Up @@ -1946,8 +1951,10 @@ def sample_analyze_iam_policy_longrunning():
google.api_core.operation.Operation:
An object representing a long-running operation.
The result type for the operation will be :class:`google.cloud.asset_v1.types.AnalyzeIamPolicyLongrunningResponse` A response message for
[AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning].
The result type for the operation will be
:class:`google.cloud.asset_v1.types.AnalyzeIamPolicyLongrunningResponse`
A response message for
[AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning].
"""
# Create or coerce a protobuf request object.
Expand Down Expand Up @@ -2794,7 +2801,7 @@ def sample_batch_get_effective_iam_policies():
Returns:
google.cloud.asset_v1.types.BatchGetEffectiveIamPoliciesResponse:
A response message for
[AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies].
[AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies].
"""
# Create or coerce a protobuf request object.
Expand Down
25 changes: 16 additions & 9 deletions google/cloud/asset_v1/types/asset_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,11 @@ class SearchAllResourcesRequest(proto.Message):
- ``labels.env:*`` to find Cloud resources that have a
label "env".
- ``kmsKey:key`` to find Cloud resources encrypted with a
customer-managed encryption key whose name contains the
customer-managed encryption key whose name contains "key"
as a word. This field is deprecated. Please use the
``kmsKeys`` field to retrieve KMS key information.
- ``kmsKeys:key`` to find Cloud resources encrypted with
customer-managed encryption keys whose name contains the
word "key".
- ``relationships:instance-group-1`` to find Cloud
resources that have relationships with "instance-group-1"
Expand Down Expand Up @@ -1140,16 +1144,16 @@ class SearchAllResourcesRequest(proto.Message):
- displayName
- description
- location
- kmsKey
- createTime
- updateTime
- state
- parentFullResourceName
- parentAssetType
All the other fields such as repeated fields (e.g.,
``networkTags``), map fields (e.g., ``labels``) and struct
fields (e.g., ``additionalAttributes``) are not supported.
``networkTags``, ``kmsKeys``), map fields (e.g., ``labels``)
and struct fields (e.g., ``additionalAttributes``) are not
supported.
read_mask (google.protobuf.field_mask_pb2.FieldMask):
Optional. A comma-separated list of fields specifying which
fields to be returned in ResourceSearchResult. Only '*' or
Expand All @@ -1172,7 +1176,9 @@ class SearchAllResourcesRequest(proto.Message):
- tagValueIds
- labels
- networkTags
- kmsKey
- kmsKey (This field is deprecated. Please use the
``kmsKeys`` field to retrieve KMS key information.)
- kmsKeys
- createTime
- updateTime
- state
Expand Down Expand Up @@ -2203,9 +2209,8 @@ class ListSavedQueriesRequest(proto.Message):
Optional. 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.
be returned. The maximum value is 1000; values
above 1000 will be coerced to 1000.
page_token (str):
Optional. A page token, received from a previous
``ListSavedQueries`` call. Provide this to retrieve the
Expand Down Expand Up @@ -2493,7 +2498,9 @@ class BigQueryDestination(proto.Message):
BigQuery appends the data to the table or the latest
partition.
- WRITE_EMPTY: If the table already exists and contains
data, an error is returned.
data, a 'duplicate' error is returned in the job result.
The default value is WRITE_EMPTY.
"""

dataset = proto.Field(
Expand Down
Loading

0 comments on commit 07dd6cc

Please sign in to comment.