class CloudOperationsClient: (source)
Constructors: CloudOperationsClient.connect(api_key, version, target_host, tls, retry_config, ...)
, CloudOperationsClient(service_client)
Client for accessing Temporal Cloud Operations API.
Warning
This client and the API are experimental
Most users will use connect
to create a client. The
cloud_service
property provides access to a raw gRPC cloud
service client.
Clients are not thread-safe and should only be used in the event loop they
are first connected in. If a client needs to be used from another thread
than where it was created, make sure the event loop where it was created is
captured, and then call asyncio.run_coroutine_threadsafe
with the
client call and that event loop.
Clients do not work across forks since runtimes do not work across forks.
Async Static Method | connect |
Connect to a Temporal Cloud Operations API. |
Method | __init__ |
Create a Temporal Cloud Operations client from a service client. |
Method | api |
Update the API key for this client. |
Method | rpc |
Update the headers for this client. |
Property | api |
API key for every call made by this client. |
Property | cloud |
Raw gRPC cloud service client. |
Property | identity |
Identity used in calls by this client. |
Property | rpc |
Headers for every call made by this client. |
Property | service |
Raw gRPC service client. |
Instance Variable | _service |
Undocumented |
async def connect(*, api_key:
Optional[ str]
= None, version: Optional[ str]
= None, target_host: str
= 'saas-api.tmprl.cloud:443', tls: Union[ bool, TLSConfig]
= True, retry_config: Optional[ RetryConfig]
= None, keep_alive_config: Optional[ KeepAliveConfig]
= KeepAliveConfig.default, rpc_metadata: Mapping[ str, str]
= {}, identity: Optional[ str]
= None, lazy: bool
= False, runtime: Optional[ temporalio.runtime.Runtime]
= None, http_connect_proxy_config: Optional[ HttpConnectProxyConfig]
= None) -> CloudOperationsClient
:
(source)
¶
Connect to a Temporal Cloud Operations API.
Warning
This client and the API are experimental
Parameters | |
apiOptional[ | API key for Temporal. This becomes the "Authorization" HTTP header with "Bearer " prepended. This is only set if RPC metadata doesn't already have an "authorization" key. This is essentially required for access to the cloud API. |
version:Optional[ | Version header for safer mutations. May or may not be required depending on cloud settings. |
targetstr | host:port for the Temporal server. The default is to the common cloud endpoint. |
tls:Union[ | If true, the default, use system default TLS configuration. If false, the default, do not use TLS. If TLS configuration present, that TLS configuration will be used. The default is usually required to access the API. |
retryOptional[ | Retry configuration for direct service calls (when opted in) or all high-level calls made by this client (which all opt-in to retries by default). If unset, a default retry configuration is used. |
keepOptional[ | Keep-alive configuration for the client connection. Default is to check every 30s and kill the connection if a response doesn't come back in 15s. Can be set to None to disable. |
rpcMapping[ | Headers to use for all calls to the server. Keys here can be overriden by per-call RPC metadata keys. |
identity:Optional[ | Identity for this client. If unset, a default is created based on the version of the SDK. |
lazy:bool | If true, the client will not connect until the first call is attempted or a worker is created with it. Lazy clients cannot be used for workers. |
runtime:Optional[ | The runtime for this client, or the default if unset. |
httpOptional[ | Configuration for HTTP CONNECT proxy. |
Returns | |
CloudOperationsClient | Undocumented |
Create a Temporal Cloud Operations client from a service client.
Warning
This client and the API are experimental
Parameters | |
servicetemporalio.service.ServiceClient | Existing service client to use. |
Update the API key for this client.
This is only set if RPCmetadata doesn't already have an "authorization" key.
Update the headers for this client.
Do not mutate this mapping after set. Rather, set an entirely new mapping if changes are needed. Currently this must be set with the temporal-cloud-api-version header if it is needed.