ansys.platform.instancemanagement.Instance#

class ansys.platform.instancemanagement.Instance(definition_name: str, name: str, ready: bool, status_message: str, services: Mapping[str, ansys.platform.instancemanagement.service.Service], stub: Optional[ansys.api.platform.instancemanagement.v1.product_instance_manager_pb2_grpc.ProductInstanceManagerStub] = None)#

Provides a remote instance of a product.

This class is a context manager and can be used with the with statement to automatically stop the remote instance when the tasks are finished.

Methods

Instance.build_grpc_channel([service_name])

Build a gRPC channel to communicate with this instance.

Instance.delete([timeout])

Delete the remote product instance.

Instance.update([timeout])

Update the instance information from the remote status.

Instance.wait_for_ready([polling_interval, ...])

Wait for the instance to be ready.

Attributes

Instance.definition_name

Name of the definition that created this instance.

Instance.name

Name of the instance.

Instance.ready

Whether the instance is ready.

Instance.services

List of entry points exposed by the instance.

Instance.status_message

Status of the instance.