2.5.0 (latest) 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

    public class Instances.InstancesClient : ClientBase<Instances.InstancesClient>

Reference documentation and code samples for the App Engine v1 API class Instances.InstancesClient.

Client for Instances

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [ClientBase](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.md.txt) \> [ClientBase](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase-1.md.txt)[Instances](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.Instances.md.txt)[InstancesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.Instances.InstancesClient.md.txt) \> Instances.InstancesClient

## Inherited Members

[ClientBase\<Instances.InstancesClient\>.WithHost(string)](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase-1.md.txt#Grpc_Core_ClientBase_1_WithHost_System_String_) [ClientBase.CallInvoker](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.md.txt#Grpc_Core_ClientBase_CallInvoker) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.AppEngine.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.md.txt)

## Assembly

Google.Cloud.AppEngine.V1.dll

## Constructors

### InstancesClient()

    protected InstancesClient()

Protected parameterless constructor to allow creation of test doubles.

### InstancesClient(CallInvoker)

    public InstancesClient(CallInvoker callInvoker)

Creates a new client for Instances that uses a custom `CallInvoker`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `callInvoker` | `CallInvoker` The callInvoker to use to make remote calls. |

### InstancesClient(ChannelBase)

    public InstancesClient(ChannelBase channel)

Creates a new client for Instances

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `channel` | `ChannelBase` The channel to use to make remote calls. |

### InstancesClient(ClientBaseConfiguration)

    protected InstancesClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `configuration` | `ClientBaseClientBaseConfiguration` The client configuration. |

## Methods

### CreateOperationsClient()

    public virtual Operations.OperationsClient CreateOperationsClient()

Creates a new instance of [Operations.OperationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operations.OperationsClient.md.txt) using the same call invoker as
this client.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationsOperationsClient` | A new Operations client for the same target as this client. |

### DebugInstance(DebugInstanceRequest, CallOptions)

    public virtual Operation DebugInstance(DebugInstanceRequest request, CallOptions options)

Enables debugging on a VM instance. This allows you to use the SSH
command to connect to the virtual machine where the instance lives.
While in "debug mode", the instance continues to serve live traffic.
You should delete the instance when you are done debugging and then
allow the system to take over and determine if another instance
should be started.

Only applicable for instances in App Engine flexible environment.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DebugInstanceRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Operation` | The response received from the server. |

### DebugInstance(DebugInstanceRequest, Metadata, DateTime?, CancellationToken)

    public virtual Operation DebugInstance(DebugInstanceRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Enables debugging on a VM instance. This allows you to use the SSH
command to connect to the virtual machine where the instance lives.
While in "debug mode", the instance continues to serve live traffic.
You should delete the instance when you are done debugging and then
allow the system to take over and determine if another instance
should be started.

Only applicable for instances in App Engine flexible environment.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DebugInstanceRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Operation` | The response received from the server. |

### DebugInstanceAsync(DebugInstanceRequest, CallOptions)

    public virtual AsyncUnaryCall<Operation> DebugInstanceAsync(DebugInstanceRequest request, CallOptions options)

Enables debugging on a VM instance. This allows you to use the SSH
command to connect to the virtual machine where the instance lives.
While in "debug mode", the instance continues to serve live traffic.
You should delete the instance when you are done debugging and then
allow the system to take over and determine if another instance
should be started.

Only applicable for instances in App Engine flexible environment.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DebugInstanceRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallOperation` | The call object. |

### DebugInstanceAsync(DebugInstanceRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Operation> DebugInstanceAsync(DebugInstanceRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Enables debugging on a VM instance. This allows you to use the SSH
command to connect to the virtual machine where the instance lives.
While in "debug mode", the instance continues to serve live traffic.
You should delete the instance when you are done debugging and then
allow the system to take over and determine if another instance
should be started.

Only applicable for instances in App Engine flexible environment.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DebugInstanceRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallOperation` | The call object. |

### DeleteInstance(DeleteInstanceRequest, CallOptions)

    public virtual Operation DeleteInstance(DeleteInstanceRequest request, CallOptions options)

Stops a running instance.

The instance might be automatically recreated based on the scaling settings
of the version. For more information, see "How Instances are Managed"
([standard environment](https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) \|
[flexible environment](https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)).

To ensure that instances are not re-created and avoid getting billed, you
can stop all instances within the target version by changing the serving
status of the version to `STOPPED` with the
[`apps.services.versions.patch`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch)
method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DeleteInstanceRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Operation` | The response received from the server. |

### DeleteInstance(DeleteInstanceRequest, Metadata, DateTime?, CancellationToken)

    public virtual Operation DeleteInstance(DeleteInstanceRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Stops a running instance.

The instance might be automatically recreated based on the scaling settings
of the version. For more information, see "How Instances are Managed"
([standard environment](https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) \|
[flexible environment](https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)).

To ensure that instances are not re-created and avoid getting billed, you
can stop all instances within the target version by changing the serving
status of the version to `STOPPED` with the
[`apps.services.versions.patch`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch)
method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DeleteInstanceRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Operation` | The response received from the server. |

### DeleteInstanceAsync(DeleteInstanceRequest, CallOptions)

    public virtual AsyncUnaryCall<Operation> DeleteInstanceAsync(DeleteInstanceRequest request, CallOptions options)

Stops a running instance.

The instance might be automatically recreated based on the scaling settings
of the version. For more information, see "How Instances are Managed"
([standard environment](https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) \|
[flexible environment](https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)).

To ensure that instances are not re-created and avoid getting billed, you
can stop all instances within the target version by changing the serving
status of the version to `STOPPED` with the
[`apps.services.versions.patch`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch)
method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DeleteInstanceRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallOperation` | The call object. |

### DeleteInstanceAsync(DeleteInstanceRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Operation> DeleteInstanceAsync(DeleteInstanceRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Stops a running instance.

The instance might be automatically recreated based on the scaling settings
of the version. For more information, see "How Instances are Managed"
([standard environment](https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) \|
[flexible environment](https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)).

To ensure that instances are not re-created and avoid getting billed, you
can stop all instances within the target version by changing the serving
status of the version to `STOPPED` with the
[`apps.services.versions.patch`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch)
method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DeleteInstanceRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallOperation` | The call object. |

### GetInstance(GetInstanceRequest, CallOptions)

    public virtual Instance GetInstance(GetInstanceRequest request, CallOptions options)

Gets instance information.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetInstanceRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Instance` | The response received from the server. |

### GetInstance(GetInstanceRequest, Metadata, DateTime?, CancellationToken)

    public virtual Instance GetInstance(GetInstanceRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets instance information.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetInstanceRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Instance` | The response received from the server. |

### GetInstanceAsync(GetInstanceRequest, CallOptions)

    public virtual AsyncUnaryCall<Instance> GetInstanceAsync(GetInstanceRequest request, CallOptions options)

Gets instance information.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetInstanceRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallInstance` | The call object. |

### GetInstanceAsync(GetInstanceRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Instance> GetInstanceAsync(GetInstanceRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets instance information.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetInstanceRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallInstance` | The call object. |

### ListInstances(ListInstancesRequest, CallOptions)

    public virtual ListInstancesResponse ListInstances(ListInstancesRequest request, CallOptions options)

Lists the instances of a version.

Tip: To aggregate details about instances over time, see the
[Stackdriver Monitoring API](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListInstancesRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `ListInstancesResponse` | The response received from the server. |

### ListInstances(ListInstancesRequest, Metadata, DateTime?, CancellationToken)

    public virtual ListInstancesResponse ListInstances(ListInstancesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists the instances of a version.

Tip: To aggregate details about instances over time, see the
[Stackdriver Monitoring API](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListInstancesRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `ListInstancesResponse` | The response received from the server. |

### ListInstancesAsync(ListInstancesRequest, CallOptions)

    public virtual AsyncUnaryCall<ListInstancesResponse> ListInstancesAsync(ListInstancesRequest request, CallOptions options)

Lists the instances of a version.

Tip: To aggregate details about instances over time, see the
[Stackdriver Monitoring API](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListInstancesRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallListInstancesResponse` | The call object. |

### ListInstancesAsync(ListInstancesRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<ListInstancesResponse> ListInstancesAsync(ListInstancesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists the instances of a version.

Tip: To aggregate details about instances over time, see the
[Stackdriver Monitoring API](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListInstancesRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallListInstancesResponse` | The call object. |

### NewInstance(ClientBaseConfiguration)

    protected override Instances.InstancesClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given `ClientBaseConfiguration`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `configuration` | `ClientBaseClientBaseConfiguration` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `InstancesInstancesClient` |   |

**Overrides** Grpc.Core.ClientBase\<Google.Cloud.AppEngine.V1.Instances.InstancesClient\>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)