# Google Cloud Dataproc v1 API - Class SessionTemplateControllerClient (5.27.0)

5.27.0 (latest) 5.26.0 5.25.0 5.24.0 5.23.0 5.22.0 5.21.0 5.20.0 5.19.0 5.18.0 5.17.0 5.16.0 5.15.0 5.14.0 5.13.0 5.12.0 5.11.0 5.10.0 5.9.0 5.8.0 5.7.0 5.6.0 5.5.0 5.4.0 5.3.0 5.2.0 5.1.0 5.0.0 4.0.0 3.4.0 3.3.0 3.2.0 3.1.0

    public abstract class SessionTemplateControllerClient

Reference documentation and code samples for the Google Cloud Dataproc v1 API class SessionTemplateControllerClient.

SessionTemplateController client wrapper, for convenient use.

## Inheritance

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

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

[SessionTemplateControllerClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplateControllerClientImpl)

## Namespace

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

## Assembly

Google.Cloud.Dataproc.V1.dll

## Remarks

The SessionTemplateController provides methods to manage session templates.

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

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

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

### GrpcClient

    public virtual SessionTemplateController.SessionTemplateControllerClient GrpcClient { get; }

The underlying gRPC SessionTemplateController client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplateControllerhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplateController.SessionTemplateControllerClient` |   |

### IAMPolicyClient

    public virtual IAMPolicyClient IAMPolicyClient { get; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.IAMPolicyClient.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` |   |

## Methods

### Create()

    public static SessionTemplateControllerClient Create()

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

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

### CreateAsync(CancellationToken)

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

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

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

### CreateSessionTemplate(LocationName, SessionTemplate, CallSettings)

    public virtual SessionTemplate CreateSessionTemplate(LocationName parent, SessionTemplate sessionTemplate, CallSettings callSettings = null)

Create a session template synchronously.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent resource where this session template will be created. |
| `sessionTemplate` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` Required. The session template to create. |
| `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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | The RPC response. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = SessionTemplateControllerClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    SessionTemplate sessionTemplate = new SessionTemplate();
    // Make the request
    SessionTemplate response = sessionTemplateControllerClient.CreateSessionTemplate(parent, sessionTemplate);

### CreateSessionTemplate(CreateSessionTemplateRequest, CallSettings)

    public virtual SessionTemplate CreateSessionTemplate(CreateSessionTemplateRequest request, CallSettings callSettings = null)

Create a session template synchronously.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.CreateSessionTemplateRequest` 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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | The RPC response. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = SessionTemplateControllerClient.Create();
    // Initialize request argument(s)
    CreateSessionTemplateRequest request = new CreateSessionTemplateRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        SessionTemplate = new SessionTemplate(),
    };
    // Make the request
    SessionTemplate response = sessionTemplateControllerClient.CreateSessionTemplate(request);

### CreateSessionTemplate(string, SessionTemplate, CallSettings)

    public virtual SessionTemplate CreateSessionTemplate(string parent, SessionTemplate sessionTemplate, CallSettings callSettings = null)

Create a session template synchronously.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource where this session template will be created. |
| `sessionTemplate` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` Required. The session template to create. |
| `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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | The RPC response. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = SessionTemplateControllerClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    SessionTemplate sessionTemplate = new SessionTemplate();
    // Make the request
    SessionTemplate response = sessionTemplateControllerClient.CreateSessionTemplate(parent, sessionTemplate);

### CreateSessionTemplateAsync(LocationName, SessionTemplate, CallSettings)

    public virtual Task<SessionTemplate> CreateSessionTemplateAsync(LocationName parent, SessionTemplate sessionTemplate, CallSettings callSettings = null)

Create a session template synchronously.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent resource where this session template will be created. |
| `sessionTemplate` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` Required. The session template to create. |
| `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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | A Task containing the RPC response. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    SessionTemplate sessionTemplate = new SessionTemplate();
    // Make the request
    SessionTemplate response = await sessionTemplateControllerClient.CreateSessionTemplateAsync(parent, sessionTemplate);

### CreateSessionTemplateAsync(LocationName, SessionTemplate, CancellationToken)

    public virtual Task<SessionTemplate> CreateSessionTemplateAsync(LocationName parent, SessionTemplate sessionTemplate, CancellationToken cancellationToken)

Create a session template synchronously.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent resource where this session template will be created. |
| `sessionTemplate` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` Required. The session template to create. |
| `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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | A Task containing the RPC response. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    SessionTemplate sessionTemplate = new SessionTemplate();
    // Make the request
    SessionTemplate response = await sessionTemplateControllerClient.CreateSessionTemplateAsync(parent, sessionTemplate);

### CreateSessionTemplateAsync(CreateSessionTemplateRequest, CallSettings)

    public virtual Task<SessionTemplate> CreateSessionTemplateAsync(CreateSessionTemplateRequest request, CallSettings callSettings = null)

Create a session template synchronously.

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

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    CreateSessionTemplateRequest request = new CreateSessionTemplateRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        SessionTemplate = new SessionTemplate(),
    };
    // Make the request
    SessionTemplate response = await sessionTemplateControllerClient.CreateSessionTemplateAsync(request);

### CreateSessionTemplateAsync(CreateSessionTemplateRequest, CancellationToken)

    public virtual Task<SessionTemplate> CreateSessionTemplateAsync(CreateSessionTemplateRequest request, CancellationToken cancellationToken)

Create a session template synchronously.

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

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    CreateSessionTemplateRequest request = new CreateSessionTemplateRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        SessionTemplate = new SessionTemplate(),
    };
    // Make the request
    SessionTemplate response = await sessionTemplateControllerClient.CreateSessionTemplateAsync(request);

### CreateSessionTemplateAsync(string, SessionTemplate, CallSettings)

    public virtual Task<SessionTemplate> CreateSessionTemplateAsync(string parent, SessionTemplate sessionTemplate, CallSettings callSettings = null)

Create a session template synchronously.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource where this session template will be created. |
| `sessionTemplate` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` Required. The session template to create. |
| `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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | A Task containing the RPC response. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    SessionTemplate sessionTemplate = new SessionTemplate();
    // Make the request
    SessionTemplate response = await sessionTemplateControllerClient.CreateSessionTemplateAsync(parent, sessionTemplate);

### CreateSessionTemplateAsync(string, SessionTemplate, CancellationToken)

    public virtual Task<SessionTemplate> CreateSessionTemplateAsync(string parent, SessionTemplate sessionTemplate, CancellationToken cancellationToken)

Create a session template synchronously.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource where this session template will be created. |
| `sessionTemplate` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` Required. The session template to create. |
| `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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | A Task containing the RPC response. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    SessionTemplate sessionTemplate = new SessionTemplate();
    // Make the request
    SessionTemplate response = await sessionTemplateControllerClient.CreateSessionTemplateAsync(parent, sessionTemplate);

### DeleteSessionTemplate(DeleteSessionTemplateRequest, CallSettings)

    public virtual void DeleteSessionTemplate(DeleteSessionTemplateRequest request, CallSettings callSettings = null)

Deletes a session template.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.DeleteSessionTemplateRequest` 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. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = SessionTemplateControllerClient.Create();
    // Initialize request argument(s)
    DeleteSessionTemplateRequest request = new DeleteSessionTemplateRequest
    {
        SessionTemplateName = SessionTemplateName.FromProjectLocationTemplate("[PROJECT]", "[LOCATION]", "[TEMPLATE]"),
    };
    // Make the request
    sessionTemplateControllerClient.DeleteSessionTemplate(request);

### DeleteSessionTemplate(SessionTemplateName, CallSettings)

    public virtual void DeleteSessionTemplate(SessionTemplateName name, CallSettings callSettings = null)

Deletes a session template.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplateName` Required. The name of the session template resource to delete. |
| `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. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = SessionTemplateControllerClient.Create();
    // Initialize request argument(s)
    SessionTemplateName name = SessionTemplateName.FromProjectLocationTemplate("[PROJECT]", "[LOCATION]", "[TEMPLATE]");
    // Make the request
    sessionTemplateControllerClient.DeleteSessionTemplate(name);

### DeleteSessionTemplate(string, CallSettings)

    public virtual void DeleteSessionTemplate(string name, CallSettings callSettings = null)

Deletes a session template.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the session template resource to delete. |
| `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. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = SessionTemplateControllerClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/sessionTemplates/[TEMPLATE]";
    // Make the request
    sessionTemplateControllerClient.DeleteSessionTemplate(name);

### DeleteSessionTemplateAsync(DeleteSessionTemplateRequest, CallSettings)

    public virtual Task DeleteSessionTemplateAsync(DeleteSessionTemplateRequest request, CallSettings callSettings = null)

Deletes a session template.

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

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    DeleteSessionTemplateRequest request = new DeleteSessionTemplateRequest
    {
        SessionTemplateName = SessionTemplateName.FromProjectLocationTemplate("[PROJECT]", "[LOCATION]", "[TEMPLATE]"),
    };
    // Make the request
    await sessionTemplateControllerClient.DeleteSessionTemplateAsync(request);

### DeleteSessionTemplateAsync(DeleteSessionTemplateRequest, CancellationToken)

    public virtual Task DeleteSessionTemplateAsync(DeleteSessionTemplateRequest request, CancellationToken cancellationToken)

Deletes a session template.

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

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    DeleteSessionTemplateRequest request = new DeleteSessionTemplateRequest
    {
        SessionTemplateName = SessionTemplateName.FromProjectLocationTemplate("[PROJECT]", "[LOCATION]", "[TEMPLATE]"),
    };
    // Make the request
    await sessionTemplateControllerClient.DeleteSessionTemplateAsync(request);

### DeleteSessionTemplateAsync(SessionTemplateName, CallSettings)

    public virtual Task DeleteSessionTemplateAsync(SessionTemplateName name, CallSettings callSettings = null)

Deletes a session template.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplateName` Required. The name of the session template resource to delete. |
| `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` | A Task containing the RPC response. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    SessionTemplateName name = SessionTemplateName.FromProjectLocationTemplate("[PROJECT]", "[LOCATION]", "[TEMPLATE]");
    // Make the request
    await sessionTemplateControllerClient.DeleteSessionTemplateAsync(name);

### DeleteSessionTemplateAsync(SessionTemplateName, CancellationToken)

    public virtual Task DeleteSessionTemplateAsync(SessionTemplateName name, CancellationToken cancellationToken)

Deletes a session template.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplateName` Required. The name of the session template resource to delete. |
| `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` | A Task containing the RPC response. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    SessionTemplateName name = SessionTemplateName.FromProjectLocationTemplate("[PROJECT]", "[LOCATION]", "[TEMPLATE]");
    // Make the request
    await sessionTemplateControllerClient.DeleteSessionTemplateAsync(name);

### DeleteSessionTemplateAsync(string, CallSettings)

    public virtual Task DeleteSessionTemplateAsync(string name, CallSettings callSettings = null)

Deletes a session template.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the session template resource to delete. |
| `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` | A Task containing the RPC response. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/sessionTemplates/[TEMPLATE]";
    // Make the request
    await sessionTemplateControllerClient.DeleteSessionTemplateAsync(name);

### DeleteSessionTemplateAsync(string, CancellationToken)

    public virtual Task DeleteSessionTemplateAsync(string name, CancellationToken cancellationToken)

Deletes a session template.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the session template resource to delete. |
| `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` | A Task containing the RPC response. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/sessionTemplates/[TEMPLATE]";
    // Make the request
    await sessionTemplateControllerClient.DeleteSessionTemplateAsync(name);

### GetSessionTemplate(GetSessionTemplateRequest, CallSettings)

    public virtual SessionTemplate GetSessionTemplate(GetSessionTemplateRequest request, CallSettings callSettings = null)

Gets the resource representation for a session template.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.GetSessionTemplateRequest` 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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | The RPC response. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = SessionTemplateControllerClient.Create();
    // Initialize request argument(s)
    GetSessionTemplateRequest request = new GetSessionTemplateRequest
    {
        SessionTemplateName = SessionTemplateName.FromProjectLocationTemplate("[PROJECT]", "[LOCATION]", "[TEMPLATE]"),
    };
    // Make the request
    SessionTemplate response = sessionTemplateControllerClient.GetSessionTemplate(request);

### GetSessionTemplate(SessionTemplateName, CallSettings)

    public virtual SessionTemplate GetSessionTemplate(SessionTemplateName name, CallSettings callSettings = null)

Gets the resource representation for a session template.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplateName` Required. The name of the session template to retrieve. |
| `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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | The RPC response. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = SessionTemplateControllerClient.Create();
    // Initialize request argument(s)
    SessionTemplateName name = SessionTemplateName.FromProjectLocationTemplate("[PROJECT]", "[LOCATION]", "[TEMPLATE]");
    // Make the request
    SessionTemplate response = sessionTemplateControllerClient.GetSessionTemplate(name);

### GetSessionTemplate(string, CallSettings)

    public virtual SessionTemplate GetSessionTemplate(string name, CallSettings callSettings = null)

Gets the resource representation for a session template.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the session template to retrieve. |
| `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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | The RPC response. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = SessionTemplateControllerClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/sessionTemplates/[TEMPLATE]";
    // Make the request
    SessionTemplate response = sessionTemplateControllerClient.GetSessionTemplate(name);

### GetSessionTemplateAsync(GetSessionTemplateRequest, CallSettings)

    public virtual Task<SessionTemplate> GetSessionTemplateAsync(GetSessionTemplateRequest request, CallSettings callSettings = null)

Gets the resource representation for a session template.

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

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    GetSessionTemplateRequest request = new GetSessionTemplateRequest
    {
        SessionTemplateName = SessionTemplateName.FromProjectLocationTemplate("[PROJECT]", "[LOCATION]", "[TEMPLATE]"),
    };
    // Make the request
    SessionTemplate response = await sessionTemplateControllerClient.GetSessionTemplateAsync(request);

### GetSessionTemplateAsync(GetSessionTemplateRequest, CancellationToken)

    public virtual Task<SessionTemplate> GetSessionTemplateAsync(GetSessionTemplateRequest request, CancellationToken cancellationToken)

Gets the resource representation for a session template.

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

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    GetSessionTemplateRequest request = new GetSessionTemplateRequest
    {
        SessionTemplateName = SessionTemplateName.FromProjectLocationTemplate("[PROJECT]", "[LOCATION]", "[TEMPLATE]"),
    };
    // Make the request
    SessionTemplate response = await sessionTemplateControllerClient.GetSessionTemplateAsync(request);

### GetSessionTemplateAsync(SessionTemplateName, CallSettings)

    public virtual Task<SessionTemplate> GetSessionTemplateAsync(SessionTemplateName name, CallSettings callSettings = null)

Gets the resource representation for a session template.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplateName` Required. The name of the session template to retrieve. |
| `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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | A Task containing the RPC response. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    SessionTemplateName name = SessionTemplateName.FromProjectLocationTemplate("[PROJECT]", "[LOCATION]", "[TEMPLATE]");
    // Make the request
    SessionTemplate response = await sessionTemplateControllerClient.GetSessionTemplateAsync(name);

### GetSessionTemplateAsync(SessionTemplateName, CancellationToken)

    public virtual Task<SessionTemplate> GetSessionTemplateAsync(SessionTemplateName name, CancellationToken cancellationToken)

Gets the resource representation for a session template.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplateName` Required. The name of the session template to retrieve. |
| `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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | A Task containing the RPC response. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    SessionTemplateName name = SessionTemplateName.FromProjectLocationTemplate("[PROJECT]", "[LOCATION]", "[TEMPLATE]");
    // Make the request
    SessionTemplate response = await sessionTemplateControllerClient.GetSessionTemplateAsync(name);

### GetSessionTemplateAsync(string, CallSettings)

    public virtual Task<SessionTemplate> GetSessionTemplateAsync(string name, CallSettings callSettings = null)

Gets the resource representation for a session template.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the session template to retrieve. |
| `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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | A Task containing the RPC response. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/sessionTemplates/[TEMPLATE]";
    // Make the request
    SessionTemplate response = await sessionTemplateControllerClient.GetSessionTemplateAsync(name);

### GetSessionTemplateAsync(string, CancellationToken)

    public virtual Task<SessionTemplate> GetSessionTemplateAsync(string name, CancellationToken cancellationToken)

Gets the resource representation for a session template.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the session template to retrieve. |
| `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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | A Task containing the RPC response. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/sessionTemplates/[TEMPLATE]";
    // Make the request
    SessionTemplate response = await sessionTemplateControllerClient.GetSessionTemplateAsync(name);

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

    public virtual PagedEnumerable<ListSessionTemplatesResponse, SessionTemplate> ListSessionTemplates(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists session templates.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent that owns this collection of session templates. |
| `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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.ListSessionTemplatesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | A pageable sequence of [SessionTemplate](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate) resources. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = SessionTemplateControllerClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    PagedEnumerable<ListSessionTemplatesResponse, SessionTemplate> response = sessionTemplateControllerClient.ListSessionTemplates(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (SessionTemplate 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 (ListSessionTemplatesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (SessionTemplate 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<SessionTemplate> 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 (SessionTemplate 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;

### ListSessionTemplates(ListSessionTemplatesRequest, CallSettings)

    public virtual PagedEnumerable<ListSessionTemplatesResponse, SessionTemplate> ListSessionTemplates(ListSessionTemplatesRequest request, CallSettings callSettings = null)

Lists session templates.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.ListSessionTemplatesRequest` 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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.ListSessionTemplatesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | A pageable sequence of [SessionTemplate](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate) resources. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = SessionTemplateControllerClient.Create();
    // Initialize request argument(s)
    ListSessionTemplatesRequest request = new ListSessionTemplatesRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Filter = "",
    };
    // Make the request
    PagedEnumerable<ListSessionTemplatesResponse, SessionTemplate> response = sessionTemplateControllerClient.ListSessionTemplates(request);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (SessionTemplate 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 (ListSessionTemplatesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (SessionTemplate 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<SessionTemplate> 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 (SessionTemplate 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;

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

    public virtual PagedEnumerable<ListSessionTemplatesResponse, SessionTemplate> ListSessionTemplates(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists session templates.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent that owns this collection of session templates. |
| `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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.ListSessionTemplatesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | A pageable sequence of [SessionTemplate](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate) resources. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = SessionTemplateControllerClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    // Make the request
    PagedEnumerable<ListSessionTemplatesResponse, SessionTemplate> response = sessionTemplateControllerClient.ListSessionTemplates(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (SessionTemplate 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 (ListSessionTemplatesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (SessionTemplate 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<SessionTemplate> 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 (SessionTemplate 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;

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

    public virtual PagedAsyncEnumerable<ListSessionTemplatesResponse, SessionTemplate> ListSessionTemplatesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists session templates.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent that owns this collection of session templates. |
| `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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.ListSessionTemplatesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | A pageable asynchronous sequence of [SessionTemplate](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate) resources. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    PagedAsyncEnumerable<ListSessionTemplatesResponse, SessionTemplate> response = sessionTemplateControllerClient.ListSessionTemplatesAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (SessionTemplate 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 (ListSessionTemplatesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (SessionTemplate 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<SessionTemplate> 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 (SessionTemplate 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;

### ListSessionTemplatesAsync(ListSessionTemplatesRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListSessionTemplatesResponse, SessionTemplate> ListSessionTemplatesAsync(ListSessionTemplatesRequest request, CallSettings callSettings = null)

Lists session templates.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.ListSessionTemplatesRequest` 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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.ListSessionTemplatesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | A pageable asynchronous sequence of [SessionTemplate](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate) resources. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    ListSessionTemplatesRequest request = new ListSessionTemplatesRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Filter = "",
    };
    // Make the request
    PagedAsyncEnumerable<ListSessionTemplatesResponse, SessionTemplate> response = sessionTemplateControllerClient.ListSessionTemplatesAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (SessionTemplate 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 (ListSessionTemplatesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (SessionTemplate 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<SessionTemplate> 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 (SessionTemplate 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;

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

    public virtual PagedAsyncEnumerable<ListSessionTemplatesResponse, SessionTemplate> ListSessionTemplatesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists session templates.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent that owns this collection of session templates. |
| `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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.ListSessionTemplatesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | A pageable asynchronous sequence of [SessionTemplate](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate) resources. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    // Make the request
    PagedAsyncEnumerable<ListSessionTemplatesResponse, SessionTemplate> response = sessionTemplateControllerClient.ListSessionTemplatesAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (SessionTemplate 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 (ListSessionTemplatesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (SessionTemplate 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<SessionTemplate> 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 (SessionTemplate 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;

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

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

### UpdateSessionTemplate(SessionTemplate, CallSettings)

    public virtual SessionTemplate UpdateSessionTemplate(SessionTemplate sessionTemplate, CallSettings callSettings = null)

Updates the session template synchronously.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `sessionTemplate` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` Required. The updated session template. |
| `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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | The RPC response. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = SessionTemplateControllerClient.Create();
    // Initialize request argument(s)
    SessionTemplate sessionTemplate = new SessionTemplate();
    // Make the request
    SessionTemplate response = sessionTemplateControllerClient.UpdateSessionTemplate(sessionTemplate);

### UpdateSessionTemplate(UpdateSessionTemplateRequest, CallSettings)

    public virtual SessionTemplate UpdateSessionTemplate(UpdateSessionTemplateRequest request, CallSettings callSettings = null)

Updates the session template synchronously.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.UpdateSessionTemplateRequest` 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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | The RPC response. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = SessionTemplateControllerClient.Create();
    // Initialize request argument(s)
    UpdateSessionTemplateRequest request = new UpdateSessionTemplateRequest
    {
        SessionTemplate = new SessionTemplate(),
    };
    // Make the request
    SessionTemplate response = sessionTemplateControllerClient.UpdateSessionTemplate(request);

### UpdateSessionTemplateAsync(SessionTemplate, CallSettings)

    public virtual Task<SessionTemplate> UpdateSessionTemplateAsync(SessionTemplate sessionTemplate, CallSettings callSettings = null)

Updates the session template synchronously.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `sessionTemplate` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` Required. The updated session template. |
| `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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | A Task containing the RPC response. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    SessionTemplate sessionTemplate = new SessionTemplate();
    // Make the request
    SessionTemplate response = await sessionTemplateControllerClient.UpdateSessionTemplateAsync(sessionTemplate);

### UpdateSessionTemplateAsync(SessionTemplate, CancellationToken)

    public virtual Task<SessionTemplate> UpdateSessionTemplateAsync(SessionTemplate sessionTemplate, CancellationToken cancellationToken)

Updates the session template synchronously.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `sessionTemplate` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` Required. The updated session template. |
| `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.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplate` | A Task containing the RPC response. |

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    SessionTemplate sessionTemplate = new SessionTemplate();
    // Make the request
    SessionTemplate response = await sessionTemplateControllerClient.UpdateSessionTemplateAsync(sessionTemplate);

### UpdateSessionTemplateAsync(UpdateSessionTemplateRequest, CallSettings)

    public virtual Task<SessionTemplate> UpdateSessionTemplateAsync(UpdateSessionTemplateRequest request, CallSettings callSettings = null)

Updates the session template synchronously.

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

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    UpdateSessionTemplateRequest request = new UpdateSessionTemplateRequest
    {
        SessionTemplate = new SessionTemplate(),
    };
    // Make the request
    SessionTemplate response = await sessionTemplateControllerClient.UpdateSessionTemplateAsync(request);

### UpdateSessionTemplateAsync(UpdateSessionTemplateRequest, CancellationToken)

    public virtual Task<SessionTemplate> UpdateSessionTemplateAsync(UpdateSessionTemplateRequest request, CancellationToken cancellationToken)

Updates the session template synchronously.

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

**Example**

    // Create client
    SessionTemplateControllerClient sessionTemplateControllerClient = await SessionTemplateControllerClient.CreateAsync();
    // Initialize request argument(s)
    UpdateSessionTemplateRequest request = new UpdateSessionTemplateRequest
    {
        SessionTemplate = new SessionTemplate(),
    };
    // Make the request
    SessionTemplate response = await sessionTemplateControllerClient.UpdateSessionTemplateAsync(request);