Google Cloud Dataproc v1 API - Class ClusterControllerClient (5.8.0)

public abstract class ClusterControllerClient

Reference documentation and code samples for the Google Cloud Dataproc v1 API class ClusterControllerClient.

ClusterController client wrapper, for convenient use.

Inheritance

object > ClusterControllerClient

Namespace

Google.Cloud.Dataproc.V1

Assembly

Google.Cloud.Dataproc.V1.dll

Remarks

The ClusterControllerService provides methods to manage clusters of Compute Engine instances.

Properties

CreateClusterOperationsClient

public virtual OperationsClient CreateClusterOperationsClient { get; }

The long-running operations client for CreateCluster.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default ClusterController scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

The default ClusterController scopes are:

DeleteClusterOperationsClient

public virtual OperationsClient DeleteClusterOperationsClient { get; }

The long-running operations client for DeleteCluster.

Property Value
TypeDescription
OperationsClient

DiagnoseClusterOperationsClient

public virtual OperationsClient DiagnoseClusterOperationsClient { get; }

The long-running operations client for DiagnoseCluster.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual ClusterController.ClusterControllerClient GrpcClient { get; }

The underlying gRPC ClusterController client

Property Value
TypeDescription
ClusterControllerClusterControllerClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
TypeDescription
IAMPolicyClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

StartClusterOperationsClient

public virtual OperationsClient StartClusterOperationsClient { get; }

The long-running operations client for StartCluster.

Property Value
TypeDescription
OperationsClient

StopClusterOperationsClient

public virtual OperationsClient StopClusterOperationsClient { get; }

The long-running operations client for StopCluster.

Property Value
TypeDescription
OperationsClient

UpdateClusterOperationsClient

public virtual OperationsClient UpdateClusterOperationsClient { get; }

The long-running operations client for UpdateCluster.

Property Value
TypeDescription
OperationsClient

Methods

Create()

public static ClusterControllerClient Create()

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

Returns
TypeDescription
ClusterControllerClient

The created ClusterControllerClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskClusterControllerClient

The task representing the created ClusterControllerClient.

CreateCluster(CreateClusterRequest, CallSettings)

public virtual Operation<Cluster, ClusterOperationMetadata> CreateCluster(CreateClusterRequest request, CallSettings callSettings = null)

Creates a cluster in a project. The returned [Operation.metadata][google.longrunning.Operation.metadata] will be ClusterOperationMetadata.

Parameters
NameDescription
requestCreateClusterRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationClusterClusterOperationMetadata

The RPC response.

Example
// Create client
ClusterControllerClient clusterControllerClient = ClusterControllerClient.Create();
// Initialize request argument(s)
CreateClusterRequest request = new CreateClusterRequest
{
    ProjectId = "",
    Cluster = new Cluster(),
    Region = "",
    RequestId = "",
    ActionOnFailedPrimaryWorkers = FailureAction.Unspecified,
};
// Make the request
Operation<Cluster, ClusterOperationMetadata> response = clusterControllerClient.CreateCluster(request);

// Poll until the returned long-running operation is complete
Operation<Cluster, ClusterOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Cluster 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<Cluster, ClusterOperationMetadata> retrievedResponse = clusterControllerClient.PollOnceCreateCluster(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Cluster retrievedResult = retrievedResponse.Result;
}

CreateCluster(string, string, Cluster, CallSettings)

public virtual Operation<Cluster, ClusterOperationMetadata> CreateCluster(string projectId, string region, Cluster cluster, CallSettings callSettings = null)

Creates a cluster in a project. The returned [Operation.metadata][google.longrunning.Operation.metadata] will be ClusterOperationMetadata.

Parameters
NameDescription
projectIdstring

Required. The ID of the Google Cloud Platform project that the cluster belongs to.

regionstring

Required. The Dataproc region in which to handle the request.

clusterCluster

Required. The cluster to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationClusterClusterOperationMetadata

The RPC response.

Example
// Create client
ClusterControllerClient clusterControllerClient = ClusterControllerClient.Create();
// Initialize request argument(s)
string projectId = "";
string region = "";
Cluster cluster = new Cluster();
// Make the request
Operation<Cluster, ClusterOperationMetadata> response = clusterControllerClient.CreateCluster(projectId, region, cluster);

// Poll until the returned long-running operation is complete
Operation<Cluster, ClusterOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Cluster 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<Cluster, ClusterOperationMetadata> retrievedResponse = clusterControllerClient.PollOnceCreateCluster(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Cluster retrievedResult = retrievedResponse.Result;
}

CreateClusterAsync(CreateClusterRequest, CallSettings)

public virtual Task<Operation<Cluster, ClusterOperationMetadata>> CreateClusterAsync(CreateClusterRequest request, CallSettings callSettings = null)

Creates a cluster in a project. The returned [Operation.metadata][google.longrunning.Operation.metadata] will be ClusterOperationMetadata.

Parameters
NameDescription
requestCreateClusterRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationClusterClusterOperationMetadata

A Task containing the RPC response.

Example
// Create client
ClusterControllerClient clusterControllerClient = await ClusterControllerClient.CreateAsync();
// Initialize request argument(s)
CreateClusterRequest request = new CreateClusterRequest
{
    ProjectId = "",
    Cluster = new Cluster(),
    Region = "",
    RequestId = "",
    ActionOnFailedPrimaryWorkers = FailureAction.Unspecified,
};
// Make the request
Operation<Cluster, ClusterOperationMetadata> response = await clusterControllerClient.CreateClusterAsync(request);

// Poll until the returned long-running operation is complete
Operation<Cluster, ClusterOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Cluster 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<Cluster, ClusterOperationMetadata> retrievedResponse = await clusterControllerClient.PollOnceCreateClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Cluster retrievedResult = retrievedResponse.Result;
}

CreateClusterAsync(CreateClusterRequest, CancellationToken)

public virtual Task<Operation<Cluster, ClusterOperationMetadata>> CreateClusterAsync(CreateClusterRequest request, CancellationToken cancellationToken)

Creates a cluster in a project. The returned [Operation.metadata][google.longrunning.Operation.metadata] will be ClusterOperationMetadata.

Parameters
NameDescription
requestCreateClusterRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationClusterClusterOperationMetadata

A Task containing the RPC response.

Example
// Create client
ClusterControllerClient clusterControllerClient = await ClusterControllerClient.CreateAsync();
// Initialize request argument(s)
CreateClusterRequest request = new CreateClusterRequest
{
    ProjectId = "",
    Cluster = new Cluster(),
    Region = "",
    RequestId = "",
    ActionOnFailedPrimaryWorkers = FailureAction.Unspecified,
};
// Make the request
Operation<Cluster, ClusterOperationMetadata> response = await clusterControllerClient.CreateClusterAsync(request);

// Poll until the returned long-running operation is complete
Operation<Cluster, ClusterOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Cluster 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<Cluster, ClusterOperationMetadata> retrievedResponse = await clusterControllerClient.PollOnceCreateClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Cluster retrievedResult = retrievedResponse.Result;
}

CreateClusterAsync(string, string, Cluster, CallSettings)

public virtual Task<Operation<Cluster, ClusterOperationMetadata>> CreateClusterAsync(string projectId, string region, Cluster cluster, CallSettings callSettings = null)

Creates a cluster in a project. The returned [Operation.metadata][google.longrunning.Operation.metadata] will be ClusterOperationMetadata.

Parameters
NameDescription
projectIdstring

Required. The ID of the Google Cloud Platform project that the cluster belongs to.

regionstring

Required. The Dataproc region in which to handle the request.

clusterCluster

Required. The cluster to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationClusterClusterOperationMetadata

A Task containing the RPC response.

Example
// Create client
ClusterControllerClient clusterControllerClient = await ClusterControllerClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string region = "";
Cluster cluster = new Cluster();
// Make the request
Operation<Cluster, ClusterOperationMetadata> response = await clusterControllerClient.CreateClusterAsync(projectId, region, cluster);

// Poll until the returned long-running operation is complete
Operation<Cluster, ClusterOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Cluster 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<Cluster, ClusterOperationMetadata> retrievedResponse = await clusterControllerClient.PollOnceCreateClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Cluster retrievedResult = retrievedResponse.Result;
}

CreateClusterAsync(string, string, Cluster, CancellationToken)

public virtual Task<Operation<Cluster, ClusterOperationMetadata>> CreateClusterAsync(string projectId, string region, Cluster cluster, CancellationToken cancellationToken)

Creates a cluster in a project. The returned [Operation.metadata][google.longrunning.Operation.metadata] will be ClusterOperationMetadata.

Parameters
NameDescription
projectIdstring

Required. The ID of the Google Cloud Platform project that the cluster belongs to.

regionstring

Required. The Dataproc region in which to handle the request.

clusterCluster

Required. The cluster to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationClusterClusterOperationMetadata

A Task containing the RPC response.

Example
// Create client
ClusterControllerClient clusterControllerClient = await ClusterControllerClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string region = "";
Cluster cluster = new Cluster();
// Make the request
Operation<Cluster, ClusterOperationMetadata> response = await clusterControllerClient.CreateClusterAsync(projectId, region, cluster);

// Poll until the returned long-running operation is complete
Operation<Cluster, ClusterOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Cluster 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<Cluster, ClusterOperationMetadata> retrievedResponse = await clusterControllerClient.PollOnceCreateClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Cluster retrievedResult = retrievedResponse.Result;
}

DeleteCluster(DeleteClusterRequest, CallSettings)

public virtual Operation<Empty, ClusterOperationMetadata> DeleteCluster(DeleteClusterRequest request, CallSettings callSettings = null)

Deletes a cluster in a project. The returned [Operation.metadata][google.longrunning.Operation.metadata] will be ClusterOperationMetadata.

Parameters
NameDescription
requestDeleteClusterRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyClusterOperationMetadata

The RPC response.

Example
// Create client
ClusterControllerClient clusterControllerClient = ClusterControllerClient.Create();
// Initialize request argument(s)
DeleteClusterRequest request = new DeleteClusterRequest
{
    ProjectId = "",
    ClusterName = "",
    Region = "",
    ClusterUuid = "",
    RequestId = "",
};
// Make the request
Operation<Empty, ClusterOperationMetadata> response = clusterControllerClient.DeleteCluster(request);

// Poll until the returned long-running operation is complete
Operation<Empty, ClusterOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty 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<Empty, ClusterOperationMetadata> retrievedResponse = clusterControllerClient.PollOnceDeleteCluster(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteCluster(string, string, string, CallSettings)

public virtual Operation<Empty, ClusterOperationMetadata> DeleteCluster(string projectId, string region, string clusterName, CallSettings callSettings = null)

Deletes a cluster in a project. The returned [Operation.metadata][google.longrunning.Operation.metadata] will be ClusterOperationMetadata.

Parameters
NameDescription
projectIdstring

Required. The ID of the Google Cloud Platform project that the cluster belongs to.

regionstring

Required. The Dataproc region in which to handle the request.

clusterNamestring

Required. The cluster name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyClusterOperationMetadata

The RPC response.

Example
// Create client
ClusterControllerClient clusterControllerClient = ClusterControllerClient.Create();
// Initialize request argument(s)
string projectId = "";
string region = "";
string clusterName = "";
// Make the request
Operation<Empty, ClusterOperationMetadata> response = clusterControllerClient.DeleteCluster(projectId, region, clusterName);

// Poll until the returned long-running operation is complete
Operation<Empty, ClusterOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty 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<Empty, ClusterOperationMetadata> retrievedResponse = clusterControllerClient.PollOnceDeleteCluster(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteClusterAsync(DeleteClusterRequest, CallSettings)

public virtual Task<Operation<Empty, ClusterOperationMetadata>> DeleteClusterAsync(DeleteClusterRequest request, CallSettings callSettings = null)

Deletes a cluster in a project. The returned [Operation.metadata][google.longrunning.Operation.metadata] will be ClusterOperationMetadata.

Parameters
NameDescription
requestDeleteClusterRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyClusterOperationMetadata

A Task containing the RPC response.

Example
// Create client
ClusterControllerClient clusterControllerClient = await ClusterControllerClient.CreateAsync();
// Initialize request argument(s)
DeleteClusterRequest request = new DeleteClusterRequest
{
    ProjectId = "",
    ClusterName = "",
    Region = "",
    ClusterUuid = "",
    RequestId = "",
};
// Make the request
Operation<Empty, ClusterOperationMetadata> response = await clusterControllerClient.DeleteClusterAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, ClusterOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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<Empty, ClusterOperationMetadata> retrievedResponse = await clusterControllerClient.PollOnceDeleteClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteClusterAsync(DeleteClusterRequest, CancellationToken)

public virtual Task<Operation<Empty, ClusterOperationMetadata>> DeleteClusterAsync(DeleteClusterRequest request, CancellationToken cancellationToken)

Deletes a cluster in a project. The returned [Operation.metadata][google.longrunning.Operation.metadata] will be ClusterOperationMetadata.

Parameters
NameDescription
requestDeleteClusterRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEmptyClusterOperationMetadata

A Task containing the RPC response.

Example
// Create client
ClusterControllerClient clusterControllerClient = await ClusterControllerClient.CreateAsync();
// Initialize request argument(s)
DeleteClusterRequest request = new DeleteClusterRequest
{
    ProjectId = "",
    ClusterName = "",
    Region = "",
    ClusterUuid = "",
    RequestId = "",
};
// Make the request
Operation<Empty, ClusterOperationMetadata> response = await clusterControllerClient.DeleteClusterAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, ClusterOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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<Empty, ClusterOperationMetadata> retrievedResponse = await clusterControllerClient.PollOnceDeleteClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteClusterAsync(string, string, string, CallSettings)

public virtual Task<Operation<Empty, ClusterOperationMetadata>> DeleteClusterAsync(string projectId, string region, string clusterName, CallSettings callSettings = null)

Deletes a cluster in a project. The returned [Operation.metadata][google.longrunning.Operation.metadata] will be ClusterOperationMetadata.

Parameters
NameDescription
projectIdstring

Required. The ID of the Google Cloud Platform project that the cluster belongs to.

regionstring

Required. The Dataproc region in which to handle the request.

clusterNamestring

Required. The cluster name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyClusterOperationMetadata

A Task containing the RPC response.

Example
// Create client
ClusterControllerClient clusterControllerClient = await ClusterControllerClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string region = "";
string clusterName = "";
// Make the request
Operation<Empty, ClusterOperationMetadata> response = await clusterControllerClient.DeleteClusterAsync(projectId, region, clusterName);

// Poll until the returned long-running operation is complete
Operation<Empty, ClusterOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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<Empty, ClusterOperationMetadata> retrievedResponse = await clusterControllerClient.PollOnceDeleteClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteClusterAsync(string, string, string, CancellationToken)

public virtual Task<Operation<Empty, ClusterOperationMetadata>> DeleteClusterAsync(string projectId, string region, string clusterName, CancellationToken cancellationToken)

Deletes a cluster in a project. The returned [Operation.metadata][google.longrunning.Operation.metadata] will be ClusterOperationMetadata.

Parameters
NameDescription
projectIdstring

Required. The ID of the Google Cloud Platform project that the cluster belongs to.

regionstring

Required. The Dataproc region in which to handle the request.

clusterNamestring

Required. The cluster name.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEmptyClusterOperationMetadata

A Task containing the RPC response.

Example
// Create client
ClusterControllerClient clusterControllerClient = await ClusterControllerClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string region = "";
string clusterName = "";
// Make the request
Operation<Empty, ClusterOperationMetadata> response = await clusterControllerClient.DeleteClusterAsync(projectId, region, clusterName);

// Poll until the returned long-running operation is complete
Operation<Empty, ClusterOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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<Empty, ClusterOperationMetadata> retrievedResponse = await clusterControllerClient.PollOnceDeleteClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DiagnoseCluster(DiagnoseClusterRequest, CallSettings)

public virtual Operation<DiagnoseClusterResults, ClusterOperationMetadata> DiagnoseCluster(DiagnoseClusterRequest request, CallSettings callSettings = null)

Gets cluster diagnostic information. The returned [Operation.metadata][google.longrunning.Operation.metadata] will be ClusterOperationMetadata. After the operation completes, [Operation.response][google.longrunning.Operation.response] contains DiagnoseClusterResults.

Parameters
NameDescription
requestDiagnoseClusterRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationDiagnoseClusterResultsClusterOperationMetadata

The RPC response.

Example
// Create client
ClusterControllerClient clusterControllerClient = ClusterControllerClient.Create();
// Initialize request argument(s)
DiagnoseClusterRequest request = new DiagnoseClusterRequest
{
    ProjectId = "",
    ClusterName = "",
    Region = "",
    TarballGcsDir = "",
    DiagnosisInterval = new Interval(),
    Jobs = { "", },
    YarnApplicationIds = { "", },
};
// Make the request
Operation<DiagnoseClusterResults, ClusterOperationMetadata> response = clusterControllerClient.DiagnoseCluster(request);

// Poll until the returned long-running operation is complete
Operation<DiagnoseClusterResults, ClusterOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
DiagnoseClusterResults 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<DiagnoseClusterResults, ClusterOperationMetadata> retrievedResponse = clusterControllerClient.PollOnceDiagnoseCluster(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DiagnoseClusterResults retrievedResult = retrievedResponse.Result;
}

DiagnoseCluster(string, string, string, CallSettings)

public virtual Operation<DiagnoseClusterResults, ClusterOperationMetadata> DiagnoseCluster(string projectId, string region, string clusterName, CallSettings callSettings = null)

Gets cluster diagnostic information. The returned [Operation.metadata][google.longrunning.Operation.metadata] will be ClusterOperationMetadata. After the operation completes, [Operation.response][google.longrunning.Operation.response] contains DiagnoseClusterResults.

Parameters
NameDescription
projectId