Skip to content

Commit

Permalink
feat: Add client library support for AssetService v1 BatchGetEffectiv…
Browse files Browse the repository at this point in the history
…eIamPolicies API (#462)

* feat: Add client library support for AssetService v1 BatchGetEffectiveIamPolicies API
Committer: haochunzhang@

PiperOrigin-RevId: 466134014

Source-Link: googleapis/googleapis@63c73fb

Source-Link: googleapis/googleapis-gen@2350945
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjM1MDk0NWY3YTcwZWNhYWVjZjlhMWZkZDdkNmU3MGFjNTBlODYyZCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Aug 9, 2022
1 parent 3a0b9ae commit 1358774
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,17 @@ async def sample_search_all_resources():
- ``kmsKey:key`` to find Cloud resources encrypted with
a customer-managed encryption key 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.
- ``relationships:INSTANCE_TO_INSTANCEGROUP`` to find
compute instances that have relationships of type
"INSTANCE_TO_INSTANCEGROUP".
- ``relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1``
to find compute instances that have relationships
with "instance-group-1" in the compute instance group
resource name, for relationship type
"INSTANCE_TO_INSTANCEGROUP".
- ``state:ACTIVE`` to find Cloud resources whose state
contains "ACTIVE" as a word.
- ``NOT state:ACTIVE`` to find Cloud resources whose
Expand Down Expand Up @@ -1339,8 +1350,8 @@ async def sample_search_all_iam_policies():
principals, roles, and Cloud IAM conditions. The
returned Cloud IAM policies will only contain the
bindings that match your query. To learn more about the
IAM policy structure, see `IAM policy
doc <https://cloud.google.com/iam/docs/policies#structure>`__.
IAM policy structure, see the `IAM policy
documentation <https://cloud.google.com/iam/help/allow-policies/structure>`__.
Examples:
Expand Down Expand Up @@ -2326,7 +2337,16 @@ async def sample_batch_get_effective_iam_policies():
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.batch_get_effective_iam_policies,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=300.0,
),
default_timeout=300.0,
client_info=DEFAULT_CLIENT_INFO,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,17 @@ def sample_search_all_resources():
- ``kmsKey:key`` to find Cloud resources encrypted with
a customer-managed encryption key 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.
- ``relationships:INSTANCE_TO_INSTANCEGROUP`` to find
compute instances that have relationships of type
"INSTANCE_TO_INSTANCEGROUP".
- ``relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1``
to find compute instances that have relationships
with "instance-group-1" in the compute instance group
resource name, for relationship type
"INSTANCE_TO_INSTANCEGROUP".
- ``state:ACTIVE`` to find Cloud resources whose state
contains "ACTIVE" as a word.
- ``NOT state:ACTIVE`` to find Cloud resources whose
Expand Down Expand Up @@ -1591,8 +1602,8 @@ def sample_search_all_iam_policies():
principals, roles, and Cloud IAM conditions. The
returned Cloud IAM policies will only contain the
bindings that match your query. To learn more about the
IAM policy structure, see `IAM policy
doc <https://cloud.google.com/iam/docs/policies#structure>`__.
IAM policy structure, see the `IAM policy
documentation <https://cloud.google.com/iam/help/allow-policies/structure>`__.
Examples:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,16 @@ def _prep_wrapped_messages(self, client_info):
),
self.batch_get_effective_iam_policies: gapic_v1.method.wrap_method(
self.batch_get_effective_iam_policies,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=300.0,
),
default_timeout=300.0,
client_info=client_info,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,16 @@ class SearchAllResourcesRequest(proto.Message):
- ``kmsKey:key`` to find Cloud resources encrypted with a
customer-managed encryption key 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.
- ``relationships:INSTANCE_TO_INSTANCEGROUP`` to find
compute instances that have relationships of type
"INSTANCE_TO_INSTANCEGROUP".
- ``relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1``
to find compute instances that have relationships with
"instance-group-1" in the compute instance group resource
name, for relationship type "INSTANCE_TO_INSTANCEGROUP".
- ``state:ACTIVE`` to find Cloud resources whose state
contains "ACTIVE" as a word.
- ``NOT state:ACTIVE`` to find Cloud resources whose state
Expand Down Expand Up @@ -1257,8 +1267,8 @@ class SearchAllIamPoliciesRequest(proto.Message):
IAM policy binding, including its principals, roles, and
Cloud IAM conditions. The returned Cloud IAM policies will
only contain the bindings that match your query. To learn
more about the IAM policy structure, see `IAM policy
doc <https://cloud.google.com/iam/docs/policies#structure>`__.
more about the IAM policy structure, see the `IAM policy
documentation <https://cloud.google.com/iam/help/allow-policies/structure>`__.
Examples:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class Asset(proto.Message):
policy set on this resource and each policy set on all of
the resource's ancestry resource levels in the hierarchy.
See `this
topic <https://cloud.google.com/iam/docs/policies#inheritance>`__
topic <https://cloud.google.com/iam/help/allow-policies/inheritance>`__
for more information.
org_policy (Sequence[google.cloud.orgpolicy.v1.orgpolicy_pb2.Policy]):
A representation of an `organization
Expand Down Expand Up @@ -496,7 +496,7 @@ class RelatedAsset(proto.Message):

class ResourceSearchResult(proto.Message):
r"""A result of Resource Search, containing information of a
cloud resource.
cloud resource. Next ID: 29
Attributes:
name (str):
Expand Down

0 comments on commit 1358774

Please sign in to comment.