Class InstancesClient (2.30.0)

Service for the instances resource.

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

Equality

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

Performance

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

Thread Safety

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

Constructors

InstancesClient(InstancesClient const &)

Copy and move support

Parameter
Name Description
InstancesClient const &

InstancesClient(InstancesClient &&)

Copy and move support

Parameter
Name Description
InstancesClient &&

InstancesClient(std::shared_ptr< InstancesConnection >, Options)

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

Operators

operator=(InstancesClient const &)

Copy and move support

Parameter
Name Description
InstancesClient const &
Returns
Type Description
InstancesClient &

operator=(InstancesClient &&)

Copy and move support

Parameter
Name Description
InstancesClient &&
Returns
Type Description
InstancesClient &

Functions

AddAccessConfig(std::string const &, std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::AccessConfig const &, Options)

Adds an access config to an instance's network interface.

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

The instance name for this request.

network_interface std::string const &

The name of the network interface to add to this instance.

access_config_resource google::cloud::cpp::compute::v1::AccessConfig const &

The AccessConfig 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.

AddAccessConfig(NoAwaitTag, std::string const &, std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::AccessConfig const &, Options)

Adds an access config to an instance's network interface.

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 &
zone std::string const &
instance std::string const &
network_interface std::string const &
access_config_resource google::cloud::cpp::compute::v1::AccessConfig const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

AddAccessConfig(google::cloud::cpp::compute::instances::v1::AddAccessConfigRequest const &, Options)

Adds an access config to an instance's network interface.

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::AddAccessConfigRequest 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.instances.v1.AddAccessConfigRequest. 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.

AddAccessConfig(NoAwaitTag, google::cloud::cpp::compute::instances::v1::AddAccessConfigRequest const &, Options)

Adds an access config to an instance's network interface.

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::instances::v1::AddAccessConfigRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Adds an access config to an instance's network interface.

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

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

Adds existing resource policies to an instance.

You can only add one policy right now which will be applied to this instance for scheduling live migrations. https://cloud.google.com/compute/docs/reference/rest/v1/instances/addResourcePolicies

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

The instance name for this request.

instances_add_resource_policies_request_resource google::cloud::cpp::compute::v1::InstancesAddResourcePoliciesRequest const &

The InstancesAddResourcePoliciesRequest for this request.

opts Options

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

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

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

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

Adds existing resource policies to an instance.

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 &
zone std::string const &
instance std::string const &
instances_add_resource_policies_request_resource google::cloud::cpp::compute::v1::InstancesAddResourcePoliciesRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Adds existing resource policies to an instance.

You can only add one policy right now which will be applied to this instance for scheduling live migrations. https://cloud.google.com/compute/docs/reference/rest/v1/instances/addResourcePolicies

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

opts Options

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

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

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

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

Adds existing resource policies to an instance.

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::instances::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 an instance.

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

AggregatedListInstances(std::string const &, Options)

Retrieves an aggregated list of all of the instances in your project across all regions and zones.

The performance of this method degrades when a filter is specified on a project that has a very large number of instances. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true. https://cloud.google.com/compute/docs/reference/rest/v1/instances/aggregatedList

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
StreamRange< std::pair< std::string, google::cloud::cpp::compute::v1::InstancesScopedList > >

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.InstancesScopedList, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

AggregatedListInstances(google::cloud::cpp::compute::instances::v1::AggregatedListInstancesRequest, Options)

Retrieves an aggregated list of all of the instances in your project across all regions and zones.

The performance of this method degrades when a filter is specified on a project that has a very large number of instances. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true. https://cloud.google.com/compute/docs/reference/rest/v1/instances/aggregatedList

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::AggregatedListInstancesRequest

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.instances.v1.AggregatedListInstancesRequest. 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< std::pair< std::string, google::cloud::cpp::compute::v1::InstancesScopedList > >

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.InstancesScopedList, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

AttachDisk(std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::AttachedDisk const &, Options)

Attaches an existing Disk resource to an instance.

You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance. https://cloud.google.com/compute/docs/reference/rest/v1/instances/attachDisk

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

The instance name for this request.

attached_disk_resource google::cloud::cpp::compute::v1::AttachedDisk const &

The AttachedDisk 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.

AttachDisk(NoAwaitTag, std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::AttachedDisk const &, Options)

Attaches an existing Disk resource to an instance.

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 &
zone std::string const &
instance std::string const &
attached_disk_resource google::cloud::cpp::compute::v1::AttachedDisk const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

AttachDisk(google::cloud::cpp::compute::instances::v1::AttachDiskRequest const &, Options)

Attaches an existing Disk resource to an instance.

You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance. https://cloud.google.com/compute/docs/reference/rest/v1/instances/attachDisk

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::AttachDiskRequest 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.instances.v1.AttachDiskRequest. 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.

AttachDisk(NoAwaitTag, google::cloud::cpp::compute::instances::v1::AttachDiskRequest const &, Options)

Attaches an existing Disk resource to an instance.

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::instances::v1::AttachDiskRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Attaches an existing Disk resource to an instance.

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

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

Creates multiple instances.

Count specifies the number of instances to create. For more information, see About bulk creation of VMs. https://cloud.google.com/compute/docs/reference/rest/v1/instances/bulkInsert

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

bulk_insert_instance_resource google::cloud::cpp::compute::v1::BulkInsertInstanceResource const &

The BulkInsertInstanceResource for this request.

opts Options

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

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

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

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

Creates multiple instances.

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 &
zone std::string const &
bulk_insert_instance_resource google::cloud::cpp::compute::v1::BulkInsertInstanceResource const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Creates multiple instances.

Count specifies the number of instances to create. For more information, see About bulk creation of VMs. https://cloud.google.com/compute/docs/reference/rest/v1/instances/bulkInsert

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

opts Options

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

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

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

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

Creates multiple instances.

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::instances::v1::BulkInsertRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Creates multiple instances.

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

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

Deletes the specified Instance resource.

For more information, see Deleting an instance. https://cloud.google.com/compute/docs/reference/rest/v1/instances/delete

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance resource to delete.

opts Options

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

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

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

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

Deletes the specified Instance resource.

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 &
zone std::string const &
instance std::string const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

DeleteInstance(google::cloud::cpp::compute::instances::v1::DeleteInstanceRequest const &, Options)

Deletes the specified Instance resource.

For more information, see Deleting an instance. https://cloud.google.com/compute/docs/reference/rest/v1/instances/delete

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::DeleteInstanceRequest 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.instances.v1.DeleteInstanceRequest. 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.

DeleteInstance(NoAwaitTag, google::cloud::cpp::compute::instances::v1::DeleteInstanceRequest const &, Options)

Deletes the specified Instance resource.

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::instances::v1::DeleteInstanceRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Deletes the specified Instance resource.

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

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

Deletes an access config from an instance's network interface.

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

The instance name for this request.

access_config std::string const &

The name of the access config to delete.

network_interface std::string const &

The name of the network interface.

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.

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

Deletes an access config from an instance's network interface.

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 &
zone std::string const &
instance std::string const &
access_config std::string const &
network_interface std::string const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

DeleteAccessConfig(google::cloud::cpp::compute::instances::v1::DeleteAccessConfigRequest const &, Options)

Deletes an access config from an instance's network interface.

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::DeleteAccessConfigRequest 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.instances.v1.DeleteAccessConfigRequest. 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.

DeleteAccessConfig(NoAwaitTag, google::cloud::cpp::compute::instances::v1::DeleteAccessConfigRequest const &, Options)

Deletes an access config from an instance's network interface.

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::instances::v1::DeleteAccessConfigRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Deletes an access config from an instance's network interface.

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

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

Detaches a disk from an instance.

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Instance name for this request.

device_name std::string const &

The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names.

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.

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

Detaches a disk from an instance.

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 &
zone std::string const &
instance std::string const &
device_name std::string const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

DetachDisk(google::cloud::cpp::compute::instances::v1::DetachDiskRequest const &, Options)

Detaches a disk from an instance.

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::DetachDiskRequest 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.instances.v1.DetachDiskRequest. 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.

DetachDisk(NoAwaitTag, google::cloud::cpp::compute::instances::v1::DetachDiskRequest const &, Options)

Detaches a disk from an instance.

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::instances::v1::DetachDiskRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Detaches a disk from an instance.

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

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

Returns the specified Instance resource.

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance resource 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::Instance >

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

GetInstance(google::cloud::cpp::compute::instances::v1::GetInstanceRequest const &, Options)

Returns the specified Instance resource.

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::GetInstanceRequest 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.instances.v1.GetInstanceRequest. 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::Instance >

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

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

Returns effective firewalls applied to an interface of the instance.

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance scoping this request.

network_interface std::string const &

The name of the network interface to get the effective firewalls.

opts Options

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

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

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

GetEffectiveFirewalls(google::cloud::cpp::compute::instances::v1::GetEffectiveFirewallsRequest const &, Options)

Returns effective firewalls applied to an interface of the instance.

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::GetEffectiveFirewallsRequest 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.instances.v1.GetEffectiveFirewallsRequest. 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::InstancesGetEffectiveFirewallsResponse >

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

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

Returns the specified guest attributes entry.

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance scoping 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::GuestAttributes >

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

GetGuestAttributes(google::cloud::cpp::compute::instances::v1::GetGuestAttributesRequest const &, Options)

Returns the specified guest attributes entry.

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::GetGuestAttributesRequest 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.instances.v1.GetGuestAttributesRequest. 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::GuestAttributes >

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

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

Gets the access control policy for a resource.

May be empty if no such policy or resource exists. https://cloud.google.com/compute/docs/reference/rest/v1/instances/getIamPolicy

Parameters
Name Description
project std::string const &

Project 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) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetIamPolicy(google::cloud::cpp::compute::instances::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/instances/getIamPolicy

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

opts Options

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

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

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

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

Returns the screenshot from the specified instance.

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance scoping 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::Screenshot >

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

GetScreenshot(google::cloud::cpp::compute::instances::v1::GetScreenshotRequest const &, Options)

Returns the screenshot from the specified instance.

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::GetScreenshotRequest 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.instances.v1.GetScreenshotRequest. 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::Screenshot >

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

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

Returns the last 1 MB of serial port output from the specified instance.

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance 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::SerialPortOutput >

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

GetSerialPortOutput(google::cloud::cpp::compute::instances::v1::GetSerialPortOutputRequest const &, Options)

Returns the last 1 MB of serial port output from the specified instance.

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::GetSerialPortOutputRequest 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.instances.v1.GetSerialPortOutputRequest. 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::SerialPortOutput >

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

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

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name or id of the instance scoping 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::ShieldedInstanceIdentity >

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

GetShieldedInstanceIdentity(google::cloud::cpp::compute::instances::v1::GetShieldedInstanceIdentityRequest const &, Options)

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::GetShieldedInstanceIdentityRequest 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.instances.v1.GetShieldedInstanceIdentityRequest. 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::ShieldedInstanceIdentity >

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

InsertInstance(std::string const &, std::string const &, google::cloud::cpp::compute::v1::Instance const &, Options)

Creates an instance resource in the specified project using the data included in the request.

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance_resource google::cloud::cpp::compute::v1::Instance const &

The Instance 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.

InsertInstance(NoAwaitTag, std::string const &, std::string const &, google::cloud::cpp::compute::v1::Instance const &, Options)

Creates an instance resource in 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 &
zone std::string const &
instance_resource google::cloud::cpp::compute::v1::Instance const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

InsertInstance(google::cloud::cpp::compute::instances::v1::InsertInstanceRequest const &, Options)

Creates an instance resource in the specified project using the data included in the request.

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::InsertInstanceRequest 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.instances.v1.InsertInstanceRequest. 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.

InsertInstance(NoAwaitTag, google::cloud::cpp::compute::instances::v1::InsertInstanceRequest const &, Options)

Creates an instance resource in 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::instances::v1::InsertInstanceRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Creates an instance resource in 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 > >

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

Retrieves the list of instances contained within the specified zone.

Parameters
Name Description
project std::string const &

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

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.Instance, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListInstances(google::cloud::cpp::compute::instances::v1::ListInstancesRequest, Options)

Retrieves the list of instances contained within the specified zone.

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::ListInstancesRequest

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.instances.v1.ListInstancesRequest. 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::Instance >

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.Instance, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

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

Retrieves a list of resources that refer to the VM instance specified in the request.

For example, if the VM instance is part of a managed or unmanaged instance group, the referrers list includes the instance group. For more information, read Viewing referrers to VM instances. https://cloud.google.com/compute/docs/reference/rest/v1/instances/listReferrers

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.

opts Options

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

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

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.Reference, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListReferrers(google::cloud::cpp::compute::instances::v1::ListReferrersRequest, Options)

Retrieves a list of resources that refer to the VM instance specified in the request.

For example, if the VM instance is part of a managed or unmanaged instance group, the referrers list includes the instance group. For more information, read Viewing referrers to VM instances. https://cloud.google.com/compute/docs/reference/rest/v1/instances/listReferrers

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::ListReferrersRequest

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.instances.v1.ListReferrersRequest. 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::Reference >

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.Reference, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

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

Perform a manual maintenance on the instance.

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance scoping 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.

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

Perform a manual maintenance on the instance.

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 &
zone std::string const &
instance std::string const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

PerformMaintenance(google::cloud::cpp::compute::instances::v1::PerformMaintenanceRequest const &, Options)

Perform a manual maintenance on the instance.

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::PerformMaintenanceRequest 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.instances.v1.PerformMaintenanceRequest. 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.

PerformMaintenance(NoAwaitTag, google::cloud::cpp::compute::instances::v1::PerformMaintenanceRequest const &, Options)

Perform a manual maintenance on the instance.

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::instances::v1::PerformMaintenanceRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Perform a manual maintenance on the instance.

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

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

Removes resource policies from an instance.

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

The instance name for this request.

instances_remove_resource_policies_request_resource google::cloud::cpp::compute::v1::InstancesRemoveResourcePoliciesRequest const &

The InstancesRemoveResourcePoliciesRequest for this request.

opts Options

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

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

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

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

Removes resource policies from an instance.

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 &
zone std::string const &
instance std::string const &
instances_remove_resource_policies_request_resource google::cloud::cpp::compute::v1::InstancesRemoveResourcePoliciesRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Removes resource policies from an instance.

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

opts Options

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

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

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

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

Removes resource policies from an instance.

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::instances::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 an instance.

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

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

Performs a reset on the instance.

This is a hard reset. The VM does not do a graceful shutdown. For more information, see Resetting an instance. https://cloud.google.com/compute/docs/reference/rest/v1/instances/reset

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance scoping 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.

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

Performs a reset on the instance.

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 &
zone std::string const &
instance std::string const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

Reset(google::cloud::cpp::compute::instances::v1::ResetRequest const &, Options)

Performs a reset on the instance.

This is a hard reset. The VM does not do a graceful shutdown. For more information, see Resetting an instance. https://cloud.google.com/compute/docs/reference/rest/v1/instances/reset

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::ResetRequest 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.instances.v1.ResetRequest. 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.

Reset(NoAwaitTag, google::cloud::cpp::compute::instances::v1::ResetRequest const &, Options)

Performs a reset on the instance.

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::instances::v1::ResetRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Performs a reset on the instance.

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

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

Resumes an instance that was suspended using the instances().suspend method.

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance resource to resume.

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.

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

Resumes an instance that was suspended using the instances().suspend method.

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 &
zone std::string const &
instance std::string const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

Resume(google::cloud::cpp::compute::instances::v1::ResumeRequest const &, Options)

Resumes an instance that was suspended using the instances().suspend method.

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::ResumeRequest 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.instances.v1.ResumeRequest. 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.

Resume(NoAwaitTag, google::cloud::cpp::compute::instances::v1::ResumeRequest const &, Options)

Resumes an instance that was suspended using the instances().suspend method.

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::instances::v1::ResumeRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Resumes an instance that was suspended using the instances().suspend method.

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

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

Sends diagnostic interrupt to the instance.

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance scoping this request.

opts Options

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

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

SendDiagnosticInterrupt(google::cloud::cpp::compute::instances::v1::SendDiagnosticInterruptRequest const &, Options)

Sends diagnostic interrupt to the instance.

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::SendDiagnosticInterruptRequest 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.instances.v1.SendDiagnosticInterruptRequest. 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
Status

a Status object. If the request failed, the status contains the details of the failure.

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

Sets deletion protection on the instance.

Parameters
Name Description
project std::string const &

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

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

Sets deletion protection on the instance.

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 &
zone std::string const &
resource std::string const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

SetDeletionProtection(google::cloud::cpp::compute::instances::v1::SetDeletionProtectionRequest const &, Options)

Sets deletion protection on the instance.

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::SetDeletionProtectionRequest 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.instances.v1.SetDeletionProtectionRequest. 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.

SetDeletionProtection(NoAwaitTag, google::cloud::cpp::compute::instances::v1::SetDeletionProtectionRequest const &, Options)

Sets deletion protection on the instance.

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::instances::v1::SetDeletionProtectionRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Sets deletion protection on the instance.

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

SetDiskAutoDelete(std::string const &, std::string const &, std::string const &, bool, std::string const &, Options)

Sets the auto-delete flag for a disk attached to an instance.

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

The instance name for this request.

auto_delete bool

Whether to auto-delete the disk when the instance is deleted.

device_name std::string const &

The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names.

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.

SetDiskAutoDelete(NoAwaitTag, std::string const &, std::string const &, std::string const &, bool, std::string const &, Options)

Sets the auto-delete flag for a disk attached to an instance.

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 &
zone std::string const &
instance std::string const &
auto_delete bool
device_name std::string const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

SetDiskAutoDelete(google::cloud::cpp::compute::instances::v1::SetDiskAutoDeleteRequest const &, Options)

Sets the auto-delete flag for a disk attached to an instance.

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::SetDiskAutoDeleteRequest 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.instances.v1.SetDiskAutoDeleteRequest. 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.

SetDiskAutoDelete(NoAwaitTag, google::cloud::cpp::compute::instances::v1::SetDiskAutoDeleteRequest const &, Options)

Sets the auto-delete flag for a disk attached to an instance.

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::instances::v1::SetDiskAutoDeleteRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Sets the auto-delete flag for a disk attached to an instance.

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.

Parameters
Name Description
project std::string const &

Project 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) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

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

Sets the access control policy on the specified resource.

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

opts Options

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

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

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

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

Sets labels on an instance.

To learn more about labels, read the Labeling Resources documentation. https://cloud.google.com/compute/docs/reference/rest/v1/instances/setLabels

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance scoping this request.

instances_set_labels_request_resource google::cloud::cpp::compute::v1::InstancesSetLabelsRequest const &

The InstancesSetLabelsRequest for this request.

opts Options

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

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

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

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

Sets labels on an instance.

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 &
zone std::string const &
instance std::string const &
instances_set_labels_request_resource google::cloud::cpp::compute::v1::InstancesSetLabelsRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Sets labels on an instance.

To learn more about labels, read the Labeling Resources documentation. https://cloud.google.com/compute/docs/reference/rest/v1/instances/setLabels

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

opts Options

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

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

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

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

Sets labels on an instance.

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::instances::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 labels on an instance.

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

SetMachineResources(std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::InstancesSetMachineResourcesRequest const &, Options)

Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance scoping this request.

instances_set_machine_resources_request_resource google::cloud::cpp::compute::v1::InstancesSetMachineResourcesRequest const &

The InstancesSetMachineResourcesRequest 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.

SetMachineResources(NoAwaitTag, std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::InstancesSetMachineResourcesRequest const &, Options)

Changes the number and/or type of accelerator for a stopped instance to the values specified 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 &
zone std::string const &
instance std::string const &
instances_set_machine_resources_request_resource google::cloud::cpp::compute::v1::InstancesSetMachineResourcesRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

SetMachineResources(google::cloud::cpp::compute::instances::v1::SetMachineResourcesRequest const &, Options)

Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::SetMachineResourcesRequest 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.instances.v1.SetMachineResourcesRequest. 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.

SetMachineResources(NoAwaitTag, google::cloud::cpp::compute::instances::v1::SetMachineResourcesRequest const &, Options)

Changes the number and/or type of accelerator for a stopped instance to the values specified 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::instances::v1::SetMachineResourcesRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Changes the number and/or type of accelerator for a stopped instance to the values specified 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 > >

SetMachineType(std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::InstancesSetMachineTypeRequest const &, Options)

Changes the machine type for a stopped instance to the machine type specified in the request.

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance scoping this request.

instances_set_machine_type_request_resource google::cloud::cpp::compute::v1::InstancesSetMachineTypeRequest const &

The InstancesSetMachineTypeRequest 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.

SetMachineType(NoAwaitTag, std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::InstancesSetMachineTypeRequest const &, Options)

Changes the machine type for a stopped instance to the machine type specified 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 &
zone std::string const &
instance std::string const &
instances_set_machine_type_request_resource google::cloud::cpp::compute::v1::InstancesSetMachineTypeRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

SetMachineType(google::cloud::cpp::compute::instances::v1::SetMachineTypeRequest const &, Options)

Changes the machine type for a stopped instance to the machine type specified in the request.

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::SetMachineTypeRequest 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.instances.v1.SetMachineTypeRequest. 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.

SetMachineType(NoAwaitTag, google::cloud::cpp::compute::instances::v1::SetMachineTypeRequest const &, Options)

Changes the machine type for a stopped instance to the machine type specified 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::instances::v1::SetMachineTypeRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Changes the machine type for a stopped instance to the machine type specified 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 > >

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

Sets metadata for the specified instance to the data included in the request.

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance scoping 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.

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

Sets metadata for the specified instance to 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 &
zone std::string const &
instance std::string const &
metadata_resource google::cloud::cpp::compute::v1::Metadata const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

SetMetadata(google::cloud::cpp::compute::instances::v1::SetMetadataRequest const &, Options)

Sets metadata for the specified instance to the data included in the request.

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::SetMetadataRequest 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.instances.v1.SetMetadataRequest. 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.

SetMetadata(NoAwaitTag, google::cloud::cpp::compute::instances::v1::SetMetadataRequest const &, Options)

Sets metadata for the specified instance to 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::instances::v1::SetMetadataRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Sets metadata for the specified instance to 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 > >

SetMinCpuPlatform(std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::InstancesSetMinCpuPlatformRequest const &, Options)

Changes the minimum CPU platform that this instance should use.

This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform. https://cloud.google.com/compute/docs/reference/rest/v1/instances/setMinCpuPlatform

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance scoping this request.

instances_set_min_cpu_platform_request_resource google::cloud::cpp::compute::v1::InstancesSetMinCpuPlatformRequest const &

The InstancesSetMinCpuPlatformRequest 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.

SetMinCpuPlatform(NoAwaitTag, std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::InstancesSetMinCpuPlatformRequest const &, Options)

Changes the minimum CPU platform that this instance should use.

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 &
zone std::string const &
instance std::string const &
instances_set_min_cpu_platform_request_resource google::cloud::cpp::compute::v1::InstancesSetMinCpuPlatformRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

SetMinCpuPlatform(google::cloud::cpp::compute::instances::v1::SetMinCpuPlatformRequest const &, Options)

Changes the minimum CPU platform that this instance should use.

This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform. https://cloud.google.com/compute/docs/reference/rest/v1/instances/setMinCpuPlatform

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::SetMinCpuPlatformRequest 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.instances.v1.SetMinCpuPlatformRequest. 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.

SetMinCpuPlatform(NoAwaitTag, google::cloud::cpp::compute::instances::v1::SetMinCpuPlatformRequest const &, Options)

Changes the minimum CPU platform that this instance should use.

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::instances::v1::SetMinCpuPlatformRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Changes the minimum CPU platform that this instance should use.

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

SetName(std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::InstancesSetNameRequest const &, Options)

Sets name of an instance.

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

The instance name for this request.

instances_set_name_request_resource google::cloud::cpp::compute::v1::InstancesSetNameRequest const &

The InstancesSetNameRequest 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.

SetName(NoAwaitTag, std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::InstancesSetNameRequest const &, Options)

Sets name of an instance.

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 &
zone std::string const &
instance std::string const &
instances_set_name_request_resource google::cloud::cpp::compute::v1::InstancesSetNameRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

SetName(google::cloud::cpp::compute::instances::v1::SetNameRequest const &, Options)

Sets name of an instance.

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::SetNameRequest 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.instances.v1.SetNameRequest. 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.

SetName(NoAwaitTag, google::cloud::cpp::compute::instances::v1::SetNameRequest const &, Options)

Sets name of an instance.

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::instances::v1::SetNameRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Sets name of an instance.

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

SetScheduling(std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::Scheduling const &, Options)

Sets an instance's scheduling options.

You can only call this method on a stopped instance, that is, a VM instance that is in a TERMINATED state. See Instance Life Cycle for more information on the possible instance states. For more information about setting scheduling options for a VM, see Set VM host maintenance policy. https://cloud.google.com/compute/docs/reference/rest/v1/instances/setScheduling

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Instance name for this request.

scheduling_resource google::cloud::cpp::compute::v1::Scheduling const &

The Scheduling 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.

SetScheduling(NoAwaitTag, std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::Scheduling const &, Options)

Sets an instance's scheduling options.

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 &
zone std::string const &
instance std::string const &
scheduling_resource google::cloud::cpp::compute::v1::Scheduling const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

SetScheduling(google::cloud::cpp::compute::instances::v1::SetSchedulingRequest const &, Options)

Sets an instance's scheduling options.

You can only call this method on a stopped instance, that is, a VM instance that is in a TERMINATED state. See Instance Life Cycle for more information on the possible instance states. For more information about setting scheduling options for a VM, see Set VM host maintenance policy. https://cloud.google.com/compute/docs/reference/rest/v1/instances/setScheduling

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::SetSchedulingRequest 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.instances.v1.SetSchedulingRequest. 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.

SetScheduling(NoAwaitTag, google::cloud::cpp::compute::instances::v1::SetSchedulingRequest const &, Options)

Sets an instance's scheduling options.

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::instances::v1::SetSchedulingRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Sets an instance's scheduling options.

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

SetSecurityPolicy(std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::InstancesSetSecurityPolicyRequest const &, Options)

Sets the Google Cloud Armor security policy for the specified instance.

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

Name of the zone scoping this request.

instance std::string const &

Name of the Instance resource to which the security policy should be set. The name should conform to RFC1035.

instances_set_security_policy_request_resource google::cloud::cpp::compute::v1::InstancesSetSecurityPolicyRequest const &

The InstancesSetSecurityPolicyRequest 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.

SetSecurityPolicy(NoAwaitTag, std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::InstancesSetSecurityPolicyRequest const &, Options)

Sets the Google Cloud Armor security policy for the specified instance.

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 &
zone std::string const &
instance std::string const &
instances_set_security_policy_request_resource google::cloud::cpp::compute::v1::InstancesSetSecurityPolicyRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

SetSecurityPolicy(google::cloud::cpp::compute::instances::v1::SetSecurityPolicyRequest const &, Options)

Sets the Google Cloud Armor security policy for the specified instance.

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::SetSecurityPolicyRequest 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.instances.v1.SetSecurityPolicyRequest. 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.

SetSecurityPolicy(NoAwaitTag, google::cloud::cpp::compute::instances::v1::SetSecurityPolicyRequest const &, Options)

Sets the Google Cloud Armor security policy for the specified instance.

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::instances::v1::SetSecurityPolicyRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Sets the Google Cloud Armor security policy for the specified instance.

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

SetServiceAccount(std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::InstancesSetServiceAccountRequest const &, Options)

Sets the service account on the instance.

For more information, read Changing the service account and access scopes for an instance. https://cloud.google.com/compute/docs/reference/rest/v1/instances/setServiceAccount

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance resource to start.

instances_set_service_account_request_resource google::cloud::cpp::compute::v1::InstancesSetServiceAccountRequest const &

The InstancesSetServiceAccountRequest 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.

SetServiceAccount(NoAwaitTag, std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::InstancesSetServiceAccountRequest const &, Options)

Sets the service account on the instance.

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 &
zone std::string const &
instance std::string const &
instances_set_service_account_request_resource google::cloud::cpp::compute::v1::InstancesSetServiceAccountRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

SetServiceAccount(google::cloud::cpp::compute::instances::v1::SetServiceAccountRequest const &, Options)

Sets the service account on the instance.

For more information, read Changing the service account and access scopes for an instance. https://cloud.google.com/compute/docs/reference/rest/v1/instances/setServiceAccount

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::SetServiceAccountRequest 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.instances.v1.SetServiceAccountRequest. 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.

SetServiceAccount(NoAwaitTag, google::cloud::cpp::compute::instances::v1::SetServiceAccountRequest const &, Options)

Sets the service account on the instance.

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::instances::v1::SetServiceAccountRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Sets the service account on the instance.

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

SetShieldedInstanceIntegrityPolicy(std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::ShieldedInstanceIntegrityPolicy const &, Options)

Sets the Shielded Instance integrity policy for an instance.

You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. https://cloud.google.com/compute/docs/reference/rest/v1/instances/setShieldedInstanceIntegrityPolicy

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name or id of the instance scoping this request.

shielded_instance_integrity_policy_resource google::cloud::cpp::compute::v1::ShieldedInstanceIntegrityPolicy const &

The ShieldedInstanceIntegrityPolicy 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.

SetShieldedInstanceIntegrityPolicy(NoAwaitTag, std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::ShieldedInstanceIntegrityPolicy const &, Options)

Sets the Shielded Instance integrity policy for an instance.

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 &
zone std::string const &
instance std::string const &
shielded_instance_integrity_policy_resource google::cloud::cpp::compute::v1::ShieldedInstanceIntegrityPolicy const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

SetShieldedInstanceIntegrityPolicy(google::cloud::cpp::compute::instances::v1::SetShieldedInstanceIntegrityPolicyRequest const &, Options)

Sets the Shielded Instance integrity policy for an instance.

You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. https://cloud.google.com/compute/docs/reference/rest/v1/instances/setShieldedInstanceIntegrityPolicy

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::SetShieldedInstanceIntegrityPolicyRequest 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.instances.v1.SetShieldedInstanceIntegrityPolicyRequest. 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.

SetShieldedInstanceIntegrityPolicy(NoAwaitTag, google::cloud::cpp::compute::instances::v1::SetShieldedInstanceIntegrityPolicyRequest const &, Options)

Sets the Shielded Instance integrity policy for an instance.

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::instances::v1::SetShieldedInstanceIntegrityPolicyRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Sets the Shielded Instance integrity policy for an instance.

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

SetTags(std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::Tags const &, Options)

Sets network tags for the specified instance to the data included in the request.

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance scoping this request.

tags_resource google::cloud::cpp::compute::v1::Tags const &

The Tags 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.

SetTags(NoAwaitTag, std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::Tags const &, Options)

Sets network tags for the specified instance to 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 &
zone std::string const &
instance std::string const &
tags_resource google::cloud::cpp::compute::v1::Tags const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

SetTags(google::cloud::cpp::compute::instances::v1::SetTagsRequest const &, Options)

Sets network tags for the specified instance to the data included in the request.

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::SetTagsRequest 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.instances.v1.SetTagsRequest. 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.

SetTags(NoAwaitTag, google::cloud::cpp::compute::instances::v1::SetTagsRequest const &, Options)

Sets network tags for the specified instance to 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::instances::v1::SetTagsRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Sets network tags for the specified instance to 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 > >

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

Simulates a host maintenance event on a VM.

For more information, see Simulate a host maintenance event. https://cloud.google.com/compute/docs/reference/rest/v1/instances/simulateMaintenanceEvent

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance scoping 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.

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

Simulates a host maintenance event on a VM.

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 &
zone std::string const &
instance std::string const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

SimulateMaintenanceEvent(google::cloud::cpp::compute::instances::v1::SimulateMaintenanceEventRequest const &, Options)

Simulates a host maintenance event on a VM.

For more information, see Simulate a host maintenance event. https://cloud.google.com/compute/docs/reference/rest/v1/instances/simulateMaintenanceEvent

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::SimulateMaintenanceEventRequest 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.instances.v1.SimulateMaintenanceEventRequest. 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.

SimulateMaintenanceEvent(NoAwaitTag, google::cloud::cpp::compute::instances::v1::SimulateMaintenanceEventRequest const &, Options)

Simulates a host maintenance event on a VM.

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::instances::v1::SimulateMaintenanceEventRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Simulates a host maintenance event on a VM.

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

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

Starts an instance that was stopped using the instances().stop method.

For more information, see Restart an instance. https://cloud.google.com/compute/docs/reference/rest/v1/instances/start

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance resource to start.

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.

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

Starts an instance that was stopped using the instances().stop method.

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 &
zone std::string const &
instance std::string const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

Start(google::cloud::cpp::compute::instances::v1::StartRequest const &, Options)

Starts an instance that was stopped using the instances().stop method.

For more information, see Restart an instance. https://cloud.google.com/compute/docs/reference/rest/v1/instances/start

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::StartRequest 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.instances.v1.StartRequest. 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.

Start(NoAwaitTag, google::cloud::cpp::compute::instances::v1::StartRequest const &, Options)

Starts an instance that was stopped using the instances().stop method.

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::instances::v1::StartRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Starts an instance that was stopped using the instances().stop method.

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

StartWithEncryptionKey(std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::InstancesStartWithEncryptionKeyRequest const &, Options)

Starts an instance that was stopped using the instances().stop method.

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance resource to start.

instances_start_with_encryption_key_request_resource google::cloud::cpp::compute::v1::InstancesStartWithEncryptionKeyRequest const &

The InstancesStartWithEncryptionKeyRequest 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.

StartWithEncryptionKey(NoAwaitTag, std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::InstancesStartWithEncryptionKeyRequest const &, Options)

Starts an instance that was stopped using the instances().stop method.

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 &
zone std::string const &
instance std::string const &
instances_start_with_encryption_key_request_resource google::cloud::cpp::compute::v1::InstancesStartWithEncryptionKeyRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

StartWithEncryptionKey(google::cloud::cpp::compute::instances::v1::StartWithEncryptionKeyRequest const &, Options)

Starts an instance that was stopped using the instances().stop method.

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::StartWithEncryptionKeyRequest 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.instances.v1.StartWithEncryptionKeyRequest. 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.

StartWithEncryptionKey(NoAwaitTag, google::cloud::cpp::compute::instances::v1::StartWithEncryptionKeyRequest const &, Options)

Starts an instance that was stopped using the instances().stop method.

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::instances::v1::StartWithEncryptionKeyRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Starts an instance that was stopped using the instances().stop method.

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

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

Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time.

Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance. https://cloud.google.com/compute/docs/reference/rest/v1/instances/stop

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance resource to stop.

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.

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

Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time.

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 &
zone std::string const &
instance std::string const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

Stop(google::cloud::cpp::compute::instances::v1::StopRequest const &, Options)

Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time.

Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance. https://cloud.google.com/compute/docs/reference/rest/v1/instances/stop

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::StopRequest 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.instances.v1.StopRequest. 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.

Stop(NoAwaitTag, google::cloud::cpp::compute::instances::v1::StopRequest const &, Options)

Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time.

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::instances::v1::StopRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time.

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

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

This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time.

Suspended instances have no compute costs (cores or RAM), and incur only storage charges for the saved VM memory and localSSD data. Any charged resources the virtual machine was using, such as persistent disks and static IP addresses, will continue to be charged while the instance is suspended. For more information, see Suspending and resuming an instance. https://cloud.google.com/compute/docs/reference/rest/v1/instances/suspend

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance resource to suspend.

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.

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

This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time.

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 &
zone std::string const &
instance std::string const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

Suspend(google::cloud::cpp::compute::instances::v1::SuspendRequest const &, Options)

This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time.

Suspended instances have no compute costs (cores or RAM), and incur only storage charges for the saved VM memory and localSSD data. Any charged resources the virtual machine was using, such as persistent disks and static IP addresses, will continue to be charged while the instance is suspended. For more information, see Suspending and resuming an instance. https://cloud.google.com/compute/docs/reference/rest/v1/instances/suspend

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::SuspendRequest 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.instances.v1.SuspendRequest. 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.

Suspend(NoAwaitTag, google::cloud::cpp::compute::instances::v1::SuspendRequest const &, Options)

This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time.

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::instances::v1::SuspendRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time.

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.

Parameters
Name Description
project std::string const &

Project 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) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

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

Returns permissions that a caller has on the specified resource.

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

opts Options

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

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

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

UpdateInstance(std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::Instance const &, Options)

Updates an instance only if the necessary resources are available.

This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties. https://cloud.google.com/compute/docs/reference/rest/v1/instances/update

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance resource to update.

instance_resource google::cloud::cpp::compute::v1::Instance const &

The Instance 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.

UpdateInstance(NoAwaitTag, std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::Instance const &, Options)

Updates an instance only if the necessary resources are available.

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 &
zone std::string const &
instance std::string const &
instance_resource google::cloud::cpp::compute::v1::Instance const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

UpdateInstance(google::cloud::cpp::compute::instances::v1::UpdateInstanceRequest const &, Options)

Updates an instance only if the necessary resources are available.

This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties. https://cloud.google.com/compute/docs/reference/rest/v1/instances/update

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::UpdateInstanceRequest 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.instances.v1.UpdateInstanceRequest. 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.

UpdateInstance(NoAwaitTag, google::cloud::cpp::compute::instances::v1::UpdateInstanceRequest const &, Options)

Updates an instance only if the necessary resources are available.

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::instances::v1::UpdateInstanceRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Updates an instance only if the necessary resources are available.

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

UpdateAccessConfig(std::string const &, std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::AccessConfig const &, Options)

Updates the specified access config from an instance's network interface with the data included in the request.

This method supports PATCH semantics and uses the JSON merge patch format and processing rules. https://cloud.google.com/compute/docs/reference/rest/v1/instances/updateAccessConfig

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

The instance name for this request.

network_interface std::string const &

The name of the network interface where the access config is attached.

access_config_resource google::cloud::cpp::compute::v1::AccessConfig const &

The AccessConfig 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.

UpdateAccessConfig(NoAwaitTag, std::string const &, std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::AccessConfig const &, Options)

Updates the specified access config from an instance's network interface with 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 &
zone std::string const &
instance std::string const &
network_interface std::string const &
access_config_resource google::cloud::cpp::compute::v1::AccessConfig const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

UpdateAccessConfig(google::cloud::cpp::compute::instances::v1::UpdateAccessConfigRequest const &, Options)

Updates the specified access config from an instance's network interface with the data included in the request.

This method supports PATCH semantics and uses the JSON merge patch format and processing rules. https://cloud.google.com/compute/docs/reference/rest/v1/instances/updateAccessConfig

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::UpdateAccessConfigRequest 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.instances.v1.UpdateAccessConfigRequest. 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.

UpdateAccessConfig(NoAwaitTag, google::cloud::cpp::compute::instances::v1::UpdateAccessConfigRequest const &, Options)

Updates the specified access config from an instance's network interface with 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::instances::v1::UpdateAccessConfigRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Updates the specified access config from an instance's network interface 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 > >

UpdateDisplayDevice(std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::DisplayDevice const &, Options)

Updates the Display config for a VM instance.

You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. https://cloud.google.com/compute/docs/reference/rest/v1/instances/updateDisplayDevice

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name of the instance scoping this request.

display_device_resource google::cloud::cpp::compute::v1::DisplayDevice const &

The DisplayDevice 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.

UpdateDisplayDevice(NoAwaitTag, std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::DisplayDevice const &, Options)

Updates the Display config for a VM instance.

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 &
zone std::string const &
instance std::string const &
display_device_resource google::cloud::cpp::compute::v1::DisplayDevice const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

UpdateDisplayDevice(google::cloud::cpp::compute::instances::v1::UpdateDisplayDeviceRequest const &, Options)

Updates the Display config for a VM instance.

You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. https://cloud.google.com/compute/docs/reference/rest/v1/instances/updateDisplayDevice

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::UpdateDisplayDeviceRequest 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.instances.v1.UpdateDisplayDeviceRequest. 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.

UpdateDisplayDevice(NoAwaitTag, google::cloud::cpp::compute::instances::v1::UpdateDisplayDeviceRequest const &, Options)

Updates the Display config for a VM instance.

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::instances::v1::UpdateDisplayDeviceRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Updates the Display config for a VM instance.

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

UpdateNetworkInterface(std::string const &, std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::NetworkInterface const &, Options)

Updates an instance's network interface.

This method can only update an interface's alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP ranges. See Migrating a VM between networks for instructions on migrating an interface. This method follows PATCH semantics. https://cloud.google.com/compute/docs/reference/rest/v1/instances/updateNetworkInterface

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

The instance name for this request.

network_interface std::string const &

The name of the network interface to update.

network_interface_resource google::cloud::cpp::compute::v1::NetworkInterface const &

The NetworkInterface 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.

UpdateNetworkInterface(NoAwaitTag, std::string const &, std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::NetworkInterface const &, Options)

Updates an instance's network interface.

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 &
zone std::string const &
instance std::string const &
network_interface std::string const &
network_interface_resource google::cloud::cpp::compute::v1::NetworkInterface const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

UpdateNetworkInterface(google::cloud::cpp::compute::instances::v1::UpdateNetworkInterfaceRequest const &, Options)

Updates an instance's network interface.

This method can only update an interface's alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP ranges. See Migrating a VM between networks for instructions on migrating an interface. This method follows PATCH semantics. https://cloud.google.com/compute/docs/reference/rest/v1/instances/updateNetworkInterface

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::UpdateNetworkInterfaceRequest 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.instances.v1.UpdateNetworkInterfaceRequest. 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.

UpdateNetworkInterface(NoAwaitTag, google::cloud::cpp::compute::instances::v1::UpdateNetworkInterfaceRequest const &, Options)

Updates an instance's network interface.

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::instances::v1::UpdateNetworkInterfaceRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Updates an instance's network interface.

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

UpdateShieldedInstanceConfig(std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::ShieldedInstanceConfig const &, Options)

Updates the Shielded Instance config for an instance.

You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. https://cloud.google.com/compute/docs/reference/rest/v1/instances/updateShieldedInstanceConfig

Parameters
Name Description
project std::string const &

Project ID for this request.

zone std::string const &

The name of the zone for this request.

instance std::string const &

Name or id of the instance scoping this request.

shielded_instance_config_resource google::cloud::cpp::compute::v1::ShieldedInstanceConfig const &

The ShieldedInstanceConfig 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.

UpdateShieldedInstanceConfig(NoAwaitTag, std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::ShieldedInstanceConfig const &, Options)

Updates the Shielded Instance config for an instance.

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 &
zone std::string const &
instance std::string const &
shielded_instance_config_resource google::cloud::cpp::compute::v1::ShieldedInstanceConfig const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

UpdateShieldedInstanceConfig(google::cloud::cpp::compute::instances::v1::UpdateShieldedInstanceConfigRequest const &, Options)

Updates the Shielded Instance config for an instance.

You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. https://cloud.google.com/compute/docs/reference/rest/v1/instances/updateShieldedInstanceConfig

Parameters
Name Description
request google::cloud::cpp::compute::instances::v1::UpdateShieldedInstanceConfigRequest 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.instances.v1.UpdateShieldedInstanceConfigRequest. 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.

UpdateShieldedInstanceConfig(NoAwaitTag, google::cloud::cpp::compute::instances::v1::UpdateShieldedInstanceConfigRequest const &, Options)

Updates the Shielded Instance config for an instance.

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::instances::v1::UpdateShieldedInstanceConfigRequest const &
opts Options
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Operation >

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

Updates the Shielded Instance config for an instance.

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