Dialogflow v3 API - Class DeploymentsClient (2.18.0)

public abstract class DeploymentsClient

Reference documentation and code samples for the Dialogflow v3 API class DeploymentsClient.

Deployments client wrapper, for convenient use.

Inheritance

object > DeploymentsClient

Derived Types

Namespace

Google.Cloud.Dialogflow.Cx.V3

Assembly

Google.Cloud.Dialogflow.Cx.V3.dll

Remarks

Service for managing [Deployments][google.cloud.dialogflow.cx.v3.Deployment].

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Deployments scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

GrpcClient

public virtual Deployments.DeploymentsClient GrpcClient { get; }

The underlying gRPC Deployments client

Property Value
Type Description
DeploymentsDeploymentsClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

Create()

public static DeploymentsClient Create()

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

Returns
Type Description
DeploymentsClient

The created DeploymentsClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskDeploymentsClient

The task representing the created DeploymentsClient.

GetDeployment(DeploymentName, CallSettings)

public virtual Deployment GetDeployment(DeploymentName name, CallSettings callSettings = null)

Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3.Deployment].

Parameters
Name Description
name DeploymentName

Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>/deployments/<Deployment ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Deployment

The RPC response.

Example
// Create client
DeploymentsClient deploymentsClient = DeploymentsClient.Create();
// Initialize request argument(s)
DeploymentName name = DeploymentName.FromProjectLocationAgentEnvironmentDeployment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]");
// Make the request
Deployment response = deploymentsClient.GetDeployment(name);

GetDeployment(GetDeploymentRequest, CallSettings)

public virtual Deployment GetDeployment(GetDeploymentRequest request, CallSettings callSettings = null)

Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3.Deployment].

Parameters
Name Description
request GetDeploymentRequest

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
Deployment

The RPC response.

Example
// Create client
DeploymentsClient deploymentsClient = DeploymentsClient.Create();
// Initialize request argument(s)
GetDeploymentRequest request = new GetDeploymentRequest
{
    DeploymentName = DeploymentName.FromProjectLocationAgentEnvironmentDeployment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]"),
};
// Make the request
Deployment response = deploymentsClient.GetDeployment(request);

GetDeployment(string, CallSettings)

public virtual Deployment GetDeployment(string name, CallSettings callSettings = null)

Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3.Deployment].

Parameters
Name Description
name string

Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>/deployments/<Deployment ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Deployment

The RPC response.

Example
// Create client
DeploymentsClient deploymentsClient = DeploymentsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]/deployments/[DEPLOYMENT]";
// Make the request
Deployment response = deploymentsClient.GetDeployment(name);

GetDeploymentAsync(DeploymentName, CallSettings)

public virtual Task<Deployment> GetDeploymentAsync(DeploymentName name, CallSettings callSettings = null)

Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3.Deployment].

Parameters
Name Description
name DeploymentName

Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>/deployments/<Deployment ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDeployment

A Task containing the RPC response.

Example
// Create client
DeploymentsClient deploymentsClient = await DeploymentsClient.CreateAsync();
// Initialize request argument(s)
DeploymentName name = DeploymentName.FromProjectLocationAgentEnvironmentDeployment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]");
// Make the request
Deployment response = await deploymentsClient.GetDeploymentAsync(name);

GetDeploymentAsync(DeploymentName, CancellationToken)

public virtual Task<Deployment> GetDeploymentAsync(DeploymentName name, CancellationToken cancellationToken)

Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3.Deployment].

Parameters
Name Description
name DeploymentName

Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>/deployments/<Deployment ID>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDeployment

A Task containing the RPC response.

Example
// Create client
DeploymentsClient deploymentsClient = await DeploymentsClient.CreateAsync();
// Initialize request argument(s)
DeploymentName name = DeploymentName.FromProjectLocationAgentEnvironmentDeployment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]");
// Make the request
Deployment response = await deploymentsClient.GetDeploymentAsync(name);

GetDeploymentAsync(GetDeploymentRequest, CallSettings)

public virtual Task<Deployment> GetDeploymentAsync(GetDeploymentRequest request, CallSettings callSettings = null)

Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3.Deployment].

Parameters
Name Description
request GetDeploymentRequest

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
TaskDeployment

A Task containing the RPC response.

Example
// Create client
DeploymentsClient deploymentsClient = await DeploymentsClient.CreateAsync();
// Initialize request argument(s)
GetDeploymentRequest request = new GetDeploymentRequest
{
    DeploymentName = DeploymentName.FromProjectLocationAgentEnvironmentDeployment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]"),
};
// Make the request
Deployment response = await deploymentsClient.GetDeploymentAsync(request);

GetDeploymentAsync(GetDeploymentRequest, CancellationToken)

public virtual Task<Deployment> GetDeploymentAsync(GetDeploymentRequest request, CancellationToken cancellationToken)

Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3.Deployment].

Parameters
Name Description
request GetDeploymentRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDeployment

A Task containing the RPC response.

Example
// Create client
DeploymentsClient deploymentsClient = await DeploymentsClient.CreateAsync();
// Initialize request argument(s)
GetDeploymentRequest request = new GetDeploymentRequest
{
    DeploymentName = DeploymentName.FromProjectLocationAgentEnvironmentDeployment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]"),
};
// Make the request
Deployment response = await deploymentsClient.GetDeploymentAsync(request);

GetDeploymentAsync(string, CallSettings)

public virtual Task<Deployment> GetDeploymentAsync(string name, CallSettings callSettings = null)

Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3.Deployment].

Parameters
Name Description
name string

Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>/deployments/<Deployment ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDeployment

A Task containing the RPC response.

Example
// Create client
DeploymentsClient deploymentsClient = await DeploymentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]/deployments/[DEPLOYMENT]";
// Make the request
Deployment response = await deploymentsClient.GetDeploymentAsync(name);

GetDeploymentAsync(string, CancellationToken)

public virtual Task<Deployment> GetDeploymentAsync(string name, CancellationToken cancellationToken)

Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3.Deployment].

Parameters
Name Description
name string

Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>/deployments/<Deployment ID>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDeployment

A Task containing the RPC response.

Example
// Create client
DeploymentsClient deploymentsClient = await DeploymentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]/deployments/[DEPLOYMENT]";
// Make the request
Deployment response = await deploymentsClient.GetDeploymentAsync(name);

ListDeployments(EnvironmentName, string, int?, CallSettings)

public virtual PagedEnumerable<ListDeploymentsResponse, Deployment> ListDeployments(EnvironmentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all deployments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].

Parameters
Name Description
parent EnvironmentName

Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>.

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
PagedEnumerableListDeploymentsResponseDeployment

A pageable sequence of Deployment resources.

Example
// Create client
DeploymentsClient deploymentsClient = DeploymentsClient.Create();
// Initialize request argument(s)
EnvironmentName parent = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
// Make the request
PagedEnumerable<ListDeploymentsResponse, Deployment> response = deploymentsClient.ListDeployments(parent);

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

ListDeployments(ListDeploymentsRequest, CallSettings)

public virtual PagedEnumerable<ListDeploymentsResponse, Deployment> ListDeployments(ListDeploymentsRequest request, CallSettings callSettings = null)

Returns the list of all deployments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].

Parameters
Name Description
request ListDeploymentsRequest

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
PagedEnumerableListDeploymentsResponseDeployment

A pageable sequence of Deployment resources.

Example
// Create client
DeploymentsClient deploymentsClient = DeploymentsClient.Create();
// Initialize request argument(s)
ListDeploymentsRequest request = new ListDeploymentsRequest
{
    ParentAsEnvironmentName = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"),
};
// Make the request
PagedEnumerable<ListDeploymentsResponse, Deployment> response = deploymentsClient.ListDeployments(request);

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

ListDeployments(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListDeploymentsResponse, Deployment> ListDeployments(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all deployments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].

Parameters
Name Description
parent string

Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>.

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
PagedEnumerableListDeploymentsResponseDeployment

A pageable sequence of Deployment resources.

Example
// Create client
DeploymentsClient deploymentsClient = DeploymentsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]";
// Make the request
PagedEnumerable<ListDeploymentsResponse, Deployment> response = deploymentsClient.ListDeployments(parent);

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

ListDeploymentsAsync(EnvironmentName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListDeploymentsResponse, Deployment> ListDeploymentsAsync(EnvironmentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all deployments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].

Parameters
Name Description
parent EnvironmentName

Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>.

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
PagedAsyncEnumerableListDeploymentsResponseDeployment

A pageable asynchronous sequence of Deployment resources.

Example
// Create client
DeploymentsClient deploymentsClient = await DeploymentsClient.CreateAsync();
// Initialize request argument(s)
EnvironmentName parent = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
// Make the request
PagedAsyncEnumerable<ListDeploymentsResponse, Deployment> response = deploymentsClient.ListDeploymentsAsync(parent);

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

ListDeploymentsAsync(ListDeploymentsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListDeploymentsResponse, Deployment> ListDeploymentsAsync(ListDeploymentsRequest request, CallSettings callSettings = null)

Returns the list of all deployments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].

Parameters
Name Description
request ListDeploymentsRequest

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
PagedAsyncEnumerableListDeploymentsResponseDeployment

A pageable asynchronous sequence of Deployment resources.

Example
// Create client
DeploymentsClient deploymentsClient = await DeploymentsClient.CreateAsync();
// Initialize request argument(s)
ListDeploymentsRequest request = new ListDeploymentsRequest
{
    ParentAsEnvironmentName = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"),
};
// Make the request
PagedAsyncEnumerable<ListDeploymentsResponse, Deployment> response = deploymentsClient.ListDeploymentsAsync(request);

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

ListDeploymentsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListDeploymentsResponse, Deployment> ListDeploymentsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all deployments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].

Parameters
Name Description
parent string

Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>.

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
PagedAsyncEnumerableListDeploymentsResponseDeployment

A pageable asynchronous sequence of Deployment resources.

Example
// Create client
DeploymentsClient deploymentsClient = await DeploymentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]";
// Make the request
PagedAsyncEnumerable<ListDeploymentsResponse, Deployment> response = deploymentsClient.ListDeploymentsAsync(parent);

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