Class NodeGroupControllerClient (2.21.0)

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

Equality

Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection> objects compare equal. Objects that compare equal share the same underlying resources.

Performance

Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.

Thread Safety

Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.

Constructors

NodeGroupControllerClient(NodeGroupControllerClient const &)

Copy and move support

Parameter
NameDescription
NodeGroupControllerClient const &

NodeGroupControllerClient(NodeGroupControllerClient &&)

Copy and move support

Parameter
NameDescription
NodeGroupControllerClient &&

NodeGroupControllerClient(std::shared_ptr< NodeGroupControllerConnection >, Options)

Parameters
NameDescription
connection std::shared_ptr< NodeGroupControllerConnection >
opts Options

Operators

operator=(NodeGroupControllerClient const &)

Copy and move support

Parameter
NameDescription
NodeGroupControllerClient const &
Returns
TypeDescription
NodeGroupControllerClient &

operator=(NodeGroupControllerClient &&)

Copy and move support

Parameter
NameDescription
NodeGroupControllerClient &&
Returns
TypeDescription
NodeGroupControllerClient &

Functions

CreateNodeGroup(std::string const &, google::cloud::dataproc::v1::NodeGroup const &, std::string const &, Options)

Creates a node group in a cluster.

Parameters
NameDescription
parent std::string const &

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

node_group google::cloud::dataproc::v1::NodeGroup const &

Required. The node group to create.

node_group_id std::string const &

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.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::dataproc::v1::NodeGroup > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.dataproc.v1.NodeGroup proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateNodeGroup(google::cloud::dataproc::v1::CreateNodeGroupRequest const &, Options)

Creates a node group in a cluster.

Parameters
NameDescription
request google::cloud::dataproc::v1::CreateNodeGroupRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.dataproc.v1.CreateNodeGroupRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::dataproc::v1::NodeGroup > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.dataproc.v1.NodeGroup proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

ResizeNodeGroup(std::string const &, std::int32_t, Options)

Resizes a node group in a cluster.

Parameters
NameDescription
name std::string const &

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

size std::int32_t

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.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::dataproc::v1::NodeGroup > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.dataproc.v1.NodeGroup proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

ResizeNodeGroup(google::cloud::dataproc::v1::ResizeNodeGroupRequest const &, Options)

Resizes a node group in a cluster.

Parameters
NameDescription
request google::cloud::dataproc::v1::ResizeNodeGroupRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.dataproc.v1.ResizeNodeGroupRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::dataproc::v1::NodeGroup > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.dataproc.v1.NodeGroup proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

GetNodeGroup(std::string const &, Options)

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

Parameters
NameDescription
name std::string const &

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

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::dataproc::v1::NodeGroup >

the result of the RPC. The response message type (google.cloud.dataproc.v1.NodeGroup) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetNodeGroup(google::cloud::dataproc::v1::GetNodeGroupRequest const &, Options)

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

Parameters
NameDescription
request google::cloud::dataproc::v1::GetNodeGroupRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.dataproc.v1.GetNodeGroupRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::dataproc::v1::NodeGroup >

the result of the RPC. The response message type (google.cloud.dataproc.v1.NodeGroup) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.