Google Cloud Dataproc v1 API - Class SessionTemplateControllerClient (5.13.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 > SessionTemplateControllerClient

Namespace

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
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default SessionTemplateController scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default SessionTemplateController scopes are:

GrpcClient

public virtual SessionTemplateController.SessionTemplateControllerClient GrpcClient { get; }

The underlying gRPC SessionTemplateController client

Property Value
Type Description
SessionTemplateControllerSessionTemplateControllerClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
Type Description
IAMPolicyClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

Create()

public static SessionTemplateControllerClient Create()

Synchronously creates a SessionTemplateControllerClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use SessionTemplateControllerClientBuilder.

Returns
Type Description
SessionTemplateControllerClient

The created SessionTemplateControllerClient.

CreateAsync(CancellationToken)

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

Asynchronously creates a SessionTemplateControllerClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use SessionTemplateControllerClientBuilder.

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskSessionTemplateControllerClient

The task representing the created 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 LocationName

Required. The parent resource where this session template will be created.

sessionTemplate SessionTemplate

Required. The session template to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 CreateSessionTemplateRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 string

Required. The parent resource where this session template will be created.

sessionTemplate SessionTemplate

Required. The session template to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 LocationName

Required. The parent resource where this session template will be created.

sessionTemplate SessionTemplate

Required. The session template to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSessionTemplate

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 LocationName

Required. The parent resource where this session template will be created.

sessionTemplate SessionTemplate

Required. The session template to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSessionTemplate

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 CreateSessionTemplateRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSessionTemplate

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 CreateSessionTemplateRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSessionTemplate

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 string

Required. The parent resource where this session template will be created.

sessionTemplate SessionTemplate

Required. The session template to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSessionTemplate

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 string

Required. The parent resource where this session template will be created.

sessionTemplate SessionTemplate

Required. The session template to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSessionTemplate

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 DeleteSessionTemplateRequest

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

callSettings CallSettings

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 SessionTemplateName

Required. The name of the session template resource to delete.

callSettings CallSettings

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 string

Required. The name of the session template resource to delete.

callSettings CallSettings

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 DeleteSessionTemplateRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 DeleteSessionTemplateRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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 SessionTemplateName

Required. The name of the session template resource to delete.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 SessionTemplateName

Required. The name of the session template resource to delete.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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 string

Required. The name of the session template resource to delete.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 string

Required. The name of the session template resource to delete.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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 GetSessionTemplateRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 SessionTemplateName

Required. The name of the session template to retrieve.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 string

Required. The name of the session template to retrieve.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 GetSessionTemplateRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSessionTemplate

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 GetSessionTemplateRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSessionTemplate

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 SessionTemplateName

Required. The name of the session template to retrieve.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSessionTemplate

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 SessionTemplateName

Required. The name of the session template to retrieve.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSessionTemplate

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 string

Required. The name of the session template to retrieve.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSessionTemplate

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 string

Required. The name of the session template to retrieve.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSessionTemplate

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 LocationName

Required. The parent that owns this collection of session templates.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

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 CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListSessionTemplatesResponseSessionTemplate

A pageable sequence of 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 ListSessionTemplatesRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListSessionTemplatesResponseSessionTemplate

A pageable sequence of 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 string

Required. The parent that owns this collection of session templates.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

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 CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListSessionTemplatesResponseSessionTemplate

A pageable sequence of 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 LocationName

Required. The parent that owns this collection of session templates.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

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 CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListSessionTemplatesResponseSessionTemplate

A pageable asynchronous sequence of 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 response.ForEachAsync((SessionTemplate item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListSessionTemplatesResponse page) =>
{
    // 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 ListSessionTemplatesRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListSessionTemplatesResponseSessionTemplate

A pageable asynchronous sequence of 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 response.ForEachAsync((SessionTemplate item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListSessionTemplatesResponse page) =>
{
    // 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 string

Required. The parent that owns this collection of session templates.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

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 CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListSessionTemplatesResponseSessionTemplate

A pageable asynchronous sequence of 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 response.ForEachAsync((SessionTemplate item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListSessionTemplatesResponse page) =>
{
    // 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() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(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 SessionTemplate

Required. The updated session template.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 UpdateSessionTemplateRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 SessionTemplate

Required. The updated session template.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSessionTemplate

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 SessionTemplate

Required. The updated session template.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSessionTemplate

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 UpdateSessionTemplateRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSessionTemplate

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 UpdateSessionTemplateRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSessionTemplate

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