Class InstancesClient (2.15.1)

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(ExperimentalTag, std::shared_ptr< InstancesConnection >, Options)

Parameters
Name Description
ExperimentalTag
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(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.

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.

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

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.

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.

Parameters
Name Description
project std::string const &

Project ID for this request.

opts Options

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

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

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

AggregatedListInstances(google::cloud::cpp::compute::instances::v1::AggregatedListInstancesRequest 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.

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

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

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.

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

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.

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.

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

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.

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

Deletes the specified Instance resource.

For more information, see Deleting 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 &

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.

DeleteInstances(google::cloud::cpp::compute::instances::v1::DeleteInstancesRequest const &, Options)

Deletes the specified Instance resource.

For more information, see Deleting an instance.

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

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

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

GetInstances(google::cloud::cpp::compute::instances::v1::GetInstancesRequest const &, Options)

Returns the specified Instance resource.

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

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.

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)

Returns the Shielded Instance Identity 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 &

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)

Returns the Shielded Instance Identity of an instance.

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.

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

InsertInstances(google::cloud::cpp::compute::instances::v1::InsertInstancesRequest 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::InsertInstancesRequest 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.InsertInstancesRequest. 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.

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.

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.

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.

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

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.

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

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.

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

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

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

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

Sets the access control policy on the specified resource.

Replaces any existing policy.

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.

Replaces any existing policy.

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.

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(google::cloud::cpp::compute::instances::v1::SetLabelsRequest const &, Options)

Sets labels on an instance.

To learn more about labels, read the Labeling Resources documentation.

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.

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

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

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

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.

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

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.

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

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.

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

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.

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.

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

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.

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.

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

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.

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

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.

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

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.

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.

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

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.

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.

For more information, see Restart 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 &

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(google::cloud::cpp::compute::instances::v1::StartWithEncryptionKeyRequest const &, Options)

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

For more information, see Restart an instance.

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.

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.

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

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.

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.

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

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.

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.

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

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.

UpdateInstances(google::cloud::cpp::compute::instances::v1::UpdateInstancesRequest 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.

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

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

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.

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.

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

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.

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.

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

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.

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.

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

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.