diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 58fcbeee..0eb02fda 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:c8878270182edaab99f2927969d4f700c3af265accd472c3425deedff2b7fd93 -# created: 2022-07-14T01:58:16.015625351Z + digest: sha256:9db98b055a7f8bd82351238ccaacfd3cda58cdf73012ab58b8da146368330021 +# created: 2022-07-25T16:02:49.174178716Z diff --git a/CHANGELOG.md b/CHANGELOG.md index f9d44cc1..cec86522 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://pypi.org/project/google-cloud-asset/#history +## [3.11.0](https://github.com/googleapis/python-asset/compare/v3.10.0...v3.11.0) (2022-08-09) + + +### Features + +* Add client library support for AssetService v1 BatchGetEffectiveIamPolicies API ([#462](https://github.com/googleapis/python-asset/issues/462)) ([30a184b](https://github.com/googleapis/python-asset/commit/30a184b697fa7d9ece8d490fa5ec95251d644162)) + ## [3.10.0](https://github.com/googleapis/python-asset/compare/v3.9.1...v3.10.0) (2022-07-18) diff --git a/google/cloud/asset_v1/services/asset_service/async_client.py b/google/cloud/asset_v1/services/asset_service/async_client.py index be0002d8..e842d66a 100644 --- a/google/cloud/asset_v1/services/asset_service/async_client.py +++ b/google/cloud/asset_v1/services/asset_service/async_client.py @@ -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 @@ -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 `__. + IAM policy structure, see the `IAM policy + documentation `__. Examples: @@ -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, ) diff --git a/google/cloud/asset_v1/services/asset_service/client.py b/google/cloud/asset_v1/services/asset_service/client.py index 9d585adf..08e82d82 100644 --- a/google/cloud/asset_v1/services/asset_service/client.py +++ b/google/cloud/asset_v1/services/asset_service/client.py @@ -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 @@ -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 `__. + IAM policy structure, see the `IAM policy + documentation `__. Examples: diff --git a/google/cloud/asset_v1/services/asset_service/transports/base.py b/google/cloud/asset_v1/services/asset_service/transports/base.py index 2822b95c..30d0d644 100644 --- a/google/cloud/asset_v1/services/asset_service/transports/base.py +++ b/google/cloud/asset_v1/services/asset_service/transports/base.py @@ -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, ), } diff --git a/google/cloud/asset_v1/types/asset_service.py b/google/cloud/asset_v1/types/asset_service.py index d05c5b05..9a34a3b6 100644 --- a/google/cloud/asset_v1/types/asset_service.py +++ b/google/cloud/asset_v1/types/asset_service.py @@ -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 @@ -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 `__. + more about the IAM policy structure, see the `IAM policy + documentation `__. Examples: diff --git a/google/cloud/asset_v1/types/assets.py b/google/cloud/asset_v1/types/assets.py index 3434b534..075e3a28 100644 --- a/google/cloud/asset_v1/types/assets.py +++ b/google/cloud/asset_v1/types/assets.py @@ -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 `__ + topic `__ for more information. org_policy (Sequence[google.cloud.orgpolicy.v1.orgpolicy_pb2.Policy]): A representation of an `organization @@ -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): diff --git a/noxfile.py b/noxfile.py index 627cb880..c9318936 100644 --- a/noxfile.py +++ b/noxfile.py @@ -333,7 +333,8 @@ def prerelease_deps(session): # Install all dependencies session.install("-e", ".[all, tests, tracing]") - session.install(*UNIT_TEST_STANDARD_DEPENDENCIES) + unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES + session.install(*unit_deps_all) system_deps_all = ( SYSTEM_TEST_STANDARD_DEPENDENCIES + SYSTEM_TEST_EXTERNAL_DEPENDENCIES @@ -362,12 +363,6 @@ def prerelease_deps(session): session.install(*constraints_deps) - if os.path.exists("samples/snippets/requirements.txt"): - session.install("-r", "samples/snippets/requirements.txt") - - if os.path.exists("samples/snippets/requirements-test.txt"): - session.install("-r", "samples/snippets/requirements-test.txt") - prerel_deps = [ "protobuf", # dependency of grpc @@ -404,11 +399,19 @@ def prerelease_deps(session): system_test_folder_path = os.path.join("tests", "system") # Only run system tests if found. - if os.path.exists(system_test_path) or os.path.exists(system_test_folder_path): - session.run("py.test", "tests/system") - - snippets_test_path = os.path.join("samples", "snippets") - - # Only run samples tests if found. - if os.path.exists(snippets_test_path): - session.run("py.test", "samples/snippets") + if os.path.exists(system_test_path): + session.run( + "py.test", + "--verbose", + f"--junitxml=system_{session.python}_sponge_log.xml", + system_test_path, + *session.posargs, + ) + if os.path.exists(system_test_folder_path): + session.run( + "py.test", + "--verbose", + f"--junitxml=system_{session.python}_sponge_log.xml", + system_test_folder_path, + *session.posargs, + ) diff --git a/samples/snippets/requirements-test.txt b/samples/snippets/requirements-test.txt index c78317e3..d8b655eb 100644 --- a/samples/snippets/requirements-test.txt +++ b/samples/snippets/requirements-test.txt @@ -1,3 +1,3 @@ -backoff==2.0.1 +backoff==2.1.2 flaky==3.7.0 pytest==7.1.2 diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index 3d6a3acd..d8d6de33 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1,5 +1,5 @@ -google-cloud-storage==2.3.0 -google-cloud-asset==3.9.0 -google-cloud-resource-manager==1.5.0 -google-cloud-pubsub==2.12.1 -google-cloud-bigquery==3.1.0 +google-cloud-storage==2.5.0 +google-cloud-asset==3.10.0 +google-cloud-resource-manager==1.6.0 +google-cloud-pubsub==2.13.4 +google-cloud-bigquery==3.3.0 diff --git a/setup.py b/setup.py index 92143402..d0261010 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ name = "google-cloud-asset" description = "Cloud Asset API API client library" -version = "3.10.0" +version = "3.11.0" # Should be one of: # 'Development Status :: 3 - Alpha' # 'Development Status :: 4 - Beta' pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy