diff --git a/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/services/connection_service/async_client.py b/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/services/connection_service/async_client.py index b0ec5838de64..a383c68f2957 100644 --- a/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/services/connection_service/async_client.py +++ b/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/services/connection_service/async_client.py @@ -288,7 +288,8 @@ def sample_list_connections(): maximum=60.0, multiplier=1.3, predicate=retries.if_exception_type( - core_exceptions.GoogleAPICallError, + core_exceptions.ServiceUnavailable, + core_exceptions.Unknown, ), deadline=60.0, ), diff --git a/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/services/connection_service/transports/base.py b/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/services/connection_service/transports/base.py index fdf167b1d095..0c30bd23fa77 100644 --- a/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/services/connection_service/transports/base.py +++ b/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/services/connection_service/transports/base.py @@ -128,7 +128,8 @@ def _prep_wrapped_messages(self, client_info): maximum=60.0, multiplier=1.3, predicate=retries.if_exception_type( - core_exceptions.GoogleAPICallError, + core_exceptions.ServiceUnavailable, + core_exceptions.Unknown, ), deadline=60.0, ), diff --git a/packages/google-cloud-apigee-connect/samples/generated_samples/snippet_metadata_apigeeconnect_v1.json b/packages/google-cloud-apigee-connect/samples/generated_samples/snippet_metadata_apigeeconnect_v1.json index 9e7ddf2a2810..f5a0a465828f 100644 --- a/packages/google-cloud-apigee-connect/samples/generated_samples/snippet_metadata_apigeeconnect_v1.json +++ b/packages/google-cloud-apigee-connect/samples/generated_samples/snippet_metadata_apigeeconnect_v1.json @@ -1,16 +1,61 @@ { + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.apigeeconnect.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-apigee-connect" + }, "snippets": [ { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.apigeeconnect_v1.ConnectionServiceAsyncClient", + "shortName": "ConnectionServiceAsyncClient" + }, + "fullName": "google.cloud.apigeeconnect_v1.ConnectionServiceAsyncClient.list_connections", "method": { + "fullName": "google.cloud.apigeeconnect.v1.ConnectionService.ListConnections", "service": { + "fullName": "google.cloud.apigeeconnect.v1.ConnectionService", "shortName": "ConnectionService" }, "shortName": "ListConnections" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigeeconnect_v1.types.ListConnectionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigeeconnect_v1.services.connection_service.pagers.ListConnectionsAsyncPager", + "shortName": "list_connections" }, + "description": "Sample for ListConnections", "file": "apigeeconnect_v1_generated_connection_service_list_connections_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "apigeeconnect_v1_generated_ConnectionService_ListConnections_async", "segments": [ { @@ -43,18 +88,54 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "apigeeconnect_v1_generated_connection_service_list_connections_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.apigeeconnect_v1.ConnectionServiceClient", + "shortName": "ConnectionServiceClient" + }, + "fullName": "google.cloud.apigeeconnect_v1.ConnectionServiceClient.list_connections", "method": { + "fullName": "google.cloud.apigeeconnect.v1.ConnectionService.ListConnections", "service": { + "fullName": "google.cloud.apigeeconnect.v1.ConnectionService", "shortName": "ConnectionService" }, "shortName": "ListConnections" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.apigeeconnect_v1.types.ListConnectionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.apigeeconnect_v1.services.connection_service.pagers.ListConnectionsPager", + "shortName": "list_connections" }, + "description": "Sample for ListConnections", "file": "apigeeconnect_v1_generated_connection_service_list_connections_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "apigeeconnect_v1_generated_ConnectionService_ListConnections_sync", "segments": [ { @@ -87,19 +168,51 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "apigeeconnect_v1_generated_connection_service_list_connections_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.apigeeconnect_v1.TetherAsyncClient", + "shortName": "TetherAsyncClient" + }, + "fullName": "google.cloud.apigeeconnect_v1.TetherAsyncClient.egress", "method": { + "fullName": "google.cloud.apigeeconnect.v1.Tether.Egress", "service": { + "fullName": "google.cloud.apigeeconnect.v1.Tether", "shortName": "Tether" }, "shortName": "Egress" - } + }, + "parameters": [ + { + "name": "requests", + "type": "Iterator[google.cloud.apigeeconnect_v1.types.EgressResponse]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "Iterable[google.cloud.apigeeconnect_v1.types.EgressRequest]", + "shortName": "egress" }, + "description": "Sample for Egress", "file": "apigeeconnect_v1_generated_tether_egress_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "apigeeconnect_v1_generated_Tether_Egress_async", "segments": [ { @@ -132,18 +245,50 @@ "start": 51, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "apigeeconnect_v1_generated_tether_egress_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.apigeeconnect_v1.TetherClient", + "shortName": "TetherClient" + }, + "fullName": "google.cloud.apigeeconnect_v1.TetherClient.egress", "method": { + "fullName": "google.cloud.apigeeconnect.v1.Tether.Egress", "service": { + "fullName": "google.cloud.apigeeconnect.v1.Tether", "shortName": "Tether" }, "shortName": "Egress" - } + }, + "parameters": [ + { + "name": "requests", + "type": "Iterator[google.cloud.apigeeconnect_v1.types.EgressResponse]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "Iterable[google.cloud.apigeeconnect_v1.types.EgressRequest]", + "shortName": "egress" }, + "description": "Sample for Egress", "file": "apigeeconnect_v1_generated_tether_egress_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "apigeeconnect_v1_generated_Tether_Egress_sync", "segments": [ { @@ -176,7 +321,8 @@ "start": 51, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "apigeeconnect_v1_generated_tether_egress_sync.py" } ] }