Google Cloud Dataproc v1 API - Class NodeGroupControllerClient (5.8.0)

public abstract class NodeGroupControllerClient

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

NodeGroupController client wrapper, for convenient use.

Inheritance

object > NodeGroupControllerClient

Namespace

Google.Cloud.Dataproc.V1

Assembly

Google.Cloud.Dataproc.V1.dll

Remarks

The NodeGroupControllerService provides methods to manage node groups of Compute Engine managed instances.

Properties

CreateNodeGroupOperationsClient

public virtual OperationsClient CreateNodeGroupOperationsClient { get; }

The long-running operations client for CreateNodeGroup.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default NodeGroupController scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

The default NodeGroupController scopes are:

GrpcClient

public virtual NodeGroupController.NodeGroupControllerClient GrpcClient { get; }

The underlying gRPC NodeGroupController client

Property Value
TypeDescription
NodeGroupControllerNodeGroupControllerClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
TypeDescription
IAMPolicyClient

ResizeNodeGroupOperationsClient

public virtual OperationsClient ResizeNodeGroupOperationsClient { get; }

The long-running operations client for ResizeNodeGroup.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

Create()

public static NodeGroupControllerClient Create()

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

Returns
TypeDescription
NodeGroupControllerClient

The created NodeGroupControllerClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskNodeGroupControllerClient

The task representing the created NodeGroupControllerClient.

CreateNodeGroup(ClusterRegionName, NodeGroup, string, CallSettings)

public virtual Operation<NodeGroup, NodeGroupOperationMetadata> CreateNodeGroup(ClusterRegionName parent, NodeGroup nodeGroup, string nodeGroupId, CallSettings callSettings = null)

Creates a node group in a cluster. The returned [Operation.metadata][google.longrunning.Operation.metadata] is NodeGroupOperationMetadata.

Parameters
NameDescription
parentClusterRegionName

Required. The parent resource where this node group will be created. Format: projects/{project}/regions/{region}/clusters/{cluster}

nodeGroupNodeGroup

Required. The node group to create.

nodeGroupIdstring

Optional. An optional node group ID. Generated if not specified.

The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of from 3 to 33 characters.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationNodeGroupNodeGroupOperationMetadata

The RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.Create();
// Initialize request argument(s)
ClusterRegionName parent = ClusterRegionName.FromProjectRegionCluster("[PROJECT]", "[REGION]", "[CLUSTER]");
NodeGroup nodeGroup = new NodeGroup();
string nodeGroupId = "";
// Make the request
Operation<NodeGroup, NodeGroupOperationMetadata> response = nodeGroupControllerClient.CreateNodeGroup(parent, nodeGroup, nodeGroupId);

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

CreateNodeGroup(CreateNodeGroupRequest, CallSettings)

public virtual Operation<NodeGroup, NodeGroupOperationMetadata> CreateNodeGroup(CreateNodeGroupRequest request, CallSettings callSettings = null)

Creates a node group in a cluster. The returned [Operation.metadata][google.longrunning.Operation.metadata] is NodeGroupOperationMetadata.

Parameters
NameDescription
requestCreateNodeGroupRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationNodeGroupNodeGroupOperationMetadata

The RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.Create();
// Initialize request argument(s)
CreateNodeGroupRequest request = new CreateNodeGroupRequest
{
    ParentAsClusterRegionName = ClusterRegionName.FromProjectRegionCluster("[PROJECT]", "[REGION]", "[CLUSTER]"),
    NodeGroup = new NodeGroup(),
    RequestId = "",
    NodeGroupId = "",
};
// Make the request
Operation<NodeGroup, NodeGroupOperationMetadata> response = nodeGroupControllerClient.CreateNodeGroup(request);

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

CreateNodeGroup(string, NodeGroup, string, CallSettings)

public virtual Operation<NodeGroup, NodeGroupOperationMetadata> CreateNodeGroup(string parent, NodeGroup nodeGroup, string nodeGroupId, CallSettings callSettings = null)

Creates a node group in a cluster. The returned [Operation.metadata][google.longrunning.Operation.metadata] is NodeGroupOperationMetadata.

Parameters
NameDescription
parentstring

Required. The parent resource where this node group will be created. Format: projects/{project}/regions/{region}/clusters/{cluster}

nodeGroupNodeGroup

Required. The node group to create.

nodeGroupIdstring

Optional. An optional node group ID. Generated if not specified.

The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of from 3 to 33 characters.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationNodeGroupNodeGroupOperationMetadata

The RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/regions/[REGION]/clusters/[CLUSTER]";
NodeGroup nodeGroup = new NodeGroup();
string nodeGroupId = "";
// Make the request
Operation<NodeGroup, NodeGroupOperationMetadata> response = nodeGroupControllerClient.CreateNodeGroup(parent, nodeGroup, nodeGroupId);

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

CreateNodeGroupAsync(ClusterRegionName, NodeGroup, string, CallSettings)

public virtual Task<Operation<NodeGroup, NodeGroupOperationMetadata>> CreateNodeGroupAsync(ClusterRegionName parent, NodeGroup nodeGroup, string nodeGroupId, CallSettings callSettings = null)

Creates a node group in a cluster. The returned [Operation.metadata][google.longrunning.Operation.metadata] is NodeGroupOperationMetadata.

Parameters
NameDescription
parentClusterRegionName

Required. The parent resource where this node group will be created. Format: projects/{project}/regions/{region}/clusters/{cluster}

nodeGroupNodeGroup

Required. The node group to create.

nodeGroupIdstring

Optional. An optional node group ID. Generated if not specified.

The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of from 3 to 33 characters.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationNodeGroupNodeGroupOperationMetadata

A Task containing the RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = await NodeGroupControllerClient.CreateAsync();
// Initialize request argument(s)
ClusterRegionName parent = ClusterRegionName.FromProjectRegionCluster("[PROJECT]", "[REGION]", "[CLUSTER]");
NodeGroup nodeGroup = new NodeGroup();
string nodeGroupId = "";
// Make the request
Operation<NodeGroup, NodeGroupOperationMetadata> response = await nodeGroupControllerClient.CreateNodeGroupAsync(parent, nodeGroup, nodeGroupId);

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

CreateNodeGroupAsync(ClusterRegionName, NodeGroup, string, CancellationToken)

public virtual Task<Operation<NodeGroup, NodeGroupOperationMetadata>> CreateNodeGroupAsync(ClusterRegionName parent, NodeGroup nodeGroup, string nodeGroupId, CancellationToken cancellationToken)

Creates a node group in a cluster. The returned [Operation.metadata][google.longrunning.Operation.metadata] is NodeGroupOperationMetadata.

Parameters
NameDescription
parentClusterRegionName

Required. The parent resource where this node group will be created. Format: projects/{project}/regions/{region}/clusters/{cluster}

nodeGroupNodeGroup

Required. The node group to create.

nodeGroupIdstring

Optional. An optional node group ID. Generated if not specified.

The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of from 3 to 33 characters.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationNodeGroupNodeGroupOperationMetadata

A Task containing the RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = await NodeGroupControllerClient.CreateAsync();
// Initialize request argument(s)
ClusterRegionName parent = ClusterRegionName.FromProjectRegionCluster("[PROJECT]", "[REGION]", "[CLUSTER]");
NodeGroup nodeGroup = new NodeGroup();
string nodeGroupId = "";
// Make the request
Operation<NodeGroup, NodeGroupOperationMetadata> response = await nodeGroupControllerClient.CreateNodeGroupAsync(parent, nodeGroup, nodeGroupId);

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

CreateNodeGroupAsync(CreateNodeGroupRequest, CallSettings)

public virtual Task<Operation<NodeGroup, NodeGroupOperationMetadata>> CreateNodeGroupAsync(CreateNodeGroupRequest request, CallSettings callSettings = null)

Creates a node group in a cluster. The returned [Operation.metadata][google.longrunning.Operation.metadata] is NodeGroupOperationMetadata.

Parameters
NameDescription
requestCreateNodeGroupRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationNodeGroupNodeGroupOperationMetadata

A Task containing the RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = await NodeGroupControllerClient.CreateAsync();
// Initialize request argument(s)
CreateNodeGroupRequest request = new CreateNodeGroupRequest
{
    ParentAsClusterRegionName = ClusterRegionName.FromProjectRegionCluster("[PROJECT]", "[REGION]", "[CLUSTER]"),
    NodeGroup = new NodeGroup(),
    RequestId = "",
    NodeGroupId = "",
};
// Make the request
Operation<NodeGroup, NodeGroupOperationMetadata> response = await nodeGroupControllerClient.CreateNodeGroupAsync(request);

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

CreateNodeGroupAsync(CreateNodeGroupRequest, CancellationToken)

public virtual Task<Operation<NodeGroup, NodeGroupOperationMetadata>> CreateNodeGroupAsync(CreateNodeGroupRequest request, CancellationToken cancellationToken)

Creates a node group in a cluster. The returned [Operation.metadata][google.longrunning.Operation.metadata] is NodeGroupOperationMetadata.

Parameters
NameDescription
requestCreateNodeGroupRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationNodeGroupNodeGroupOperationMetadata

A Task containing the RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = await NodeGroupControllerClient.CreateAsync();
// Initialize request argument(s)
CreateNodeGroupRequest request = new CreateNodeGroupRequest
{
    ParentAsClusterRegionName = ClusterRegionName.FromProjectRegionCluster("[PROJECT]", "[REGION]", "[CLUSTER]"),
    NodeGroup = new NodeGroup(),
    RequestId = "",
    NodeGroupId = "",
};
// Make the request
Operation<NodeGroup, NodeGroupOperationMetadata> response = await nodeGroupControllerClient.CreateNodeGroupAsync(request);

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

CreateNodeGroupAsync(string, NodeGroup, string, CallSettings)

public virtual Task<Operation<NodeGroup, NodeGroupOperationMetadata>> CreateNodeGroupAsync(string parent, NodeGroup nodeGroup, string nodeGroupId, CallSettings callSettings = null)

Creates a node group in a cluster. The returned [Operation.metadata][google.longrunning.Operation.metadata] is NodeGroupOperationMetadata.

Parameters
NameDescription
parentstring

Required. The parent resource where this node group will be created. Format: projects/{project}/regions/{region}/clusters/{cluster}

nodeGroupNodeGroup

Required. The node group to create.

nodeGroupIdstring

Optional. An optional node group ID. Generated if not specified.

The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of from 3 to 33 characters.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationNodeGroupNodeGroupOperationMetadata

A Task containing the RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = await NodeGroupControllerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/regions/[REGION]/clusters/[CLUSTER]";
NodeGroup nodeGroup = new NodeGroup();
string nodeGroupId = "";
// Make the request
Operation<NodeGroup, NodeGroupOperationMetadata> response = await nodeGroupControllerClient.CreateNodeGroupAsync(parent, nodeGroup, nodeGroupId);

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

CreateNodeGroupAsync(string, NodeGroup, string, CancellationToken)

public virtual Task<Operation<NodeGroup, NodeGroupOperationMetadata>> CreateNodeGroupAsync(string parent, NodeGroup nodeGroup, string nodeGroupId, CancellationToken cancellationToken)

Creates a node group in a cluster. The returned [Operation.metadata][google.longrunning.Operation.metadata] is NodeGroupOperationMetadata.

Parameters
NameDescription
parentstring

Required. The parent resource where this node group will be created. Format: projects/{project}/regions/{region}/clusters/{cluster}

nodeGroupNodeGroup

Required. The node group to create.

nodeGroupIdstring

Optional. An optional node group ID. Generated if not specified.

The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of from 3 to 33 characters.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationNodeGroupNodeGroupOperationMetadata

A Task containing the RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = await NodeGroupControllerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/regions/[REGION]/clusters/[CLUSTER]";
NodeGroup nodeGroup = new NodeGroup();
string nodeGroupId = "";
// Make the request
Operation<NodeGroup, NodeGroupOperationMetadata> response = await nodeGroupControllerClient.CreateNodeGroupAsync(parent, nodeGroup, nodeGroupId);

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

GetNodeGroup(GetNodeGroupRequest, CallSettings)

public virtual NodeGroup GetNodeGroup(GetNodeGroupRequest request, CallSettings callSettings = null)

Gets the resource representation for a node group in a cluster.

Parameters
NameDescription
requestGetNodeGroupRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
NodeGroup

The RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.Create();
// Initialize request argument(s)
GetNodeGroupRequest request = new GetNodeGroupRequest
{
    NodeGroupName = NodeGroupName.FromProjectRegionClusterNodeGroup("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]"),
};
// Make the request
NodeGroup response = nodeGroupControllerClient.GetNodeGroup(request);

GetNodeGroup(NodeGroupName, CallSettings)

public virtual NodeGroup GetNodeGroup(NodeGroupName name, CallSettings callSettings = null)

Gets the resource representation for a node group in a cluster.

Parameters
NameDescription
nameNodeGroupName

Required. The name of the node group to retrieve. Format: projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
NodeGroup

The RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.Create();
// Initialize request argument(s)
NodeGroupName name = NodeGroupName.FromProjectRegionClusterNodeGroup("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]");
// Make the request
NodeGroup response = nodeGroupControllerClient.GetNodeGroup(name);

GetNodeGroup(string, CallSettings)

public virtual NodeGroup GetNodeGroup(string name, CallSettings callSettings = null)

Gets the resource representation for a node group in a cluster.

Parameters
NameDescription
namestring

Required. The name of the node group to retrieve. Format: projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
NodeGroup

The RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/regions/[REGION]/clusters/[CLUSTER]/nodeGroups/[NODE_GROUP]";
// Make the request
NodeGroup response = nodeGroupControllerClient.GetNodeGroup(name);

GetNodeGroupAsync(GetNodeGroupRequest, CallSettings)

public virtual Task<NodeGroup> GetNodeGroupAsync(GetNodeGroupRequest request, CallSettings callSettings = null)

Gets the resource representation for a node group in a cluster.

Parameters
NameDescription
requestGetNodeGroupRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskNodeGroup

A Task containing the RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = await NodeGroupControllerClient.CreateAsync();
// Initialize request argument(s)
GetNodeGroupRequest request = new GetNodeGroupRequest
{
    NodeGroupName = NodeGroupName.FromProjectRegionClusterNodeGroup("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]"),
};
// Make the request
NodeGroup response = await nodeGroupControllerClient.GetNodeGroupAsync(request);

GetNodeGroupAsync(GetNodeGroupRequest, CancellationToken)

public virtual Task<NodeGroup> GetNodeGroupAsync(GetNodeGroupRequest request, CancellationToken cancellationToken)

Gets the resource representation for a node group in a cluster.

Parameters
NameDescription
requestGetNodeGroupRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskNodeGroup

A Task containing the RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = await NodeGroupControllerClient.CreateAsync();
// Initialize request argument(s)
GetNodeGroupRequest request = new GetNodeGroupRequest
{
    NodeGroupName = NodeGroupName.FromProjectRegionClusterNodeGroup("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]"),
};
// Make the request
NodeGroup response = await nodeGroupControllerClient.GetNodeGroupAsync(request);

GetNodeGroupAsync(NodeGroupName, CallSettings)

public virtual Task<NodeGroup> GetNodeGroupAsync(NodeGroupName name, CallSettings callSettings = null)

Gets the resource representation for a node group in a cluster.

Parameters
NameDescription
nameNodeGroupName

Required. The name of the node group to retrieve. Format: projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskNodeGroup

A Task containing the RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = await NodeGroupControllerClient.CreateAsync();
// Initialize request argument(s)
NodeGroupName name = NodeGroupName.FromProjectRegionClusterNodeGroup("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]");
// Make the request
NodeGroup response = await nodeGroupControllerClient.GetNodeGroupAsync(name);

GetNodeGroupAsync(NodeGroupName, CancellationToken)

public virtual Task<NodeGroup> GetNodeGroupAsync(NodeGroupName name, CancellationToken cancellationToken)

Gets the resource representation for a node group in a cluster.

Parameters
NameDescription
nameNodeGroupName

Required. The name of the node group to retrieve. Format: projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskNodeGroup

A Task containing the RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = await NodeGroupControllerClient.CreateAsync();
// Initialize request argument(s)
NodeGroupName name = NodeGroupName.FromProjectRegionClusterNodeGroup("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]");
// Make the request
NodeGroup response = await nodeGroupControllerClient.GetNodeGroupAsync(name);

GetNodeGroupAsync(string, CallSettings)

public virtual Task<NodeGroup> GetNodeGroupAsync(string name, CallSettings callSettings = null)

Gets the resource representation for a node group in a cluster.

Parameters
NameDescription
namestring

Required. The name of the node group to retrieve. Format: projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskNodeGroup

A Task containing the RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = await NodeGroupControllerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/regions/[REGION]/clusters/[CLUSTER]/nodeGroups/[NODE_GROUP]";
// Make the request
NodeGroup response = await nodeGroupControllerClient.GetNodeGroupAsync(name);

GetNodeGroupAsync(string, CancellationToken)

public virtual Task<NodeGroup> GetNodeGroupAsync(string name, CancellationToken cancellationToken)

Gets the resource representation for a node group in a cluster.

Parameters
NameDescription
namestring

Required. The name of the node group to retrieve. Format: projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskNodeGroup

A Task containing the RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = await NodeGroupControllerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/regions/[REGION]/clusters/[CLUSTER]/nodeGroups/[NODE_GROUP]";
// Make the request
NodeGroup response = await nodeGroupControllerClient.GetNodeGroupAsync(name);

PollOnceCreateNodeGroup(string, CallSettings)

public virtual Operation<NodeGroup, NodeGroupOperationMetadata> PollOnceCreateNodeGroup(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationNodeGroupNodeGroupOperationMetadata

The result of polling the operation.

PollOnceCreateNodeGroupAsync(string, CallSettings)

public virtual Task<Operation<NodeGroup, NodeGroupOperationMetadata>> PollOnceCreateNodeGroupAsync(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationNodeGroupNodeGroupOperationMetadata

A task representing the result of polling the operation.

PollOnceResizeNodeGroup(string, CallSettings)

public virtual Operation<NodeGroup, NodeGroupOperationMetadata> PollOnceResizeNodeGroup(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationNodeGroupNodeGroupOperationMetadata

The result of polling the operation.

PollOnceResizeNodeGroupAsync(string, CallSettings)

public virtual Task<Operation<NodeGroup, NodeGroupOperationMetadata>> PollOnceResizeNodeGroupAsync(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationNodeGroupNodeGroupOperationMetadata

A task representing the result of polling the operation.

ResizeNodeGroup(ResizeNodeGroupRequest, CallSettings)

public virtual Operation<NodeGroup, NodeGroupOperationMetadata> ResizeNodeGroup(ResizeNodeGroupRequest request, CallSettings callSettings = null)

Resizes a node group in a cluster. The returned [Operation.metadata][google.longrunning.Operation.metadata] is NodeGroupOperationMetadata.

Parameters
NameDescription
requestResizeNodeGroupRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationNodeGroupNodeGroupOperationMetadata

The RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.Create();
// Initialize request argument(s)
ResizeNodeGroupRequest request = new ResizeNodeGroupRequest
{
    Name = "",
    Size = 0,
    RequestId = "",
    GracefulDecommissionTimeout = new Duration(),
};
// Make the request
Operation<NodeGroup, NodeGroupOperationMetadata> response = nodeGroupControllerClient.ResizeNodeGroup(request);

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

ResizeNodeGroup(string, int, CallSettings)

public virtual Operation<NodeGroup, NodeGroupOperationMetadata> ResizeNodeGroup(string name, int size, CallSettings callSettings = null)

Resizes a node group in a cluster. The returned [Operation.metadata][google.longrunning.Operation.metadata] is NodeGroupOperationMetadata.

Parameters
NameDescription
namestring

Required. The name of the node group to resize. Format: projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}

sizeint

Required. The number of running instances for the node group to maintain. The group adds or removes instances to maintain the number of instances specified by this parameter.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationNodeGroupNodeGroupOperationMetadata

The RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.Create();
// Initialize request argument(s)
string name = "";
int size = 0;
// Make the request
Operation<NodeGroup, NodeGroupOperationMetadata> response = nodeGroupControllerClient.ResizeNodeGroup(name, size);

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

ResizeNodeGroupAsync(ResizeNodeGroupRequest, CallSettings)

public virtual Task<Operation<NodeGroup, NodeGroupOperationMetadata>> ResizeNodeGroupAsync(ResizeNodeGroupRequest request, CallSettings callSettings = null)

Resizes a node group in a cluster. The returned [Operation.metadata][google.longrunning.Operation.metadata] is NodeGroupOperationMetadata.

Parameters
NameDescription
requestResizeNodeGroupRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationNodeGroupNodeGroupOperationMetadata

A Task containing the RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = await NodeGroupControllerClient.CreateAsync();
// Initialize request argument(s)
ResizeNodeGroupRequest request = new ResizeNodeGroupRequest
{
    Name = "",
    Size = 0,
    RequestId = "",
    GracefulDecommissionTimeout = new Duration(),
};
// Make the request
Operation<NodeGroup, NodeGroupOperationMetadata> response = await nodeGroupControllerClient.ResizeNodeGroupAsync(request);

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

ResizeNodeGroupAsync(ResizeNodeGroupRequest, CancellationToken)

public virtual Task<Operation<NodeGroup, NodeGroupOperationMetadata>> ResizeNodeGroupAsync(ResizeNodeGroupRequest request, CancellationToken cancellationToken)

Resizes a node group in a cluster. The returned [Operation.metadata][google.longrunning.Operation.metadata] is NodeGroupOperationMetadata.

Parameters
NameDescription
requestResizeNodeGroupRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationNodeGroupNodeGroupOperationMetadata

A Task containing the RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = await NodeGroupControllerClient.CreateAsync();
// Initialize request argument(s)
ResizeNodeGroupRequest request = new ResizeNodeGroupRequest
{
    Name = "",
    Size = 0,
    RequestId = "",
    GracefulDecommissionTimeout = new Duration(),
};
// Make the request
Operation<NodeGroup, NodeGroupOperationMetadata> response = await nodeGroupControllerClient.ResizeNodeGroupAsync(request);

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

ResizeNodeGroupAsync(string, int, CallSettings)

public virtual Task<Operation<NodeGroup, NodeGroupOperationMetadata>> ResizeNodeGroupAsync(string name, int size, CallSettings callSettings = null)

Resizes a node group in a cluster. The returned [Operation.metadata][google.longrunning.Operation.metadata] is NodeGroupOperationMetadata.

Parameters
NameDescription
namestring

Required. The name of the node group to resize. Format: projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}

sizeint

Required. The number of running instances for the node group to maintain. The group adds or removes instances to maintain the number of instances specified by this parameter.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationNodeGroupNodeGroupOperationMetadata

A Task containing the RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = await NodeGroupControllerClient.CreateAsync();
// Initialize request argument(s)
string name = "";
int size = 0;
// Make the request
Operation<NodeGroup, NodeGroupOperationMetadata> response = await nodeGroupControllerClient.ResizeNodeGroupAsync(name, size);

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

ResizeNodeGroupAsync(string, int, CancellationToken)

public virtual Task<Operation<NodeGroup, NodeGroupOperationMetadata>> ResizeNodeGroupAsync(string name, int size, CancellationToken cancellationToken)

Resizes a node group in a cluster. The returned [Operation.metadata][google.longrunning.Operation.metadata] is NodeGroupOperationMetadata.

Parameters
NameDescription
namestring

Required. The name of the node group to resize. Format: projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}

sizeint

Required. The number of running instances for the node group to maintain. The group adds or removes instances to maintain the number of instances specified by this parameter.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationNodeGroupNodeGroupOperationMetadata

A Task containing the RPC response.

Example
// Create client
NodeGroupControllerClient nodeGroupControllerClient = await NodeGroupControllerClient.CreateAsync();
// Initialize request argument(s)
string name = "";
int size = 0;
// Make the request
Operation<NodeGroup, NodeGroupOperationMetadata> response = await nodeGroupControllerClient.ResizeNodeGroupAsync(name, size);

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

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

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

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

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