Cloud TPU v1 API - Class TpuClientImpl (2.3.0)

public sealed class TpuClientImpl : TpuClient

Reference documentation and code samples for the Cloud TPU v1 API class TpuClientImpl.

Tpu client wrapper implementation, for convenient use.

Inheritance

object > TpuClient > TpuClientImpl

Namespace

Google.Cloud.Tpu.V1

Assembly

Google.Cloud.Tpu.V1.dll

Remarks

Manages TPU nodes and other resources

TPU API v1

Constructors

TpuClientImpl(TpuClient, TpuSettings, ILogger)

public TpuClientImpl(Tpu.TpuClient grpcClient, TpuSettings settings, ILogger logger)

Constructs a client wrapper for the Tpu service, with the specified gRPC client and settings.

Parameters
Name Description
grpcClient TpuTpuClient

The underlying gRPC client.

settings TpuSettings

The base TpuSettings used within this client.

logger ILogger

Optional ILogger to use within this client.

Properties

CreateNodeOperationsClient

public override OperationsClient CreateNodeOperationsClient { get; }

The long-running operations client for CreateNode.

Property Value
Type Description
OperationsClient
Overrides

DeleteNodeOperationsClient

public override OperationsClient DeleteNodeOperationsClient { get; }

The long-running operations client for DeleteNode.

Property Value
Type Description
OperationsClient
Overrides

GrpcClient

public override Tpu.TpuClient GrpcClient { get; }

The underlying gRPC Tpu client

Property Value
Type Description
TpuTpuClient
Overrides

LocationsClient

public override LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient
Overrides

ReimageNodeOperationsClient

public override OperationsClient ReimageNodeOperationsClient { get; }

The long-running operations client for ReimageNode.

Property Value
Type Description
OperationsClient
Overrides

StartNodeOperationsClient

public override OperationsClient StartNodeOperationsClient { get; }

The long-running operations client for StartNode.

Property Value
Type Description
OperationsClient
Overrides

StopNodeOperationsClient

public override OperationsClient StopNodeOperationsClient { get; }

The long-running operations client for StopNode.

Property Value
Type Description
OperationsClient
Overrides

Methods

CreateNode(CreateNodeRequest, CallSettings)

public override Operation<Node, OperationMetadata> CreateNode(CreateNodeRequest request, CallSettings callSettings = null)

Creates a node.

Parameters
Name Description
request CreateNodeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationNodeOperationMetadata

The RPC response.

Overrides

CreateNodeAsync(CreateNodeRequest, CallSettings)

public override Task<Operation<Node, OperationMetadata>> CreateNodeAsync(CreateNodeRequest request, CallSettings callSettings = null)

Creates a node.

Parameters
Name Description
request CreateNodeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationNodeOperationMetadata

A Task containing the RPC response.

Overrides

DeleteNode(DeleteNodeRequest, CallSettings)

public override Operation<Node, OperationMetadata> DeleteNode(DeleteNodeRequest request, CallSettings callSettings = null)

Deletes a node.

Parameters
Name Description
request DeleteNodeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationNodeOperationMetadata

The RPC response.

Overrides

DeleteNodeAsync(DeleteNodeRequest, CallSettings)

public override Task<Operation<Node, OperationMetadata>> DeleteNodeAsync(DeleteNodeRequest request, CallSettings callSettings = null)

Deletes a node.

Parameters
Name Description
request DeleteNodeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationNodeOperationMetadata

A Task containing the RPC response.

Overrides

GetAcceleratorType(GetAcceleratorTypeRequest, CallSettings)

public override AcceleratorType GetAcceleratorType(GetAcceleratorTypeRequest request, CallSettings callSettings = null)

Gets AcceleratorType.

Parameters
Name Description
request GetAcceleratorTypeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AcceleratorType

The RPC response.

Overrides

GetAcceleratorTypeAsync(GetAcceleratorTypeRequest, CallSettings)

public override Task<AcceleratorType> GetAcceleratorTypeAsync(GetAcceleratorTypeRequest request, CallSettings callSettings = null)

Gets AcceleratorType.

Parameters
Name Description
request GetAcceleratorTypeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAcceleratorType

A Task containing the RPC response.

Overrides

GetNode(GetNodeRequest, CallSettings)

public override Node GetNode(GetNodeRequest request, CallSettings callSettings = null)

Gets the details of a node.

Parameters
Name Description
request GetNodeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Node

The RPC response.

Overrides

GetNodeAsync(GetNodeRequest, CallSettings)

public override Task<Node> GetNodeAsync(GetNodeRequest request, CallSettings callSettings = null)

Gets the details of a node.

Parameters
Name Description
request GetNodeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNode

A Task containing the RPC response.

Overrides

GetTensorFlowVersion(GetTensorFlowVersionRequest, CallSettings)

public override TensorFlowVersion GetTensorFlowVersion(GetTensorFlowVersionRequest request, CallSettings callSettings = null)

Gets TensorFlow Version.

Parameters
Name Description
request GetTensorFlowVersionRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TensorFlowVersion

The RPC response.

Overrides

GetTensorFlowVersionAsync(GetTensorFlowVersionRequest, CallSettings)

public override Task<TensorFlowVersion> GetTensorFlowVersionAsync(GetTensorFlowVersionRequest request, CallSettings callSettings = null)

Gets TensorFlow Version.

Parameters
Name Description
request GetTensorFlowVersionRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskTensorFlowVersion

A Task containing the RPC response.

Overrides

ListAcceleratorTypes(ListAcceleratorTypesRequest, CallSettings)

public override PagedEnumerable<ListAcceleratorTypesResponse, AcceleratorType> ListAcceleratorTypes(ListAcceleratorTypesRequest request, CallSettings callSettings = null)

Lists accelerator types supported by this API.

Parameters
Name Description
request ListAcceleratorTypesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListAcceleratorTypesResponseAcceleratorType

A pageable sequence of AcceleratorType resources.

Overrides

ListAcceleratorTypesAsync(ListAcceleratorTypesRequest, CallSettings)

public override PagedAsyncEnumerable<ListAcceleratorTypesResponse, AcceleratorType> ListAcceleratorTypesAsync(ListAcceleratorTypesRequest request, CallSettings callSettings = null)

Lists accelerator types supported by this API.

Parameters
Name Description
request ListAcceleratorTypesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListAcceleratorTypesResponseAcceleratorType

A pageable asynchronous sequence of AcceleratorType resources.

Overrides

ListNodes(ListNodesRequest, CallSettings)

public override PagedEnumerable<ListNodesResponse, Node> ListNodes(ListNodesRequest request, CallSettings callSettings = null)

Lists nodes.

Parameters
Name Description
request ListNodesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListNodesResponseNode

A pageable sequence of Node resources.

Overrides

ListNodesAsync(ListNodesRequest, CallSettings)

public override PagedAsyncEnumerable<ListNodesResponse, Node> ListNodesAsync(ListNodesRequest request, CallSettings callSettings = null)

Lists nodes.

Parameters
Name Description
request ListNodesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListNodesResponseNode

A pageable asynchronous sequence of Node resources.

Overrides

ListTensorFlowVersions(ListTensorFlowVersionsRequest, CallSettings)

public override PagedEnumerable<ListTensorFlowVersionsResponse, TensorFlowVersion> ListTensorFlowVersions(ListTensorFlowVersionsRequest request, CallSettings callSettings = null)

List TensorFlow versions supported by this API.

Parameters
Name Description
request ListTensorFlowVersionsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListTensorFlowVersionsResponseTensorFlowVersion

A pageable sequence of TensorFlowVersion resources.

Overrides

ListTensorFlowVersionsAsync(ListTensorFlowVersionsRequest, CallSettings)

public override PagedAsyncEnumerable<ListTensorFlowVersionsResponse, TensorFlowVersion> ListTensorFlowVersionsAsync(ListTensorFlowVersionsRequest request, CallSettings callSettings = null)

List TensorFlow versions supported by this API.

Parameters
Name Description
request ListTensorFlowVersionsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListTensorFlowVersionsResponseTensorFlowVersion

A pageable asynchronous sequence of TensorFlowVersion resources.

Overrides

ReimageNode(ReimageNodeRequest, CallSettings)

public override Operation<Node, OperationMetadata> ReimageNode(ReimageNodeRequest request, CallSettings callSettings = null)

Reimages a node's OS.

Parameters
Name Description
request ReimageNodeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationNodeOperationMetadata

The RPC response.

Overrides

ReimageNodeAsync(ReimageNodeRequest, CallSettings)

public override Task<Operation<Node, OperationMetadata>> ReimageNodeAsync(ReimageNodeRequest request, CallSettings callSettings = null)

Reimages a node's OS.

Parameters
Name Description
request ReimageNodeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationNodeOperationMetadata

A Task containing the RPC response.

Overrides

StartNode(StartNodeRequest, CallSettings)

public override Operation<Node, OperationMetadata> StartNode(StartNodeRequest request, CallSettings callSettings = null)

Starts a node.

Parameters
Name Description
request StartNodeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationNodeOperationMetadata

The RPC response.

Overrides

StartNodeAsync(StartNodeRequest, CallSettings)

public override Task<Operation<Node, OperationMetadata>> StartNodeAsync(StartNodeRequest request, CallSettings callSettings = null)

Starts a node.

Parameters
Name Description
request StartNodeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationNodeOperationMetadata

A Task containing the RPC response.

Overrides

StopNode(StopNodeRequest, CallSettings)

public override Operation<Node, OperationMetadata> StopNode(StopNodeRequest request, CallSettings callSettings = null)

Stops a node, this operation is only available with single TPU nodes.

Parameters
Name Description
request StopNodeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationNodeOperationMetadata

The RPC response.

Overrides

StopNodeAsync(StopNodeRequest, CallSettings)

public override Task<Operation<Node, OperationMetadata>> StopNodeAsync(StopNodeRequest request, CallSettings callSettings = null)

Stops a node, this operation is only available with single TPU nodes.

Parameters
Name Description
request StopNodeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationNodeOperationMetadata

A Task containing the RPC response.

Overrides