Class InstancesConnection (2.18.0)

This interface defines virtual methods for each of the user-facing overload sets in InstancesClient. This allows users to inject custom behavior (e.g., with a Google Mock object) when writing tests that use objects of type InstancesClient.

To create a concrete instance, see MakeInstancesConnection().

For mocking, see compute_instances_v1_mocks::MockInstancesConnection.

Functions

virtual options()

Returns
Type Description
Options

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::AddAccessConfigRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::AddResourcePoliciesRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

virtual AggregatedListInstances(google::cloud::cpp::compute::instances::v1::AggregatedListInstancesRequest)

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::AggregatedListInstancesRequest
Returns
Type Description
StreamRange< std::pair< std::string, google::cloud::cpp::compute::v1::InstancesScopedList > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::AttachDiskRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::BulkInsertRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::DeleteInstanceRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::DeleteAccessConfigRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::DetachDiskRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::GetInstanceRequest const &
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Instance >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::GetEffectiveFirewallsRequest const &
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::InstancesGetEffectiveFirewallsResponse >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::GetGuestAttributesRequest const &
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::GuestAttributes >

virtual GetIamPolicy(google::cloud::cpp::compute::instances::v1::GetIamPolicyRequest const &)

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::GetIamPolicyRequest const &
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Policy >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::GetScreenshotRequest const &
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Screenshot >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::GetSerialPortOutputRequest const &
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::SerialPortOutput >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::GetShieldedInstanceIdentityRequest const &
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::ShieldedInstanceIdentity >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::InsertInstanceRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

virtual ListInstances(google::cloud::cpp::compute::instances::v1::ListInstancesRequest)

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::ListInstancesRequest
Returns
Type Description
StreamRange< google::cloud::cpp::compute::v1::Instance >

virtual ListReferrers(google::cloud::cpp::compute::instances::v1::ListReferrersRequest)

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::ListReferrersRequest
Returns
Type Description
StreamRange< google::cloud::cpp::compute::v1::Reference >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::RemoveResourcePoliciesRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::ResetRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::ResumeRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::SendDiagnosticInterruptRequest const &
Returns
Type Description
Status

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::SetDeletionProtectionRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::SetDiskAutoDeleteRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::SetIamPolicyRequest const &
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Policy >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::SetLabelsRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::SetMachineResourcesRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::SetMachineTypeRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::SetMetadataRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::SetMinCpuPlatformRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::SetNameRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::SetSchedulingRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::SetSecurityPolicyRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::SetServiceAccountRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::SetShieldedInstanceIntegrityPolicyRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::SetTagsRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::SimulateMaintenanceEventRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::StartRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::StartWithEncryptionKeyRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::StopRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::SuspendRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::TestIamPermissionsRequest const &
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::TestPermissionsResponse >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::UpdateInstanceRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::UpdateAccessConfigRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::UpdateDisplayDeviceRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::UpdateNetworkInterfaceRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
Name Description
request google::cloud::cpp::compute::instances::v1::UpdateShieldedInstanceConfigRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >