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

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default SessionTemplateController scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

The default SessionTemplateController scopes are:

GrpcClient

public virtual SessionTemplateController.SessionTemplateControllerClient GrpcClient { get; }

The underlying gRPC SessionTemplateController client

Property Value
TypeDescription
SessionTemplateControllerSessionTemplateControllerClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
TypeDescription
IAMPolicyClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
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
TypeDescription
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
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
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
NameDescription
parentLocationName

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

sessionTemplateSessionTemplate

Required. The session template to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestCreateSessionTemplateRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentstring

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

sessionTemplateSessionTemplate

Required. The session template to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentLocationName

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

sessionTemplateSessionTemplate

Required. The session template to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentLocationName

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

sessionTemplateSessionTemplate

Required. The session template to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
requestCreateSessionTemplateRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestCreateSessionTemplateRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
parentstring

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

sessionTemplateSessionTemplate

Required. The session template to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentstring

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

sessionTemplateSessionTemplate

Required. The session template to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
requestDeleteSessionTemplateRequest

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

callSettingsCallSettings

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
NameDescription
nameSessionTemplateName

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

callSettingsCallSettings

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
NameDescription
namestring

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

callSettingsCallSettings

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
NameDescription
requestDeleteSessionTemplateRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestDeleteSessionTemplateRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
nameSessionTemplateName

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameSessionTemplateName

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
namestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
namestring

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
requestGetSessionTemplateRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameSessionTemplateName

Required. The name of the session template to retrieve.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
namestring

Required. The name of the session template to retrieve.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestGetSessionTemplateRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestGetSessionTemplateRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
nameSessionTemplateName

Required. The name of the session template to retrieve.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameSessionTemplateName

Required. The name of the session template to retrieve.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
namestring

Required. The name of the session template to retrieve.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
namestring

Required. The name of the session template to retrieve.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
parentLocationName

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

pageTokenstring

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

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestListSessionTemplatesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentstring

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

pageTokenstring

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

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentLocationName

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

pageTokenstring

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

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestListSessionTemplatesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentstring

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

pageTokenstring

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

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
TypeDescription
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
NameDescription
sessionTemplateSessionTemplate

Required. The updated session template.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestUpdateSessionTemplateRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
sessionTemplateSessionTemplate

Required. The updated session template.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
sessionTemplateSessionTemplate

Required. The updated session template.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
requestUpdateSessionTemplateRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestUpdateSessionTemplateRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

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