Class TpuClient (1.1.0)

public abstract class TpuClient

Tpu client wrapper, for convenient use.

Inheritance

Object > TpuClient

Derived Types

Namespace

Google.Cloud.Tpu.V1

Assembly

Google.Cloud.Tpu.V1.dll

Remarks

Manages TPU nodes and other resources

TPU API v1

Properties

CreateNodeOperationsClient

public virtual OperationsClient CreateNodeOperationsClient { get; }

The long-running operations client for CreateNode.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the Tpu service, which is a host of "tpu.googleapis.com" and a port of 443.

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Tpu scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

DeleteNodeOperationsClient

public virtual OperationsClient DeleteNodeOperationsClient { get; }

The long-running operations client for DeleteNode.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual Tpu.TpuClient GrpcClient { get; }

The underlying gRPC Tpu client

Property Value
TypeDescription
Tpu.TpuClient

ReimageNodeOperationsClient

public virtual OperationsClient ReimageNodeOperationsClient { get; }

The long-running operations client for ReimageNode.

Property Value
TypeDescription
OperationsClient

StartNodeOperationsClient

public virtual OperationsClient StartNodeOperationsClient { get; }

The long-running operations client for StartNode.

Property Value
TypeDescription
OperationsClient

StopNodeOperationsClient

public virtual OperationsClient StopNodeOperationsClient { get; }

The long-running operations client for StopNode.

Property Value
TypeDescription
OperationsClient

Methods

Create()

public static TpuClient Create()

Synchronously creates a TpuClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use TpuClientBuilder.

Returns
TypeDescription
TpuClient

The created TpuClient.

CreateAsync(CancellationToken)

public static Task<TpuClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))

Asynchronously creates a TpuClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use TpuClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<TpuClient>

The task representing the created TpuClient.

CreateNode(LocationName, Node, String, CallSettings)

public virtual Operation<Node, OperationMetadata> CreateNode(LocationName parent, Node node, string nodeId, CallSettings callSettings = null)

Creates a node.

Parameters
NameDescription
parentLocationName

Required. The parent resource name.

nodeNode

Required. The node.

nodeIdString

The unqualified resource name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Node, OperationMetadata>

The RPC response.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Node node = new Node();
string nodeId = "";
// Make the request
Operation<Node, OperationMetadata> response = tpuClient.CreateNode(parent, node, nodeId);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = tpuClient.PollOnceCreateNode(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

CreateNode(CreateNodeRequest, CallSettings)

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

Creates a node.

Parameters
NameDescription
requestCreateNodeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Node, OperationMetadata>

The RPC response.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
CreateNodeRequest request = new CreateNodeRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    NodeId = "",
    Node = new Node(),
};
// Make the request
Operation<Node, OperationMetadata> response = tpuClient.CreateNode(request);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = tpuClient.PollOnceCreateNode(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

CreateNode(String, Node, String, CallSettings)

public virtual Operation<Node, OperationMetadata> CreateNode(string parent, Node node, string nodeId, CallSettings callSettings = null)

Creates a node.

Parameters
NameDescription
parentString

Required. The parent resource name.

nodeNode

Required. The node.

nodeIdString

The unqualified resource name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Node, OperationMetadata>

The RPC response.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Node node = new Node();
string nodeId = "";
// Make the request
Operation<Node, OperationMetadata> response = tpuClient.CreateNode(parent, node, nodeId);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = tpuClient.PollOnceCreateNode(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

CreateNodeAsync(LocationName, Node, String, CallSettings)

public virtual Task<Operation<Node, OperationMetadata>> CreateNodeAsync(LocationName parent, Node node, string nodeId, CallSettings callSettings = null)

Creates a node.

Parameters
NameDescription
parentLocationName

Required. The parent resource name.

nodeNode

Required. The node.

nodeIdString

The unqualified resource name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Node, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Node node = new Node();
string nodeId = "";
// Make the request
Operation<Node, OperationMetadata> response = await tpuClient.CreateNodeAsync(parent, node, nodeId);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = await tpuClient.PollOnceCreateNodeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

CreateNodeAsync(LocationName, Node, String, CancellationToken)

public virtual Task<Operation<Node, OperationMetadata>> CreateNodeAsync(LocationName parent, Node node, string nodeId, CancellationToken cancellationToken)

Creates a node.

Parameters
NameDescription
parentLocationName

Required. The parent resource name.

nodeNode

Required. The node.

nodeIdString

The unqualified resource name.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Node, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Node node = new Node();
string nodeId = "";
// Make the request
Operation<Node, OperationMetadata> response = await tpuClient.CreateNodeAsync(parent, node, nodeId);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = await tpuClient.PollOnceCreateNodeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

CreateNodeAsync(CreateNodeRequest, CallSettings)

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

Creates a node.

Parameters
NameDescription
requestCreateNodeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Node, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
CreateNodeRequest request = new CreateNodeRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    NodeId = "",
    Node = new Node(),
};
// Make the request
Operation<Node, OperationMetadata> response = await tpuClient.CreateNodeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = await tpuClient.PollOnceCreateNodeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

CreateNodeAsync(CreateNodeRequest, CancellationToken)

public virtual Task<Operation<Node, OperationMetadata>> CreateNodeAsync(CreateNodeRequest request, CancellationToken cancellationToken)

Creates a node.

Parameters
NameDescription
requestCreateNodeRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Node, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
CreateNodeRequest request = new CreateNodeRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    NodeId = "",
    Node = new Node(),
};
// Make the request
Operation<Node, OperationMetadata> response = await tpuClient.CreateNodeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = await tpuClient.PollOnceCreateNodeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

CreateNodeAsync(String, Node, String, CallSettings)

public virtual Task<Operation<Node, OperationMetadata>> CreateNodeAsync(string parent, Node node, string nodeId, CallSettings callSettings = null)

Creates a node.

Parameters
NameDescription
parentString

Required. The parent resource name.

nodeNode

Required. The node.

nodeIdString

The unqualified resource name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Node, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Node node = new Node();
string nodeId = "";
// Make the request
Operation<Node, OperationMetadata> response = await tpuClient.CreateNodeAsync(parent, node, nodeId);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = await tpuClient.PollOnceCreateNodeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

CreateNodeAsync(String, Node, String, CancellationToken)

public virtual Task<Operation<Node, OperationMetadata>> CreateNodeAsync(string parent, Node node, string nodeId, CancellationToken cancellationToken)

Creates a node.

Parameters
NameDescription
parentString

Required. The parent resource name.

nodeNode

Required. The node.

nodeIdString

The unqualified resource name.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Node, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Node node = new Node();
string nodeId = "";
// Make the request
Operation<Node, OperationMetadata> response = await tpuClient.CreateNodeAsync(parent, node, nodeId);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = await tpuClient.PollOnceCreateNodeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

DeleteNode(DeleteNodeRequest, CallSettings)

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

Deletes a node.

Parameters
NameDescription
requestDeleteNodeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Node, OperationMetadata>

The RPC response.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
DeleteNodeRequest request = new DeleteNodeRequest
{
    NodeName = NodeName.FromProjectLocationNode("[PROJECT]", "[LOCATION]", "[NODE]"),
};
// Make the request
Operation<Node, OperationMetadata> response = tpuClient.DeleteNode(request);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = tpuClient.PollOnceDeleteNode(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

DeleteNode(NodeName, CallSettings)

public virtual Operation<Node, OperationMetadata> DeleteNode(NodeName name, CallSettings callSettings = null)

Deletes a node.

Parameters
NameDescription
nameNodeName

Required. The resource name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Node, OperationMetadata>

The RPC response.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
NodeName name = NodeName.FromProjectLocationNode("[PROJECT]", "[LOCATION]", "[NODE]");
// Make the request
Operation<Node, OperationMetadata> response = tpuClient.DeleteNode(name);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = tpuClient.PollOnceDeleteNode(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

DeleteNode(String, CallSettings)

public virtual Operation<Node, OperationMetadata> DeleteNode(string name, CallSettings callSettings = null)

Deletes a node.

Parameters
NameDescription
nameString

Required. The resource name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Node, OperationMetadata>

The RPC response.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/nodes/[NODE]";
// Make the request
Operation<Node, OperationMetadata> response = tpuClient.DeleteNode(name);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = tpuClient.PollOnceDeleteNode(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

DeleteNodeAsync(DeleteNodeRequest, CallSettings)

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

Deletes a node.

Parameters
NameDescription
requestDeleteNodeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Node, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
DeleteNodeRequest request = new DeleteNodeRequest
{
    NodeName = NodeName.FromProjectLocationNode("[PROJECT]", "[LOCATION]", "[NODE]"),
};
// Make the request
Operation<Node, OperationMetadata> response = await tpuClient.DeleteNodeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = await tpuClient.PollOnceDeleteNodeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

DeleteNodeAsync(DeleteNodeRequest, CancellationToken)

public virtual Task<Operation<Node, OperationMetadata>> DeleteNodeAsync(DeleteNodeRequest request, CancellationToken cancellationToken)

Deletes a node.

Parameters
NameDescription
requestDeleteNodeRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Node, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
DeleteNodeRequest request = new DeleteNodeRequest
{
    NodeName = NodeName.FromProjectLocationNode("[PROJECT]", "[LOCATION]", "[NODE]"),
};
// Make the request
Operation<Node, OperationMetadata> response = await tpuClient.DeleteNodeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = await tpuClient.PollOnceDeleteNodeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

DeleteNodeAsync(NodeName, CallSettings)

public virtual Task<Operation<Node, OperationMetadata>> DeleteNodeAsync(NodeName name, CallSettings callSettings = null)

Deletes a node.

Parameters
NameDescription
nameNodeName

Required. The resource name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Node, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
NodeName name = NodeName.FromProjectLocationNode("[PROJECT]", "[LOCATION]", "[NODE]");
// Make the request
Operation<Node, OperationMetadata> response = await tpuClient.DeleteNodeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = await tpuClient.PollOnceDeleteNodeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

DeleteNodeAsync(NodeName, CancellationToken)

public virtual Task<Operation<Node, OperationMetadata>> DeleteNodeAsync(NodeName name, CancellationToken cancellationToken)

Deletes a node.

Parameters
NameDescription
nameNodeName

Required. The resource name.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Node, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
NodeName name = NodeName.FromProjectLocationNode("[PROJECT]", "[LOCATION]", "[NODE]");
// Make the request
Operation<Node, OperationMetadata> response = await tpuClient.DeleteNodeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = await tpuClient.PollOnceDeleteNodeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

DeleteNodeAsync(String, CallSettings)

public virtual Task<Operation<Node, OperationMetadata>> DeleteNodeAsync(string name, CallSettings callSettings = null)

Deletes a node.

Parameters
NameDescription
nameString

Required. The resource name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Node, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/nodes/[NODE]";
// Make the request
Operation<Node, OperationMetadata> response = await tpuClient.DeleteNodeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = await tpuClient.PollOnceDeleteNodeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

DeleteNodeAsync(String, CancellationToken)

public virtual Task<Operation<Node, OperationMetadata>> DeleteNodeAsync(string name, CancellationToken cancellationToken)

Deletes a node.

Parameters
NameDescription
nameString

Required. The resource name.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Node, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/nodes/[NODE]";
// Make the request
Operation<Node, OperationMetadata> response = await tpuClient.DeleteNodeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = await tpuClient.PollOnceDeleteNodeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

GetAcceleratorType(AcceleratorTypeName, CallSettings)

public virtual AcceleratorType GetAcceleratorType(AcceleratorTypeName name, CallSettings callSettings = null)

Gets AcceleratorType.

Parameters
NameDescription
nameAcceleratorTypeName

Required. The resource name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AcceleratorType

The RPC response.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
AcceleratorTypeName name = AcceleratorTypeName.FromProjectLocationAcceleratorType("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]");
// Make the request
AcceleratorType response = tpuClient.GetAcceleratorType(name);

GetAcceleratorType(GetAcceleratorTypeRequest, CallSettings)

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

Gets AcceleratorType.

Parameters
NameDescription
requestGetAcceleratorTypeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AcceleratorType

The RPC response.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
GetAcceleratorTypeRequest request = new GetAcceleratorTypeRequest
{
    AcceleratorTypeName = AcceleratorTypeName.FromProjectLocationAcceleratorType("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]"),
};
// Make the request
AcceleratorType response = tpuClient.GetAcceleratorType(request);

GetAcceleratorType(String, CallSettings)

public virtual AcceleratorType GetAcceleratorType(string name, CallSettings callSettings = null)

Gets AcceleratorType.

Parameters
NameDescription
nameString

Required. The resource name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AcceleratorType

The RPC response.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/acceleratorTypes/[ACCELERATOR_TYPE]";
// Make the request
AcceleratorType response = tpuClient.GetAcceleratorType(name);

GetAcceleratorTypeAsync(AcceleratorTypeName, CallSettings)

public virtual Task<AcceleratorType> GetAcceleratorTypeAsync(AcceleratorTypeName name, CallSettings callSettings = null)

Gets AcceleratorType.

Parameters
NameDescription
nameAcceleratorTypeName

Required. The resource name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AcceleratorType>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
AcceleratorTypeName name = AcceleratorTypeName.FromProjectLocationAcceleratorType("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]");
// Make the request
AcceleratorType response = await tpuClient.GetAcceleratorTypeAsync(name);

GetAcceleratorTypeAsync(AcceleratorTypeName, CancellationToken)

public virtual Task<AcceleratorType> GetAcceleratorTypeAsync(AcceleratorTypeName name, CancellationToken cancellationToken)

Gets AcceleratorType.

Parameters
NameDescription
nameAcceleratorTypeName

Required. The resource name.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<AcceleratorType>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
AcceleratorTypeName name = AcceleratorTypeName.FromProjectLocationAcceleratorType("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]");
// Make the request
AcceleratorType response = await tpuClient.GetAcceleratorTypeAsync(name);

GetAcceleratorTypeAsync(GetAcceleratorTypeRequest, CallSettings)

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

Gets AcceleratorType.

Parameters
NameDescription
requestGetAcceleratorTypeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AcceleratorType>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
GetAcceleratorTypeRequest request = new GetAcceleratorTypeRequest
{
    AcceleratorTypeName = AcceleratorTypeName.FromProjectLocationAcceleratorType("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]"),
};
// Make the request
AcceleratorType response = await tpuClient.GetAcceleratorTypeAsync(request);

GetAcceleratorTypeAsync(GetAcceleratorTypeRequest, CancellationToken)

public virtual Task<AcceleratorType> GetAcceleratorTypeAsync(GetAcceleratorTypeRequest request, CancellationToken cancellationToken)

Gets AcceleratorType.

Parameters
NameDescription
requestGetAcceleratorTypeRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<AcceleratorType>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
GetAcceleratorTypeRequest request = new GetAcceleratorTypeRequest
{
    AcceleratorTypeName = AcceleratorTypeName.FromProjectLocationAcceleratorType("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]"),
};
// Make the request
AcceleratorType response = await tpuClient.GetAcceleratorTypeAsync(request);

GetAcceleratorTypeAsync(String, CallSettings)

public virtual Task<AcceleratorType> GetAcceleratorTypeAsync(string name, CallSettings callSettings = null)

Gets AcceleratorType.

Parameters
NameDescription
nameString

Required. The resource name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AcceleratorType>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/acceleratorTypes/[ACCELERATOR_TYPE]";
// Make the request
AcceleratorType response = await tpuClient.GetAcceleratorTypeAsync(name);

GetAcceleratorTypeAsync(String, CancellationToken)

public virtual Task<AcceleratorType> GetAcceleratorTypeAsync(string name, CancellationToken cancellationToken)

Gets AcceleratorType.

Parameters
NameDescription
nameString

Required. The resource name.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<AcceleratorType>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/acceleratorTypes/[ACCELERATOR_TYPE]";
// Make the request
AcceleratorType response = await tpuClient.GetAcceleratorTypeAsync(name);

GetNode(GetNodeRequest, CallSettings)

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

Gets the details of a node.

Parameters
NameDescription
requestGetNodeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Node

The RPC response.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
GetNodeRequest request = new GetNodeRequest
{
    NodeName = NodeName.FromProjectLocationNode("[PROJECT]", "[LOCATION]", "[NODE]"),
};
// Make the request
Node response = tpuClient.GetNode(request);

GetNode(NodeName, CallSettings)

public virtual Node GetNode(NodeName name, CallSettings callSettings = null)

Gets the details of a node.

Parameters
NameDescription
nameNodeName

Required. The resource name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Node

The RPC response.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
NodeName name = NodeName.FromProjectLocationNode("[PROJECT]", "[LOCATION]", "[NODE]");
// Make the request
Node response = tpuClient.GetNode(name);

GetNode(String, CallSettings)

public virtual Node GetNode(string name, CallSettings callSettings = null)

Gets the details of a node.

Parameters
NameDescription
nameString

Required. The resource name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Node

The RPC response.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/nodes/[NODE]";
// Make the request
Node response = tpuClient.GetNode(name);

GetNodeAsync(GetNodeRequest, CallSettings)

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

Gets the details of a node.

Parameters
NameDescription
requestGetNodeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Node>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
GetNodeRequest request = new GetNodeRequest
{
    NodeName = NodeName.FromProjectLocationNode("[PROJECT]", "[LOCATION]", "[NODE]"),
};
// Make the request
Node response = await tpuClient.GetNodeAsync(request);

GetNodeAsync(GetNodeRequest, CancellationToken)

public virtual Task<Node> GetNodeAsync(GetNodeRequest request, CancellationToken cancellationToken)

Gets the details of a node.

Parameters
NameDescription
requestGetNodeRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Node>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
GetNodeRequest request = new GetNodeRequest
{
    NodeName = NodeName.FromProjectLocationNode("[PROJECT]", "[LOCATION]", "[NODE]"),
};
// Make the request
Node response = await tpuClient.GetNodeAsync(request);

GetNodeAsync(NodeName, CallSettings)

public virtual Task<Node> GetNodeAsync(NodeName name, CallSettings callSettings = null)

Gets the details of a node.

Parameters
NameDescription
nameNodeName

Required. The resource name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Node>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
NodeName name = NodeName.FromProjectLocationNode("[PROJECT]", "[LOCATION]", "[NODE]");
// Make the request
Node response = await tpuClient.GetNodeAsync(name);

GetNodeAsync(NodeName, CancellationToken)

public virtual Task<Node> GetNodeAsync(NodeName name, CancellationToken cancellationToken)

Gets the details of a node.

Parameters
NameDescription
nameNodeName

Required. The resource name.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Node>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
NodeName name = NodeName.FromProjectLocationNode("[PROJECT]", "[LOCATION]", "[NODE]");
// Make the request
Node response = await tpuClient.GetNodeAsync(name);

GetNodeAsync(String, CallSettings)

public virtual Task<Node> GetNodeAsync(string name, CallSettings callSettings = null)

Gets the details of a node.

Parameters
NameDescription
nameString

Required. The resource name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Node>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/nodes/[NODE]";
// Make the request
Node response = await tpuClient.GetNodeAsync(name);

GetNodeAsync(String, CancellationToken)

public virtual Task<Node> GetNodeAsync(string name, CancellationToken cancellationToken)

Gets the details of a node.

Parameters
NameDescription
nameString

Required. The resource name.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Node>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/nodes/[NODE]";
// Make the request
Node response = await tpuClient.GetNodeAsync(name);

GetTensorFlowVersion(GetTensorFlowVersionRequest, CallSettings)

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

Gets TensorFlow Version.

Parameters
NameDescription
requestGetTensorFlowVersionRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TensorFlowVersion

The RPC response.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
GetTensorFlowVersionRequest request = new GetTensorFlowVersionRequest
{
    TensorFlowVersionName = TensorFlowVersionName.FromProjectLocationTensorFlowVersion("[PROJECT]", "[LOCATION]", "[TENSOR_FLOW_VERSION]"),
};
// Make the request
TensorFlowVersion response = tpuClient.GetTensorFlowVersion(request);

GetTensorFlowVersion(TensorFlowVersionName, CallSettings)

public virtual TensorFlowVersion GetTensorFlowVersion(TensorFlowVersionName name, CallSettings callSettings = null)

Gets TensorFlow Version.

Parameters
NameDescription
nameTensorFlowVersionName

Required. The resource name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TensorFlowVersion

The RPC response.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
TensorFlowVersionName name = TensorFlowVersionName.FromProjectLocationTensorFlowVersion("[PROJECT]", "[LOCATION]", "[TENSOR_FLOW_VERSION]");
// Make the request
TensorFlowVersion response = tpuClient.GetTensorFlowVersion(name);

GetTensorFlowVersion(String, CallSettings)

public virtual TensorFlowVersion GetTensorFlowVersion(string name, CallSettings callSettings = null)

Gets TensorFlow Version.

Parameters
NameDescription
nameString

Required. The resource name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TensorFlowVersion

The RPC response.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/tensorFlowVersions/[TENSOR_FLOW_VERSION]";
// Make the request
TensorFlowVersion response = tpuClient.GetTensorFlowVersion(name);

GetTensorFlowVersionAsync(GetTensorFlowVersionRequest, CallSettings)

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

Gets TensorFlow Version.

Parameters
NameDescription
requestGetTensorFlowVersionRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TensorFlowVersion>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
GetTensorFlowVersionRequest request = new GetTensorFlowVersionRequest
{
    TensorFlowVersionName = TensorFlowVersionName.FromProjectLocationTensorFlowVersion("[PROJECT]", "[LOCATION]", "[TENSOR_FLOW_VERSION]"),
};
// Make the request
TensorFlowVersion response = await tpuClient.GetTensorFlowVersionAsync(request);

GetTensorFlowVersionAsync(GetTensorFlowVersionRequest, CancellationToken)

public virtual Task<TensorFlowVersion> GetTensorFlowVersionAsync(GetTensorFlowVersionRequest request, CancellationToken cancellationToken)

Gets TensorFlow Version.

Parameters
NameDescription
requestGetTensorFlowVersionRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TensorFlowVersion>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
GetTensorFlowVersionRequest request = new GetTensorFlowVersionRequest
{
    TensorFlowVersionName = TensorFlowVersionName.FromProjectLocationTensorFlowVersion("[PROJECT]", "[LOCATION]", "[TENSOR_FLOW_VERSION]"),
};
// Make the request
TensorFlowVersion response = await tpuClient.GetTensorFlowVersionAsync(request);

GetTensorFlowVersionAsync(TensorFlowVersionName, CallSettings)

public virtual Task<TensorFlowVersion> GetTensorFlowVersionAsync(TensorFlowVersionName name, CallSettings callSettings = null)

Gets TensorFlow Version.

Parameters
NameDescription
nameTensorFlowVersionName

Required. The resource name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TensorFlowVersion>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
TensorFlowVersionName name = TensorFlowVersionName.FromProjectLocationTensorFlowVersion("[PROJECT]", "[LOCATION]", "[TENSOR_FLOW_VERSION]");
// Make the request
TensorFlowVersion response = await tpuClient.GetTensorFlowVersionAsync(name);

GetTensorFlowVersionAsync(TensorFlowVersionName, CancellationToken)

public virtual Task<TensorFlowVersion> GetTensorFlowVersionAsync(TensorFlowVersionName name, CancellationToken cancellationToken)

Gets TensorFlow Version.

Parameters
NameDescription
nameTensorFlowVersionName

Required. The resource name.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TensorFlowVersion>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
TensorFlowVersionName name = TensorFlowVersionName.FromProjectLocationTensorFlowVersion("[PROJECT]", "[LOCATION]", "[TENSOR_FLOW_VERSION]");
// Make the request
TensorFlowVersion response = await tpuClient.GetTensorFlowVersionAsync(name);

GetTensorFlowVersionAsync(String, CallSettings)

public virtual Task<TensorFlowVersion> GetTensorFlowVersionAsync(string name, CallSettings callSettings = null)

Gets TensorFlow Version.

Parameters
NameDescription
nameString

Required. The resource name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TensorFlowVersion>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/tensorFlowVersions/[TENSOR_FLOW_VERSION]";
// Make the request
TensorFlowVersion response = await tpuClient.GetTensorFlowVersionAsync(name);

GetTensorFlowVersionAsync(String, CancellationToken)

public virtual Task<TensorFlowVersion> GetTensorFlowVersionAsync(string name, CancellationToken cancellationToken)

Gets TensorFlow Version.

Parameters
NameDescription
nameString

Required. The resource name.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TensorFlowVersion>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/tensorFlowVersions/[TENSOR_FLOW_VERSION]";
// Make the request
TensorFlowVersion response = await tpuClient.GetTensorFlowVersionAsync(name);

ListAcceleratorTypes(AcceleratorTypeName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListAcceleratorTypesResponse, AcceleratorType> ListAcceleratorTypes(AcceleratorTypeName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists accelerator types supported by this API.

Parameters
NameDescription
parentAcceleratorTypeName

Required. The parent resource name.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListAcceleratorTypesResponse, AcceleratorType>

A pageable sequence of AcceleratorType resources.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
AcceleratorTypeName parent = AcceleratorTypeName.FromProjectLocationAcceleratorType("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]");
// Make the request
PagedEnumerable<ListAcceleratorTypesResponse, AcceleratorType> response = tpuClient.ListAcceleratorTypes(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (AcceleratorType item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAcceleratorTypesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AcceleratorType item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AcceleratorType> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AcceleratorType item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAcceleratorTypes(ListAcceleratorTypesRequest, CallSettings)

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

Lists accelerator types supported by this API.

Parameters
NameDescription
requestListAcceleratorTypesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListAcceleratorTypesResponse, AcceleratorType>

A pageable sequence of AcceleratorType resources.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
ListAcceleratorTypesRequest request = new ListAcceleratorTypesRequest
{
    ParentAsAcceleratorTypeName = AcceleratorTypeName.FromProjectLocationAcceleratorType("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListAcceleratorTypesResponse, AcceleratorType> response = tpuClient.ListAcceleratorTypes(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (AcceleratorType item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAcceleratorTypesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AcceleratorType item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AcceleratorType> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AcceleratorType item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAcceleratorTypes(String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListAcceleratorTypesResponse, AcceleratorType> ListAcceleratorTypes(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists accelerator types supported by this API.

Parameters
NameDescription
parentString

Required. The parent resource name.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListAcceleratorTypesResponse, AcceleratorType>

A pageable sequence of AcceleratorType resources.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/acceleratorTypes/[ACCELERATOR_TYPE]";
// Make the request
PagedEnumerable<ListAcceleratorTypesResponse, AcceleratorType> response = tpuClient.ListAcceleratorTypes(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (AcceleratorType item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAcceleratorTypesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AcceleratorType item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AcceleratorType> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AcceleratorType item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAcceleratorTypesAsync(AcceleratorTypeName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListAcceleratorTypesResponse, AcceleratorType> ListAcceleratorTypesAsync(AcceleratorTypeName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists accelerator types supported by this API.

Parameters
NameDescription
parentAcceleratorTypeName

Required. The parent resource name.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListAcceleratorTypesResponse, AcceleratorType>

A pageable asynchronous sequence of AcceleratorType resources.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
AcceleratorTypeName parent = AcceleratorTypeName.FromProjectLocationAcceleratorType("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]");
// Make the request
PagedAsyncEnumerable<ListAcceleratorTypesResponse, AcceleratorType> response = tpuClient.ListAcceleratorTypesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AcceleratorType item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListAcceleratorTypesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AcceleratorType item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AcceleratorType> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AcceleratorType item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAcceleratorTypesAsync(ListAcceleratorTypesRequest, CallSettings)

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

Lists accelerator types supported by this API.

Parameters
NameDescription
requestListAcceleratorTypesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListAcceleratorTypesResponse, AcceleratorType>

A pageable asynchronous sequence of AcceleratorType resources.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
ListAcceleratorTypesRequest request = new ListAcceleratorTypesRequest
{
    ParentAsAcceleratorTypeName = AcceleratorTypeName.FromProjectLocationAcceleratorType("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListAcceleratorTypesResponse, AcceleratorType> response = tpuClient.ListAcceleratorTypesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AcceleratorType item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListAcceleratorTypesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AcceleratorType item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AcceleratorType> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AcceleratorType item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAcceleratorTypesAsync(String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListAcceleratorTypesResponse, AcceleratorType> ListAcceleratorTypesAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists accelerator types supported by this API.

Parameters
NameDescription
parentString

Required. The parent resource name.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListAcceleratorTypesResponse, AcceleratorType>

A pageable asynchronous sequence of AcceleratorType resources.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/acceleratorTypes/[ACCELERATOR_TYPE]";
// Make the request
PagedAsyncEnumerable<ListAcceleratorTypesResponse, AcceleratorType> response = tpuClient.ListAcceleratorTypesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AcceleratorType item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListAcceleratorTypesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AcceleratorType item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AcceleratorType> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AcceleratorType item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNodes(LocationName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListNodesResponse, Node> ListNodes(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists nodes.

Parameters
NameDescription
parentLocationName

Required. The parent resource name.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListNodesResponse, Node>

A pageable sequence of Node resources.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListNodesResponse, Node> response = tpuClient.ListNodes(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Node item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNodesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Node item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Node> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Node item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNodes(ListNodesRequest, CallSettings)

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

Lists nodes.

Parameters
NameDescription
requestListNodesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListNodesResponse, Node>

A pageable sequence of Node resources.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
ListNodesRequest request = new ListNodesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListNodesResponse, Node> response = tpuClient.ListNodes(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Node item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNodesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Node item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Node> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Node item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNodes(String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListNodesResponse, Node> ListNodes(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists nodes.

Parameters
NameDescription
parentString

Required. The parent resource name.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListNodesResponse, Node>

A pageable sequence of Node resources.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListNodesResponse, Node> response = tpuClient.ListNodes(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Node item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNodesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Node item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Node> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Node item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNodesAsync(LocationName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListNodesResponse, Node> ListNodesAsync(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists nodes.

Parameters
NameDescription
parentLocationName

Required. The parent resource name.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListNodesResponse, Node>

A pageable asynchronous sequence of Node resources.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListNodesResponse, Node> response = tpuClient.ListNodesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Node item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNodesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Node item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Node> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Node item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNodesAsync(ListNodesRequest, CallSettings)

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

Lists nodes.

Parameters
NameDescription
requestListNodesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListNodesResponse, Node>

A pageable asynchronous sequence of Node resources.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
ListNodesRequest request = new ListNodesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListNodesResponse, Node> response = tpuClient.ListNodesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Node item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNodesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Node item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Node> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Node item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNodesAsync(String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListNodesResponse, Node> ListNodesAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists nodes.

Parameters
NameDescription
parentString

Required. The parent resource name.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListNodesResponse, Node>

A pageable asynchronous sequence of Node resources.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListNodesResponse, Node> response = tpuClient.ListNodesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Node item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNodesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Node item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Node> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Node item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListTensorFlowVersions(ListTensorFlowVersionsRequest, CallSettings)

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

List TensorFlow versions supported by this API.

Parameters
NameDescription
requestListTensorFlowVersionsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListTensorFlowVersionsResponse, TensorFlowVersion>

A pageable sequence of TensorFlowVersion resources.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
ListTensorFlowVersionsRequest request = new ListTensorFlowVersionsRequest
{
    ParentAsTensorFlowVersionName = TensorFlowVersionName.FromProjectLocationTensorFlowVersion("[PROJECT]", "[LOCATION]", "[TENSOR_FLOW_VERSION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListTensorFlowVersionsResponse, TensorFlowVersion> response = tpuClient.ListTensorFlowVersions(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (TensorFlowVersion item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTensorFlowVersionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TensorFlowVersion item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TensorFlowVersion> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TensorFlowVersion item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListTensorFlowVersions(TensorFlowVersionName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListTensorFlowVersionsResponse, TensorFlowVersion> ListTensorFlowVersions(TensorFlowVersionName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

List TensorFlow versions supported by this API.

Parameters
NameDescription
parentTensorFlowVersionName

Required. The parent resource name.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListTensorFlowVersionsResponse, TensorFlowVersion>

A pageable sequence of TensorFlowVersion resources.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
TensorFlowVersionName parent = TensorFlowVersionName.FromProjectLocationTensorFlowVersion("[PROJECT]", "[LOCATION]", "[TENSOR_FLOW_VERSION]");
// Make the request
PagedEnumerable<ListTensorFlowVersionsResponse, TensorFlowVersion> response = tpuClient.ListTensorFlowVersions(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (TensorFlowVersion item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTensorFlowVersionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TensorFlowVersion item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TensorFlowVersion> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TensorFlowVersion item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListTensorFlowVersions(String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListTensorFlowVersionsResponse, TensorFlowVersion> ListTensorFlowVersions(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

List TensorFlow versions supported by this API.

Parameters
NameDescription
parentString

Required. The parent resource name.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListTensorFlowVersionsResponse, TensorFlowVersion>

A pageable sequence of TensorFlowVersion resources.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/tensorFlowVersions/[TENSOR_FLOW_VERSION]";
// Make the request
PagedEnumerable<ListTensorFlowVersionsResponse, TensorFlowVersion> response = tpuClient.ListTensorFlowVersions(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (TensorFlowVersion item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTensorFlowVersionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TensorFlowVersion item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TensorFlowVersion> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TensorFlowVersion item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListTensorFlowVersionsAsync(ListTensorFlowVersionsRequest, CallSettings)

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

List TensorFlow versions supported by this API.

Parameters
NameDescription
requestListTensorFlowVersionsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListTensorFlowVersionsResponse, TensorFlowVersion>

A pageable asynchronous sequence of TensorFlowVersion resources.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
ListTensorFlowVersionsRequest request = new ListTensorFlowVersionsRequest
{
    ParentAsTensorFlowVersionName = TensorFlowVersionName.FromProjectLocationTensorFlowVersion("[PROJECT]", "[LOCATION]", "[TENSOR_FLOW_VERSION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListTensorFlowVersionsResponse, TensorFlowVersion> response = tpuClient.ListTensorFlowVersionsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((TensorFlowVersion item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTensorFlowVersionsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TensorFlowVersion item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TensorFlowVersion> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TensorFlowVersion item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListTensorFlowVersionsAsync(TensorFlowVersionName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListTensorFlowVersionsResponse, TensorFlowVersion> ListTensorFlowVersionsAsync(TensorFlowVersionName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

List TensorFlow versions supported by this API.

Parameters
NameDescription
parentTensorFlowVersionName

Required. The parent resource name.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListTensorFlowVersionsResponse, TensorFlowVersion>

A pageable asynchronous sequence of TensorFlowVersion resources.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
TensorFlowVersionName parent = TensorFlowVersionName.FromProjectLocationTensorFlowVersion("[PROJECT]", "[LOCATION]", "[TENSOR_FLOW_VERSION]");
// Make the request
PagedAsyncEnumerable<ListTensorFlowVersionsResponse, TensorFlowVersion> response = tpuClient.ListTensorFlowVersionsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((TensorFlowVersion item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTensorFlowVersionsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TensorFlowVersion item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TensorFlowVersion> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TensorFlowVersion item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListTensorFlowVersionsAsync(String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListTensorFlowVersionsResponse, TensorFlowVersion> ListTensorFlowVersionsAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

List TensorFlow versions supported by this API.

Parameters
NameDescription
parentString

Required. The parent resource name.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListTensorFlowVersionsResponse, TensorFlowVersion>

A pageable asynchronous sequence of TensorFlowVersion resources.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/tensorFlowVersions/[TENSOR_FLOW_VERSION]";
// Make the request
PagedAsyncEnumerable<ListTensorFlowVersionsResponse, TensorFlowVersion> response = tpuClient.ListTensorFlowVersionsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((TensorFlowVersion item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTensorFlowVersionsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TensorFlowVersion item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TensorFlowVersion> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TensorFlowVersion item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

PollOnceCreateNode(String, CallSettings)

public virtual Operation<Node, OperationMetadata> PollOnceCreateNode(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of CreateNode.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Node, OperationMetadata>

The result of polling the operation.

PollOnceCreateNodeAsync(String, CallSettings)

public virtual Task<Operation<Node, OperationMetadata>> PollOnceCreateNodeAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of CreateNode.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Node, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceDeleteNode(String, CallSettings)

public virtual Operation<Node, OperationMetadata> PollOnceDeleteNode(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of DeleteNode.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Node, OperationMetadata>

The result of polling the operation.

PollOnceDeleteNodeAsync(String, CallSettings)

public virtual Task<Operation<Node, OperationMetadata>> PollOnceDeleteNodeAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of DeleteNode.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Node, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceReimageNode(String, CallSettings)

public virtual Operation<Node, OperationMetadata> PollOnceReimageNode(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of ReimageNode.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Node, OperationMetadata>

The result of polling the operation.

PollOnceReimageNodeAsync(String, CallSettings)

public virtual Task<Operation<Node, OperationMetadata>> PollOnceReimageNodeAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of ReimageNode.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Node, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceStartNode(String, CallSettings)

public virtual Operation<Node, OperationMetadata> PollOnceStartNode(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of StartNode.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Node, OperationMetadata>

The result of polling the operation.

PollOnceStartNodeAsync(String, CallSettings)

public virtual Task<Operation<Node, OperationMetadata>> PollOnceStartNodeAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of StartNode.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Node, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceStopNode(String, CallSettings)

public virtual Operation<Node, OperationMetadata> PollOnceStopNode(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of StopNode.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Node, OperationMetadata>

The result of polling the operation.

PollOnceStopNodeAsync(String, CallSettings)

public virtual Task<Operation<Node, OperationMetadata>> PollOnceStopNodeAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of StopNode.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Node, OperationMetadata>>

A task representing the result of polling the operation.

ReimageNode(ReimageNodeRequest, CallSettings)

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

Reimages a node's OS.

Parameters
NameDescription
requestReimageNodeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Node, OperationMetadata>

The RPC response.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
ReimageNodeRequest request = new ReimageNodeRequest
{
    Name = "",
    TensorflowVersion = "",
};
// Make the request
Operation<Node, OperationMetadata> response = tpuClient.ReimageNode(request);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = tpuClient.PollOnceReimageNode(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

ReimageNodeAsync(ReimageNodeRequest, CallSettings)

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

Reimages a node's OS.

Parameters
NameDescription
requestReimageNodeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Node, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
ReimageNodeRequest request = new ReimageNodeRequest
{
    Name = "",
    TensorflowVersion = "",
};
// Make the request
Operation<Node, OperationMetadata> response = await tpuClient.ReimageNodeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = await tpuClient.PollOnceReimageNodeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

ReimageNodeAsync(ReimageNodeRequest, CancellationToken)

public virtual Task<Operation<Node, OperationMetadata>> ReimageNodeAsync(ReimageNodeRequest request, CancellationToken cancellationToken)

Reimages a node's OS.

Parameters
NameDescription
requestReimageNodeRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Node, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
ReimageNodeRequest request = new ReimageNodeRequest
{
    Name = "",
    TensorflowVersion = "",
};
// Make the request
Operation<Node, OperationMetadata> response = await tpuClient.ReimageNodeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = await tpuClient.PollOnceReimageNodeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

StartNode(StartNodeRequest, CallSettings)

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

Starts a node.

Parameters
NameDescription
requestStartNodeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Node, OperationMetadata>

The RPC response.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
StartNodeRequest request = new StartNodeRequest { Name = "", };
// Make the request
Operation<Node, OperationMetadata> response = tpuClient.StartNode(request);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = tpuClient.PollOnceStartNode(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

StartNodeAsync(StartNodeRequest, CallSettings)

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

Starts a node.

Parameters
NameDescription
requestStartNodeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Node, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
StartNodeRequest request = new StartNodeRequest { Name = "", };
// Make the request
Operation<Node, OperationMetadata> response = await tpuClient.StartNodeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = await tpuClient.PollOnceStartNodeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

StartNodeAsync(StartNodeRequest, CancellationToken)

public virtual Task<Operation<Node, OperationMetadata>> StartNodeAsync(StartNodeRequest request, CancellationToken cancellationToken)

Starts a node.

Parameters
NameDescription
requestStartNodeRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Node, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
StartNodeRequest request = new StartNodeRequest { Name = "", };
// Make the request
Operation<Node, OperationMetadata> response = await tpuClient.StartNodeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = await tpuClient.PollOnceStartNodeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

StopNode(StopNodeRequest, CallSettings)

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

Stops a node.

Parameters
NameDescription
requestStopNodeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Node, OperationMetadata>

The RPC response.

Example
// Create client
TpuClient tpuClient = TpuClient.Create();
// Initialize request argument(s)
StopNodeRequest request = new StopNodeRequest { Name = "", };
// Make the request
Operation<Node, OperationMetadata> response = tpuClient.StopNode(request);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = tpuClient.PollOnceStopNode(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

StopNodeAsync(StopNodeRequest, CallSettings)

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

Stops a node.

Parameters
NameDescription
requestStopNodeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Node, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
StopNodeRequest request = new StopNodeRequest { Name = "", };
// Make the request
Operation<Node, OperationMetadata> response = await tpuClient.StopNodeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = await tpuClient.PollOnceStopNodeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}

StopNodeAsync(StopNodeRequest, CancellationToken)

public virtual Task<Operation<Node, OperationMetadata>> StopNodeAsync(StopNodeRequest request, CancellationToken cancellationToken)

Stops a node.

Parameters
NameDescription
requestStopNodeRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Node, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
TpuClient tpuClient = await TpuClient.CreateAsync();
// Initialize request argument(s)
StopNodeRequest request = new StopNodeRequest { Name = "", };
// Make the request
Operation<Node, OperationMetadata> response = await tpuClient.StopNodeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Node, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Node result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Node, OperationMetadata> retrievedResponse = await tpuClient.PollOnceStopNodeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Node retrievedResult = retrievedResponse.Result;
}