Cloud AI Platform v1 API - Class DeploymentResourcePoolServiceClient (3.2.0)

public abstract class DeploymentResourcePoolServiceClient

Reference documentation and code samples for the Cloud AI Platform v1 API class DeploymentResourcePoolServiceClient.

DeploymentResourcePoolService client wrapper, for convenient use.

Inheritance

object > DeploymentResourcePoolServiceClient

Namespace

Google.Cloud.AIPlatform.V1

Assembly

Google.Cloud.AIPlatform.V1.dll

Remarks

A service that manages the DeploymentResourcePool resource.

Properties

CreateDeploymentResourcePoolOperationsClient

public virtual OperationsClient CreateDeploymentResourcePoolOperationsClient { get; }

The long-running operations client for CreateDeploymentResourcePool.

Property Value
Type Description
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default DeploymentResourcePoolService scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default DeploymentResourcePoolService scopes are:

DeleteDeploymentResourcePoolOperationsClient

public virtual OperationsClient DeleteDeploymentResourcePoolOperationsClient { get; }

The long-running operations client for DeleteDeploymentResourcePool.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual DeploymentResourcePoolService.DeploymentResourcePoolServiceClient GrpcClient { get; }

The underlying gRPC DeploymentResourcePoolService client

Property Value
Type Description
DeploymentResourcePoolServiceDeploymentResourcePoolServiceClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
Type Description
IAMPolicyClient

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 DeploymentResourcePoolServiceClient Create()

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

Returns
Type Description
DeploymentResourcePoolServiceClient

The created DeploymentResourcePoolServiceClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskDeploymentResourcePoolServiceClient

The task representing the created DeploymentResourcePoolServiceClient.

CreateDeploymentResourcePool(LocationName, DeploymentResourcePool, string, CallSettings)

public virtual Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> CreateDeploymentResourcePool(LocationName parent, DeploymentResourcePool deploymentResourcePool, string deploymentResourcePoolId, CallSettings callSettings = null)

Create a DeploymentResourcePool.

Parameters
Name Description
parent LocationName

Required. The parent location resource where this DeploymentResourcePool will be created. Format: projects/{project}/locations/{location}

deploymentResourcePool DeploymentResourcePool

Required. The DeploymentResourcePool to create.

deploymentResourcePoolId string

Required. The ID to use for the DeploymentResourcePool, which will become the final component of the DeploymentResourcePool's resource name.

The maximum length is 63 characters, and valid characters are /^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationDeploymentResourcePoolCreateDeploymentResourcePoolOperationMetadata

The RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = DeploymentResourcePoolServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
DeploymentResourcePool deploymentResourcePool = new DeploymentResourcePool();
string deploymentResourcePoolId = "";
// Make the request
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> response = deploymentResourcePoolServiceClient.CreateDeploymentResourcePool(parent, deploymentResourcePool, deploymentResourcePoolId);

// Poll until the returned long-running operation is complete
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
DeploymentResourcePool result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> retrievedResponse = deploymentResourcePoolServiceClient.PollOnceCreateDeploymentResourcePool(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DeploymentResourcePool retrievedResult = retrievedResponse.Result;
}

CreateDeploymentResourcePool(CreateDeploymentResourcePoolRequest, CallSettings)

public virtual Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> CreateDeploymentResourcePool(CreateDeploymentResourcePoolRequest request, CallSettings callSettings = null)

Create a DeploymentResourcePool.

Parameters
Name Description
request CreateDeploymentResourcePoolRequest

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
OperationDeploymentResourcePoolCreateDeploymentResourcePoolOperationMetadata

The RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = DeploymentResourcePoolServiceClient.Create();
// Initialize request argument(s)
CreateDeploymentResourcePoolRequest request = new CreateDeploymentResourcePoolRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    DeploymentResourcePool = new DeploymentResourcePool(),
    DeploymentResourcePoolId = "",
};
// Make the request
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> response = deploymentResourcePoolServiceClient.CreateDeploymentResourcePool(request);

// Poll until the returned long-running operation is complete
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
DeploymentResourcePool result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> retrievedResponse = deploymentResourcePoolServiceClient.PollOnceCreateDeploymentResourcePool(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DeploymentResourcePool retrievedResult = retrievedResponse.Result;
}

CreateDeploymentResourcePool(string, DeploymentResourcePool, string, CallSettings)

public virtual Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> CreateDeploymentResourcePool(string parent, DeploymentResourcePool deploymentResourcePool, string deploymentResourcePoolId, CallSettings callSettings = null)

Create a DeploymentResourcePool.

Parameters
Name Description
parent string

Required. The parent location resource where this DeploymentResourcePool will be created. Format: projects/{project}/locations/{location}

deploymentResourcePool DeploymentResourcePool

Required. The DeploymentResourcePool to create.

deploymentResourcePoolId string

Required. The ID to use for the DeploymentResourcePool, which will become the final component of the DeploymentResourcePool's resource name.

The maximum length is 63 characters, and valid characters are /^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationDeploymentResourcePoolCreateDeploymentResourcePoolOperationMetadata

The RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = DeploymentResourcePoolServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
DeploymentResourcePool deploymentResourcePool = new DeploymentResourcePool();
string deploymentResourcePoolId = "";
// Make the request
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> response = deploymentResourcePoolServiceClient.CreateDeploymentResourcePool(parent, deploymentResourcePool, deploymentResourcePoolId);

// Poll until the returned long-running operation is complete
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
DeploymentResourcePool result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> retrievedResponse = deploymentResourcePoolServiceClient.PollOnceCreateDeploymentResourcePool(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DeploymentResourcePool retrievedResult = retrievedResponse.Result;
}

CreateDeploymentResourcePoolAsync(LocationName, DeploymentResourcePool, string, CallSettings)

public virtual Task<Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata>> CreateDeploymentResourcePoolAsync(LocationName parent, DeploymentResourcePool deploymentResourcePool, string deploymentResourcePoolId, CallSettings callSettings = null)

Create a DeploymentResourcePool.

Parameters
Name Description
parent LocationName

Required. The parent location resource where this DeploymentResourcePool will be created. Format: projects/{project}/locations/{location}

deploymentResourcePool DeploymentResourcePool

Required. The DeploymentResourcePool to create.

deploymentResourcePoolId string

Required. The ID to use for the DeploymentResourcePool, which will become the final component of the DeploymentResourcePool's resource name.

The maximum length is 63 characters, and valid characters are /^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationDeploymentResourcePoolCreateDeploymentResourcePoolOperationMetadata

A Task containing the RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = await DeploymentResourcePoolServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
DeploymentResourcePool deploymentResourcePool = new DeploymentResourcePool();
string deploymentResourcePoolId = "";
// Make the request
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> response = await deploymentResourcePoolServiceClient.CreateDeploymentResourcePoolAsync(parent, deploymentResourcePool, deploymentResourcePoolId);

// Poll until the returned long-running operation is complete
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DeploymentResourcePool result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> retrievedResponse = await deploymentResourcePoolServiceClient.PollOnceCreateDeploymentResourcePoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DeploymentResourcePool retrievedResult = retrievedResponse.Result;
}

CreateDeploymentResourcePoolAsync(LocationName, DeploymentResourcePool, string, CancellationToken)

public virtual Task<Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata>> CreateDeploymentResourcePoolAsync(LocationName parent, DeploymentResourcePool deploymentResourcePool, string deploymentResourcePoolId, CancellationToken cancellationToken)

Create a DeploymentResourcePool.

Parameters
Name Description
parent LocationName

Required. The parent location resource where this DeploymentResourcePool will be created. Format: projects/{project}/locations/{location}

deploymentResourcePool DeploymentResourcePool

Required. The DeploymentResourcePool to create.

deploymentResourcePoolId string

Required. The ID to use for the DeploymentResourcePool, which will become the final component of the DeploymentResourcePool's resource name.

The maximum length is 63 characters, and valid characters are /^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationDeploymentResourcePoolCreateDeploymentResourcePoolOperationMetadata

A Task containing the RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = await DeploymentResourcePoolServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
DeploymentResourcePool deploymentResourcePool = new DeploymentResourcePool();
string deploymentResourcePoolId = "";
// Make the request
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> response = await deploymentResourcePoolServiceClient.CreateDeploymentResourcePoolAsync(parent, deploymentResourcePool, deploymentResourcePoolId);

// Poll until the returned long-running operation is complete
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DeploymentResourcePool result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> retrievedResponse = await deploymentResourcePoolServiceClient.PollOnceCreateDeploymentResourcePoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DeploymentResourcePool retrievedResult = retrievedResponse.Result;
}

CreateDeploymentResourcePoolAsync(CreateDeploymentResourcePoolRequest, CallSettings)

public virtual Task<Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata>> CreateDeploymentResourcePoolAsync(CreateDeploymentResourcePoolRequest request, CallSettings callSettings = null)

Create a DeploymentResourcePool.

Parameters
Name Description
request CreateDeploymentResourcePoolRequest

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
TaskOperationDeploymentResourcePoolCreateDeploymentResourcePoolOperationMetadata

A Task containing the RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = await DeploymentResourcePoolServiceClient.CreateAsync();
// Initialize request argument(s)
CreateDeploymentResourcePoolRequest request = new CreateDeploymentResourcePoolRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    DeploymentResourcePool = new DeploymentResourcePool(),
    DeploymentResourcePoolId = "",
};
// Make the request
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> response = await deploymentResourcePoolServiceClient.CreateDeploymentResourcePoolAsync(request);

// Poll until the returned long-running operation is complete
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DeploymentResourcePool result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> retrievedResponse = await deploymentResourcePoolServiceClient.PollOnceCreateDeploymentResourcePoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DeploymentResourcePool retrievedResult = retrievedResponse.Result;
}

CreateDeploymentResourcePoolAsync(CreateDeploymentResourcePoolRequest, CancellationToken)

public virtual Task<Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata>> CreateDeploymentResourcePoolAsync(CreateDeploymentResourcePoolRequest request, CancellationToken cancellationToken)

Create a DeploymentResourcePool.

Parameters
Name Description
request CreateDeploymentResourcePoolRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationDeploymentResourcePoolCreateDeploymentResourcePoolOperationMetadata

A Task containing the RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = await DeploymentResourcePoolServiceClient.CreateAsync();
// Initialize request argument(s)
CreateDeploymentResourcePoolRequest request = new CreateDeploymentResourcePoolRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    DeploymentResourcePool = new DeploymentResourcePool(),
    DeploymentResourcePoolId = "",
};
// Make the request
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> response = await deploymentResourcePoolServiceClient.CreateDeploymentResourcePoolAsync(request);

// Poll until the returned long-running operation is complete
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DeploymentResourcePool result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> retrievedResponse = await deploymentResourcePoolServiceClient.PollOnceCreateDeploymentResourcePoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DeploymentResourcePool retrievedResult = retrievedResponse.Result;
}

CreateDeploymentResourcePoolAsync(string, DeploymentResourcePool, string, CallSettings)

public virtual Task<Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata>> CreateDeploymentResourcePoolAsync(string parent, DeploymentResourcePool deploymentResourcePool, string deploymentResourcePoolId, CallSettings callSettings = null)

Create a DeploymentResourcePool.

Parameters
Name Description
parent string

Required. The parent location resource where this DeploymentResourcePool will be created. Format: projects/{project}/locations/{location}

deploymentResourcePool DeploymentResourcePool

Required. The DeploymentResourcePool to create.

deploymentResourcePoolId string

Required. The ID to use for the DeploymentResourcePool, which will become the final component of the DeploymentResourcePool's resource name.

The maximum length is 63 characters, and valid characters are /^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationDeploymentResourcePoolCreateDeploymentResourcePoolOperationMetadata

A Task containing the RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = await DeploymentResourcePoolServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
DeploymentResourcePool deploymentResourcePool = new DeploymentResourcePool();
string deploymentResourcePoolId = "";
// Make the request
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> response = await deploymentResourcePoolServiceClient.CreateDeploymentResourcePoolAsync(parent, deploymentResourcePool, deploymentResourcePoolId);

// Poll until the returned long-running operation is complete
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DeploymentResourcePool result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> retrievedResponse = await deploymentResourcePoolServiceClient.PollOnceCreateDeploymentResourcePoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DeploymentResourcePool retrievedResult = retrievedResponse.Result;
}

CreateDeploymentResourcePoolAsync(string, DeploymentResourcePool, string, CancellationToken)

public virtual Task<Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata>> CreateDeploymentResourcePoolAsync(string parent, DeploymentResourcePool deploymentResourcePool, string deploymentResourcePoolId, CancellationToken cancellationToken)

Create a DeploymentResourcePool.

Parameters
Name Description
parent string

Required. The parent location resource where this DeploymentResourcePool will be created. Format: projects/{project}/locations/{location}

deploymentResourcePool DeploymentResourcePool

Required. The DeploymentResourcePool to create.

deploymentResourcePoolId string

Required. The ID to use for the DeploymentResourcePool, which will become the final component of the DeploymentResourcePool's resource name.

The maximum length is 63 characters, and valid characters are /^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationDeploymentResourcePoolCreateDeploymentResourcePoolOperationMetadata

A Task containing the RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = await DeploymentResourcePoolServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
DeploymentResourcePool deploymentResourcePool = new DeploymentResourcePool();
string deploymentResourcePoolId = "";
// Make the request
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> response = await deploymentResourcePoolServiceClient.CreateDeploymentResourcePoolAsync(parent, deploymentResourcePool, deploymentResourcePoolId);

// Poll until the returned long-running operation is complete
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DeploymentResourcePool result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> retrievedResponse = await deploymentResourcePoolServiceClient.PollOnceCreateDeploymentResourcePoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DeploymentResourcePool retrievedResult = retrievedResponse.Result;
}

DeleteDeploymentResourcePool(DeleteDeploymentResourcePoolRequest, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> DeleteDeploymentResourcePool(DeleteDeploymentResourcePoolRequest request, CallSettings callSettings = null)

Delete a DeploymentResourcePool.

Parameters
Name Description
request DeleteDeploymentResourcePoolRequest

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
OperationEmptyDeleteOperationMetadata

The RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = DeploymentResourcePoolServiceClient.Create();
// Initialize request argument(s)
DeleteDeploymentResourcePoolRequest request = new DeleteDeploymentResourcePoolRequest
{
    DeploymentResourcePoolName = DeploymentResourcePoolName.FromProjectLocationDeploymentResourcePool("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = deploymentResourcePoolServiceClient.DeleteDeploymentResourcePool(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = deploymentResourcePoolServiceClient.PollOnceDeleteDeploymentResourcePool(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteDeploymentResourcePool(DeploymentResourcePoolName, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> DeleteDeploymentResourcePool(DeploymentResourcePoolName name, CallSettings callSettings = null)

Delete a DeploymentResourcePool.

Parameters
Name Description
name DeploymentResourcePoolName

Required. The name of the DeploymentResourcePool to delete. Format: projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteOperationMetadata

The RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = DeploymentResourcePoolServiceClient.Create();
// Initialize request argument(s)
DeploymentResourcePoolName name = DeploymentResourcePoolName.FromProjectLocationDeploymentResourcePool("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = deploymentResourcePoolServiceClient.DeleteDeploymentResourcePool(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = deploymentResourcePoolServiceClient.PollOnceDeleteDeploymentResourcePool(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteDeploymentResourcePool(string, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> DeleteDeploymentResourcePool(string name, CallSettings callSettings = null)

Delete a DeploymentResourcePool.

Parameters
Name Description
name string

Required. The name of the DeploymentResourcePool to delete. Format: projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteOperationMetadata

The RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = DeploymentResourcePoolServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/deploymentResourcePools/[DEPLOYMENT_RESOURCE_POOL]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = deploymentResourcePoolServiceClient.DeleteDeploymentResourcePool(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = deploymentResourcePoolServiceClient.PollOnceDeleteDeploymentResourcePool(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteDeploymentResourcePoolAsync(DeleteDeploymentResourcePoolRequest, CallSettings)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteDeploymentResourcePoolAsync(DeleteDeploymentResourcePoolRequest request, CallSettings callSettings = null)

Delete a DeploymentResourcePool.

Parameters
Name Description
request DeleteDeploymentResourcePoolRequest

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
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = await DeploymentResourcePoolServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteDeploymentResourcePoolRequest request = new DeleteDeploymentResourcePoolRequest
{
    DeploymentResourcePoolName = DeploymentResourcePoolName.FromProjectLocationDeploymentResourcePool("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await deploymentResourcePoolServiceClient.DeleteDeploymentResourcePoolAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await deploymentResourcePoolServiceClient.PollOnceDeleteDeploymentResourcePoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteDeploymentResourcePoolAsync(DeleteDeploymentResourcePoolRequest, CancellationToken)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteDeploymentResourcePoolAsync(DeleteDeploymentResourcePoolRequest request, CancellationToken cancellationToken)

Delete a DeploymentResourcePool.

Parameters
Name Description
request DeleteDeploymentResourcePoolRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = await DeploymentResourcePoolServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteDeploymentResourcePoolRequest request = new DeleteDeploymentResourcePoolRequest
{
    DeploymentResourcePoolName = DeploymentResourcePoolName.FromProjectLocationDeploymentResourcePool("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await deploymentResourcePoolServiceClient.DeleteDeploymentResourcePoolAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await deploymentResourcePoolServiceClient.PollOnceDeleteDeploymentResourcePoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteDeploymentResourcePoolAsync(DeploymentResourcePoolName, CallSettings)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteDeploymentResourcePoolAsync(DeploymentResourcePoolName name, CallSettings callSettings = null)

Delete a DeploymentResourcePool.

Parameters
Name Description
name DeploymentResourcePoolName

Required. The name of the DeploymentResourcePool to delete. Format: projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = await DeploymentResourcePoolServiceClient.CreateAsync();
// Initialize request argument(s)
DeploymentResourcePoolName name = DeploymentResourcePoolName.FromProjectLocationDeploymentResourcePool("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await deploymentResourcePoolServiceClient.DeleteDeploymentResourcePoolAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await deploymentResourcePoolServiceClient.PollOnceDeleteDeploymentResourcePoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteDeploymentResourcePoolAsync(DeploymentResourcePoolName, CancellationToken)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteDeploymentResourcePoolAsync(DeploymentResourcePoolName name, CancellationToken cancellationToken)

Delete a DeploymentResourcePool.

Parameters
Name Description
name DeploymentResourcePoolName

Required. The name of the DeploymentResourcePool to delete. Format: projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = await DeploymentResourcePoolServiceClient.CreateAsync();
// Initialize request argument(s)
DeploymentResourcePoolName name = DeploymentResourcePoolName.FromProjectLocationDeploymentResourcePool("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await deploymentResourcePoolServiceClient.DeleteDeploymentResourcePoolAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await deploymentResourcePoolServiceClient.PollOnceDeleteDeploymentResourcePoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteDeploymentResourcePoolAsync(string, CallSettings)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteDeploymentResourcePoolAsync(string name, CallSettings callSettings = null)

Delete a DeploymentResourcePool.

Parameters
Name Description
name string

Required. The name of the DeploymentResourcePool to delete. Format: projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = await DeploymentResourcePoolServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/deploymentResourcePools/[DEPLOYMENT_RESOURCE_POOL]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await deploymentResourcePoolServiceClient.DeleteDeploymentResourcePoolAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await deploymentResourcePoolServiceClient.PollOnceDeleteDeploymentResourcePoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteDeploymentResourcePoolAsync(string, CancellationToken)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteDeploymentResourcePoolAsync(string name, CancellationToken cancellationToken)

Delete a DeploymentResourcePool.

Parameters
Name Description
name string

Required. The name of the DeploymentResourcePool to delete. Format: projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = await DeploymentResourcePoolServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/deploymentResourcePools/[DEPLOYMENT_RESOURCE_POOL]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await deploymentResourcePoolServiceClient.DeleteDeploymentResourcePoolAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await deploymentResourcePoolServiceClient.PollOnceDeleteDeploymentResourcePoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

GetDeploymentResourcePool(DeploymentResourcePoolName, CallSettings)

public virtual DeploymentResourcePool GetDeploymentResourcePool(DeploymentResourcePoolName name, CallSettings callSettings = null)

Get a DeploymentResourcePool.

Parameters
Name Description
name DeploymentResourcePoolName

Required. The name of the DeploymentResourcePool to retrieve. Format: projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DeploymentResourcePool

The RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = DeploymentResourcePoolServiceClient.Create();
// Initialize request argument(s)
DeploymentResourcePoolName name = DeploymentResourcePoolName.FromProjectLocationDeploymentResourcePool("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]");
// Make the request
DeploymentResourcePool response = deploymentResourcePoolServiceClient.GetDeploymentResourcePool(name);

GetDeploymentResourcePool(GetDeploymentResourcePoolRequest, CallSettings)

public virtual DeploymentResourcePool GetDeploymentResourcePool(GetDeploymentResourcePoolRequest request, CallSettings callSettings = null)

Get a DeploymentResourcePool.

Parameters
Name Description
request GetDeploymentResourcePoolRequest

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
DeploymentResourcePool

The RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = DeploymentResourcePoolServiceClient.Create();
// Initialize request argument(s)
GetDeploymentResourcePoolRequest request = new GetDeploymentResourcePoolRequest
{
    DeploymentResourcePoolName = DeploymentResourcePoolName.FromProjectLocationDeploymentResourcePool("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]"),
};
// Make the request
DeploymentResourcePool response = deploymentResourcePoolServiceClient.GetDeploymentResourcePool(request);

GetDeploymentResourcePool(string, CallSettings)

public virtual DeploymentResourcePool GetDeploymentResourcePool(string name, CallSettings callSettings = null)

Get a DeploymentResourcePool.

Parameters
Name Description
name string

Required. The name of the DeploymentResourcePool to retrieve. Format: projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DeploymentResourcePool

The RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = DeploymentResourcePoolServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/deploymentResourcePools/[DEPLOYMENT_RESOURCE_POOL]";
// Make the request
DeploymentResourcePool response = deploymentResourcePoolServiceClient.GetDeploymentResourcePool(name);

GetDeploymentResourcePoolAsync(DeploymentResourcePoolName, CallSettings)

public virtual Task<DeploymentResourcePool> GetDeploymentResourcePoolAsync(DeploymentResourcePoolName name, CallSettings callSettings = null)

Get a DeploymentResourcePool.

Parameters
Name Description
name DeploymentResourcePoolName

Required. The name of the DeploymentResourcePool to retrieve. Format: projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDeploymentResourcePool

A Task containing the RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = await DeploymentResourcePoolServiceClient.CreateAsync();
// Initialize request argument(s)
DeploymentResourcePoolName name = DeploymentResourcePoolName.FromProjectLocationDeploymentResourcePool("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]");
// Make the request
DeploymentResourcePool response = await deploymentResourcePoolServiceClient.GetDeploymentResourcePoolAsync(name);

GetDeploymentResourcePoolAsync(DeploymentResourcePoolName, CancellationToken)

public virtual Task<DeploymentResourcePool> GetDeploymentResourcePoolAsync(DeploymentResourcePoolName name, CancellationToken cancellationToken)

Get a DeploymentResourcePool.

Parameters
Name Description
name DeploymentResourcePoolName

Required. The name of the DeploymentResourcePool to retrieve. Format: projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDeploymentResourcePool

A Task containing the RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = await DeploymentResourcePoolServiceClient.CreateAsync();
// Initialize request argument(s)
DeploymentResourcePoolName name = DeploymentResourcePoolName.FromProjectLocationDeploymentResourcePool("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]");
// Make the request
DeploymentResourcePool response = await deploymentResourcePoolServiceClient.GetDeploymentResourcePoolAsync(name);

GetDeploymentResourcePoolAsync(GetDeploymentResourcePoolRequest, CallSettings)

public virtual Task<DeploymentResourcePool> GetDeploymentResourcePoolAsync(GetDeploymentResourcePoolRequest request, CallSettings callSettings = null)

Get a DeploymentResourcePool.

Parameters
Name Description
request GetDeploymentResourcePoolRequest

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
TaskDeploymentResourcePool

A Task containing the RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = await DeploymentResourcePoolServiceClient.CreateAsync();
// Initialize request argument(s)
GetDeploymentResourcePoolRequest request = new GetDeploymentResourcePoolRequest
{
    DeploymentResourcePoolName = DeploymentResourcePoolName.FromProjectLocationDeploymentResourcePool("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]"),
};
// Make the request
DeploymentResourcePool response = await deploymentResourcePoolServiceClient.GetDeploymentResourcePoolAsync(request);

GetDeploymentResourcePoolAsync(GetDeploymentResourcePoolRequest, CancellationToken)

public virtual Task<DeploymentResourcePool> GetDeploymentResourcePoolAsync(GetDeploymentResourcePoolRequest request, CancellationToken cancellationToken)

Get a DeploymentResourcePool.

Parameters
Name Description
request GetDeploymentResourcePoolRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDeploymentResourcePool

A Task containing the RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = await DeploymentResourcePoolServiceClient.CreateAsync();
// Initialize request argument(s)
GetDeploymentResourcePoolRequest request = new GetDeploymentResourcePoolRequest
{
    DeploymentResourcePoolName = DeploymentResourcePoolName.FromProjectLocationDeploymentResourcePool("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]"),
};
// Make the request
DeploymentResourcePool response = await deploymentResourcePoolServiceClient.GetDeploymentResourcePoolAsync(request);

GetDeploymentResourcePoolAsync(string, CallSettings)

public virtual Task<DeploymentResourcePool> GetDeploymentResourcePoolAsync(string name, CallSettings callSettings = null)

Get a DeploymentResourcePool.

Parameters
Name Description
name string

Required. The name of the DeploymentResourcePool to retrieve. Format: projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDeploymentResourcePool

A Task containing the RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = await DeploymentResourcePoolServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/deploymentResourcePools/[DEPLOYMENT_RESOURCE_POOL]";
// Make the request
DeploymentResourcePool response = await deploymentResourcePoolServiceClient.GetDeploymentResourcePoolAsync(name);

GetDeploymentResourcePoolAsync(string, CancellationToken)

public virtual Task<DeploymentResourcePool> GetDeploymentResourcePoolAsync(string name, CancellationToken cancellationToken)

Get a DeploymentResourcePool.

Parameters
Name Description
name string

Required. The name of the DeploymentResourcePool to retrieve. Format: projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDeploymentResourcePool

A Task containing the RPC response.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = await DeploymentResourcePoolServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/deploymentResourcePools/[DEPLOYMENT_RESOURCE_POOL]";
// Make the request
DeploymentResourcePool response = await deploymentResourcePoolServiceClient.GetDeploymentResourcePoolAsync(name);

ListDeploymentResourcePools(ProjectName, string, int?, CallSettings)

public virtual PagedEnumerable<ListDeploymentResourcePoolsResponse, DeploymentResourcePool> ListDeploymentResourcePools(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List DeploymentResourcePools in a location.

Parameters
Name Description
parent ProjectName

Required. The parent Location which owns this collection of DeploymentResourcePools. Format: projects/{project}/locations/{location}

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
PagedEnumerableListDeploymentResourcePoolsResponseDeploymentResourcePool

A pageable sequence of DeploymentResourcePool resources.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = DeploymentResourcePoolServiceClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedEnumerable<ListDeploymentResourcePoolsResponse, DeploymentResourcePool> response = deploymentResourcePoolServiceClient.ListDeploymentResourcePools(parent);

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

ListDeploymentResourcePools(ListDeploymentResourcePoolsRequest, CallSettings)

public virtual PagedEnumerable<ListDeploymentResourcePoolsResponse, DeploymentResourcePool> ListDeploymentResourcePools(ListDeploymentResourcePoolsRequest request, CallSettings callSettings = null)

List DeploymentResourcePools in a location.

Parameters
Name Description
request ListDeploymentResourcePoolsRequest

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
PagedEnumerableListDeploymentResourcePoolsResponseDeploymentResourcePool

A pageable sequence of DeploymentResourcePool resources.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = DeploymentResourcePoolServiceClient.Create();
// Initialize request argument(s)
ListDeploymentResourcePoolsRequest request = new ListDeploymentResourcePoolsRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedEnumerable<ListDeploymentResourcePoolsResponse, DeploymentResourcePool> response = deploymentResourcePoolServiceClient.ListDeploymentResourcePools(request);

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

ListDeploymentResourcePools(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListDeploymentResourcePoolsResponse, DeploymentResourcePool> ListDeploymentResourcePools(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List DeploymentResourcePools in a location.

Parameters
Name Description
parent string

Required. The parent Location which owns this collection of DeploymentResourcePools. Format: projects/{project}/locations/{location}

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
PagedEnumerableListDeploymentResourcePoolsResponseDeploymentResourcePool

A pageable sequence of DeploymentResourcePool resources.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = DeploymentResourcePoolServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedEnumerable<ListDeploymentResourcePoolsResponse, DeploymentResourcePool> response = deploymentResourcePoolServiceClient.ListDeploymentResourcePools(parent);

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

ListDeploymentResourcePoolsAsync(ProjectName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListDeploymentResourcePoolsResponse, DeploymentResourcePool> ListDeploymentResourcePoolsAsync(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List DeploymentResourcePools in a location.

Parameters
Name Description
parent ProjectName

Required. The parent Location which owns this collection of DeploymentResourcePools. Format: projects/{project}/locations/{location}

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
PagedAsyncEnumerableListDeploymentResourcePoolsResponseDeploymentResourcePool

A pageable asynchronous sequence of DeploymentResourcePool resources.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = await DeploymentResourcePoolServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedAsyncEnumerable<ListDeploymentResourcePoolsResponse, DeploymentResourcePool> response = deploymentResourcePoolServiceClient.ListDeploymentResourcePoolsAsync(parent);

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

ListDeploymentResourcePoolsAsync(ListDeploymentResourcePoolsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListDeploymentResourcePoolsResponse, DeploymentResourcePool> ListDeploymentResourcePoolsAsync(ListDeploymentResourcePoolsRequest request, CallSettings callSettings = null)

List DeploymentResourcePools in a location.

Parameters
Name Description
request ListDeploymentResourcePoolsRequest

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
PagedAsyncEnumerableListDeploymentResourcePoolsResponseDeploymentResourcePool

A pageable asynchronous sequence of DeploymentResourcePool resources.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = await DeploymentResourcePoolServiceClient.CreateAsync();
// Initialize request argument(s)
ListDeploymentResourcePoolsRequest request = new ListDeploymentResourcePoolsRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedAsyncEnumerable<ListDeploymentResourcePoolsResponse, DeploymentResourcePool> response = deploymentResourcePoolServiceClient.ListDeploymentResourcePoolsAsync(request);

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

ListDeploymentResourcePoolsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListDeploymentResourcePoolsResponse, DeploymentResourcePool> ListDeploymentResourcePoolsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List DeploymentResourcePools in a location.

Parameters
Name Description
parent string

Required. The parent Location which owns this collection of DeploymentResourcePools. Format: projects/{project}/locations/{location}

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
PagedAsyncEnumerableListDeploymentResourcePoolsResponseDeploymentResourcePool

A pageable asynchronous sequence of DeploymentResourcePool resources.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = await DeploymentResourcePoolServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedAsyncEnumerable<ListDeploymentResourcePoolsResponse, DeploymentResourcePool> response = deploymentResourcePoolServiceClient.ListDeploymentResourcePoolsAsync(parent);

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

PollOnceCreateDeploymentResourcePool(string, CallSettings)

public virtual Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> PollOnceCreateDeploymentResourcePool(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of CreateDeploymentResourcePool.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationDeploymentResourcePoolCreateDeploymentResourcePoolOperationMetadata

The result of polling the operation.

PollOnceCreateDeploymentResourcePoolAsync(string, CallSettings)

public virtual Task<Operation<DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata>> PollOnceCreateDeploymentResourcePoolAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of CreateDeploymentResourcePool.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationDeploymentResourcePoolCreateDeploymentResourcePoolOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteDeploymentResourcePool(string, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> PollOnceDeleteDeploymentResourcePool(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of DeleteDeploymentResourcePool.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteOperationMetadata

The result of polling the operation.

PollOnceDeleteDeploymentResourcePoolAsync(string, CallSettings)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> PollOnceDeleteDeploymentResourcePoolAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of DeleteDeploymentResourcePool.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A task representing the result of polling the operation.

QueryDeployedModels(QueryDeployedModelsRequest, CallSettings)

public virtual PagedEnumerable<QueryDeployedModelsResponse, DeployedModelRef> QueryDeployedModels(QueryDeployedModelsRequest request, CallSettings callSettings = null)

List DeployedModels that have been deployed on this DeploymentResourcePool.

Parameters
Name Description
request QueryDeployedModelsRequest

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
PagedEnumerableQueryDeployedModelsResponseDeployedModelRef

A pageable sequence of DeployedModelRef resources.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = DeploymentResourcePoolServiceClient.Create();
// Initialize request argument(s)
QueryDeployedModelsRequest request = new QueryDeployedModelsRequest
{
    DeploymentResourcePool = "",
};
// Make the request
PagedEnumerable<QueryDeployedModelsResponse, DeployedModelRef> response = deploymentResourcePoolServiceClient.QueryDeployedModels(request);

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

QueryDeployedModels(string, string, int?, CallSettings)

public virtual PagedEnumerable<QueryDeployedModelsResponse, DeployedModelRef> QueryDeployedModels(string deploymentResourcePool, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List DeployedModels that have been deployed on this DeploymentResourcePool.

Parameters
Name Description
deploymentResourcePool string

Required. The name of the target DeploymentResourcePool to query. Format: projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}

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
PagedEnumerableQueryDeployedModelsResponseDeployedModelRef

A pageable sequence of DeployedModelRef resources.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = DeploymentResourcePoolServiceClient.Create();
// Initialize request argument(s)
string deploymentResourcePool = "";
// Make the request
PagedEnumerable<QueryDeployedModelsResponse, DeployedModelRef> response = deploymentResourcePoolServiceClient.QueryDeployedModels(deploymentResourcePool);

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

QueryDeployedModelsAsync(QueryDeployedModelsRequest, CallSettings)

public virtual PagedAsyncEnumerable<QueryDeployedModelsResponse, DeployedModelRef> QueryDeployedModelsAsync(QueryDeployedModelsRequest request, CallSettings callSettings = null)

List DeployedModels that have been deployed on this DeploymentResourcePool.

Parameters
Name Description
request QueryDeployedModelsRequest

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
PagedAsyncEnumerableQueryDeployedModelsResponseDeployedModelRef

A pageable asynchronous sequence of DeployedModelRef resources.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = await DeploymentResourcePoolServiceClient.CreateAsync();
// Initialize request argument(s)
QueryDeployedModelsRequest request = new QueryDeployedModelsRequest
{
    DeploymentResourcePool = "",
};
// Make the request
PagedAsyncEnumerable<QueryDeployedModelsResponse, DeployedModelRef> response = deploymentResourcePoolServiceClient.QueryDeployedModelsAsync(request);

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

QueryDeployedModelsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<QueryDeployedModelsResponse, DeployedModelRef> QueryDeployedModelsAsync(string deploymentResourcePool, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List DeployedModels that have been deployed on this DeploymentResourcePool.

Parameters
Name Description
deploymentResourcePool string

Required. The name of the target DeploymentResourcePool to query. Format: projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}

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
PagedAsyncEnumerableQueryDeployedModelsResponseDeployedModelRef

A pageable asynchronous sequence of DeployedModelRef resources.

Example
// Create client
DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient = await DeploymentResourcePoolServiceClient.CreateAsync();
// Initialize request argument(s)
string deploymentResourcePool = "";
// Make the request
PagedAsyncEnumerable<QueryDeployedModelsResponse, DeployedModelRef> response = deploymentResourcePoolServiceClient.QueryDeployedModelsAsync(deploymentResourcePool);

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