Compute Engine v1 API - Class InstanceGroupsClientImpl (2.2.0)

public sealed class InstanceGroupsClientImpl : InstanceGroupsClient

Reference documentation and code samples for the Compute Engine v1 API class InstanceGroupsClientImpl.

InstanceGroups client wrapper implementation, for convenient use.

Inheritance

Object > InstanceGroupsClient > InstanceGroupsClientImpl

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Remarks

The InstanceGroups API.

Constructors

InstanceGroupsClientImpl(InstanceGroups.InstanceGroupsClient, InstanceGroupsSettings, ILogger)

public InstanceGroupsClientImpl(InstanceGroups.InstanceGroupsClient grpcClient, InstanceGroupsSettings settings, ILogger logger)

Constructs a client wrapper for the InstanceGroups service, with the specified gRPC client and settings.

Parameters
NameDescription
grpcClientInstanceGroups.InstanceGroupsClient

The underlying gRPC client.

settingsInstanceGroupsSettings

The base InstanceGroupsSettings used within this client.

loggerILogger

Optional ILogger to use within this client.

Properties

AddInstancesOperationsClient

public override OperationsClient AddInstancesOperationsClient { get; }

The long-running operations client for AddInstances.

Property Value
TypeDescription
OperationsClient
Overrides

DeleteOperationsClient

public override OperationsClient DeleteOperationsClient { get; }

The long-running operations client for Delete.

Property Value
TypeDescription
OperationsClient
Overrides

GrpcClient

public override InstanceGroups.InstanceGroupsClient GrpcClient { get; }

The underlying gRPC InstanceGroups client

Property Value
TypeDescription
InstanceGroups.InstanceGroupsClient
Overrides

InsertOperationsClient

public override OperationsClient InsertOperationsClient { get; }

The long-running operations client for Insert.

Property Value
TypeDescription
OperationsClient
Overrides

RemoveInstancesOperationsClient

public override OperationsClient RemoveInstancesOperationsClient { get; }

The long-running operations client for RemoveInstances.

Property Value
TypeDescription
OperationsClient
Overrides

SetNamedPortsOperationsClient

public override OperationsClient SetNamedPortsOperationsClient { get; }

The long-running operations client for SetNamedPorts.

Property Value
TypeDescription
OperationsClient
Overrides

Methods

AddInstances(AddInstancesInstanceGroupRequest, CallSettings)

public override Operation<Operation, Operation> AddInstances(AddInstancesInstanceGroupRequest request, CallSettings callSettings = null)

Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.

Parameters
NameDescription
requestAddInstancesInstanceGroupRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Overrides

AddInstancesAsync(AddInstancesInstanceGroupRequest, CallSettings)

public override async Task<Operation<Operation, Operation>> AddInstancesAsync(AddInstancesInstanceGroupRequest request, CallSettings callSettings = null)

Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.

Parameters
NameDescription
requestAddInstancesInstanceGroupRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Overrides

AggregatedList(AggregatedListInstanceGroupsRequest, CallSettings)

public override PagedEnumerable<InstanceGroupAggregatedList, KeyValuePair<string, InstanceGroupsScopedList>> AggregatedList(AggregatedListInstanceGroupsRequest request, CallSettings callSettings = null)

Retrieves the list of instance groups and sorts them by zone.

Parameters
NameDescription
requestAggregatedListInstanceGroupsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<InstanceGroupAggregatedList, KeyValuePair<String, InstanceGroupsScopedList>>

A pageable sequence of KeyValuePair<TKey,TValue> resources.

Overrides

AggregatedListAsync(AggregatedListInstanceGroupsRequest, CallSettings)

public override PagedAsyncEnumerable<InstanceGroupAggregatedList, KeyValuePair<string, InstanceGroupsScopedList>> AggregatedListAsync(AggregatedListInstanceGroupsRequest request, CallSettings callSettings = null)

Retrieves the list of instance groups and sorts them by zone.

Parameters
NameDescription
requestAggregatedListInstanceGroupsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<InstanceGroupAggregatedList, KeyValuePair<String, InstanceGroupsScopedList>>

A pageable asynchronous sequence of KeyValuePair<TKey,TValue> resources.

Overrides

Delete(DeleteInstanceGroupRequest, CallSettings)

public override Operation<Operation, Operation> Delete(DeleteInstanceGroupRequest request, CallSettings callSettings = null)

Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.

Parameters
NameDescription
requestDeleteInstanceGroupRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Overrides

DeleteAsync(DeleteInstanceGroupRequest, CallSettings)

public override async Task<Operation<Operation, Operation>> DeleteAsync(DeleteInstanceGroupRequest request, CallSettings callSettings = null)

Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.

Parameters
NameDescription
requestDeleteInstanceGroupRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Overrides

Get(GetInstanceGroupRequest, CallSettings)

public override InstanceGroup Get(GetInstanceGroupRequest request, CallSettings callSettings = null)

Returns the specified zonal instance group. Get a list of available zonal instance groups by making a list() request. For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.

Parameters
NameDescription
requestGetInstanceGroupRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
InstanceGroup

The RPC response.

Overrides

GetAsync(GetInstanceGroupRequest, CallSettings)

public override Task<InstanceGroup> GetAsync(GetInstanceGroupRequest request, CallSettings callSettings = null)

Returns the specified zonal instance group. Get a list of available zonal instance groups by making a list() request. For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.

Parameters
NameDescription
requestGetInstanceGroupRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<InstanceGroup>

A Task containing the RPC response.

Overrides

Insert(InsertInstanceGroupRequest, CallSettings)

public override Operation<Operation, Operation> Insert(InsertInstanceGroupRequest request, CallSettings callSettings = null)

Creates an instance group in the specified project using the parameters that are included in the request.

Parameters
NameDescription
requestInsertInstanceGroupRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Overrides

InsertAsync(InsertInstanceGroupRequest, CallSettings)

public override async Task<Operation<Operation, Operation>> InsertAsync(InsertInstanceGroupRequest request, CallSettings callSettings = null)

Creates an instance group in the specified project using the parameters that are included in the request.

Parameters
NameDescription
requestInsertInstanceGroupRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Overrides

List(ListInstanceGroupsRequest, CallSettings)

public override PagedEnumerable<InstanceGroupList, InstanceGroup> List(ListInstanceGroupsRequest request, CallSettings callSettings = null)

Retrieves the list of zonal instance group resources contained within the specified zone. For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.

Parameters
NameDescription
requestListInstanceGroupsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<InstanceGroupList, InstanceGroup>

A pageable sequence of InstanceGroup resources.

Overrides

ListAsync(ListInstanceGroupsRequest, CallSettings)

public override PagedAsyncEnumerable<InstanceGroupList, InstanceGroup> ListAsync(ListInstanceGroupsRequest request, CallSettings callSettings = null)

Retrieves the list of zonal instance group resources contained within the specified zone. For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.

Parameters
NameDescription
requestListInstanceGroupsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<InstanceGroupList, InstanceGroup>

A pageable asynchronous sequence of InstanceGroup resources.

Overrides

ListInstances(ListInstancesInstanceGroupsRequest, CallSettings)

public override PagedEnumerable<InstanceGroupsListInstances, InstanceWithNamedPorts> ListInstances(ListInstancesInstanceGroupsRequest request, CallSettings callSettings = null)

Lists the instances in the specified instance group. The orderBy query parameter is not supported. The filter query parameter is supported, but only for expressions that use eq (equal) or ne (not equal) operators.

Parameters
NameDescription
requestListInstancesInstanceGroupsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<InstanceGroupsListInstances, InstanceWithNamedPorts>

A pageable sequence of InstanceWithNamedPorts resources.

Overrides

ListInstancesAsync(ListInstancesInstanceGroupsRequest, CallSettings)

public override PagedAsyncEnumerable<InstanceGroupsListInstances, InstanceWithNamedPorts> ListInstancesAsync(ListInstancesInstanceGroupsRequest request, CallSettings callSettings = null)

Lists the instances in the specified instance group. The orderBy query parameter is not supported. The filter query parameter is supported, but only for expressions that use eq (equal) or ne (not equal) operators.

Parameters
NameDescription
requestListInstancesInstanceGroupsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<InstanceGroupsListInstances, InstanceWithNamedPorts>

A pageable asynchronous sequence of InstanceWithNamedPorts resources.

Overrides

RemoveInstances(RemoveInstancesInstanceGroupRequest, CallSettings)

public override Operation<Operation, Operation> RemoveInstances(RemoveInstancesInstanceGroupRequest request, CallSettings callSettings = null)

Removes one or more instances from the specified instance group, but does not delete those instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.

Parameters
NameDescription
requestRemoveInstancesInstanceGroupRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Overrides

RemoveInstancesAsync(RemoveInstancesInstanceGroupRequest, CallSettings)

public override async Task<Operation<Operation, Operation>> RemoveInstancesAsync(RemoveInstancesInstanceGroupRequest request, CallSettings callSettings = null)

Removes one or more instances from the specified instance group, but does not delete those instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.

Parameters
NameDescription
requestRemoveInstancesInstanceGroupRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Overrides

SetNamedPorts(SetNamedPortsInstanceGroupRequest, CallSettings)

public override Operation<Operation, Operation> SetNamedPorts(SetNamedPortsInstanceGroupRequest request, CallSettings callSettings = null)

Sets the named ports for the specified instance group.

Parameters
NameDescription
requestSetNamedPortsInstanceGroupRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Overrides

SetNamedPortsAsync(SetNamedPortsInstanceGroupRequest, CallSettings)

public override async Task<Operation<Operation, Operation>> SetNamedPortsAsync(SetNamedPortsInstanceGroupRequest request, CallSettings callSettings = null)

Sets the named ports for the specified instance group.

Parameters
NameDescription
requestSetNamedPortsInstanceGroupRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Overrides