Class ProjectsClient (2.32.0-rc)

Service for the projects resource.

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

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

ProjectsClient(ProjectsClient const &)

Copy and move support

Parameter
Name Description
ProjectsClient const &

ProjectsClient(ProjectsClient &&)

Copy and move support

Parameter
Name Description
ProjectsClient &&

ProjectsClient(std::shared_ptr< ProjectsConnection >, Options)

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

Operators

operator=(ProjectsClient const &)

Copy and move support

Parameter
Name Description
ProjectsClient const &
Returns
Type Description
ProjectsClient &

operator=(ProjectsClient &&)

Copy and move support

Parameter
Name Description
ProjectsClient &&
Returns
Type Description
ProjectsClient &

Functions

DisableXpnHost(std::string const &, Options)

Disable this project as a shared VPC host project.

Parameters
Name Description
project std::string const &

Project ID for this request.

opts Options

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

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

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

DisableXpnHost(NoAwaitTag, std::string const &, Options)

Disable this project as a shared VPC host project.

Specifying the NoAwaitTag 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 &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

DisableXpnHost(google::cloud::cpp::compute::projects::v1::DisableXpnHostRequest const &, Options)

Disable this project as a shared VPC host project.

Parameters
Name Description
request google::cloud::cpp::compute::projects::v1::DisableXpnHostRequest 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.projects.v1.DisableXpnHostRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

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

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

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

DisableXpnHost(NoAwaitTag, google::cloud::cpp::compute::projects::v1::DisableXpnHostRequest const &, Options)

Disable this project as a shared VPC host project.

Specifying the NoAwaitTag 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::projects::v1::DisableXpnHostRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

DisableXpnHost(google::cloud::cpp::compute::v1::Operation const &, Options)

Disable this project as a shared VPC host project.

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

DisableXpnResource(std::string const &, google::cloud::cpp::compute::v1::ProjectsDisableXpnResourceRequest const &, Options)

Disable a service resource (also known as service project) associated with this host project.

Parameters
Name Description
project std::string const &

Project ID for this request.

projects_disable_xpn_resource_request_resource google::cloud::cpp::compute::v1::ProjectsDisableXpnResourceRequest const &

The ProjectsDisableXpnResourceRequest for this request.

opts Options

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

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

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

DisableXpnResource(NoAwaitTag, std::string const &, google::cloud::cpp::compute::v1::ProjectsDisableXpnResourceRequest const &, Options)

Disable a service resource (also known as service project) associated with this host project.

Specifying the NoAwaitTag 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 &
projects_disable_xpn_resource_request_resource google::cloud::cpp::compute::v1::ProjectsDisableXpnResourceRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

DisableXpnResource(google::cloud::cpp::compute::projects::v1::DisableXpnResourceRequest const &, Options)

Disable a service resource (also known as service project) associated with this host project.

Parameters
Name Description
request google::cloud::cpp::compute::projects::v1::DisableXpnResourceRequest 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.projects.v1.DisableXpnResourceRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

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

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

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

DisableXpnResource(NoAwaitTag, google::cloud::cpp::compute::projects::v1::DisableXpnResourceRequest const &, Options)

Disable a service resource (also known as service project) associated with this host project.

Specifying the NoAwaitTag 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::projects::v1::DisableXpnResourceRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

DisableXpnResource(google::cloud::cpp::compute::v1::Operation const &, Options)

Disable a service resource (also known as service project) associated with this host project.

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

EnableXpnHost(std::string const &, Options)

Enable this project as a shared VPC host project.

Parameters
Name Description
project std::string const &

Project ID for this request.

opts Options

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

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

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

EnableXpnHost(NoAwaitTag, std::string const &, Options)

Enable this project as a shared VPC host project.

Specifying the NoAwaitTag 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 &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

EnableXpnHost(google::cloud::cpp::compute::projects::v1::EnableXpnHostRequest const &, Options)

Enable this project as a shared VPC host project.

Parameters
Name Description
request google::cloud::cpp::compute::projects::v1::EnableXpnHostRequest 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.projects.v1.EnableXpnHostRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

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

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

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

EnableXpnHost(NoAwaitTag, google::cloud::cpp::compute::projects::v1::EnableXpnHostRequest const &, Options)

Enable this project as a shared VPC host project.

Specifying the NoAwaitTag 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::projects::v1::EnableXpnHostRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

EnableXpnHost(google::cloud::cpp::compute::v1::Operation const &, Options)

Enable this project as a shared VPC host project.

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

EnableXpnResource(std::string const &, google::cloud::cpp::compute::v1::ProjectsEnableXpnResourceRequest const &, Options)

Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.

Parameters
Name Description
project std::string const &

Project ID for this request.

projects_enable_xpn_resource_request_resource google::cloud::cpp::compute::v1::ProjectsEnableXpnResourceRequest const &

The ProjectsEnableXpnResourceRequest for this request.

opts Options

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

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

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

EnableXpnResource(NoAwaitTag, std::string const &, google::cloud::cpp::compute::v1::ProjectsEnableXpnResourceRequest const &, Options)

Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.

Specifying the NoAwaitTag 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 &
projects_enable_xpn_resource_request_resource google::cloud::cpp::compute::v1::ProjectsEnableXpnResourceRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

EnableXpnResource(google::cloud::cpp::compute::projects::v1::EnableXpnResourceRequest const &, Options)

Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.

Parameters
Name Description
request google::cloud::cpp::compute::projects::v1::EnableXpnResourceRequest 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.projects.v1.EnableXpnResourceRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

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

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

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

EnableXpnResource(NoAwaitTag, google::cloud::cpp::compute::projects::v1::EnableXpnResourceRequest const &, Options)

Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.

Specifying the NoAwaitTag 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::projects::v1::EnableXpnResourceRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

EnableXpnResource(google::cloud::cpp::compute::v1::Operation const &, Options)

Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.

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

GetProject(std::string const &, Options)

Returns the specified Project resource.

To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the quotas field). To exclude one or more fields, set your request's fields query parameter to only include the fields you need. For example, to only include the id and selfLink fields, add the query parameter ?fields=id,selfLink to your request. https://cloud.google.com/compute/docs/reference/rest/v1/projects/get

Parameters
Name Description
project std::string const &

Project ID 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::Project >

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

GetProject(google::cloud::cpp::compute::projects::v1::GetProjectRequest const &, Options)

Returns the specified Project resource.

To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the quotas field). To exclude one or more fields, set your request's fields query parameter to only include the fields you need. For example, to only include the id and selfLink fields, add the query parameter ?fields=id,selfLink to your request. https://cloud.google.com/compute/docs/reference/rest/v1/projects/get

Parameters
Name Description
request google::cloud::cpp::compute::projects::v1::GetProjectRequest 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.projects.v1.GetProjectRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

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

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

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

GetXpnHost(std::string const &, Options)

Gets the shared VPC host project that this project links to.

Parameters
Name Description
project std::string const &

Project ID 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::Project >

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

GetXpnHost(google::cloud::cpp::compute::projects::v1::GetXpnHostRequest const &, Options)

Gets the shared VPC host project that this project links to.

Parameters
Name Description
request google::cloud::cpp::compute::projects::v1::GetXpnHostRequest 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.projects.v1.GetXpnHostRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

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

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

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

GetXpnResources(std::string const &, Options)

Gets service resources (a.k.a service project) associated with this host project.

Parameters
Name Description
project std::string const &

Project ID 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::ProjectsGetXpnResources >

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

GetXpnResources(google::cloud::cpp::compute::projects::v1::GetXpnResourcesRequest const &, Options)

Gets service resources (a.k.a service project) associated with this host project.

Parameters
Name Description
request google::cloud::cpp::compute::projects::v1::GetXpnResourcesRequest 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.projects.v1.GetXpnResourcesRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

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

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

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

ListXpnHosts(std::string const &, google::cloud::cpp::compute::v1::ProjectsListXpnHostsRequest const &, Options)

Lists all shared VPC host projects visible to the user in an organization.

Parameters
Name Description
project std::string const &

Project ID for this request.

projects_list_xpn_hosts_request_resource google::cloud::cpp::compute::v1::ProjectsListXpnHostsRequest const &

The ProjectsListXpnHostsRequest 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::Project >

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

ListXpnHosts(google::cloud::cpp::compute::projects::v1::ListXpnHostsRequest, Options)

Lists all shared VPC host projects visible to the user in an organization.

Parameters
Name Description
request google::cloud::cpp::compute::projects::v1::ListXpnHostsRequest

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.projects.v1.ListXpnHostsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

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

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

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

MoveDisk(std::string const &, google::cloud::cpp::compute::v1::DiskMoveRequest const &, Options)

Moves a persistent disk from one zone to another.

Parameters
Name Description
project std::string const &

Project ID for this request.

disk_move_request_resource google::cloud::cpp::compute::v1::DiskMoveRequest const &

The DiskMoveRequest for this request.

opts Options

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

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

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

MoveDisk(NoAwaitTag, std::string const &, google::cloud::cpp::compute::v1::DiskMoveRequest const &, Options)

Moves a persistent disk from one zone to another.

Specifying the NoAwaitTag 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 &
disk_move_request_resource google::cloud::cpp::compute::v1::DiskMoveRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

MoveDisk(google::cloud::cpp::compute::projects::v1::MoveDiskRequest const &, Options)

Moves a persistent disk from one zone to another.

Parameters
Name Description
request google::cloud::cpp::compute::projects::v1::MoveDiskRequest 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.projects.v1.MoveDiskRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

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

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

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

MoveDisk(NoAwaitTag, google::cloud::cpp::compute::projects::v1::MoveDiskRequest const &, Options)

Moves a persistent disk from one zone to another.

Specifying the NoAwaitTag 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::projects::v1::MoveDiskRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

MoveDisk(google::cloud::cpp::compute::v1::Operation const &, Options)

Moves a persistent disk from one zone to another.

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

MoveInstance(std::string const &, google::cloud::cpp::compute::v1::InstanceMoveRequest const &, Options)

Moves an instance and its attached persistent disks from one zone to another.

Note: Moving VMs or disks by using this method might cause unexpected behavior. For more information, see the known issue. [Deprecated] This method is deprecated. See moving instance across zones instead. https://cloud.google.com/compute/docs/reference/rest/v1/projects/moveInstance

Parameters
Name Description
project std::string const &

Project ID for this request.

instance_move_request_resource google::cloud::cpp::compute::v1::InstanceMoveRequest const &

The InstanceMoveRequest for this request.

opts Options

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

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

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

MoveInstance(NoAwaitTag, std::string const &, google::cloud::cpp::compute::v1::InstanceMoveRequest const &, Options)

Moves an instance and its attached persistent disks from one zone to another.

Specifying the NoAwaitTag 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 &
instance_move_request_resource google::cloud::cpp::compute::v1::InstanceMoveRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

MoveInstance(google::cloud::cpp::compute::projects::v1::MoveInstanceRequest const &, Options)

Moves an instance and its attached persistent disks from one zone to another.

Note: Moving VMs or disks by using this method might cause unexpected behavior. For more information, see the known issue. [Deprecated] This method is deprecated. See moving instance across zones instead. https://cloud.google.com/compute/docs/reference/rest/v1/projects/moveInstance

Parameters
Name Description
request google::cloud::cpp::compute::projects::v1::MoveInstanceRequest 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.projects.v1.MoveInstanceRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

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

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

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

MoveInstance(NoAwaitTag, google::cloud::cpp::compute::projects::v1::MoveInstanceRequest const &, Options)

Moves an instance and its attached persistent disks from one zone to another.

Specifying the NoAwaitTag 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::projects::v1::MoveInstanceRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

MoveInstance(google::cloud::cpp::compute::v1::Operation const &, Options)

Moves an instance and its attached persistent disks from one zone to another.

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

SetCloudArmorTier(std::string const &, google::cloud::cpp::compute::v1::ProjectsSetCloudArmorTierRequest const &, Options)

Sets the Cloud Armor tier of the project.

To set ENTERPRISE or above the billing account of the project must be subscribed to Cloud Armor Enterprise. See Subscribing to Cloud Armor Enterprise for more information. https://cloud.google.com/compute/docs/reference/rest/v1/projects/setCloudArmorTier

Parameters
Name Description
project std::string const &

Project ID for this request.

projects_set_cloud_armor_tier_request_resource google::cloud::cpp::compute::v1::ProjectsSetCloudArmorTierRequest const &

The ProjectsSetCloudArmorTierRequest for this request.

opts Options

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

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

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

SetCloudArmorTier(NoAwaitTag, std::string const &, google::cloud::cpp::compute::v1::ProjectsSetCloudArmorTierRequest const &, Options)

Sets the Cloud Armor tier of the project.

Specifying the NoAwaitTag 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 &
projects_set_cloud_armor_tier_request_resource google::cloud::cpp::compute::v1::ProjectsSetCloudArmorTierRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

SetCloudArmorTier(google::cloud::cpp::compute::projects::v1::SetCloudArmorTierRequest const &, Options)

Sets the Cloud Armor tier of the project.

To set ENTERPRISE or above the billing account of the project must be subscribed to Cloud Armor Enterprise. See Subscribing to Cloud Armor Enterprise for more information. https://cloud.google.com/compute/docs/reference/rest/v1/projects/setCloudArmorTier

Parameters
Name Description
request google::cloud::cpp::compute::projects::v1::SetCloudArmorTierRequest 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.projects.v1.SetCloudArmorTierRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

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

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

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

SetCloudArmorTier(NoAwaitTag, google::cloud::cpp::compute::projects::v1::SetCloudArmorTierRequest const &, Options)

Sets the Cloud Armor tier of the project.

Specifying the NoAwaitTag 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::projects::v1::SetCloudArmorTierRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

SetCloudArmorTier(google::cloud::cpp::compute::v1::Operation const &, Options)

Sets the Cloud Armor tier of the project.

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

SetCommonInstanceMetadata(std::string const &, google::cloud::cpp::compute::v1::Metadata const &, Options)

Sets metadata common to all instances within the specified project using the data included in the request.

Parameters
Name Description
project std::string const &

Project ID for this request.

metadata_resource google::cloud::cpp::compute::v1::Metadata const &

The Metadata for this request.

opts Options

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

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

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

SetCommonInstanceMetadata(NoAwaitTag, std::string const &, google::cloud::cpp::compute::v1::Metadata const &, Options)

Sets metadata common to all instances within the specified project using the data included in the request.

Specifying the NoAwaitTag 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 &
metadata_resource google::cloud::cpp::compute::v1::Metadata const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

SetCommonInstanceMetadata(google::cloud::cpp::compute::projects::v1::SetCommonInstanceMetadataRequest const &, Options)

Sets metadata common to all instances within the specified project using the data included in the request.

Parameters
Name Description
request google::cloud::cpp::compute::projects::v1::SetCommonInstanceMetadataRequest 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.projects.v1.SetCommonInstanceMetadataRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

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

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

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

SetCommonInstanceMetadata(NoAwaitTag, google::cloud::cpp::compute::projects::v1::SetCommonInstanceMetadataRequest const &, Options)

Sets metadata common to all instances within the specified project using the data included in the request.

Specifying the NoAwaitTag 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::projects::v1::SetCommonInstanceMetadataRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

SetCommonInstanceMetadata(google::cloud::cpp::compute::v1::Operation const &, Options)

Sets metadata common to all instances within the specified project using 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 > >

SetDefaultNetworkTier(std::string const &, google::cloud::cpp::compute::v1::ProjectsSetDefaultNetworkTierRequest const &, Options)

Sets the default network tier of the project.

The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field. https://cloud.google.com/compute/docs/reference/rest/v1/projects/setDefaultNetworkTier

Parameters
Name Description
project std::string const &

Project ID for this request.

projects_set_default_network_tier_request_resource google::cloud::cpp::compute::v1::ProjectsSetDefaultNetworkTierRequest const &

The ProjectsSetDefaultNetworkTierRequest for this request.

opts Options

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

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

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

SetDefaultNetworkTier(NoAwaitTag, std::string const &, google::cloud::cpp::compute::v1::ProjectsSetDefaultNetworkTierRequest const &, Options)

Sets the default network tier of the project.

Specifying the NoAwaitTag 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 &
projects_set_default_network_tier_request_resource google::cloud::cpp::compute::v1::ProjectsSetDefaultNetworkTierRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

SetDefaultNetworkTier(google::cloud::cpp::compute::projects::v1::SetDefaultNetworkTierRequest const &, Options)

Sets the default network tier of the project.

The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field. https://cloud.google.com/compute/docs/reference/rest/v1/projects/setDefaultNetworkTier

Parameters
Name Description
request google::cloud::cpp::compute::projects::v1::SetDefaultNetworkTierRequest 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.projects.v1.SetDefaultNetworkTierRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

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

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

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

SetDefaultNetworkTier(NoAwaitTag, google::cloud::cpp::compute::projects::v1::SetDefaultNetworkTierRequest const &, Options)

Sets the default network tier of the project.

Specifying the NoAwaitTag 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::projects::v1::SetDefaultNetworkTierRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

SetDefaultNetworkTier(google::cloud::cpp::compute::v1::Operation const &, Options)

Sets the default network tier of the project.

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

SetUsageExportBucket(std::string const &, google::cloud::cpp::compute::v1::UsageExportLocation const &, Options)

Enables the usage export feature and sets the usage export bucket where reports are stored.

If you provide an empty request body using this method, the usage export feature will be disabled. https://cloud.google.com/compute/docs/reference/rest/v1/projects/setUsageExportBucket

Parameters
Name Description
project std::string const &

Project ID for this request.

usage_export_location_resource google::cloud::cpp::compute::v1::UsageExportLocation const &

The UsageExportLocation for this request.

opts Options

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

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

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

SetUsageExportBucket(NoAwaitTag, std::string const &, google::cloud::cpp::compute::v1::UsageExportLocation const &, Options)

Enables the usage export feature and sets the usage export bucket where reports are stored.

Specifying the NoAwaitTag 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 &
usage_export_location_resource google::cloud::cpp::compute::v1::UsageExportLocation const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

SetUsageExportBucket(google::cloud::cpp::compute::projects::v1::SetUsageExportBucketRequest const &, Options)

Enables the usage export feature and sets the usage export bucket where reports are stored.

If you provide an empty request body using this method, the usage export feature will be disabled. https://cloud.google.com/compute/docs/reference/rest/v1/projects/setUsageExportBucket

Parameters
Name Description
request google::cloud::cpp::compute::projects::v1::SetUsageExportBucketRequest 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.projects.v1.SetUsageExportBucketRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

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

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

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

SetUsageExportBucket(NoAwaitTag, google::cloud::cpp::compute::projects::v1::SetUsageExportBucketRequest const &, Options)

Enables the usage export feature and sets the usage export bucket where reports are stored.

Specifying the NoAwaitTag 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::projects::v1::SetUsageExportBucketRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

SetUsageExportBucket(google::cloud::cpp::compute::v1::Operation const &, Options)

Enables the usage export feature and sets the usage export bucket where reports are stored.

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