LookupServiceClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Optional[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'> = ClientOptions: {'api_endpoint': 'servicedirectory.googleapis.com', 'client_cert_source': None, 'client_encrypted_cert_source': None, 'quota_project_id': None, 'credentials_file': None, 'scopes': None, 'api_key': None, 'api_audience': None})
Service Directory API for looking up service data at runtime.
Methods
LookupServiceClient
LookupServiceClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Optional[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'> = ClientOptions: {'api_endpoint': 'servicedirectory.googleapis.com', 'client_cert_source': None, 'client_encrypted_cert_source': None, 'quota_project_id': None, 'credentials_file': None, 'scopes': None, 'api_key': None, 'api_audience': 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. |
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. |