public abstract class ClusterControllerClient
Reference documentation and code samples for the Google Cloud Dataproc v1 API class ClusterControllerClient.
ClusterController client wrapper, for convenient use.
Derived Types
Namespace
GoogleCloudGoogle.Cloud.DataprocV1Assembly
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
.
Type | Description |
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.
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default ClusterController scopes.
Type | Description |
IReadOnlyListstring |
The default ClusterController scopes are:
DeleteClusterOperationsClient
public virtual OperationsClient DeleteClusterOperationsClient { get; }
The long-running operations client for DeleteCluster
.
Type | Description |
OperationsClient |
DiagnoseClusterOperationsClient
public virtual OperationsClient DiagnoseClusterOperationsClient { get; }
The long-running operations client for DiagnoseCluster
.
Type | Description |
OperationsClient |
GrpcClient
public virtual ClusterController.ClusterControllerClient GrpcClient { get; }
The underlying gRPC ClusterController client
Type | Description |
ClusterControllerClusterControllerClient |
IAMPolicyClient
public virtual IAMPolicyClient IAMPolicyClient { get; }
The IAMPolicyClient associated with this client.
Type | Description |
IAMPolicyClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Type | Description |
ServiceMetadata |
StartClusterOperationsClient
public virtual OperationsClient StartClusterOperationsClient { get; }
The long-running operations client for StartCluster
.
Type | Description |
OperationsClient |
StopClusterOperationsClient
public virtual OperationsClient StopClusterOperationsClient { get; }
The long-running operations client for StopCluster
.
Type | Description |
OperationsClient |
UpdateClusterOperationsClient
public virtual OperationsClient UpdateClusterOperationsClient { get; }
The long-running operations client for UpdateCluster
.
Type | Description |
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.
Type | Description |
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.
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Type | Description |
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.
Name | Description |
request | CreateClusterRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
OperationClusterClusterOperationMetadata | The RPC response. |
// 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.
Name | Description |
projectId | string Required. The ID of the Google Cloud Platform project that the cluster belongs to. |
region | string Required. The Dataproc region in which to handle the request. |
cluster | Cluster Required. The cluster to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
OperationClusterClusterOperationMetadata | The RPC response. |
// 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.
Name | Description |
request | CreateClusterRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
TaskOperationClusterClusterOperationMetadata | A Task containing the RPC response. |
// 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.
Name | Description |
request | CreateClusterRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
TaskOperationClusterClusterOperationMetadata | A Task containing the RPC response. |
// 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.
Name | Description |
projectId | string Required. The ID of the Google Cloud Platform project that the cluster belongs to. |
region | string Required. The Dataproc region in which to handle the request. |
cluster | Cluster Required. The cluster to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
TaskOperationClusterClusterOperationMetadata | A Task containing the RPC response. |
// 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.
Name | Description |
projectId | string Required. The ID of the Google Cloud Platform project that the cluster belongs to. |
region | string Required. The Dataproc region in which to handle the request. |
cluster | Cluster Required. The cluster to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
TaskOperationClusterClusterOperationMetadata | A Task containing the RPC response. |
// 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.
Name | Description |
request | DeleteClusterRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
OperationEmptyClusterOperationMetadata | The RPC response. |
// 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.
Name | Description |
projectId | string Required. The ID of the Google Cloud Platform project that the cluster belongs to. |
region | string Required. The Dataproc region in which to handle the request. |
clusterName | string Required. The cluster name. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
OperationEmptyClusterOperationMetadata | The RPC response. |
// 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.
Name | Description |
request | DeleteClusterRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
TaskOperationEmptyClusterOperationMetadata | A Task containing the RPC response. |
// 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.
Name | Description |
request | DeleteClusterRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
TaskOperationEmptyClusterOperationMetadata | A Task containing the RPC response. |
// 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.
Name | Description |
projectId | string Required. The ID of the Google Cloud Platform project that the cluster belongs to. |
region | string Required. The Dataproc region in which to handle the request. |
clusterName | string Required. The cluster name. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
TaskOperationEmptyClusterOperationMetadata | A Task containing the RPC response. |
// 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.
Name | Description |
projectId | string Required. The ID of the Google Cloud Platform project that the cluster belongs to. |
region | string Required. The Dataproc region in which to handle the request. |
clusterName | string Required. The cluster name. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
TaskOperationEmptyClusterOperationMetadata | A Task containing the RPC response. |
// 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.
Name | Description |
request | DiagnoseClusterRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
OperationDiagnoseClusterResultsClusterOperationMetadata | The RPC response. |
// Create client
ClusterControllerClient clusterControllerClient = ClusterControllerClient.Create();
// Initialize request argument(s)
DiagnoseClusterRequest request = new DiagnoseClusterRequest
{
ProjectId = "",
ClusterName = "",
Region = "",
};
// 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.
Name | Description |
projectId | string Required. The ID of the Google Cloud Platform project that the cluster belongs to. |
region | string Required. The Dataproc region in which to handle the request. |
clusterName | string Required. The cluster name. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
OperationDiagnoseClusterResultsClusterOperationMetadata | The RPC response. |
// Create client
ClusterControllerClient clusterControllerClient = ClusterControllerClient.Create();
// Initialize request argument(s)
string projectId = "";
string region = "";
string clusterName = "";
// Make the request
Operation<DiagnoseClusterResults, ClusterOperationMetadata> response = clusterControllerClient.DiagnoseCluster(projectId, region, clusterName);
// 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;
}
DiagnoseClusterAsync(DiagnoseClusterRequest, CallSettings)
public virtual Task<Operation<DiagnoseClusterResults, ClusterOperationMetadata>> DiagnoseClusterAsync(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.
Name | Description |
request | DiagnoseClusterRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
TaskOperationDiagnoseClusterResultsClusterOperationMetadata | A Task containing the RPC response. |
// Create client
ClusterControllerClient clusterControllerClient = await ClusterControllerClient.CreateAsync();
// Initialize request argument(s)
DiagnoseClusterRequest request = new DiagnoseClusterRequest
{
ProjectId = "",
ClusterName = "",
Region = "",
};
// Make the request
Operation<DiagnoseClusterResults, ClusterOperationMetadata> response = await clusterControllerClient.DiagnoseClusterAsync(request);
// Poll until the returned long-running operation is complete
Operation<DiagnoseClusterResults, ClusterOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// 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 = await clusterControllerClient.PollOnceDiagnoseClusterAsync(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;
}
DiagnoseClusterAsync(DiagnoseClusterRequest, CancellationToken)
public virtual Task<Operation<DiagnoseClusterResults, ClusterOperationMetadata>> DiagnoseClusterAsync(DiagnoseClusterRequest request, CancellationToken cancellationToken)
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.
Name | Description |
request | DiagnoseClusterRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
TaskOperationDiagnoseClusterResultsClusterOperationMetadata | A Task containing the RPC response. |
// Create client
ClusterControllerClient clusterControllerClient = await ClusterControllerClient.CreateAsync();
// Initialize r