Class ProjectsClient (2.16.0)

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

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

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

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

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

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

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

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

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