Class RegionDisksClient (2.18.0)

Service for the regionDisks resource.

https://cloud.google.com/compute/docs/reference/rest/v1/regionDisks

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

RegionDisksClient(RegionDisksClient const &)

Copy and move support

Parameter
Name Description
RegionDisksClient const &

RegionDisksClient(RegionDisksClient &&)

Copy and move support

Parameter
Name Description
RegionDisksClient &&

RegionDisksClient(std::shared_ptr< RegionDisksConnection >, Options)

Parameters
Name Description
connection std::shared_ptr< RegionDisksConnection >
opts Options

Operators

operator=(RegionDisksClient const &)

Copy and move support

Parameter
Name Description
RegionDisksClient const &
Returns
Type Description
RegionDisksClient &

operator=(RegionDisksClient &&)

Copy and move support

Parameter
Name Description
RegionDisksClient &&
Returns
Type Description
RegionDisksClient &

Functions

AddResourcePolicies(std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::RegionDisksAddResourcePoliciesRequest const &, Options)

Adds existing resource policies to a regional disk.

You can only add one policy which will be applied to this disk for scheduling snapshot creation. https://cloud.google.com/compute/docs/reference/rest/v1/regionDisks/addResourcePolicies

Parameters
Name Description
project std::string const &

Project ID for this request.

region std::string const &

The name of the region for this request.

disk std::string const &

The disk name for this request.

region_disks_add_resource_policies_request_resource google::cloud::cpp::compute::v1::RegionDisksAddResourcePoliciesRequest const &

The RegionDisksAddResourcePoliciesRequest for this request.

opts Options

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

Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

AddResourcePolicies(google::cloud::cpp::compute::region_disks::v1::AddResourcePoliciesRequest const &, Options)

Adds existing resource policies to a regional disk.

You can only add one policy which will be applied to this disk for scheduling snapshot creation. https://cloud.google.com/compute/docs/reference/rest/v1/regionDisks/addResourcePolicies

Parameters
Name Description
request google::cloud::cpp::compute::region_disks::v1::AddResourcePoliciesRequest 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.cpp.compute.region_disks.v1.AddResourcePoliciesRequest. 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
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

BulkInsert(std::string const &, std::string const &, google::cloud::cpp::compute::v1::BulkInsertDiskResource const &, Options)

Bulk create a set of disks.

Parameters
Name Description
project std::string const &

Project ID for this request.

region std::string const &

The name of the region for this request.

bulk_insert_disk_resource google::cloud::cpp::compute::v1::BulkInsertDiskResource const &

The BulkInsertDiskResource for this request.

opts Options

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

Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

BulkInsert(google::cloud::cpp::compute::region_disks::v1::BulkInsertRequest const &, Options)

Bulk create a set of disks.

Parameters
Name Description
request google::cloud::cpp::compute::region_disks::v1::BulkInsertRequest 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.cpp.compute.region_disks.v1.BulkInsertRequest. 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
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateSnapshot(std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::Snapshot const &, Options)

Creates a snapshot of a specified persistent disk.

For regular snapshot creation, consider using snapshots.insert instead, as that method supports more features, such as creating snapshots in a project different from the source disk project. https://cloud.google.com/compute/docs/reference/rest/v1/regionDisks/createSnapshot

Parameters
Name Description
project std::string const &

Project ID for this request.

region std::string const &

Name of the region for this request.

disk std::string const &

Name of the regional persistent disk to snapshot.

snapshot_resource google::cloud::cpp::compute::v1::Snapshot const &

The Snapshot for this request.

opts Options

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

Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateSnapshot(google::cloud::cpp::compute::region_disks::v1::CreateSnapshotRequest const &, Options)

Creates a snapshot of a specified persistent disk.

For regular snapshot creation, consider using snapshots.insert instead, as that method supports more features, such as creating snapshots in a project different from the source disk project. https://cloud.google.com/compute/docs/reference/rest/v1/regionDisks/createSnapshot

Parameters
Name Description
request google::cloud::cpp::compute::region_disks::v1::CreateSnapshotRequest 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.cpp.compute.region_disks.v1.CreateSnapshotRequest. 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
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteDisk(std::string const &, std::string const &, std::string const &, Options)

Deletes the specified regional persistent disk.

Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots. https://cloud.google.com/compute/docs/reference/rest/v1/regionDisks/delete

Parameters
Name Description
project std::string const &

Project ID for this request.

region std::string const &

Name of the region for this request.

disk std::string const &

Name of the regional persistent disk to delete.

opts Options

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

Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteDisk(google::cloud::cpp::compute::region_disks::v1::DeleteDiskRequest const &, Options)

Deletes the specified regional persistent disk.

Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots. https://cloud.google.com/compute/docs/reference/rest/v1/regionDisks/delete

Parameters
Name Description
request google::cloud::cpp::compute::region_disks::v1::DeleteDiskRequest 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.cpp.compute.region_disks.v1.DeleteDiskRequest. 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
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

GetDisk(std::string const &, std::string const &, std::string const &, Options)

Returns a specified regional persistent disk.

Parameters
Name Description
project std::string const &

Project ID for this request.

region std::string const &

Name of the region for this request.

disk std::string const &

Name of the regional persistent disk to return.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Disk >

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

GetDisk(google::cloud::cpp::compute::region_disks::v1::GetDiskRequest const &, Options)

Returns a specified regional persistent disk.

Parameters
Name Description
request google::cloud::cpp::compute::region_disks::v1::GetDiskRequest 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.cpp.compute.region_disks.v1.GetDiskRequest. 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
Type Description
StatusOr< google::cloud::cpp::compute::v1::Disk >

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

GetIamPolicy(std::string const &, std::string const &, std::string const &, Options)

Gets the access control policy for a resource.

Parameters
Name Description
project std::string const &

Project ID for this request.

region std::string const &

The name of the region for this request.

resource std::string const &

Name or id of the resource for this request.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Policy >

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

GetIamPolicy(google::cloud::cpp::compute::region_disks::v1::GetIamPolicyRequest const &, Options)

Gets the access control policy for a resource.

Parameters
Name Description
request google::cloud::cpp::compute::region_disks::v1::GetIamPolicyRequest 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.cpp.compute.region_disks.v1.GetIamPolicyRequest. 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
Type Description
StatusOr< google::cloud::cpp::compute::v1::Policy >

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

InsertDisk(std::string const &, std::string const &, google::cloud::cpp::compute::v1::Disk const &, Options)

Creates a persistent regional disk in the specified project using the data included in the request.

Parameters
Name Description
project std::string const &

Project ID for this request.

region std::string const &

Name of the region for this request.

disk_resource google::cloud::cpp::compute::v1::Disk const &

The Disk for this request.

opts Options

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

Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

InsertDisk(google::cloud::cpp::compute::region_disks::v1::InsertDiskRequest const &, Options)

Creates a persistent regional disk in the specified project using the data included in the request.

Parameters
Name Description
request google::cloud::cpp::compute::region_disks::v1::InsertDiskRequest 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.cpp.compute.region_disks.v1.InsertDiskRequest. 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
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

ListRegionDisks(std::string const &, std::string const &, Options)

Retrieves the list of persistent disks contained within the specified region.

Parameters
Name Description
project std::string const &

Project ID for this request.

region std::string const &

Name of the region for this request.

opts Options

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

Returns
Type Description
StreamRange< google::cloud::cpp::compute::v1::Disk >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.cpp.compute.v1.Disk, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListRegionDisks(google::cloud::cpp::compute::region_disks::v1::ListRegionDisksRequest, Options)

Retrieves the list of persistent disks contained within the specified region.

Parameters
Name Description
request google::cloud::cpp::compute::region_disks::v1::ListRegionDisksRequest

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.cpp.compute.region_disks.v1.ListRegionDisksRequest. 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
Type Description
StreamRange< google::cloud::cpp::compute::v1::Disk >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.cpp.compute.v1.Disk, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

RemoveResourcePolicies(std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::RegionDisksRemoveResourcePoliciesRequest const &, Options)

Removes resource policies from a regional disk.

Parameters
Name Description
project std::string const &

Project ID for this request.

region std::string const &

The name of the region for this request.

disk std::string const &

The disk name for this request.

region_disks_remove_resource_policies_request_resource google::cloud::cpp::compute::v1::RegionDisksRemoveResourcePoliciesRequest const &

The RegionDisksRemoveResourcePoliciesRequest for this request.

opts Options

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

Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

RemoveResourcePolicies(google::cloud::cpp::compute::region_disks::v1::RemoveResourcePoliciesRequest const &, Options)

Removes resource policies from a regional disk.

Parameters
Name Description
request google::cloud::cpp::compute::region_disks::v1::RemoveResourcePoliciesRequest 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.cpp.compute.region_disks.v1.RemoveResourcePoliciesRequest. 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
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

Resize(std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::RegionDisksResizeRequest const &, Options)

Resizes the specified regional persistent disk.

Parameters
Name Description
project std::string const &

The project ID for this request.

region std::string const &

Name of the region for this request.

disk std::string const &

Name of the regional persistent disk.

region_disks_resize_request_resource google::cloud::cpp::compute::v1::RegionDisksResizeRequest const &

The RegionDisksResizeRequest for this request.

opts Options

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

Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

Resize(google::cloud::cpp::compute::region_disks::v1::ResizeRequest const &, Options)

Resizes the specified regional persistent disk.

Parameters
Name Description
request google::cloud::cpp::compute::region_disks::v1::ResizeRequest 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.cpp.compute.region_disks.v1.ResizeRequest. 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
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

SetIamPolicy(std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::RegionSetPolicyRequest const &, Options)

Sets the access control policy on the specified resource.

Parameters
Name Description
project std::string const &

Project ID for this request.

region std::string const &

The name of the region for this request.

resource std::string const &

Name or id of the resource for this request.

region_set_policy_request_resource google::cloud::cpp::compute::v1::RegionSetPolicyRequest const &

The RegionSetPolicyRequest for this request.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Policy >

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

SetIamPolicy(google::cloud::cpp::compute::region_disks::v1::SetIamPolicyRequest const &, Options)

Sets the access control policy on the specified resource.

Parameters
Name Description
request google::cloud::cpp::compute::region_disks::v1::SetIamPolicyRequest 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.cpp.compute.region_disks.v1.SetIamPolicyRequest. 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
Type Description
StatusOr< google::cloud::cpp::compute::v1::Policy >

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

SetLabels(std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::RegionSetLabelsRequest const &, Options)

Sets the labels on the target regional disk.

Parameters
Name Description
project std::string const &

Project ID for this request.

region std::string const &

The region for this request.

resource std::string const &

Name or id of the resource for this request.

region_set_labels_request_resource google::cloud::cpp::compute::v1::RegionSetLabelsRequest const &

The RegionSetLabelsRequest for this request.

opts Options

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

Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

SetLabels(google::cloud::cpp::compute::region_disks::v1::SetLabelsRequest const &, Options)

Sets the labels on the target regional disk.

Parameters
Name Description
request google::cloud::cpp::compute::region_disks::v1::SetLabelsRequest 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.cpp.compute.region_disks.v1.SetLabelsRequest. 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
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

StartAsyncReplication(std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::RegionDisksStartAsyncReplicationRequest const &, Options)

Starts asynchronous replication.

Parameters
Name Description
project std::string const &

Project ID for this request.

region std::string const &

The name of the region for this request.

disk std::string const &

The name of the persistent disk.

region_disks_start_async_replication_request_resource google::cloud::cpp::compute::v1::RegionDisksStartAsyncReplicationRequest const &

The RegionDisksStartAsyncReplicationRequest for this request.

opts Options

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

Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

StartAsyncReplication(google::cloud::cpp::compute::region_disks::v1::StartAsyncReplicationRequest const &, Options)

Starts asynchronous replication.

Parameters
Name Description
request google::cloud::cpp::compute::region_disks::v1::StartAsyncReplicationRequest 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.cpp.compute.region_disks.v1.StartAsyncReplicationRequest. 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
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

StopAsyncReplication(std::string const &, std::string const &, std::string const &, Options)

Stops asynchronous replication.

Can be invoked either on the primary or on the secondary disk. https://cloud.google.com/compute/docs/reference/rest/v1/regionDisks/stopAsyncReplication

Parameters
Name Description
project std::string const &

Project ID for this request.

region std::string const &

The name of the region for this request.

disk std::string const &

The name of the persistent disk.

opts Options

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

Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

StopAsyncReplication(google::cloud::cpp::compute::region_disks::v1::StopAsyncReplicationRequest const &, Options)

Stops asynchronous replication.

Can be invoked either on the primary or on the secondary disk. https://cloud.google.com/compute/docs/reference/rest/v1/regionDisks/stopAsyncReplication

Parameters
Name Description
request google::cloud::cpp::compute::region_disks::v1::StopAsyncReplicationRequest 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.cpp.compute.region_disks.v1.StopAsyncReplicationRequest. 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
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

StopGroupAsyncReplication(std::string const &, std::string const &, google::cloud::cpp::compute::v1::DisksStopGroupAsyncReplicationResource const &, Options)

Stops asynchronous replication for a consistency group of disks.

Parameters
Name Description
project std::string const &

Project ID for this request.

region std::string const &

The name of the region for this request. This must be the region of the primary or secondary disks in the consistency group.

disks_stop_group_async_replication_resource google::cloud::cpp::compute::v1::DisksStopGroupAsyncReplicationResource const &

The DisksStopGroupAsyncReplicationResource for this request.

opts Options

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

Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

StopGroupAsyncReplication(google::cloud::cpp::compute::region_disks::v1::StopGroupAsyncReplicationRequest const &, Options)

Stops asynchronous replication for a consistency group of disks.

Parameters
Name Description
request google::cloud::cpp::compute::region_disks::v1::StopGroupAsyncReplicationRequest 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.cpp.compute.region_disks.v1.StopGroupAsyncReplicationRequest. 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
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

TestIamPermissions(std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::TestPermissionsRequest const &, Options)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
project std::string const &

Project ID for this request.

region std::string const &

The name of the region for this request.

resource std::string const &

Name or id of the resource for this request.

test_permissions_request_resource google::cloud::cpp::compute::v1::TestPermissionsRequest const &

The TestPermissionsRequest for this request.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::TestPermissionsResponse >

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

TestIamPermissions(google::cloud::cpp::compute::region_disks::v1::TestIamPermissionsRequest const &, Options)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request google::cloud::cpp::compute::region_disks::v1::TestIamPermissionsRequest 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.cpp.compute.region_disks.v1.TestIamPermissionsRequest. 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
Type Description
StatusOr< google::cloud::cpp::compute::v1::TestPermissionsResponse >

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

UpdateDisk(std::string const &, std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::Disk const &, Options)

Update the specified disk with the data included in the request.

Update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: user_license. https://cloud.google.com/compute/docs/reference/rest/v1/regionDisks/update

Parameters
Name Description
project std::string const &

Project ID for this request.

region std::string const &

The name of the region for this request.

disk std::string const &

The disk name for this request.

update_mask std::string const &

update_mask indicates fields to be updated as part of this request.

disk_resource google::cloud::cpp::compute::v1::Disk const &

The Disk for this request.

opts Options

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

Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

UpdateDisk(google::cloud::cpp::compute::region_disks::v1::UpdateDiskRequest const &, Options)

Update the specified disk with the data included in the request.

Update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: user_license. https://cloud.google.com/compute/docs/reference/rest/v1/regionDisks/update

Parameters
Name Description
request google::cloud::cpp::compute::region_disks::v1::UpdateDiskRequest 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.cpp.compute.region_disks.v1.UpdateDiskRequest. 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
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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.cpp.compute.v1.Operation] proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.