3.15.0-rc 3.14.2 (latest) 3.13.0 3.12.0 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0 2.48.0-rc 2.47.1 2.46.0 2.45.0 2.44.0 2.43.0 2.42.0 2.41.0 2.40.0 2.39.0 2.38.0 2.37.0 2.36.0 2.35.0 2.34.0 2.33.0 2.32.0 2.31.0 2.30.0 2.29.0 2.28.0 2.27.0 2.26.0 2.25.1 2.24.0 2.23.0 2.22.1 2.21.0 2.20.0 2.19.0 2.18.0 2.17.0 2.16.0 2.15.1 Service for the disks resource.
<https://cloud.google.com/compute/docs/reference/rest/v1/disks>

This client uses Disks version 2026-11-01.

###### 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

### DisksClient(DisksClient const \&)

Copy and move support

| **Parameter** ||
|---|---|
| **Name** | **Description** |
|   | `DisksClient const &` |

### DisksClient(DisksClient \&\&)

Copy and move support

| **Parameter** ||
|---|---|
| **Name** | **Description** |
|   | `DisksClient &&` |

### DisksClient(std::shared_ptr\< DisksConnection \>, Options)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `connection` | `std::shared_ptr< DisksConnection >` |
| `opts` | `Options` |

## Operators

### operator=(DisksClient const \&)

Copy and move support

| **Parameter** ||
|---|---|
| **Name** | **Description** |
|   | `DisksClient const &` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `DisksClient &` |   |

### operator=(DisksClient \&\&)

Copy and move support

| **Parameter** ||
|---|---|
| **Name** | **Description** |
|   | `DisksClient &&` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `DisksClient &` |   |

## Functions

### AddResourcePolicies(std::string const \&, std::string const \&, std::string const \&, google::cloud::cpp::compute::v1::DisksAddResourcePoliciesRequest const \&, Options)

Adds existing resource policies to a 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/disks/addResourcePolicies>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `zone` | `std::string const &` The name of the zone for this request. |
| `disk` | `std::string const &` The disk name for this request. |
| `disks_add_resource_policies_request_resource` | `google::cloud::cpp::compute::v1::DisksAddResourcePoliciesRequest const &` The DisksAddResourcePoliciesRequest 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### AddResourcePolicies(NoAwaitTag, std::string const \&, std::string const \&, std::string const \&, google::cloud::cpp::compute::v1::DisksAddResourcePoliciesRequest const \&, Options)

Adds existing resource policies to a disk.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `zone` | `std::string const &` |
| `disk` | `std::string const &` |
| `disks_add_resource_policies_request_resource` | `google::cloud::cpp::compute::v1::DisksAddResourcePoliciesRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### AddResourcePolicies(google::cloud::cpp::compute::disks::v1::AddResourcePoliciesRequest const \&, Options)

Adds existing resource policies to a 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/disks/addResourcePolicies>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::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.disks.v1.AddResourcePoliciesRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/disks/v1/disks.proto#L319). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### AddResourcePolicies(NoAwaitTag, google::cloud::cpp::compute::disks::v1::AddResourcePoliciesRequest const \&, Options)

Adds existing resource policies to a disk.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::disks::v1::AddResourcePoliciesRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### AddResourcePolicies(google::cloud::cpp::compute::v1::Operation const \&, Options)

Adds existing resource policies to a disk.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |

### AggregatedListDisks(std::string const \&, Options)

Retrieves an aggregated list of persistent disks.
To prevent failure, it is recommended that you set the `returnPartialSuccess` parameter to `true`. <https://cloud.google.com/compute/docs/reference/rest/v1/disks/aggregatedList>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StreamRange< std::pair< std::string, google::cloud::cpp::compute::v1::DisksScopedList > >` | a [StreamRange](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StreamRange.md.txt) 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](https://en.cppreference.com/w/cpp/named_req/InputIterator). The value type for this iterator is a [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt)`<T>` contains elements of type [google.cloud.cpp.compute.v1.DisksScopedList](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/v1/internal/common_021.proto#L211), or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### AggregatedListDisks(google::cloud::cpp::compute::disks::v1::AggregatedListDisksRequest, Options)

Retrieves an aggregated list of persistent disks.
To prevent failure, it is recommended that you set the `returnPartialSuccess` parameter to `true`. <https://cloud.google.com/compute/docs/reference/rest/v1/disks/aggregatedList>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::disks::v1::AggregatedListDisksRequest` 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.disks.v1.AggregatedListDisksRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/disks/v1/disks.proto#L359). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StreamRange< std::pair< std::string, google::cloud::cpp::compute::v1::DisksScopedList > >` | a [StreamRange](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StreamRange.md.txt) 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](https://en.cppreference.com/w/cpp/named_req/InputIterator). The value type for this iterator is a [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt)`<T>` contains elements of type [google.cloud.cpp.compute.v1.DisksScopedList](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/v1/internal/common_021.proto#L211), or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

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

Bulk create a set of disks.
<https://cloud.google.com/compute/docs/reference/rest/v1/disks/bulkInsert>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `zone` | `std::string const &` The name of the zone 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

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

Bulk create a set of disks.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `zone` | `std::string const &` |
| `bulk_insert_disk_resource` | `google::cloud::cpp::compute::v1::BulkInsertDiskResource const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### BulkInsert(google::cloud::cpp::compute::disks::v1::BulkInsertRequest const \&, Options)

Bulk create a set of disks.
<https://cloud.google.com/compute/docs/reference/rest/v1/disks/bulkInsert>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::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.disks.v1.BulkInsertRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/disks/v1/disks.proto#L467). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### BulkInsert(NoAwaitTag, google::cloud::cpp::compute::disks::v1::BulkInsertRequest const \&, Options)

Bulk create a set of disks.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::disks::v1::BulkInsertRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### BulkInsert(google::cloud::cpp::compute::v1::Operation const \&, Options)

Bulk create a set of disks.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |

### BulkSetLabels(std::string const \&, std::string const \&, google::cloud::cpp::compute::v1::BulkZoneSetLabelsRequest const \&, Options)

Sets the labels on many disks at once.
To learn more about labels, read theLabeling Resources documentation. <https://cloud.google.com/compute/docs/reference/rest/v1/disks/bulkSetLabels>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `zone` | `std::string const &` The name of the zone for this request. |
| `bulk_zone_set_labels_request_resource` | `google::cloud::cpp::compute::v1::BulkZoneSetLabelsRequest const &` The BulkZoneSetLabelsRequest 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### BulkSetLabels(NoAwaitTag, std::string const \&, std::string const \&, google::cloud::cpp::compute::v1::BulkZoneSetLabelsRequest const \&, Options)

Sets the labels on many disks at once.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `zone` | `std::string const &` |
| `bulk_zone_set_labels_request_resource` | `google::cloud::cpp::compute::v1::BulkZoneSetLabelsRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### BulkSetLabels(google::cloud::cpp::compute::disks::v1::BulkSetLabelsRequest const \&, Options)

Sets the labels on many disks at once.
To learn more about labels, read theLabeling Resources documentation. <https://cloud.google.com/compute/docs/reference/rest/v1/disks/bulkSetLabels>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::disks::v1::BulkSetLabelsRequest 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.disks.v1.BulkSetLabelsRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/disks/v1/disks.proto#L503). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### BulkSetLabels(NoAwaitTag, google::cloud::cpp::compute::disks::v1::BulkSetLabelsRequest const \&, Options)

Sets the labels on many disks at once.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::disks::v1::BulkSetLabelsRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### BulkSetLabels(google::cloud::cpp::compute::v1::Operation const \&, Options)

Sets the labels on many disks at once.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |

### 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/disks/createSnapshot>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `zone` | `std::string const &` The name of the zone for this request. |
| `disk` | `std::string const &` Name of the 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### CreateSnapshot(NoAwaitTag, 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.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `zone` | `std::string const &` |
| `disk` | `std::string const &` |
| `snapshot_resource` | `google::cloud::cpp::compute::v1::Snapshot const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### CreateSnapshot(google::cloud::cpp::compute::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/disks/createSnapshot>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::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.disks.v1.CreateSnapshotRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/disks/v1/disks.proto#L543). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### CreateSnapshot(NoAwaitTag, google::cloud::cpp::compute::disks::v1::CreateSnapshotRequest const \&, Options)

Creates a snapshot of a specified persistent disk.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::disks::v1::CreateSnapshotRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### CreateSnapshot(google::cloud::cpp::compute::v1::Operation const \&, Options)

Creates a snapshot of a specified persistent disk.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |

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

Deletes the specified persistent disk.
Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separatelydelete snapshots. <https://cloud.google.com/compute/docs/reference/rest/v1/disks/delete>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `zone` | `std::string const &` The name of the zone for this request. |
| `disk` | `std::string const &` Name of the 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### DeleteDisk(NoAwaitTag, std::string const \&, std::string const \&, std::string const \&, Options)

Deletes the specified persistent disk.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `zone` | `std::string const &` |
| `disk` | `std::string const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### DeleteDisk(google::cloud::cpp::compute::disks::v1::DeleteDiskRequest const \&, Options)

Deletes the specified persistent disk.
Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separatelydelete snapshots. <https://cloud.google.com/compute/docs/reference/rest/v1/disks/delete>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::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.disks.v1.DeleteDiskRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/disks/v1/disks.proto#L586). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### DeleteDisk(NoAwaitTag, google::cloud::cpp::compute::disks::v1::DeleteDiskRequest const \&, Options)

Deletes the specified persistent disk.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::disks::v1::DeleteDiskRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### DeleteDisk(google::cloud::cpp::compute::v1::Operation const \&, Options)

Deletes the specified persistent disk.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |

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

Returns the specified persistent disk.
<https://cloud.google.com/compute/docs/reference/rest/v1/disks/get>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `zone` | `std::string const &` The name of the zone for this request. |
| `disk` | `std::string const &` Name of the 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](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/v1/internal/common_018.proto#L75)) is mapped to a C++ class using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). If the request fails, the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) contains the error details. |

### GetDisk(google::cloud::cpp::compute::disks::v1::GetDiskRequest const \&, Options)

Returns the specified persistent disk.
<https://cloud.google.com/compute/docs/reference/rest/v1/disks/get>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::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.disks.v1.GetDiskRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/disks/v1/disks.proto#L621). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `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](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/v1/internal/common_018.proto#L75)) is mapped to a C++ class using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). If the request fails, the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) contains the error details. |

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

Gets the access control policy for a resource.
May be empty if no such policy or resource exists. <https://cloud.google.com/compute/docs/reference/rest/v1/disks/getIamPolicy>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `zone` | `std::string const &` The name of the zone 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](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/v1/internal/common_010.proto#L317)) is mapped to a C++ class using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). If the request fails, the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) contains the error details. |

### GetIamPolicy(google::cloud::cpp::compute::disks::v1::GetIamPolicyRequest const \&, Options)

Gets the access control policy for a resource.
May be empty if no such policy or resource exists. <https://cloud.google.com/compute/docs/reference/rest/v1/disks/getIamPolicy>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::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.disks.v1.GetIamPolicyRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/disks/v1/disks.proto#L634). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `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](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/v1/internal/common_010.proto#L317)) is mapped to a C++ class using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). If the request fails, the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) contains the error details. |

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

Creates a persistent disk in the specified project using the data in the request.
You can create a disk from a source (sourceImage, sourceSnapshot, orsourceDisk) or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property. <https://cloud.google.com/compute/docs/reference/rest/v1/disks/insert>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `zone` | `std::string const &` The name of the zone 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

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

Creates a persistent disk in the specified project using the data in the request.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `zone` | `std::string const &` |
| `disk_resource` | `google::cloud::cpp::compute::v1::Disk const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### InsertDisk(google::cloud::cpp::compute::disks::v1::InsertDiskRequest const \&, Options)

Creates a persistent disk in the specified project using the data in the request.
You can create a disk from a source (sourceImage, sourceSnapshot, orsourceDisk) or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property. <https://cloud.google.com/compute/docs/reference/rest/v1/disks/insert>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::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.disks.v1.InsertDiskRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/disks/v1/disks.proto#L652). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### InsertDisk(NoAwaitTag, google::cloud::cpp::compute::disks::v1::InsertDiskRequest const \&, Options)

Creates a persistent disk in the specified project using the data in the request.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::disks::v1::InsertDiskRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### InsertDisk(google::cloud::cpp::compute::v1::Operation const \&, Options)

Creates a persistent disk in the specified project using the data in the request.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |

### ListDisks(std::string const \&, std::string const \&, Options)

Retrieves a list of persistent disks contained within the specified zone.
<https://cloud.google.com/compute/docs/reference/rest/v1/disks/list>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `zone` | `std::string const &` The name of the zone 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](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StreamRange.md.txt) 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](https://en.cppreference.com/w/cpp/named_req/InputIterator). The value type for this iterator is a [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt)`<T>` contains elements of type [google.cloud.cpp.compute.v1.Disk](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/v1/internal/common_018.proto#L75), or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### ListDisks(google::cloud::cpp::compute::disks::v1::ListDisksRequest, Options)

Retrieves a list of persistent disks contained within the specified zone.
<https://cloud.google.com/compute/docs/reference/rest/v1/disks/list>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::disks::v1::ListDisksRequest` 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.disks.v1.ListDisksRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/disks/v1/disks.proto#L691). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `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](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StreamRange.md.txt) 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](https://en.cppreference.com/w/cpp/named_req/InputIterator). The value type for this iterator is a [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt)`<T>` contains elements of type [google.cloud.cpp.compute.v1.Disk](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/v1/internal/common_018.proto#L75), or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### RemoveResourcePolicies(std::string const \&, std::string const \&, std::string const \&, google::cloud::cpp::compute::v1::DisksRemoveResourcePoliciesRequest const \&, Options)

Removes resource policies from a disk.
<https://cloud.google.com/compute/docs/reference/rest/v1/disks/removeResourcePolicies>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `zone` | `std::string const &` The name of the zone for this request. |
| `disk` | `std::string const &` The disk name for this request. |
| `disks_remove_resource_policies_request_resource` | `google::cloud::cpp::compute::v1::DisksRemoveResourcePoliciesRequest const &` The DisksRemoveResourcePoliciesRequest 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### RemoveResourcePolicies(NoAwaitTag, std::string const \&, std::string const \&, std::string const \&, google::cloud::cpp::compute::v1::DisksRemoveResourcePoliciesRequest const \&, Options)

Removes resource policies from a disk.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `zone` | `std::string const &` |
| `disk` | `std::string const &` |
| `disks_remove_resource_policies_request_resource` | `google::cloud::cpp::compute::v1::DisksRemoveResourcePoliciesRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### RemoveResourcePolicies(google::cloud::cpp::compute::disks::v1::RemoveResourcePoliciesRequest const \&, Options)

Removes resource policies from a disk.
<https://cloud.google.com/compute/docs/reference/rest/v1/disks/removeResourcePolicies>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::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.disks.v1.RemoveResourcePoliciesRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/disks/v1/disks.proto#L788). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### RemoveResourcePolicies(NoAwaitTag, google::cloud::cpp::compute::disks::v1::RemoveResourcePoliciesRequest const \&, Options)

Removes resource policies from a disk.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::disks::v1::RemoveResourcePoliciesRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### RemoveResourcePolicies(google::cloud::cpp::compute::v1::Operation const \&, Options)

Removes resource policies from a disk.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |

### Resize(std::string const \&, std::string const \&, std::string const \&, google::cloud::cpp::compute::v1::DisksResizeRequest const \&, Options)

Resizes the specified persistent disk.
You can only increase the size of the disk. <https://cloud.google.com/compute/docs/reference/rest/v1/disks/resize>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `zone` | `std::string const &` The name of the zone for this request. |
| `disk` | `std::string const &` The name of the persistent disk. |
| `disks_resize_request_resource` | `google::cloud::cpp::compute::v1::DisksResizeRequest const &` The DisksResizeRequest 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### Resize(NoAwaitTag, std::string const \&, std::string const \&, std::string const \&, google::cloud::cpp::compute::v1::DisksResizeRequest const \&, Options)

Resizes the specified persistent disk.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `zone` | `std::string const &` |
| `disk` | `std::string const &` |
| `disks_resize_request_resource` | `google::cloud::cpp::compute::v1::DisksResizeRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### Resize(google::cloud::cpp::compute::disks::v1::ResizeRequest const \&, Options)

Resizes the specified persistent disk.
You can only increase the size of the disk. <https://cloud.google.com/compute/docs/reference/rest/v1/disks/resize>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::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.disks.v1.ResizeRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/disks/v1/disks.proto#L828). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### Resize(NoAwaitTag, google::cloud::cpp::compute::disks::v1::ResizeRequest const \&, Options)

Resizes the specified persistent disk.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::disks::v1::ResizeRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### Resize(google::cloud::cpp::compute::v1::Operation const \&, Options)

Resizes the specified persistent disk.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |

### SetIamPolicy(std::string const \&, std::string const \&, std::string const \&, google::cloud::cpp::compute::v1::ZoneSetPolicyRequest const \&, Options)

Sets the access control policy on the specified resource.
Replaces any existing policy. <https://cloud.google.com/compute/docs/reference/rest/v1/disks/setIamPolicy>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `zone` | `std::string const &` The name of the zone for this request. |
| `resource` | `std::string const &` Name or id of the resource for this request. |
| `zone_set_policy_request_resource` | `google::cloud::cpp::compute::v1::ZoneSetPolicyRequest const &` The ZoneSetPolicyRequest 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](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/v1/internal/common_010.proto#L317)) is mapped to a C++ class using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). If the request fails, the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) contains the error details. |

### SetIamPolicy(google::cloud::cpp::compute::disks::v1::SetIamPolicyRequest const \&, Options)

Sets the access control policy on the specified resource.
Replaces any existing policy. <https://cloud.google.com/compute/docs/reference/rest/v1/disks/setIamPolicy>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::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.disks.v1.SetIamPolicyRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/disks/v1/disks.proto#L867). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `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](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/v1/internal/common_010.proto#L317)) is mapped to a C++ class using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). If the request fails, the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) contains the error details. |

### SetLabels(std::string const \&, std::string const \&, std::string const \&, google::cloud::cpp::compute::v1::ZoneSetLabelsRequest const \&, Options)

Sets the labels on a disk.
To learn more about labels, read theLabeling Resources documentation. <https://cloud.google.com/compute/docs/reference/rest/v1/disks/setLabels>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `zone` | `std::string const &` The name of the zone for this request. |
| `resource` | `std::string const &` Name or id of the resource for this request. |
| `zone_set_labels_request_resource` | `google::cloud::cpp::compute::v1::ZoneSetLabelsRequest const &` The ZoneSetLabelsRequest 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### SetLabels(NoAwaitTag, std::string const \&, std::string const \&, std::string const \&, google::cloud::cpp::compute::v1::ZoneSetLabelsRequest const \&, Options)

Sets the labels on a disk.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `zone` | `std::string const &` |
| `resource` | `std::string const &` |
| `zone_set_labels_request_resource` | `google::cloud::cpp::compute::v1::ZoneSetLabelsRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### SetLabels(google::cloud::cpp::compute::disks::v1::SetLabelsRequest const \&, Options)

Sets the labels on a disk.
To learn more about labels, read theLabeling Resources documentation. <https://cloud.google.com/compute/docs/reference/rest/v1/disks/setLabels>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::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.disks.v1.SetLabelsRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/disks/v1/disks.proto#L885). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### SetLabels(NoAwaitTag, google::cloud::cpp::compute::disks::v1::SetLabelsRequest const \&, Options)

Sets the labels on a disk.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::disks::v1::SetLabelsRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### SetLabels(google::cloud::cpp::compute::v1::Operation const \&, Options)

Sets the labels on a disk.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |

### StartAsyncReplication(std::string const \&, std::string const \&, std::string const \&, google::cloud::cpp::compute::v1::DisksStartAsyncReplicationRequest const \&, Options)

Starts asynchronous replication.
Must be invoked on the primary disk. <https://cloud.google.com/compute/docs/reference/rest/v1/disks/startAsyncReplication>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `zone` | `std::string const &` The name of the zone for this request. |
| `disk` | `std::string const &` The name of the persistent disk. |
| `disks_start_async_replication_request_resource` | `google::cloud::cpp::compute::v1::DisksStartAsyncReplicationRequest const &` The DisksStartAsyncReplicationRequest 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### StartAsyncReplication(NoAwaitTag, std::string const \&, std::string const \&, std::string const \&, google::cloud::cpp::compute::v1::DisksStartAsyncReplicationRequest const \&, Options)

Starts asynchronous replication.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `zone` | `std::string const &` |
| `disk` | `std::string const &` |
| `disks_start_async_replication_request_resource` | `google::cloud::cpp::compute::v1::DisksStartAsyncReplicationRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### StartAsyncReplication(google::cloud::cpp::compute::disks::v1::StartAsyncReplicationRequest const \&, Options)

Starts asynchronous replication.
Must be invoked on the primary disk. <https://cloud.google.com/compute/docs/reference/rest/v1/disks/startAsyncReplication>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::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.disks.v1.StartAsyncReplicationRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/disks/v1/disks.proto#L925). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### StartAsyncReplication(NoAwaitTag, google::cloud::cpp::compute::disks::v1::StartAsyncReplicationRequest const \&, Options)

Starts asynchronous replication.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::disks::v1::StartAsyncReplicationRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### StartAsyncReplication(google::cloud::cpp::compute::v1::Operation const \&, Options)

Starts asynchronous replication.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |

### 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/disks/stopAsyncReplication>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `zone` | `std::string const &` The name of the zone 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### StopAsyncReplication(NoAwaitTag, std::string const \&, std::string const \&, std::string const \&, Options)

Stops asynchronous replication.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `zone` | `std::string const &` |
| `disk` | `std::string const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### StopAsyncReplication(google::cloud::cpp::compute::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/disks/stopAsyncReplication>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::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.disks.v1.StopAsyncReplicationRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/disks/v1/disks.proto#L965). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### StopAsyncReplication(NoAwaitTag, google::cloud::cpp::compute::disks::v1::StopAsyncReplicationRequest const \&, Options)

Stops asynchronous replication.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::disks::v1::StopAsyncReplicationRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### StopAsyncReplication(google::cloud::cpp::compute::v1::Operation const \&, Options)

Stops asynchronous replication.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |

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

Stops asynchronous replication for a consistency group of disks.
Can be invoked either in the primary or secondary scope. <https://cloud.google.com/compute/docs/reference/rest/v1/disks/stopGroupAsyncReplication>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `zone` | `std::string const &` The name of the zone for this request. This must be the zone 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

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

Stops asynchronous replication for a consistency group of disks.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `zone` | `std::string const &` |
| `disks_stop_group_async_replication_resource` | `google::cloud::cpp::compute::v1::DisksStopGroupAsyncReplicationResource const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### StopGroupAsyncReplication(google::cloud::cpp::compute::disks::v1::StopGroupAsyncReplicationRequest const \&, Options)

Stops asynchronous replication for a consistency group of disks.
Can be invoked either in the primary or secondary scope. <https://cloud.google.com/compute/docs/reference/rest/v1/disks/stopGroupAsyncReplication>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::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.disks.v1.StopGroupAsyncReplicationRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/disks/v1/disks.proto#L1000). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### StopGroupAsyncReplication(NoAwaitTag, google::cloud::cpp::compute::disks::v1::StopGroupAsyncReplicationRequest const \&, Options)

Stops asynchronous replication for a consistency group of disks.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::disks::v1::StopGroupAsyncReplicationRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### StopGroupAsyncReplication(google::cloud::cpp::compute::v1::Operation const \&, Options)

Stops asynchronous replication for a consistency group of disks.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |

### 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.
<https://cloud.google.com/compute/docs/reference/rest/v1/disks/testIamPermissions>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `zone` | `std::string const &` The name of the zone 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](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/v1/internal/common_177.proto#L30)) is mapped to a C++ class using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). If the request fails, the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) contains the error details. |

### TestIamPermissions(google::cloud::cpp::compute::disks::v1::TestIamPermissionsRequest const \&, Options)

Returns permissions that a caller has on the specified resource.
<https://cloud.google.com/compute/docs/reference/rest/v1/disks/testIamPermissions>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::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.disks.v1.TestIamPermissionsRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/disks/v1/disks.proto#L1038). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `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](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/v1/internal/common_177.proto#L30)) is mapped to a C++ class using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). If the request fails, the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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)

Updates the specified disk with the data included in the request.
The update is performed only on selected fields included as part of update-mask. <https://cloud.google.com/compute/docs/reference/rest/v1/disks/update>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `zone` | `std::string const &` The name of the zone 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

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

Updates the specified disk with the data included in the request.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `zone` | `std::string const &` |
| `disk` | `std::string const &` |
| `update_mask` | `std::string const &` |
| `disk_resource` | `google::cloud::cpp::compute::v1::Disk const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### UpdateDisk(google::cloud::cpp::compute::disks::v1::UpdateDiskRequest const \&, Options)

Updates the specified disk with the data included in the request.
The update is performed only on selected fields included as part of update-mask. <https://cloud.google.com/compute/docs/reference/rest/v1/disks/update>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::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.disks.v1.UpdateDiskRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/disks/v1/disks.proto#L1056). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### UpdateDisk(NoAwaitTag, google::cloud::cpp::compute::disks::v1::UpdateDiskRequest const \&, Options)

Updates the specified disk with the data included in the request.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::disks::v1::UpdateDiskRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### UpdateDisk(google::cloud::cpp::compute::v1::Operation const \&, Options)

Updates the specified disk with the data included in the request.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |

### UpdateKmsKey(std::string const \&, std::string const \&, std::string const \&, google::cloud::cpp::compute::v1::DiskUpdateKmsKeyRequest const \&, Options)

Rotates the customer-managed encryption key to the latest version for the specified persistent disk.
<https://cloud.google.com/compute/docs/reference/rest/v1/disks/updateKmsKey>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `zone` | `std::string const &` The name of the zone for this request. |
| `disk` | `std::string const &` Name of the Disk resource, should conform to RFC1035. |
| `disk_update_kms_key_request_resource` | `google::cloud::cpp::compute::v1::DiskUpdateKmsKeyRequest const &` The DiskUpdateKmsKeyRequest 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### UpdateKmsKey(NoAwaitTag, std::string const \&, std::string const \&, std::string const \&, google::cloud::cpp::compute::v1::DiskUpdateKmsKeyRequest const \&, Options)

Rotates the customer-managed encryption key to the latest version for the specified persistent disk.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `zone` | `std::string const &` |
| `disk` | `std::string const &` |
| `disk_update_kms_key_request_resource` | `google::cloud::cpp::compute::v1::DiskUpdateKmsKeyRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### UpdateKmsKey(google::cloud::cpp::compute::disks::v1::UpdateKmsKeyRequest const \&, Options)

Rotates the customer-managed encryption key to the latest version for the specified persistent disk.
<https://cloud.google.com/compute/docs/reference/rest/v1/disks/updateKmsKey>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::disks::v1::UpdateKmsKeyRequest 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.disks.v1.UpdateKmsKeyRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/disks/v1/disks.proto#L1100). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) 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`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) 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](https://protobuf.dev/reference/cpp/cpp-generated/). |

### UpdateKmsKey(NoAwaitTag, google::cloud::cpp::compute::disks::v1::UpdateKmsKeyRequest const \&, Options)

Rotates the customer-managed encryption key to the latest version for the specified persistent disk.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::disks::v1::UpdateKmsKeyRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### UpdateKmsKey(google::cloud::cpp::compute::v1::Operation const \&, Options)

Rotates the customer-managed encryption key to the latest version for the specified persistent disk.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |