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
Google.Cloud.Dataproc.V1Assembly
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 | |
---|---|
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.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default ClusterController scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default ClusterController scopes are:
DeleteClusterOperationsClient
public virtual OperationsClient DeleteClusterOperationsClient { get; }
The long-running operations client for DeleteCluster
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DiagnoseClusterOperationsClient
public virtual OperationsClient DiagnoseClusterOperationsClient { get; }
The long-running operations client for DiagnoseCluster
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual ClusterController.ClusterControllerClient GrpcClient { get; }
The underlying gRPC ClusterController client
Property Value | |
---|---|
Type | Description |
ClusterControllerClusterControllerClient |
IAMPolicyClient
public virtual IAMPolicyClient IAMPolicyClient { get; }
The IAMPolicyClient associated with this client.
Property Value | |
---|---|
Type | Description |
IAMPolicyClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
StartClusterOperationsClient
public virtual OperationsClient StartClusterOperationsClient { get; }
The long-running operations client for StartCluster
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
StopClusterOperationsClient
public virtual OperationsClient StopClusterOperationsClient { get; }
The long-running operations client for StopCluster
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
UpdateClusterOperationsClient
public virtual OperationsClient UpdateClusterOperationsClient { get; }
The long-running operations client for UpdateCluster
.
Property Value | |
---|---|
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.
Returns | |
---|---|
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.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
Type | Description |
OperationDiagnoseClusterResultsClusterOperationMetadata | The RPC response. |
// 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 | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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 = "",
TarballGcsDir = "",
DiagnosisInterval = new Interval(),
Jobs = { "", },
YarnApplicationIds = { "", },
};
// 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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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 = "",
TarballGcsDir = "",
DiagnosisInterval = new Interval(),
Jobs = { "", },
YarnApplicationIds = { "", },
};
// 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(string, string, string, CallSettings)
public virtual Task<Operation<DiagnoseClusterResults, ClusterOperationMetadata>> DiagnoseClusterAsync(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 | |
---|---|
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. |
Returns | |
---|---|
Type | Description |
TaskOperationDiagnoseClusterResultsClusterOperationMetadata | 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<DiagnoseClusterResults, ClusterOperationMetadata> response = await clusterControllerClient.DiagnoseClusterAsync(projectId, region, clusterName);
// 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(string, string, string, CancellationToken)
public virtual Task<Operation<DiagnoseClusterResults, ClusterOperationMetadata>> DiagnoseClusterAsync(string projectId, string region, string clusterName, 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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
Type | Description |
TaskOperationDiagnoseClusterResultsClusterOperationMetadata | 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<DiagnoseClusterResults, ClusterOperationMetadata> response = await clusterControllerClient.DiagnoseClusterAsync(projectId, region, clusterName);
// 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;
}
GetCluster(GetClusterRequest, CallSettings)
public virtual Cluster GetCluster(GetClusterRequest request, CallSettings callSettings = null)
Gets the resource representation for a cluster in a project.
Parameters | |
---|---|
Name | Description |
request | GetClusterRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Cluster | The RPC response. |
// Create client
ClusterControllerClient clusterControllerClient = ClusterControllerClient.Create();
// Initialize request argument(s)
GetClusterRequest request = new GetClusterRequest
{
ProjectId = "",
ClusterName = "",
Region = "",
};
// Make the request
Cluster response = clusterControllerClient.GetCluster(request);
GetCluster(string, string, string, CallSettings)
public virtual Cluster GetCluster(string projectId, string region, string clusterName, CallSettings callSettings = null)
Gets the resource representation for a cluster in a project.
Parameters | |
---|---|
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. |
Returns | |
---|---|
Type | Description |
Cluster | The RPC response. |
// Create client
ClusterControllerClient clusterControllerClient = ClusterControllerClient.Create();
// Initialize request argument(s)
string projectId = "";
string region = "";
string clusterName = "";
// Make the request
Cluster response = clusterControllerClient.GetCluster(projectId, region, clusterName);
GetClusterAsync(GetClusterRequest, CallSettings)
public virtual Task<Cluster> GetClusterAsync(GetClusterRequest request, CallSettings callSettings = null)
Gets the resource representation for a cluster in a project.
Parameters | |
---|---|
Name | Description |
request | GetClusterRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskCluster | A Task containing the RPC response. |
// Create client
ClusterControllerClient clusterControllerClient = await ClusterControllerClient.CreateAsync();
// Initialize request argument(s)
GetClusterRequest request = new GetClusterRequest
{
ProjectId = "",
ClusterName = "",
Region = "",
};
// Make the request
Cluster response = await clusterControllerClient.GetClusterAsync(request);
GetClusterAsync(GetClusterRequest, CancellationToken)
public virtual Task<Cluster> GetClusterAsync(GetClusterRequest request, CancellationToken cancellationToken)
Gets the resource representation for a cluster in a project.
Parameters | |
---|---|
Name | Description |
request | GetClusterRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskCluster | A Task containing the RPC response. |
// Create client
ClusterControllerClient clusterControllerClient = await ClusterControllerClient.CreateAsync();
// Initialize request argument(s)
GetClusterRequest request = new GetClusterRequest
{
ProjectId = "",
ClusterName = "",
Region = "",
};
// Make the request
Cluster response = await clusterControllerClient.GetClusterAsync(request);
GetClusterAsync(string, string, string, CallSettings)
public virtual Task<Cluster> GetClusterAsync(string projectId, string region, string clusterName, CallSettings callSettings = null)
Gets the resource representation for a cluster in a project.
Parameters | |
---|---|
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. |
Returns | |
---|---|
Type | Description |
TaskCluster | 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
Cluster response = await clusterControllerClient.GetClusterAsync(projectId, region, clusterName);
GetClusterAsync(string, string, string, CancellationToken)
public virtual Task<Cluster> GetClusterAsync(string projectId, string region, string clusterName, CancellationToken cancellationToken)
Gets the resource representation for a cluster in a project.
Parameters | |
---|---|
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. |
Returns | |
---|---|
Type | Description |
TaskCluster | 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
Cluster response = await clusterControllerClient.GetClusterAsync(projectId, region, clusterName);
ListClusters(ListClustersRequest, CallSettings)
public virtual PagedEnumerable<ListClustersResponse, Cluster> ListClusters(ListClustersRequest request, CallSettings callSettings = null)
Lists all regions/{region}/clusters in a project alphabetically.
Parameters | |
---|---|
Name | Description |
request | ListClustersRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListClustersResponseCluster | A pageable sequence of Cluster resources. |
// Create client
ClusterControllerClient clusterControllerClient = ClusterControllerClient.Create();
// Initialize request argument(s)
ListClustersRequest request = new ListClustersRequest
{
ProjectId = "",
Region = "",
Filter = "",
};
// Make the request
PagedEnumerable<ListClustersResponse, Cluster> response = clusterControllerClient.ListClusters(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Cluster 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 (ListClustersResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Cluster 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<Cluster> 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 (Cluster 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;
ListClusters(string, string, string, int?, CallSettings)
public virtual PagedEnumerable<ListClustersResponse, Cluster> ListClusters(string projectId, string region, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists all regions/{region}/clusters in a project alphabetically.
Parameters | |
---|---|
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. |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListClustersResponseCluster | A pageable sequence of Cluster resources. |
// Create client
ClusterControllerClient clusterControllerClient = ClusterControllerClient.Create();
// Initialize request argument(s)
string projectId = "";
string region = "";
// Make the request
PagedEnumerable<ListClustersResponse, Cluster> response = clusterControllerClient.ListClusters(projectId, region);
// Iterate over all response items, lazily performing RPCs as required
foreach (Cluster 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 (ListClustersResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Cluster 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<Cluster> 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 (Cluster 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;
ListClusters(string, string, string, string, int?, CallSettings)
public virtual PagedEnumerable<ListClustersResponse, Cluster> ListClusters(string projectId, string region, string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists all regions/{region}/clusters in a project alphabetically.
Parameters | |
---|---|
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. |
filter | string Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax: field = value [AND [field = value]] ... where field is one of Example filter: status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = * |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListClustersResponseCluster | A pageable sequence of Cluster resources. |
// Create client
ClusterControllerClient clusterControllerClient = ClusterControllerClient.Create();
// Initialize request argument(s)
string projectId = "";
string region = "";
string filter = "";
// Make the request
PagedEnumerable<ListClustersResponse, Cluster> response = clusterControllerClient.ListClusters(projectId, region, filter: filter);
// Iterate over all response items, lazily performing RPCs as required
foreach (Cluster 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 (ListClustersResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Cluster 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<Cluster> 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 (Cluster 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;
ListClustersAsync(ListClustersRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListClustersResponse, Cluster> ListClustersAsync(ListClustersRequest request, CallSettings callSettings = null)
Lists all regions/{region}/clusters in a project alphabetically.
Parameters | |
---|---|
Name | Description |
request | ListClustersRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListClustersResponseCluster | A pageable asynchronous sequence of Cluster resources. |
// Create client
ClusterControllerClient clusterControllerClient = await ClusterControllerClient.CreateAsync();
// Initialize request argument(s)
ListClustersRequest request = new ListClustersRequest
{
ProjectId = "",
Region = "",
Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListClustersResponse, Cluster> response = clusterControllerClient.ListClustersAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Cluster 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((ListClustersResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Cluster 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<Cluster> 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 (Cluster 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;
ListClustersAsync(string, string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListClustersResponse, Cluster> ListClustersAsync(string projectId, string region, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists all regions/{region}/clusters in a project alphabetically.
Parameters | |
---|---|
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. |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListClustersResponseCluster | A pageable asynchronous sequence of Cluster resources. |
// Create client
ClusterControllerClient clusterControllerClient = await ClusterControllerClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string region = "";
// Make the request
PagedAsyncEnumerable<ListClustersResponse, Cluster> response = clusterControllerClient.ListClustersAsync(projectId, region);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Cluster 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((ListClustersResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Cluster 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<Cluster> 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 (Cluster 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;
ListClustersAsync(string, string, string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListClustersResponse, Cluster> ListClustersAsync(string projectId, string region, string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists all regions/{region}/clusters in a project alphabetically.
Parameters | |
---|---|
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. |
filter | string Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax: field = value [AND [field = value]] ... where field is one of Example filter: status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = * |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListClustersResponseCluster | A pageable asynchronous sequence of Cluster resources. |
// Create client
ClusterControllerClient clusterControllerClient = await ClusterControllerClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string region = "";
string filter = "";
// Make the request
PagedAsyncEnumerable<ListClustersResponse, Cluster> response = clusterControllerClient.ListClustersAsync(projectId, region, filter: filter);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Cluster 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((ListClustersResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Cluster 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<Cluster> 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 (Cluster 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;
PollOnceCreateCluster(string, CallSettings)
public virtual Operation<Cluster, ClusterOperationMetadata> PollOnceCreateCluster(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of CreateCluster
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationClusterClusterOperationMetadata | The result of polling the operation. |
PollOnceCreateClusterAsync(string, CallSettings)
public virtual Task<Operation<Cluster, ClusterOperationMetadata>> PollOnceCreateClusterAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
CreateCluster
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationClusterClusterOperationMetadata | A task representing the result of polling the operation. |
PollOnceDeleteCluster(string, CallSettings)
public virtual Operation<Empty, ClusterOperationMetadata> PollOnceDeleteCluster(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of DeleteCluster
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyClusterOperationMetadata | The result of polling the operation. |
PollOnceDeleteClusterAsync(string, CallSettings)
public virtual Task<Operation<Empty, ClusterOperationMetadata>> PollOnceDeleteClusterAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DeleteCluster
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyClusterOperationMetadata | A task representing the result of polling the operation. |
PollOnceDiagnoseCluster(string, CallSettings)
public virtual Operation<DiagnoseClusterResults, ClusterOperationMetadata> PollOnceDiagnoseCluster(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of DiagnoseCluster
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationDiagnoseClusterResultsClusterOperationMetadata | The result of polling the operation. |
PollOnceDiagnoseClusterAsync(string, CallSettings)
public virtual Task<Operation<DiagnoseClusterResults, ClusterOperationMetadata>> PollOnceDiagnoseClusterAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DiagnoseCluster
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationDiagnoseClusterResultsClusterOperationMetadata | A task representing the result of polling the operation. |
PollOnceStartCluster(string, CallSettings)
public virtual Operation<Cluster, ClusterOperationMetadata> PollOnceStartCluster(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of StartCluster
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationClusterClusterOperationMetadata | The result of polling the operation. |
PollOnceStartClusterAsync(string, CallSettings)
public virtual Task<Operation<Cluster, ClusterOperationMetadata>> PollOnceStartClusterAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
StartCluster
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationClusterClusterOperationMetadata | A task representing the result of polling the operation. |
PollOnceStopCluster(string, CallSettings)
public virtual Operation<Cluster, ClusterOperationMetadata> PollOnceStopCluster(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of StopCluster
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationClusterClusterOperationMetadata | The result of polling the operation. |
PollOnceStopClusterAsync(string, CallSettings)
public virtual Task<Operation<Cluster, ClusterOperationMetadata>> PollOnceStopClusterAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
StopCluster
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationClusterClusterOperationMetadata | A task representing the result of polling the operation. |
PollOnceUpdateCluster(string, CallSettings)
public virtual Operation<Cluster, ClusterOperationMetadata> PollOnceUpdateCluster(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of UpdateCluster
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationClusterClusterOperationMetadata | The result of polling the operation. |
PollOnceUpdateClusterAsync(string, CallSettings)
public virtual Task<Operation<Cluster, ClusterOperationMetadata>> PollOnceUpdateClusterAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UpdateCluster
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationClusterClusterOperationMetadata | A task representing the result of polling the operation. |
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 | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
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.
StartCluster(StartClusterRequest, CallSettings)
public virtual Operation<Cluster, ClusterOperationMetadata> StartCluster(StartClusterRequest request, CallSettings callSettings = null)
Starts a cluster in a project.
Parameters | |
---|---|
Name | Description |
request | StartClusterRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationClusterClusterOperationMetadata | The RPC response. |
// Create client
ClusterControllerClient clusterControllerClient = ClusterControllerClient.Create();
// Initialize request argument(s)
StartClusterRequest request = new StartClusterRequest
{
ProjectId = "",
Region = "",
ClusterName = "",
ClusterUuid = "",
RequestId = "",
};
// Make the request
Operation<Cluster, ClusterOperationMetadata> response = clusterControllerClient.StartCluster(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.PollOnceStartCluster(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;
}
StartClusterAsync(StartClusterRequest, CallSettings)
public virtual Task<Operation<Cluster, ClusterOperationMetadata>> StartClusterAsync(StartClusterRequest request, CallSettings callSettings = null)
Starts a cluster in a project.
Parameters | |
---|---|
Name | Description |
request | StartClusterRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationClusterClusterOperationMetadata | A Task containing the RPC response. |
// Create client
ClusterControllerClient clusterControllerClient = await ClusterControllerClient.CreateAsync();
// Initialize request argument(s)
StartClusterRequest request = new StartClusterRequest
{
ProjectId = "",
Region = "",
ClusterName = "",
ClusterUuid = "",
RequestId = "",
};
// Make the request
Operation<Cluster, ClusterOperationMetadata> response = await clusterControllerClient.StartClusterAsync(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.PollOnceStartClusterAsync(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;
}
StartClusterAsync(StartClusterRequest, CancellationToken)
public virtual Task<Operation<Cluster, ClusterOperationMetadata>> StartClusterAsync(StartClusterRequest request, CancellationToken cancellationToken)
Starts a cluster in a project.
Parameters | |
---|---|
Name | Description |
request | StartClusterRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationClusterClusterOperationMetadata | A Task containing the RPC response. |
// Create client
ClusterControllerClient clusterControllerClient = await ClusterControllerClient.CreateAsync();
// Initialize request argument(s)
StartClusterRequest request = new StartClusterRequest
{
ProjectId = "",
Region = "",
ClusterName = "",
ClusterUuid = "",
RequestId = "",
};
// Make the request
Operation<Cluster, ClusterOperationMetadata> response = await clusterControllerClient.StartClusterAsync(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.PollOnceStartClusterAsync(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;
}
StopCluster(StopClusterRequest, CallSettings)
public virtual Operation<Cluster, ClusterOperationMetadata> StopCluster(StopClusterRequest request, CallSettings callSettings = null)
Stops a cluster in a project.
Parameters | |
---|---|
Name | Description |
request | StopClusterRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationClusterClusterOperationMetadata | The RPC response. |
// Create client
ClusterControllerClient clusterControllerClient = ClusterControllerClient.Create();
// Initialize request argument(s)
StopClusterRequest request = new StopClusterRequest
{
ProjectId = "",
Region = "",
ClusterName = "",
ClusterUuid = "",
RequestId = "",
};
// Make the request
Operation<Cluster, ClusterOperationMetadata> response = clusterControllerClient.StopCluster(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.PollOnceStopCluster(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;
}
StopClusterAsync(StopClusterRequest, CallSettings)
public virtual Task<Operation<Cluster, ClusterOperationMetadata>> StopClusterAsync(StopClusterRequest request, CallSettings callSettings = null)
Stops a cluster in a project.
Parameters | |
---|---|
Name | Description |
request | StopClusterRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationClusterClusterOperationMetadata | A Task containing the RPC response. |
// Create client
ClusterControllerClient clusterControllerClient = await ClusterControllerClient.CreateAsync();
// Initialize request argument(s)
StopClusterRequest request = new StopClusterRequest
{
ProjectId = "",
Region = "",
ClusterName = "",
ClusterUuid = "",
RequestId = "",
};
// Make the request
Operation<Cluster, ClusterOperationMetadata> response = await clusterControllerClient.StopClusterAsync(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.PollOnceStopClusterAsync(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;
}
StopClusterAsync(StopClusterRequest, CancellationToken)
public virtual Task<Operation<Cluster, ClusterOperationMetadata>> StopClusterAsync(StopClusterRequest request, CancellationToken cancellationToken)
Stops a cluster in a project.
Parameters | |
---|---|
Name | Description |
request | StopClusterRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationClusterClusterOperationMetadata | A Task containing the RPC response. |
// Create client
ClusterControllerClient clusterControllerClient = await ClusterControllerClient.CreateAsync();
// Initialize request argument(s)
StopClusterRequest request = new StopClusterRequest
{
ProjectId = "",
Region = "",
ClusterName = "",
ClusterUuid = "",
RequestId = "",
};
// Make the request
Operation<Cluster, ClusterOperationMetadata> response = await clusterControllerClient.StopClusterAsync(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.PollOnceStopClusterAsync(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;
}
UpdateCluster(UpdateClusterRequest, CallSettings)
public virtual Operation<Cluster, ClusterOperationMetadata> UpdateCluster(UpdateClusterRequest request, CallSettings callSettings = null)
Updates a cluster in a project. The returned
[Operation.metadata][google.longrunning.Operation.metadata] will be
ClusterOperationMetadata.
The cluster must be in a
[RUNNING
][google.cloud.dataproc.v1.ClusterStatus.State] state or an error
is returned.
Parameters | |
---|---|
Name | Description |
request | UpdateClusterRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationClusterClusterOperationMetadata | The RPC response. |
// Create client
ClusterControllerClient clusterControllerClient = ClusterControllerClient.Create();
// Initialize request argument(s)
UpdateClusterRequest request = new UpdateClusterRequest
{
ProjectId = "",
ClusterName = "",
Cluster = new Cluster(),
UpdateMask = new FieldMask(),
Region = "",
GracefulDecommissionTimeout = new Duration(),
RequestId = "",
};
// Make the request
Operation<Cluster, ClusterOperationMetadata> response = clusterControllerClient.UpdateCluster(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.PollOnceUpdateCluster(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;
}
UpdateCluster(string, string, string, Cluster, FieldMask, CallSettings)
public virtual Operation<Cluster, ClusterOperationMetadata> UpdateCluster(string projectId, string region, string clusterName, Cluster cluster, FieldMask updateMask, CallSettings callSettings = null)
Updates a cluster in a project. The returned
[Operation.metadata][google.longrunning.Operation.metadata] will be
ClusterOperationMetadata.
The cluster must be in a
[RUNNING
][google.cloud.dataproc.v1.ClusterStatus.State] state or an error
is returned.
Parameters | |
---|---|
Name | Description |
projectId | string Required. The ID of the Google Cloud Platform project the cluster belongs to. |
region | string Required. The Dataproc region in which to handle the request. |
clusterName | string Required. The cluster name. |
cluster | Cluster Required. The changes to the cluster. |
updateMask | FieldMask Required. Specifies the path, relative to {
"config":{
"workerConfig":{
"numInstances":"5"
}
}
}
Similarly, to change the number of preemptible workers in a cluster to 5,
the { "config":{ "secondaryWorkerConfig":{ "numInstances":"5" } } } <strong>Note:</strong> Currently, only the following fields can be updated: <table> <tbody> <tr> <td><strong>Mask</strong></td> <td><strong>Purpose</strong></td> </tr> <tr> <td><strong><em>labels</em></strong></td> <td>Update labels</td> </tr> <tr> <td><strong><em>config.worker_config.num_instances</em></strong></td> <td>Resize primary worker group</td> </tr> <tr> <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td> <td>Resize secondary worker group</td> </tr> <tr> <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or change autoscaling policies</td> </tr> </tbody> </table> |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationClusterClusterOperationMetadata | The RPC response. |
// Create client
ClusterControllerClient clusterControllerClient = ClusterControllerClient.Create();
// Initialize request argument(s)
string projectId = "";
string region = "";
string clusterName = "";
Cluster cluster = new Cluster();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Cluster, ClusterOperationMetadata> response = clusterControllerClient.UpdateCluster(projectId, region, clusterName, cluster, updateMask);
// 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.PollOnceUpdateCluster(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;
}
UpdateClusterAsync(UpdateClusterRequest, CallSettings)
public virtual Task<Operation<Cluster, ClusterOperationMetadata>> UpdateClusterAsync(UpdateClusterRequest request, CallSettings callSettings = null)
Updates a cluster in a project. The returned
[Operation.metadata][google.longrunning.Operation.metadata] will be
ClusterOperationMetadata.
The cluster must be in a
[RUNNING
][google.cloud.dataproc.v1.ClusterStatus.State] state or an error
is returned.
Parameters | |
---|---|
Name | Description |
request | UpdateClusterRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationClusterClusterOperationMetadata | A Task containing the RPC response. |
// Create client
ClusterControllerClient clusterControllerClient = await ClusterControllerClient.CreateAsync();
// Initialize request argument(s)
UpdateClusterRequest request = new UpdateClusterRequest
{
ProjectId = "",
ClusterName = "",
Cluster = new Cluster(),
UpdateMask = new FieldMask(),
Region = "",
GracefulDecommissionTimeout = new Duration(),
RequestId = "",
};
// Make the request
Operation<Cluster, ClusterOperationMetadata> response = await clusterControllerClient.UpdateClusterAsync(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.PollOnceUpdateClusterAsync(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;
}
UpdateClusterAsync(UpdateClusterRequest, CancellationToken)
public virtual Task<Operation<Cluster, ClusterOperationMetadata>> UpdateClusterAsync(UpdateClusterRequest request, CancellationToken cancellationToken)
Updates a cluster in a project. The returned
[Operation.metadata][google.longrunning.Operation.metadata] will be
ClusterOperationMetadata.
The cluster must be in a
[RUNNING
][google.cloud.dataproc.v1.ClusterStatus.State] state or an error
is returned.
Parameters | |
---|---|
Name | Description |
request | UpdateClusterRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationClusterClusterOperationMetadata | A Task containing the RPC response. |
// Create client
ClusterControllerClient clusterControllerClient = await ClusterControllerClient.CreateAsync();
// Initialize request argument(s)
UpdateClusterRequest request = new UpdateClusterRequest
{
ProjectId = "",
ClusterName = "",
Cluster = new Cluster(),
UpdateMask = new FieldMask(),
Region = "",
GracefulDecommissionTimeout = new Duration(),
RequestId = "",
};
// Make the request
Operation<Cluster, ClusterOperationMetadata> response = await clusterControllerClient.UpdateClusterAsync(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.PollOnceUpdateClusterAsync(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;
}
UpdateClusterAsync(string, string, string, Cluster, FieldMask, CallSettings)
public virtual Task<Operation<Cluster, ClusterOperationMetadata>> UpdateClusterAsync(string projectId, string region, string clusterName, Cluster cluster, FieldMask updateMask, CallSettings callSettings = null)
Updates a cluster in a project. The returned
[Operation.metadata][google.longrunning.Operation.metadata] will be
ClusterOperationMetadata.
The cluster must be in a
[RUNNING
][google.cloud.dataproc.v1.ClusterStatus.State] state or an error
is returned.
Parameters | |
---|---|
Name | Description |
projectId | string Required. The ID of the Google Cloud Platform project the cluster belongs to. |
region | string Required. The Dataproc region in which to handle the request. |
clusterName | string Required. The cluster name. |
cluster | Cluster Required. The changes to the cluster. |
updateMask | FieldMask Required. Specifies the path, relative to {
"config":{
"workerConfig":{
"numInstances":"5"
}
}
}
Similarly, to change the number of preemptible workers in a cluster to 5,
the { "config":{ "secondaryWorkerConfig":{ "numInstances":"5" } } } <strong>Note:</strong> Currently, only the following fields can be updated: <table> <tbody> <tr> <td><strong>Mask</strong></td> <td><strong>Purpose</strong></td> </tr> <tr> <td><strong><em>labels</em></strong></td> <td>Update labels</td> </tr> <tr> <td><strong><em>config.worker_config.num_instances</em></strong></td> <td>Resize primary worker group</td> </tr> <tr> <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td> <td>Resize secondary worker group</td> </tr> <tr> <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or change autoscaling policies</td> </tr> </tbody> </table> |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationClusterClusterOperationMetadata | A Task containing the RPC response. |
// Create client
ClusterControllerClient clusterControllerClient = await ClusterControllerClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string region = "";
string clusterName = "";
Cluster cluster = new Cluster();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Cluster, ClusterOperationMetadata> response = await clusterControllerClient.UpdateClusterAsync(projectId, region, clusterName, cluster, updateMask);
// 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.PollOnceUpdateClusterAsync(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;
}
UpdateClusterAsync(string, string, string, Cluster, FieldMask, CancellationToken)
public virtual Task<Operation<Cluster, ClusterOperationMetadata>> UpdateClusterAsync(string projectId, string region, string clusterName, Cluster cluster, FieldMask updateMask, CancellationToken cancellationToken)
Updates a cluster in a project. The returned
[Operation.metadata][google.longrunning.Operation.metadata] will be
ClusterOperationMetadata.
The cluster must be in a
[RUNNING
][google.cloud.dataproc.v1.ClusterStatus.State] state or an error
is returned.
Parameters | |
---|---|
Name | Description |
projectId | string Required. The ID of the Google Cloud Platform project the cluster belongs to. |
region | string Required. The Dataproc region in which to handle the request. |
clusterName | string Required. The cluster name. |
cluster | Cluster Required. The changes to the cluster. |
updateMask | FieldMask Required. Specifies the path, relative to {
"config":{
"workerConfig":{
"numInstances":"5"
}
}
}
Similarly, to change the number of preemptible workers in a cluster to 5,
the { "config":{ "secondaryWorkerConfig":{ "numInstances":"5" } } } <strong>Note:</strong> Currently, only the following fields can be updated: <table> <tbody> <tr> <td><strong>Mask</strong></td> <td><strong>Purpose</strong></td> </tr> <tr> <td><strong><em>labels</em></strong></td> <td>Update labels</td> </tr> <tr> <td><strong><em>config.worker_config.num_instances</em></strong></td> <td>Resize primary worker group</td> </tr> <tr> <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td> <td>Resize secondary worker group</td> </tr> <tr> <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or change autoscaling policies</td> </tr> </tbody> </table> |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationClusterClusterOperationMetadata | A Task containing the RPC response. |
// Create client
ClusterControllerClient clusterControllerClient = await ClusterControllerClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string region = "";
string clusterName = "";
Cluster cluster = new Cluster();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Cluster, ClusterOperationMetadata> response = await clusterControllerClient.UpdateClusterAsync(projectId, region, clusterName, cluster, updateMask);
// 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.PollOnceUpdateClusterAsync(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;
}