# Cloud Run Admin v2 API - Class InstancesClient (2.19.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.19.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstancesClient)
- [2.18.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.18.0/Google.Cloud.Run.V2.InstancesClient)
- [2.17.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.17.0/Google.Cloud.Run.V2.InstancesClient)
- [2.16.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.16.0/Google.Cloud.Run.V2.InstancesClient)
- [2.15.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.15.0/Google.Cloud.Run.V2.InstancesClient)
- [2.14.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.14.0/Google.Cloud.Run.V2.InstancesClient)
- [2.13.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.13.0/Google.Cloud.Run.V2.InstancesClient)
- [2.12.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.12.0/Google.Cloud.Run.V2.InstancesClient)
- [2.11.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.11.0/Google.Cloud.Run.V2.InstancesClient)
- [2.10.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.10.0/Google.Cloud.Run.V2.InstancesClient)
- [2.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.9.0/Google.Cloud.Run.V2.InstancesClient)
- [2.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.8.0/Google.Cloud.Run.V2.InstancesClient)
- [2.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.7.0/Google.Cloud.Run.V2.InstancesClient)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.6.0/Google.Cloud.Run.V2.InstancesClient)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.5.0/Google.Cloud.Run.V2.InstancesClient)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.4.0/Google.Cloud.Run.V2.InstancesClient)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.3.0/Google.Cloud.Run.V2.InstancesClient)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.2.0/Google.Cloud.Run.V2.InstancesClient)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.1.0/Google.Cloud.Run.V2.InstancesClient)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.0.0/Google.Cloud.Run.V2.InstancesClient)
- [1.0.0-beta02](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/1.0.0-beta02/Google.Cloud.Run.V2.InstancesClient)

    public abstract class InstancesClient

Reference documentation and code samples for the Cloud Run Admin v2 API class InstancesClient.

Instances client wrapper, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> InstancesClient

## Inherited Members

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

## Derived Types

[InstancesClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstancesClientImpl)

## Namespace

[Google.Cloud.Run.V2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2)

## Assembly

Google.Cloud.Run.V2.dll

## Remarks

The Cloud Run Instances API allows you to manage Cloud Run Instances.

## Properties

### CreateInstanceOperationsClient

    public virtual OperationsClient CreateInstanceOperationsClient { get; }

The long-running operations client for `CreateInstance`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the Instances service, which is a host of "run.googleapis.com" and a port of 443.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default Instances scopes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1https://learn.microsoft.com/dotnet/api/system.string` |   |

**Remarks** The default Instances scopes are:

- <https://www.googleapis.com/auth/cloud-platform>

<br />

### DeleteInstanceOperationsClient

    public virtual OperationsClient DeleteInstanceOperationsClient { get; }

The long-running operations client for `DeleteInstance`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### GrpcClient

    public virtual Instances.InstancesClient GrpcClient { get; }

The underlying gRPC Instances client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instanceshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instances.InstancesClient` |   |

### LocationsClient

    public virtual LocationsClient LocationsClient { get; }

The [LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ServiceMetadata.html` |   |

### StartInstanceOperationsClient

    public virtual OperationsClient StartInstanceOperationsClient { get; }

The long-running operations client for `StartInstance`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### StopInstanceOperationsClient

    public virtual OperationsClient StopInstanceOperationsClient { get; }

The long-running operations client for `StopInstance`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

## Methods

### Create()

    public static InstancesClient Create()

Synchronously creates a [InstancesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstancesClient) using the default credentials, endpoint and settings.
To specify custom credentials or other settings, use [InstancesClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstancesClientBuilder).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstancesClient` | The created [InstancesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstancesClient). |

### CreateAsync(CancellationToken)

    public static Task<InstancesClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a [InstancesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstancesClient) using the default credentials, endpoint and settings.
To specify custom credentials or other settings, use [InstancesClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstancesClientBuilder).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstancesClient` | The task representing the created [InstancesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstancesClient). |

### CreateInstance(LocationName, Instance, CallSettings)

    public virtual Operation<Instance, Instance> CreateInstance(LocationName parent, Instance instance, CallSettings callSettings = null)

Creates an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` |
| `instance` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | The RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = gcrv::InstancesClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    gcrv::Instance instance = new gcrv::Instance();
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = instancesClient.CreateInstance(parent, instance);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = instancesClient.PollOnceCreateInstance(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### CreateInstance(CreateInstanceRequest, CallSettings)

    public virtual Operation<Instance, Instance> CreateInstance(CreateInstanceRequest request, CallSettings callSettings = null)

Creates an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.CreateInstanceRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | The RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = gcrv::InstancesClient.Create();
    // Initialize request argument(s)
    gcrv::CreateInstanceRequest request = new gcrv::CreateInstanceRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Instance = new gcrv::Instance(),
        InstanceId = "",
        ValidateOnly = false,
    };
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = instancesClient.CreateInstance(request);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = instancesClient.PollOnceCreateInstance(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### CreateInstance(string, Instance, CallSettings)

    public virtual Operation<Instance, Instance> CreateInstance(string parent, Instance instance, CallSettings callSettings = null)

Creates an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` |
| `instance` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | The RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = gcrv::InstancesClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    gcrv::Instance instance = new gcrv::Instance();
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = instancesClient.CreateInstance(parent, instance);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = instancesClient.PollOnceCreateInstance(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### CreateInstanceAsync(LocationName, Instance, CallSettings)

    public virtual Task<Operation<Instance, Instance>> CreateInstanceAsync(LocationName parent, Instance instance, CallSettings callSettings = null)

Creates an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` |
| `instance` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    gcrv::Instance instance = new gcrv::Instance();
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.CreateInstanceAsync(parent, instance);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceCreateInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### CreateInstanceAsync(LocationName, Instance, CancellationToken)

    public virtual Task<Operation<Instance, Instance>> CreateInstanceAsync(LocationName parent, Instance instance, CancellationToken cancellationToken)

Creates an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` |
| `instance` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    gcrv::Instance instance = new gcrv::Instance();
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.CreateInstanceAsync(parent, instance);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceCreateInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### CreateInstanceAsync(CreateInstanceRequest, CallSettings)

    public virtual Task<Operation<Instance, Instance>> CreateInstanceAsync(CreateInstanceRequest request, CallSettings callSettings = null)

Creates an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.CreateInstanceRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    gcrv::CreateInstanceRequest request = new gcrv::CreateInstanceRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Instance = new gcrv::Instance(),
        InstanceId = "",
        ValidateOnly = false,
    };
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.CreateInstanceAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceCreateInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### CreateInstanceAsync(CreateInstanceRequest, CancellationToken)

    public virtual Task<Operation<Instance, Instance>> CreateInstanceAsync(CreateInstanceRequest request, CancellationToken cancellationToken)

Creates an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.CreateInstanceRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    gcrv::CreateInstanceRequest request = new gcrv::CreateInstanceRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Instance = new gcrv::Instance(),
        InstanceId = "",
        ValidateOnly = false,
    };
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.CreateInstanceAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceCreateInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### CreateInstanceAsync(string, Instance, CallSettings)

    public virtual Task<Operation<Instance, Instance>> CreateInstanceAsync(string parent, Instance instance, CallSettings callSettings = null)

Creates an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` |
| `instance` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    gcrv::Instance instance = new gcrv::Instance();
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.CreateInstanceAsync(parent, instance);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceCreateInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### CreateInstanceAsync(string, Instance, CancellationToken)

    public virtual Task<Operation<Instance, Instance>> CreateInstanceAsync(string parent, Instance instance, CancellationToken cancellationToken)

Creates an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` |
| `instance` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    gcrv::Instance instance = new gcrv::Instance();
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.CreateInstanceAsync(parent, instance);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceCreateInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### DeleteInstance(DeleteInstanceRequest, CallSettings)

    public virtual Operation<Instance, Instance> DeleteInstance(DeleteInstanceRequest request, CallSettings callSettings = null)

Deletes a Instance

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.DeleteInstanceRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | The RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = gcrv::InstancesClient.Create();
    // Initialize request argument(s)
    gcrv::DeleteInstanceRequest request = new gcrv::DeleteInstanceRequest
    {
        InstanceName = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
        ValidateOnly = false,
        Etag = "",
    };
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = instancesClient.DeleteInstance(request);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = instancesClient.PollOnceDeleteInstance(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### DeleteInstance(InstanceName, CallSettings)

    public virtual Operation<Instance, Instance> DeleteInstance(InstanceName name, CallSettings callSettings = null)

Deletes a Instance

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstanceName` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | The RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = gcrv::InstancesClient.Create();
    // Initialize request argument(s)
    gcrv::InstanceName name = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = instancesClient.DeleteInstance(name);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = instancesClient.PollOnceDeleteInstance(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### DeleteInstance(string, CallSettings)

    public virtual Operation<Instance, Instance> DeleteInstance(string name, CallSettings callSettings = null)

Deletes a Instance

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | The RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = gcrv::InstancesClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = instancesClient.DeleteInstance(name);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = instancesClient.PollOnceDeleteInstance(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### DeleteInstanceAsync(DeleteInstanceRequest, CallSettings)

    public virtual Task<Operation<Instance, Instance>> DeleteInstanceAsync(DeleteInstanceRequest request, CallSettings callSettings = null)

Deletes a Instance

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.DeleteInstanceRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    gcrv::DeleteInstanceRequest request = new gcrv::DeleteInstanceRequest
    {
        InstanceName = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
        ValidateOnly = false,
        Etag = "",
    };
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.DeleteInstanceAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceDeleteInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### DeleteInstanceAsync(DeleteInstanceRequest, CancellationToken)

    public virtual Task<Operation<Instance, Instance>> DeleteInstanceAsync(DeleteInstanceRequest request, CancellationToken cancellationToken)

Deletes a Instance

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.DeleteInstanceRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    gcrv::DeleteInstanceRequest request = new gcrv::DeleteInstanceRequest
    {
        InstanceName = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
        ValidateOnly = false,
        Etag = "",
    };
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.DeleteInstanceAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceDeleteInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### DeleteInstanceAsync(InstanceName, CallSettings)

    public virtual Task<Operation<Instance, Instance>> DeleteInstanceAsync(InstanceName name, CallSettings callSettings = null)

Deletes a Instance

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstanceName` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    gcrv::InstanceName name = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.DeleteInstanceAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceDeleteInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### DeleteInstanceAsync(InstanceName, CancellationToken)

    public virtual Task<Operation<Instance, Instance>> DeleteInstanceAsync(InstanceName name, CancellationToken cancellationToken)

Deletes a Instance

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstanceName` |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    gcrv::InstanceName name = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.DeleteInstanceAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceDeleteInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### DeleteInstanceAsync(string, CallSettings)

    public virtual Task<Operation<Instance, Instance>> DeleteInstanceAsync(string name, CallSettings callSettings = null)

Deletes a Instance

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.DeleteInstanceAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceDeleteInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### DeleteInstanceAsync(string, CancellationToken)

    public virtual Task<Operation<Instance, Instance>> DeleteInstanceAsync(string name, CancellationToken cancellationToken)

Deletes a Instance

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.DeleteInstanceAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceDeleteInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### GetInstance(GetInstanceRequest, CallSettings)

    public virtual Instance GetInstance(GetInstanceRequest request, CallSettings callSettings = null)

Gets a Instance

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.GetInstanceRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | The RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = gcrv::InstancesClient.Create();
    // Initialize request argument(s)
    gcrv::GetInstanceRequest request = new gcrv::GetInstanceRequest
    {
        InstanceName = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
    };
    // Make the request
    gcrv::Instance response = instancesClient.GetInstance(request);

### GetInstance(InstanceName, CallSettings)

    public virtual Instance GetInstance(InstanceName name, CallSettings callSettings = null)

Gets a Instance

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstanceName` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | The RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = gcrv::InstancesClient.Create();
    // Initialize request argument(s)
    gcrv::InstanceName name = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
    // Make the request
    gcrv::Instance response = instancesClient.GetInstance(name);

### GetInstance(string, CallSettings)

    public virtual Instance GetInstance(string name, CallSettings callSettings = null)

Gets a Instance

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | The RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = gcrv::InstancesClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
    // Make the request
    gcrv::Instance response = instancesClient.GetInstance(name);

### GetInstanceAsync(GetInstanceRequest, CallSettings)

    public virtual Task<Instance> GetInstanceAsync(GetInstanceRequest request, CallSettings callSettings = null)

Gets a Instance

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.GetInstanceRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    gcrv::GetInstanceRequest request = new gcrv::GetInstanceRequest
    {
        InstanceName = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
    };
    // Make the request
    gcrv::Instance response = await instancesClient.GetInstanceAsync(request);

### GetInstanceAsync(GetInstanceRequest, CancellationToken)

    public virtual Task<Instance> GetInstanceAsync(GetInstanceRequest request, CancellationToken cancellationToken)

Gets a Instance

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.GetInstanceRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    gcrv::GetInstanceRequest request = new gcrv::GetInstanceRequest
    {
        InstanceName = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
    };
    // Make the request
    gcrv::Instance response = await instancesClient.GetInstanceAsync(request);

### GetInstanceAsync(InstanceName, CallSettings)

    public virtual Task<Instance> GetInstanceAsync(InstanceName name, CallSettings callSettings = null)

Gets a Instance

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstanceName` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    gcrv::InstanceName name = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
    // Make the request
    gcrv::Instance response = await instancesClient.GetInstanceAsync(name);

### GetInstanceAsync(InstanceName, CancellationToken)

    public virtual Task<Instance> GetInstanceAsync(InstanceName name, CancellationToken cancellationToken)

Gets a Instance

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstanceName` |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    gcrv::InstanceName name = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
    // Make the request
    gcrv::Instance response = await instancesClient.GetInstanceAsync(name);

### GetInstanceAsync(string, CallSettings)

    public virtual Task<Instance> GetInstanceAsync(string name, CallSettings callSettings = null)

Gets a Instance

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
    // Make the request
    gcrv::Instance response = await instancesClient.GetInstanceAsync(name);

### GetInstanceAsync(string, CancellationToken)

    public virtual Task<Instance> GetInstanceAsync(string name, CancellationToken cancellationToken)

Gets a Instance

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
    // Make the request
    gcrv::Instance response = await instancesClient.GetInstanceAsync(name);

### ListInstances(LocationName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListInstancesResponse, Instance> ListInstances(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Instances. Results are sorted by creation time, descending.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The location and project to list resources on. Format: projects/{project}/locations/{location}, where {project} can be project id or number. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.ListInstancesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A pageable sequence of [Instance](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance) resources. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = gcrv::InstancesClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    PagedEnumerable<gcrv::ListInstancesResponse, gcrv::Instance> response = instancesClient.ListInstances(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (gcrv::Instance item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (gcrv::ListInstancesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (gcrv::Instance item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<gcrv::Instance> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (gcrv::Instance item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListInstances(ListInstancesRequest, CallSettings)

    public virtual PagedEnumerable<ListInstancesResponse, Instance> ListInstances(ListInstancesRequest request, CallSettings callSettings = null)

Lists Instances. Results are sorted by creation time, descending.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.ListInstancesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.ListInstancesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A pageable sequence of [Instance](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance) resources. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = gcrv::InstancesClient.Create();
    // Initialize request argument(s)
    gcrv::ListInstancesRequest request = new gcrv::ListInstancesRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        ShowDeleted = false,
    };
    // Make the request
    PagedEnumerable<gcrv::ListInstancesResponse, gcrv::Instance> response = instancesClient.ListInstances(request);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (gcrv::Instance item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (gcrv::ListInstancesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (gcrv::Instance item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<gcrv::Instance> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (gcrv::Instance item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListInstances(string, string, int?, CallSettings)

    public virtual PagedEnumerable<ListInstancesResponse, Instance> ListInstances(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Instances. Results are sorted by creation time, descending.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The location and project to list resources on. Format: projects/{project}/locations/{location}, where {project} can be project id or number. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.ListInstancesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A pageable sequence of [Instance](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance) resources. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = gcrv::InstancesClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    // Make the request
    PagedEnumerable<gcrv::ListInstancesResponse, gcrv::Instance> response = instancesClient.ListInstances(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (gcrv::Instance item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (gcrv::ListInstancesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (gcrv::Instance item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<gcrv::Instance> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (gcrv::Instance item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListInstancesAsync(LocationName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListInstancesResponse, Instance> ListInstancesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Instances. Results are sorted by creation time, descending.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The location and project to list resources on. Format: projects/{project}/locations/{location}, where {project} can be project id or number. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.ListInstancesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A pageable asynchronous sequence of [Instance](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance) resources. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    PagedAsyncEnumerable<gcrv::ListInstancesResponse, gcrv::Instance> response = instancesClient.ListInstancesAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (gcrv::Instance item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (gcrv::ListInstancesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (gcrv::Instance item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<gcrv::Instance> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (gcrv::Instance item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListInstancesAsync(ListInstancesRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListInstancesResponse, Instance> ListInstancesAsync(ListInstancesRequest request, CallSettings callSettings = null)

Lists Instances. Results are sorted by creation time, descending.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.ListInstancesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.ListInstancesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A pageable asynchronous sequence of [Instance](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance) resources. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    gcrv::ListInstancesRequest request = new gcrv::ListInstancesRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        ShowDeleted = false,
    };
    // Make the request
    PagedAsyncEnumerable<gcrv::ListInstancesResponse, gcrv::Instance> response = instancesClient.ListInstancesAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (gcrv::Instance item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (gcrv::ListInstancesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (gcrv::Instance item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<gcrv::Instance> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (gcrv::Instance item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListInstancesAsync(string, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListInstancesResponse, Instance> ListInstancesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Instances. Results are sorted by creation time, descending.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The location and project to list resources on. Format: projects/{project}/locations/{location}, where {project} can be project id or number. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.ListInstancesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A pageable asynchronous sequence of [Instance](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance) resources. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    // Make the request
    PagedAsyncEnumerable<gcrv::ListInstancesResponse, gcrv::Instance> response = instancesClient.ListInstancesAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (gcrv::Instance item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (gcrv::ListInstancesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (gcrv::Instance item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<gcrv::Instance> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (gcrv::Instance item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### PollOnceCreateInstance(string, CallSettings)

    public virtual Operation<Instance, Instance> PollOnceCreateInstance(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `CreateInstance`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | The result of polling the operation. |

### PollOnceCreateInstanceAsync(string, CallSettings)

    public virtual Task<Operation<Instance, Instance>> PollOnceCreateInstanceAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`CreateInstance`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A task representing the result of polling the operation. |

### PollOnceDeleteInstance(string, CallSettings)

    public virtual Operation<Instance, Instance> PollOnceDeleteInstance(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `DeleteInstance`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | The result of polling the operation. |

### PollOnceDeleteInstanceAsync(string, CallSettings)

    public virtual Task<Operation<Instance, Instance>> PollOnceDeleteInstanceAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`DeleteInstance`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A task representing the result of polling the operation. |

### PollOnceStartInstance(string, CallSettings)

    public virtual Operation<Instance, Instance> PollOnceStartInstance(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `StartInstance`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | The result of polling the operation. |

### PollOnceStartInstanceAsync(string, CallSettings)

    public virtual Task<Operation<Instance, Instance>> PollOnceStartInstanceAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`StartInstance`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A task representing the result of polling the operation. |

### PollOnceStopInstance(string, CallSettings)

    public virtual Operation<Instance, Instance> PollOnceStopInstance(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `StopInstance`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | The result of polling the operation. |

### PollOnceStopInstanceAsync(string, CallSettings)

    public virtual Task<Operation<Instance, Instance>> PollOnceStopInstanceAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`StopInstance`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A task representing the result of polling the operation. |

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstancesClient#Google_Cloud_Run_V2_InstancesClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstancesClient#Google_Cloud_Run_V2_InstancesClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstancesClient#Google_Cloud_Run_V2_InstancesClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstancesClient#Google_Cloud_Run_V2_InstancesClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.

### StartInstance(InstanceName, CallSettings)

    public virtual Operation<Instance, Instance> StartInstance(InstanceName name, CallSettings callSettings = null)

Starts an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstanceName` Required. The name of the Instance to stop. Format: `projects/{project}/locations/{location}/instances/{instance}`, where `{project}` can be project id or number. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | The RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = gcrv::InstancesClient.Create();
    // Initialize request argument(s)
    gcrv::InstanceName name = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = instancesClient.StartInstance(name);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = instancesClient.PollOnceStartInstance(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### StartInstance(StartInstanceRequest, CallSettings)

    public virtual Operation<Instance, Instance> StartInstance(StartInstanceRequest request, CallSettings callSettings = null)

Starts an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.StartInstanceRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | The RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = gcrv::InstancesClient.Create();
    // Initialize request argument(s)
    gcrv::StartInstanceRequest request = new gcrv::StartInstanceRequest
    {
        InstanceName = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
        ValidateOnly = false,
        Etag = "",
    };
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = instancesClient.StartInstance(request);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = instancesClient.PollOnceStartInstance(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### StartInstance(string, CallSettings)

    public virtual Operation<Instance, Instance> StartInstance(string name, CallSettings callSettings = null)

Starts an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the Instance to stop. Format: `projects/{project}/locations/{location}/instances/{instance}`, where `{project}` can be project id or number. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | The RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = gcrv::InstancesClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = instancesClient.StartInstance(name);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = instancesClient.PollOnceStartInstance(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### StartInstanceAsync(InstanceName, CallSettings)

    public virtual Task<Operation<Instance, Instance>> StartInstanceAsync(InstanceName name, CallSettings callSettings = null)

Starts an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstanceName` Required. The name of the Instance to stop. Format: `projects/{project}/locations/{location}/instances/{instance}`, where `{project}` can be project id or number. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    gcrv::InstanceName name = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.StartInstanceAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceStartInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### StartInstanceAsync(InstanceName, CancellationToken)

    public virtual Task<Operation<Instance, Instance>> StartInstanceAsync(InstanceName name, CancellationToken cancellationToken)

Starts an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstanceName` Required. The name of the Instance to stop. Format: `projects/{project}/locations/{location}/instances/{instance}`, where `{project}` can be project id or number. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    gcrv::InstanceName name = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.StartInstanceAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceStartInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### StartInstanceAsync(StartInstanceRequest, CallSettings)

    public virtual Task<Operation<Instance, Instance>> StartInstanceAsync(StartInstanceRequest request, CallSettings callSettings = null)

Starts an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.StartInstanceRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    gcrv::StartInstanceRequest request = new gcrv::StartInstanceRequest
    {
        InstanceName = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
        ValidateOnly = false,
        Etag = "",
    };
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.StartInstanceAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceStartInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### StartInstanceAsync(StartInstanceRequest, CancellationToken)

    public virtual Task<Operation<Instance, Instance>> StartInstanceAsync(StartInstanceRequest request, CancellationToken cancellationToken)

Starts an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.StartInstanceRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    gcrv::StartInstanceRequest request = new gcrv::StartInstanceRequest
    {
        InstanceName = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
        ValidateOnly = false,
        Etag = "",
    };
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.StartInstanceAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceStartInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### StartInstanceAsync(string, CallSettings)

    public virtual Task<Operation<Instance, Instance>> StartInstanceAsync(string name, CallSettings callSettings = null)

Starts an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the Instance to stop. Format: `projects/{project}/locations/{location}/instances/{instance}`, where `{project}` can be project id or number. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.StartInstanceAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceStartInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### StartInstanceAsync(string, CancellationToken)

    public virtual Task<Operation<Instance, Instance>> StartInstanceAsync(string name, CancellationToken cancellationToken)

Starts an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the Instance to stop. Format: `projects/{project}/locations/{location}/instances/{instance}`, where `{project}` can be project id or number. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.StartInstanceAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceStartInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### StopInstance(InstanceName, CallSettings)

    public virtual Operation<Instance, Instance> StopInstance(InstanceName name, CallSettings callSettings = null)

Stops an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstanceName` Required. The name of the Instance to stop. Format: `projects/{project}/locations/{location}/instances/{instance}`, where `{project}` can be project id or number. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | The RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = gcrv::InstancesClient.Create();
    // Initialize request argument(s)
    gcrv::InstanceName name = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = instancesClient.StopInstance(name);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = instancesClient.PollOnceStopInstance(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### StopInstance(StopInstanceRequest, CallSettings)

    public virtual Operation<Instance, Instance> StopInstance(StopInstanceRequest request, CallSettings callSettings = null)

Stops an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.StopInstanceRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | The RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = gcrv::InstancesClient.Create();
    // Initialize request argument(s)
    gcrv::StopInstanceRequest request = new gcrv::StopInstanceRequest
    {
        InstanceName = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
        ValidateOnly = false,
        Etag = "",
    };
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = instancesClient.StopInstance(request);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = instancesClient.PollOnceStopInstance(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### StopInstance(string, CallSettings)

    public virtual Operation<Instance, Instance> StopInstance(string name, CallSettings callSettings = null)

Stops an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the Instance to stop. Format: `projects/{project}/locations/{location}/instances/{instance}`, where `{project}` can be project id or number. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | The RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = gcrv::InstancesClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = instancesClient.StopInstance(name);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = instancesClient.PollOnceStopInstance(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### StopInstanceAsync(InstanceName, CallSettings)

    public virtual Task<Operation<Instance, Instance>> StopInstanceAsync(InstanceName name, CallSettings callSettings = null)

Stops an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstanceName` Required. The name of the Instance to stop. Format: `projects/{project}/locations/{location}/instances/{instance}`, where `{project}` can be project id or number. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    gcrv::InstanceName name = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.StopInstanceAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceStopInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### StopInstanceAsync(InstanceName, CancellationToken)

    public virtual Task<Operation<Instance, Instance>> StopInstanceAsync(InstanceName name, CancellationToken cancellationToken)

Stops an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.InstanceName` Required. The name of the Instance to stop. Format: `projects/{project}/locations/{location}/instances/{instance}`, where `{project}` can be project id or number. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    gcrv::InstanceName name = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.StopInstanceAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceStopInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### StopInstanceAsync(StopInstanceRequest, CallSettings)

    public virtual Task<Operation<Instance, Instance>> StopInstanceAsync(StopInstanceRequest request, CallSettings callSettings = null)

Stops an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.StopInstanceRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    gcrv::StopInstanceRequest request = new gcrv::StopInstanceRequest
    {
        InstanceName = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
        ValidateOnly = false,
        Etag = "",
    };
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.StopInstanceAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceStopInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### StopInstanceAsync(StopInstanceRequest, CancellationToken)

    public virtual Task<Operation<Instance, Instance>> StopInstanceAsync(StopInstanceRequest request, CancellationToken cancellationToken)

Stops an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.StopInstanceRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    gcrv::StopInstanceRequest request = new gcrv::StopInstanceRequest
    {
        InstanceName = gcrv::InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
        ValidateOnly = false,
        Etag = "",
    };
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.StopInstanceAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceStopInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### StopInstanceAsync(string, CallSettings)

    public virtual Task<Operation<Instance, Instance>> StopInstanceAsync(string name, CallSettings callSettings = null)

Stops an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the Instance to stop. Format: `projects/{project}/locations/{location}/instances/{instance}`, where `{project}` can be project id or number. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.StopInstanceAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceStopInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }

### StopInstanceAsync(string, CancellationToken)

    public virtual Task<Operation<Instance, Instance>> StopInstanceAsync(string name, CancellationToken cancellationToken)

Stops an Instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the Instance to stop. Format: `projects/{project}/locations/{location}/instances/{instance}`, where `{project}` can be project id or number. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instancehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Instance` | A Task containing the RPC response. |

**Example**

    // Create client
    gcrv::InstancesClient instancesClient = await gcrv::InstancesClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
    // Make the request
    Operation<gcrv::Instance, gcrv::Instance> response = await instancesClient.StopInstanceAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<gcrv::Instance, gcrv::Instance> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    gcrv::Instance result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<gcrv::Instance, gcrv::Instance> retrievedResponse = await instancesClient.PollOnceStopInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        gcrv::Instance retrievedResult = retrievedResponse.Result;
    }