# Dataflow v1beta3 API - Class FlexTemplatesServiceClient (2.0.0-beta10)

2.0.0-beta10 (latest) 2.0.0-beta09 1.0.0-beta03

    public abstract class FlexTemplatesServiceClient

Reference documentation and code samples for the Dataflow v1beta3 API class FlexTemplatesServiceClient.

FlexTemplatesService client wrapper, for convenient use.

## Inheritance

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

## 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

[FlexTemplatesServiceClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataflow.V1Beta3/latest/Google.Cloud.Dataflow.V1Beta3.FlexTemplatesServiceClientImpl)

## Namespace

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

## Assembly

Google.Cloud.Dataflow.V1Beta3.dll

## Remarks

Provides a service for Flex templates.

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the FlexTemplatesService service, which is a host of "dataflow.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 FlexTemplatesService 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 FlexTemplatesService scopes are:

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

### GrpcClient

    public virtual FlexTemplatesService.FlexTemplatesServiceClient GrpcClient { get; }

The underlying gRPC FlexTemplatesService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataflow.V1Beta3/latest/Google.Cloud.Dataflow.V1Beta3.FlexTemplatesServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataflow.V1Beta3/latest/Google.Cloud.Dataflow.V1Beta3.FlexTemplatesService.FlexTemplatesServiceClient` |   |

### 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` |   |

## Methods

### Create()

    public static FlexTemplatesServiceClient Create()

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

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

### CreateAsync(CancellationToken)

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

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

| **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.Dataflow.V1Beta3/latest/Google.Cloud.Dataflow.V1Beta3.FlexTemplatesServiceClient` | The task representing the created [FlexTemplatesServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataflow.V1Beta3/latest/Google.Cloud.Dataflow.V1Beta3.FlexTemplatesServiceClient). |

### LaunchFlexTemplate(LaunchFlexTemplateRequest, CallSettings)

    public virtual LaunchFlexTemplateResponse LaunchFlexTemplate(LaunchFlexTemplateRequest request, CallSettings callSettings = null)

Launch a job with a FlexTemplate.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataflow.V1Beta3/latest/Google.Cloud.Dataflow.V1Beta3.LaunchFlexTemplateRequest` 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.Dataflow.V1Beta3/latest/Google.Cloud.Dataflow.V1Beta3.LaunchFlexTemplateResponse` | The RPC response. |

**Example**

    // Create client
    FlexTemplatesServiceClient flexTemplatesServiceClient = FlexTemplatesServiceClient.Create();
    // Initialize request argument(s)
    LaunchFlexTemplateRequest request = new LaunchFlexTemplateRequest
    {
        ProjectId = "",
        LaunchParameter = new LaunchFlexTemplateParameter(),
        Location = "",
        ValidateOnly = false,
    };
    // Make the request
    LaunchFlexTemplateResponse response = flexTemplatesServiceClient.LaunchFlexTemplate(request);

### LaunchFlexTemplateAsync(LaunchFlexTemplateRequest, CallSettings)

    public virtual Task<LaunchFlexTemplateResponse> LaunchFlexTemplateAsync(LaunchFlexTemplateRequest request, CallSettings callSettings = null)

Launch a job with a FlexTemplate.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataflow.V1Beta3/latest/Google.Cloud.Dataflow.V1Beta3.LaunchFlexTemplateRequest` 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.Dataflow.V1Beta3/latest/Google.Cloud.Dataflow.V1Beta3.LaunchFlexTemplateResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    FlexTemplatesServiceClient flexTemplatesServiceClient = await FlexTemplatesServiceClient.CreateAsync();
    // Initialize request argument(s)
    LaunchFlexTemplateRequest request = new LaunchFlexTemplateRequest
    {
        ProjectId = "",
        LaunchParameter = new LaunchFlexTemplateParameter(),
        Location = "",
        ValidateOnly = false,
    };
    // Make the request
    LaunchFlexTemplateResponse response = await flexTemplatesServiceClient.LaunchFlexTemplateAsync(request);

### LaunchFlexTemplateAsync(LaunchFlexTemplateRequest, CancellationToken)

    public virtual Task<LaunchFlexTemplateResponse> LaunchFlexTemplateAsync(LaunchFlexTemplateRequest request, CancellationToken cancellationToken)

Launch a job with a FlexTemplate.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataflow.V1Beta3/latest/Google.Cloud.Dataflow.V1Beta3.LaunchFlexTemplateRequest` 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.Dataflow.V1Beta3/latest/Google.Cloud.Dataflow.V1Beta3.LaunchFlexTemplateResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    FlexTemplatesServiceClient flexTemplatesServiceClient = await FlexTemplatesServiceClient.CreateAsync();
    // Initialize request argument(s)
    LaunchFlexTemplateRequest request = new LaunchFlexTemplateRequest
    {
        ProjectId = "",
        LaunchParameter = new LaunchFlexTemplateParameter(),
        Location = "",
        ValidateOnly = false,
    };
    // Make the request
    LaunchFlexTemplateResponse response = await flexTemplatesServiceClient.LaunchFlexTemplateAsync(request);

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataflow.V1Beta3/latest/Google.Cloud.Dataflow.V1Beta3.FlexTemplatesServiceClient#Google_Cloud_Dataflow_V1Beta3_FlexTemplatesServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataflow.V1Beta3/latest/Google.Cloud.Dataflow.V1Beta3.FlexTemplatesServiceClient#Google_Cloud_Dataflow_V1Beta3_FlexTemplatesServiceClient_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.Dataflow.V1Beta3/latest/Google.Cloud.Dataflow.V1Beta3.FlexTemplatesServiceClient#Google_Cloud_Dataflow_V1Beta3_FlexTemplatesServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataflow.V1Beta3/latest/Google.Cloud.Dataflow.V1Beta3.FlexTemplatesServiceClient#Google_Cloud_Dataflow_V1Beta3_FlexTemplatesServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.