LookupServiceClient(*, credentials: google.auth.credentials.Credentials = None, transport: Union[str, google.cloud.servicedirectory_v1beta1.services.lookup_service.transports.base.LookupServiceTransport] = None, client_options: <module 'google.api_core.client_options' from '/workspace/python-service-directory/.nox/docfx/lib/python3.9/site-packages/google/api_core/client_options.py'> = None)
Service Directory API for looking up service data at runtime.
Methods
LookupServiceClient
LookupServiceClient(*, credentials: google.auth.credentials.Credentials = None, transport: Union[str, google.cloud.servicedirectory_v1beta1.services.lookup_service.transports.base.LookupServiceTransport] = None, client_options: <module 'google.api_core.client_options' from '/workspace/python-service-directory/.nox/docfx/lib/python3.9/site-packages/google/api_core/client_options.py'> = None)
Instantiate the lookup service client.
Parameters | |
---|---|
Name | Description |
credentials |
Optional[google.auth.credentials.Credentials]
The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. |
transport |
Union[str,
The transport to use. If set to None, a transport is chosen automatically. |
client_options |
ClientOptions
Custom options for the client. (1) The |
Exceptions | |
---|---|
Type | Description |
google.auth.exceptions.MutualTlsChannelError | If mutual TLS transport creation failed for any reason. |
from_service_account_file
from_service_account_file(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Parameter | |
---|---|
Name | Description |
filename |
str
The path to the service account private key json file. |
Returns | |
---|---|
Type | Description |
{@api.name} | The constructed client. |
from_service_account_json
from_service_account_json(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Parameter | |
---|---|
Name | Description |
filename |
str
The path to the service account private key json file. |
Returns | |
---|---|
Type | Description |
{@api.name} | The constructed client. |
resolve_service
resolve_service(request: Optional[google.cloud.servicedirectory_v1beta1.types.lookup_service.ResolveServiceRequest] = None, *, retry: google.api_core.retry.Retry = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Returns a xref_service and its associated endpoints. Resolving a service is not considered an active developer method.
Parameters | |
---|---|
Name | Description |
request |
The request object. The request message for LookupService.ResolveService. Looks up a service by its name, returns the service and its endpoints. |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
| The response message for LookupService.ResolveService. |