public abstract class WorkerPoolsClient
Reference documentation and code samples for the Cloud Run Admin v2 API class WorkerPoolsClient.
WorkerPools client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Run.V2Assembly
Google.Cloud.Run.V2.dll
Remarks
Cloud Run WorkerPool Control Plane API.
Properties
CreateWorkerPoolOperationsClient
public virtual OperationsClient CreateWorkerPoolOperationsClient { get; }
The long-running operations client for CreateWorkerPool
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the WorkerPools service, which is a host of "run.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default WorkerPools scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default WorkerPools scopes are:
DeleteWorkerPoolOperationsClient
public virtual OperationsClient DeleteWorkerPoolOperationsClient { get; }
The long-running operations client for DeleteWorkerPool
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual WorkerPools.WorkerPoolsClient GrpcClient { get; }
The underlying gRPC WorkerPools client
Property Value | |
---|---|
Type | Description |
WorkerPoolsWorkerPoolsClient |
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 |
UpdateWorkerPoolOperationsClient
public virtual OperationsClient UpdateWorkerPoolOperationsClient { get; }
The long-running operations client for UpdateWorkerPool
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
Methods
Create()
public static WorkerPoolsClient Create()
Synchronously creates a WorkerPoolsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use WorkerPoolsClientBuilder.
Returns | |
---|---|
Type | Description |
WorkerPoolsClient |
The created WorkerPoolsClient. |
CreateAsync(CancellationToken)
public static Task<WorkerPoolsClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a WorkerPoolsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use WorkerPoolsClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken |
CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskWorkerPoolsClient |
The task representing the created WorkerPoolsClient. |
CreateWorkerPool(LocationName, WorkerPool, string, CallSettings)
public virtual Operation<WorkerPool, WorkerPool> CreateWorkerPool(LocationName parent, WorkerPool workerPool, string workerPoolId, CallSettings callSettings = null)
Creates a new WorkerPool in a given project and location.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The location and project in which this worker pool should be
created. Format: |
workerPool |
WorkerPool Required. The WorkerPool instance to create. |
workerPoolId |
string Required. The unique identifier for the WorkerPool. It must begin with
letter, and cannot end with hyphen; must contain fewer than 50 characters.
The name of the worker pool becomes
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationWorkerPoolWorkerPool |
The RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = gcrv::WorkerPoolsClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
gcrv::WorkerPool workerPool = new gcrv::WorkerPool();
string workerPoolId = "";
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = workerPoolsClient.CreateWorkerPool(parent, workerPool, workerPoolId);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = workerPoolsClient.PollOnceCreateWorkerPool(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
CreateWorkerPool(CreateWorkerPoolRequest, CallSettings)
public virtual Operation<WorkerPool, WorkerPool> CreateWorkerPool(CreateWorkerPoolRequest request, CallSettings callSettings = null)
Creates a new WorkerPool in a given project and location.
Parameters | |
---|---|
Name | Description |
request |
CreateWorkerPoolRequest 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 |
OperationWorkerPoolWorkerPool |
The RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = gcrv::WorkerPoolsClient.Create();
// Initialize request argument(s)
gcrv::CreateWorkerPoolRequest request = new gcrv::CreateWorkerPoolRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
WorkerPool = new gcrv::WorkerPool(),
WorkerPoolId = "",
ValidateOnly = false,
};
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = workerPoolsClient.CreateWorkerPool(request);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = workerPoolsClient.PollOnceCreateWorkerPool(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
CreateWorkerPool(string, WorkerPool, string, CallSettings)
public virtual Operation<WorkerPool, WorkerPool> CreateWorkerPool(string parent, WorkerPool workerPool, string workerPoolId, CallSettings callSettings = null)
Creates a new WorkerPool in a given project and location.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The location and project in which this worker pool should be
created. Format: |
workerPool |
WorkerPool Required. The WorkerPool instance to create. |
workerPoolId |
string Required. The unique identifier for the WorkerPool. It must begin with
letter, and cannot end with hyphen; must contain fewer than 50 characters.
The name of the worker pool becomes
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationWorkerPoolWorkerPool |
The RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = gcrv::WorkerPoolsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
gcrv::WorkerPool workerPool = new gcrv::WorkerPool();
string workerPoolId = "";
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = workerPoolsClient.CreateWorkerPool(parent, workerPool, workerPoolId);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = workerPoolsClient.PollOnceCreateWorkerPool(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
CreateWorkerPoolAsync(LocationName, WorkerPool, string, CallSettings)
public virtual Task<Operation<WorkerPool, WorkerPool>> CreateWorkerPoolAsync(LocationName parent, WorkerPool workerPool, string workerPoolId, CallSettings callSettings = null)
Creates a new WorkerPool in a given project and location.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The location and project in which this worker pool should be
created. Format: |
workerPool |
WorkerPool Required. The WorkerPool instance to create. |
workerPoolId |
string Required. The unique identifier for the WorkerPool. It must begin with
letter, and cannot end with hyphen; must contain fewer than 50 characters.
The name of the worker pool becomes
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationWorkerPoolWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
gcrv::WorkerPool workerPool = new gcrv::WorkerPool();
string workerPoolId = "";
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = await workerPoolsClient.CreateWorkerPoolAsync(parent, workerPool, workerPoolId);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = await workerPoolsClient.PollOnceCreateWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
CreateWorkerPoolAsync(LocationName, WorkerPool, string, CancellationToken)
public virtual Task<Operation<WorkerPool, WorkerPool>> CreateWorkerPoolAsync(LocationName parent, WorkerPool workerPool, string workerPoolId, CancellationToken cancellationToken)
Creates a new WorkerPool in a given project and location.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The location and project in which this worker pool should be
created. Format: |
workerPool |
WorkerPool Required. The WorkerPool instance to create. |
workerPoolId |
string Required. The unique identifier for the WorkerPool. It must begin with
letter, and cannot end with hyphen; must contain fewer than 50 characters.
The name of the worker pool becomes
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationWorkerPoolWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
gcrv::WorkerPool workerPool = new gcrv::WorkerPool();
string workerPoolId = "";
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = await workerPoolsClient.CreateWorkerPoolAsync(parent, workerPool, workerPoolId);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = await workerPoolsClient.PollOnceCreateWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
CreateWorkerPoolAsync(CreateWorkerPoolRequest, CallSettings)
public virtual Task<Operation<WorkerPool, WorkerPool>> CreateWorkerPoolAsync(CreateWorkerPoolRequest request, CallSettings callSettings = null)
Creates a new WorkerPool in a given project and location.
Parameters | |
---|---|
Name | Description |
request |
CreateWorkerPoolRequest 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 |
TaskOperationWorkerPoolWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
gcrv::CreateWorkerPoolRequest request = new gcrv::CreateWorkerPoolRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
WorkerPool = new gcrv::WorkerPool(),
WorkerPoolId = "",
ValidateOnly = false,
};
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = await workerPoolsClient.CreateWorkerPoolAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = await workerPoolsClient.PollOnceCreateWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
CreateWorkerPoolAsync(CreateWorkerPoolRequest, CancellationToken)
public virtual Task<Operation<WorkerPool, WorkerPool>> CreateWorkerPoolAsync(CreateWorkerPoolRequest request, CancellationToken cancellationToken)
Creates a new WorkerPool in a given project and location.
Parameters | |
---|---|
Name | Description |
request |
CreateWorkerPoolRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationWorkerPoolWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
gcrv::CreateWorkerPoolRequest request = new gcrv::CreateWorkerPoolRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
WorkerPool = new gcrv::WorkerPool(),
WorkerPoolId = "",
ValidateOnly = false,
};
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = await workerPoolsClient.CreateWorkerPoolAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = await workerPoolsClient.PollOnceCreateWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
CreateWorkerPoolAsync(string, WorkerPool, string, CallSettings)
public virtual Task<Operation<WorkerPool, WorkerPool>> CreateWorkerPoolAsync(string parent, WorkerPool workerPool, string workerPoolId, CallSettings callSettings = null)
Creates a new WorkerPool in a given project and location.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The location and project in which this worker pool should be
created. Format: |
workerPool |
WorkerPool Required. The WorkerPool instance to create. |
workerPoolId |
string Required. The unique identifier for the WorkerPool. It must begin with
letter, and cannot end with hyphen; must contain fewer than 50 characters.
The name of the worker pool becomes
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationWorkerPoolWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
gcrv::WorkerPool workerPool = new gcrv::WorkerPool();
string workerPoolId = "";
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = await workerPoolsClient.CreateWorkerPoolAsync(parent, workerPool, workerPoolId);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = await workerPoolsClient.PollOnceCreateWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
CreateWorkerPoolAsync(string, WorkerPool, string, CancellationToken)
public virtual Task<Operation<WorkerPool, WorkerPool>> CreateWorkerPoolAsync(string parent, WorkerPool workerPool, string workerPoolId, CancellationToken cancellationToken)
Creates a new WorkerPool in a given project and location.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The location and project in which this worker pool should be
created. Format: |
workerPool |
WorkerPool Required. The WorkerPool instance to create. |
workerPoolId |
string Required. The unique identifier for the WorkerPool. It must begin with
letter, and cannot end with hyphen; must contain fewer than 50 characters.
The name of the worker pool becomes
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationWorkerPoolWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
gcrv::WorkerPool workerPool = new gcrv::WorkerPool();
string workerPoolId = "";
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = await workerPoolsClient.CreateWorkerPoolAsync(parent, workerPool, workerPoolId);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = await workerPoolsClient.PollOnceCreateWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
DeleteWorkerPool(DeleteWorkerPoolRequest, CallSettings)
public virtual Operation<WorkerPool, WorkerPool> DeleteWorkerPool(DeleteWorkerPoolRequest request, CallSettings callSettings = null)
Deletes a WorkerPool.
Parameters | |
---|---|
Name | Description |
request |
DeleteWorkerPoolRequest 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 |
OperationWorkerPoolWorkerPool |
The RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = gcrv::WorkerPoolsClient.Create();
// Initialize request argument(s)
gcrv::DeleteWorkerPoolRequest request = new gcrv::DeleteWorkerPoolRequest
{
WorkerPoolName = gcrv::WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]"),
ValidateOnly = false,
Etag = "",
};
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = workerPoolsClient.DeleteWorkerPool(request);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = workerPoolsClient.PollOnceDeleteWorkerPool(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
DeleteWorkerPool(WorkerPoolName, CallSettings)
public virtual Operation<WorkerPool, WorkerPool> DeleteWorkerPool(WorkerPoolName name, CallSettings callSettings = null)
Deletes a WorkerPool.
Parameters | |
---|---|
Name | Description |
name |
WorkerPoolName Required. The full name of the WorkerPool.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationWorkerPoolWorkerPool |
The RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = gcrv::WorkerPoolsClient.Create();
// Initialize request argument(s)
gcrv::WorkerPoolName name = gcrv::WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]");
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = workerPoolsClient.DeleteWorkerPool(name);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = workerPoolsClient.PollOnceDeleteWorkerPool(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
DeleteWorkerPool(string, CallSettings)
public virtual Operation<WorkerPool, WorkerPool> DeleteWorkerPool(string name, CallSettings callSettings = null)
Deletes a WorkerPool.
Parameters | |
---|---|
Name | Description |
name |
string Required. The full name of the WorkerPool.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationWorkerPoolWorkerPool |
The RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = gcrv::WorkerPoolsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/workerPools/[WORKER_POOL]";
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = workerPoolsClient.DeleteWorkerPool(name);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = workerPoolsClient.PollOnceDeleteWorkerPool(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
DeleteWorkerPoolAsync(DeleteWorkerPoolRequest, CallSettings)
public virtual Task<Operation<WorkerPool, WorkerPool>> DeleteWorkerPoolAsync(DeleteWorkerPoolRequest request, CallSettings callSettings = null)
Deletes a WorkerPool.
Parameters | |
---|---|
Name | Description |
request |
DeleteWorkerPoolRequest 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 |
TaskOperationWorkerPoolWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
gcrv::DeleteWorkerPoolRequest request = new gcrv::DeleteWorkerPoolRequest
{
WorkerPoolName = gcrv::WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]"),
ValidateOnly = false,
Etag = "",
};
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = await workerPoolsClient.DeleteWorkerPoolAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = await workerPoolsClient.PollOnceDeleteWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
DeleteWorkerPoolAsync(DeleteWorkerPoolRequest, CancellationToken)
public virtual Task<Operation<WorkerPool, WorkerPool>> DeleteWorkerPoolAsync(DeleteWorkerPoolRequest request, CancellationToken cancellationToken)
Deletes a WorkerPool.
Parameters | |
---|---|
Name | Description |
request |
DeleteWorkerPoolRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationWorkerPoolWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
gcrv::DeleteWorkerPoolRequest request = new gcrv::DeleteWorkerPoolRequest
{
WorkerPoolName = gcrv::WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]"),
ValidateOnly = false,
Etag = "",
};
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = await workerPoolsClient.DeleteWorkerPoolAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = await workerPoolsClient.PollOnceDeleteWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
DeleteWorkerPoolAsync(WorkerPoolName, CallSettings)
public virtual Task<Operation<WorkerPool, WorkerPool>> DeleteWorkerPoolAsync(WorkerPoolName name, CallSettings callSettings = null)
Deletes a WorkerPool.
Parameters | |
---|---|
Name | Description |
name |
WorkerPoolName Required. The full name of the WorkerPool.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationWorkerPoolWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
gcrv::WorkerPoolName name = gcrv::WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]");
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = await workerPoolsClient.DeleteWorkerPoolAsync(name);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = await workerPoolsClient.PollOnceDeleteWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
DeleteWorkerPoolAsync(WorkerPoolName, CancellationToken)
public virtual Task<Operation<WorkerPool, WorkerPool>> DeleteWorkerPoolAsync(WorkerPoolName name, CancellationToken cancellationToken)
Deletes a WorkerPool.
Parameters | |
---|---|
Name | Description |
name |
WorkerPoolName Required. The full name of the WorkerPool.
Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationWorkerPoolWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
gcrv::WorkerPoolName name = gcrv::WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]");
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = await workerPoolsClient.DeleteWorkerPoolAsync(name);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = await workerPoolsClient.PollOnceDeleteWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
DeleteWorkerPoolAsync(string, CallSettings)
public virtual Task<Operation<WorkerPool, WorkerPool>> DeleteWorkerPoolAsync(string name, CallSettings callSettings = null)
Deletes a WorkerPool.
Parameters | |
---|---|
Name | Description |
name |
string Required. The full name of the WorkerPool.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationWorkerPoolWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/workerPools/[WORKER_POOL]";
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = await workerPoolsClient.DeleteWorkerPoolAsync(name);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = await workerPoolsClient.PollOnceDeleteWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
DeleteWorkerPoolAsync(string, CancellationToken)
public virtual Task<Operation<WorkerPool, WorkerPool>> DeleteWorkerPoolAsync(string name, CancellationToken cancellationToken)
Deletes a WorkerPool.
Parameters | |
---|---|
Name | Description |
name |
string Required. The full name of the WorkerPool.
Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationWorkerPoolWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/workerPools/[WORKER_POOL]";
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = await workerPoolsClient.DeleteWorkerPoolAsync(name);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = await workerPoolsClient.PollOnceDeleteWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
GetIamPolicy(GetIamPolicyRequest, CallSettings)
public virtual Policy GetIamPolicy(GetIamPolicyRequest request, CallSettings callSettings = null)
Gets the IAM Access Control policy currently in effect for the given Cloud Run WorkerPool. This result does not include any inherited policies.
Parameters | |
---|---|
Name | Description |
request |
GetIamPolicyRequest 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 |
Policy |
The RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = gcrv::WorkerPoolsClient.Create();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Options = new GetPolicyOptions(),
};
// Make the request
Policy response = workerPoolsClient.GetIamPolicy(request);
GetIamPolicyAsync(GetIamPolicyRequest, CallSettings)
public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CallSettings callSettings = null)
Gets the IAM Access Control policy currently in effect for the given Cloud Run WorkerPool. This result does not include any inherited policies.
Parameters | |
---|---|
Name | Description |
request |
GetIamPolicyRequest 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 |
TaskPolicy |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Options = new GetPolicyOptions(),
};
// Make the request
Policy response = await workerPoolsClient.GetIamPolicyAsync(request);
GetIamPolicyAsync(GetIamPolicyRequest, CancellationToken)
public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CancellationToken cancellationToken)
Gets the IAM Access Control policy currently in effect for the given Cloud Run WorkerPool. This result does not include any inherited policies.
Parameters | |
---|---|
Name | Description |
request |
GetIamPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Options = new GetPolicyOptions(),
};
// Make the request
Policy response = await workerPoolsClient.GetIamPolicyAsync(request);
GetWorkerPool(GetWorkerPoolRequest, CallSettings)
public virtual WorkerPool GetWorkerPool(GetWorkerPoolRequest request, CallSettings callSettings = null)
Gets information about a WorkerPool.
Parameters | |
---|---|
Name | Description |
request |
GetWorkerPoolRequest 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 |
WorkerPool |
The RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = gcrv::WorkerPoolsClient.Create();
// Initialize request argument(s)
gcrv::GetWorkerPoolRequest request = new gcrv::GetWorkerPoolRequest
{
WorkerPoolName = gcrv::WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]"),
};
// Make the request
gcrv::WorkerPool response = workerPoolsClient.GetWorkerPool(request);
GetWorkerPool(WorkerPoolName, CallSettings)
public virtual WorkerPool GetWorkerPool(WorkerPoolName name, CallSettings callSettings = null)
Gets information about a WorkerPool.
Parameters | |
---|---|
Name | Description |
name |
WorkerPoolName Required. The full name of the WorkerPool.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
WorkerPool |
The RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = gcrv::WorkerPoolsClient.Create();
// Initialize request argument(s)
gcrv::WorkerPoolName name = gcrv::WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]");
// Make the request
gcrv::WorkerPool response = workerPoolsClient.GetWorkerPool(name);
GetWorkerPool(string, CallSettings)
public virtual WorkerPool GetWorkerPool(string name, CallSettings callSettings = null)
Gets information about a WorkerPool.
Parameters | |
---|---|
Name | Description |
name |
string Required. The full name of the WorkerPool.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
WorkerPool |
The RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = gcrv::WorkerPoolsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/workerPools/[WORKER_POOL]";
// Make the request
gcrv::WorkerPool response = workerPoolsClient.GetWorkerPool(name);
GetWorkerPoolAsync(GetWorkerPoolRequest, CallSettings)
public virtual Task<WorkerPool> GetWorkerPoolAsync(GetWorkerPoolRequest request, CallSettings callSettings = null)
Gets information about a WorkerPool.
Parameters | |
---|---|
Name | Description |
request |
GetWorkerPoolRequest 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 |
TaskWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
gcrv::GetWorkerPoolRequest request = new gcrv::GetWorkerPoolRequest
{
WorkerPoolName = gcrv::WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]"),
};
// Make the request
gcrv::WorkerPool response = await workerPoolsClient.GetWorkerPoolAsync(request);
GetWorkerPoolAsync(GetWorkerPoolRequest, CancellationToken)
public virtual Task<WorkerPool> GetWorkerPoolAsync(GetWorkerPoolRequest request, CancellationToken cancellationToken)
Gets information about a WorkerPool.
Parameters | |
---|---|
Name | Description |
request |
GetWorkerPoolRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
gcrv::GetWorkerPoolRequest request = new gcrv::GetWorkerPoolRequest
{
WorkerPoolName = gcrv::WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]"),
};
// Make the request
gcrv::WorkerPool response = await workerPoolsClient.GetWorkerPoolAsync(request);
GetWorkerPoolAsync(WorkerPoolName, CallSettings)
public virtual Task<WorkerPool> GetWorkerPoolAsync(WorkerPoolName name, CallSettings callSettings = null)
Gets information about a WorkerPool.
Parameters | |
---|---|
Name | Description |
name |
WorkerPoolName Required. The full name of the WorkerPool.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
gcrv::WorkerPoolName name = gcrv::WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]");
// Make the request
gcrv::WorkerPool response = await workerPoolsClient.GetWorkerPoolAsync(name);
GetWorkerPoolAsync(WorkerPoolName, CancellationToken)
public virtual Task<WorkerPool> GetWorkerPoolAsync(WorkerPoolName name, CancellationToken cancellationToken)
Gets information about a WorkerPool.
Parameters | |
---|---|
Name | Description |
name |
WorkerPoolName Required. The full name of the WorkerPool.
Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
gcrv::WorkerPoolName name = gcrv::WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]");
// Make the request
gcrv::WorkerPool response = await workerPoolsClient.GetWorkerPoolAsync(name);
GetWorkerPoolAsync(string, CallSettings)
public virtual Task<WorkerPool> GetWorkerPoolAsync(string name, CallSettings callSettings = null)
Gets information about a WorkerPool.
Parameters | |
---|---|
Name | Description |
name |
string Required. The full name of the WorkerPool.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/workerPools/[WORKER_POOL]";
// Make the request
gcrv::WorkerPool response = await workerPoolsClient.GetWorkerPoolAsync(name);
GetWorkerPoolAsync(string, CancellationToken)
public virtual Task<WorkerPool> GetWorkerPoolAsync(string name, CancellationToken cancellationToken)
Gets information about a WorkerPool.
Parameters | |
---|---|
Name | Description |
name |
string Required. The full name of the WorkerPool.
Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/workerPools/[WORKER_POOL]";
// Make the request
gcrv::WorkerPool response = await workerPoolsClient.GetWorkerPoolAsync(name);
ListWorkerPools(LocationName, string, int?, CallSettings)
public virtual PagedEnumerable<ListWorkerPoolsResponse, WorkerPool> ListWorkerPools(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists WorkerPools. Results are sorted by creation time, descending.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The location and project to list resources on.
Location must be a valid Google Cloud region, and cannot be the "-"
wildcard. Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListWorkerPoolsResponseWorkerPool |
A pageable sequence of WorkerPool resources. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = gcrv::WorkerPoolsClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<gcrv::ListWorkerPoolsResponse, gcrv::WorkerPool> response = workerPoolsClient.ListWorkerPools(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (gcrv::WorkerPool 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 (gcrv::ListWorkerPoolsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcrv::WorkerPool 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<gcrv::WorkerPool> 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 (gcrv::WorkerPool 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;
ListWorkerPools(ListWorkerPoolsRequest, CallSettings)
public virtual PagedEnumerable<ListWorkerPoolsResponse, WorkerPool> ListWorkerPools(ListWorkerPoolsRequest request, CallSettings callSettings = null)
Lists WorkerPools. Results are sorted by creation time, descending.
Parameters | |
---|---|
Name | Description |
request |
ListWorkerPoolsRequest 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 |
PagedEnumerableListWorkerPoolsResponseWorkerPool |
A pageable sequence of WorkerPool resources. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = gcrv::WorkerPoolsClient.Create();
// Initialize request argument(s)
gcrv::ListWorkerPoolsRequest request = new gcrv::ListWorkerPoolsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
ShowDeleted = false,
};
// Make the request
PagedEnumerable<gcrv::ListWorkerPoolsResponse, gcrv::WorkerPool> response = workerPoolsClient.ListWorkerPools(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (gcrv::WorkerPool 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 (gcrv::ListWorkerPoolsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcrv::WorkerPool 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<gcrv::WorkerPool> 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 (gcrv::WorkerPool 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;
ListWorkerPools(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListWorkerPoolsResponse, WorkerPool> ListWorkerPools(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists WorkerPools. Results are sorted by creation time, descending.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The location and project to list resources on.
Location must be a valid Google Cloud region, and cannot be the "-"
wildcard. Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListWorkerPoolsResponseWorkerPool |
A pageable sequence of WorkerPool resources. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = gcrv::WorkerPoolsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<gcrv::ListWorkerPoolsResponse, gcrv::WorkerPool> response = workerPoolsClient.ListWorkerPools(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (gcrv::WorkerPool 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 (gcrv::ListWorkerPoolsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcrv::WorkerPool 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<gcrv::WorkerPool> 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 (gcrv::WorkerPool 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;
ListWorkerPoolsAsync(LocationName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListWorkerPoolsResponse, WorkerPool> ListWorkerPoolsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists WorkerPools. Results are sorted by creation time, descending.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The location and project to list resources on.
Location must be a valid Google Cloud region, and cannot be the "-"
wildcard. Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListWorkerPoolsResponseWorkerPool |
A pageable asynchronous sequence of WorkerPool resources. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<gcrv::ListWorkerPoolsResponse, gcrv::WorkerPool> response = workerPoolsClient.ListWorkerPoolsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((gcrv::WorkerPool 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((gcrv::ListWorkerPoolsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcrv::WorkerPool 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<gcrv::WorkerPool> 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 (gcrv::WorkerPool 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;
ListWorkerPoolsAsync(ListWorkerPoolsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListWorkerPoolsResponse, WorkerPool> ListWorkerPoolsAsync(ListWorkerPoolsRequest request, CallSettings callSettings = null)
Lists WorkerPools. Results are sorted by creation time, descending.
Parameters | |
---|---|
Name | Description |
request |
ListWorkerPoolsRequest 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 |
PagedAsyncEnumerableListWorkerPoolsResponseWorkerPool |
A pageable asynchronous sequence of WorkerPool resources. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
gcrv::ListWorkerPoolsRequest request = new gcrv::ListWorkerPoolsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
ShowDeleted = false,
};
// Make the request
PagedAsyncEnumerable<gcrv::ListWorkerPoolsResponse, gcrv::WorkerPool> response = workerPoolsClient.ListWorkerPoolsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((gcrv::WorkerPool 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((gcrv::ListWorkerPoolsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcrv::WorkerPool 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<gcrv::WorkerPool> 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 (gcrv::WorkerPool 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;
ListWorkerPoolsAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListWorkerPoolsResponse, WorkerPool> ListWorkerPoolsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists WorkerPools. Results are sorted by creation time, descending.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The location and project to list resources on.
Location must be a valid Google Cloud region, and cannot be the "-"
wildcard. Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListWorkerPoolsResponseWorkerPool |
A pageable asynchronous sequence of WorkerPool resources. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<gcrv::ListWorkerPoolsResponse, gcrv::WorkerPool> response = workerPoolsClient.ListWorkerPoolsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((gcrv::WorkerPool 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((gcrv::ListWorkerPoolsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcrv::WorkerPool 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<gcrv::WorkerPool> 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 (gcrv::WorkerPool 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;
PollOnceCreateWorkerPool(string, CallSettings)
public virtual Operation<WorkerPool, WorkerPool> PollOnceCreateWorkerPool(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of CreateWorkerPool
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationWorkerPoolWorkerPool |
The result of polling the operation. |
PollOnceCreateWorkerPoolAsync(string, CallSettings)
public virtual Task<Operation<WorkerPool, WorkerPool>> PollOnceCreateWorkerPoolAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
CreateWorkerPool
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationWorkerPoolWorkerPool |
A task representing the result of polling the operation. |
PollOnceDeleteWorkerPool(string, CallSettings)
public virtual Operation<WorkerPool, WorkerPool> PollOnceDeleteWorkerPool(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of DeleteWorkerPool
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationWorkerPoolWorkerPool |
The result of polling the operation. |
PollOnceDeleteWorkerPoolAsync(string, CallSettings)
public virtual Task<Operation<WorkerPool, WorkerPool>> PollOnceDeleteWorkerPoolAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DeleteWorkerPool
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationWorkerPoolWorkerPool |
A task representing the result of polling the operation. |
PollOnceUpdateWorkerPool(string, CallSettings)
public virtual Operation<WorkerPool, WorkerPool> PollOnceUpdateWorkerPool(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of UpdateWorkerPool
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationWorkerPoolWorkerPool |
The result of polling the operation. |
PollOnceUpdateWorkerPoolAsync(string, CallSettings)
public virtual Task<Operation<WorkerPool, WorkerPool>> PollOnceUpdateWorkerPoolAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UpdateWorkerPool
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationWorkerPoolWorkerPool |
A task representing the result of polling the operation. |
SetIamPolicy(SetIamPolicyRequest, CallSettings)
public virtual Policy SetIamPolicy(SetIamPolicyRequest request, CallSettings callSettings = null)
Sets the IAM Access control policy for the specified WorkerPool. Overwrites any existing policy.
Parameters | |
---|---|
Name | Description |
request |
SetIamPolicyRequest 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 |
Policy |
The RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = gcrv::WorkerPoolsClient.Create();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Policy = new Policy(),
UpdateMask = new FieldMask(),
};
// Make the request
Policy response = workerPoolsClient.SetIamPolicy(request);
SetIamPolicyAsync(SetIamPolicyRequest, CallSettings)
public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CallSettings callSettings = null)
Sets the IAM Access control policy for the specified WorkerPool. Overwrites any existing policy.
Parameters | |
---|---|
Name | Description |
request |
SetIamPolicyRequest 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 |
TaskPolicy |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Policy = new Policy(),
UpdateMask = new FieldMask(),
};
// Make the request
Policy response = await workerPoolsClient.SetIamPolicyAsync(request);
SetIamPolicyAsync(SetIamPolicyRequest, CancellationToken)
public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CancellationToken cancellationToken)
Sets the IAM Access control policy for the specified WorkerPool. Overwrites any existing policy.
Parameters | |
---|---|
Name | Description |
request |
SetIamPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Policy = new Policy(),
UpdateMask = new FieldMask(),
};
// Make the request
Policy response = await workerPoolsClient.SetIamPolicyAsync(request);
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. |
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.
TestIamPermissions(TestIamPermissionsRequest, CallSettings)
public virtual TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, CallSettings callSettings = null)
Returns permissions that a caller has on the specified Project.
There are no permissions required for making this API call.
Parameters | |
---|---|
Name | Description |
request |
TestIamPermissionsRequest 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 |
TestIamPermissionsResponse |
The RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = gcrv::WorkerPoolsClient.Create();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = workerPoolsClient.TestIamPermissions(request);
TestIamPermissionsAsync(TestIamPermissionsRequest, CallSettings)
public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CallSettings callSettings = null)
Returns permissions that a caller has on the specified Project.
There are no permissions required for making this API call.
Parameters | |
---|---|
Name | Description |
request |
TestIamPermissionsRequest 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 |
TaskTestIamPermissionsResponse |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = await workerPoolsClient.TestIamPermissionsAsync(request);
TestIamPermissionsAsync(TestIamPermissionsRequest, CancellationToken)
public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CancellationToken cancellationToken)
Returns permissions that a caller has on the specified Project.
There are no permissions required for making this API call.
Parameters | |
---|---|
Name | Description |
request |
TestIamPermissionsRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTestIamPermissionsResponse |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = await workerPoolsClient.TestIamPermissionsAsync(request);
UpdateWorkerPool(UpdateWorkerPoolRequest, CallSettings)
public virtual Operation<WorkerPool, WorkerPool> UpdateWorkerPool(UpdateWorkerPoolRequest request, CallSettings callSettings = null)
Updates a WorkerPool.
Parameters | |
---|---|
Name | Description |
request |
UpdateWorkerPoolRequest 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 |
OperationWorkerPoolWorkerPool |
The RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = gcrv::WorkerPoolsClient.Create();
// Initialize request argument(s)
gcrv::UpdateWorkerPoolRequest request = new gcrv::UpdateWorkerPoolRequest
{
WorkerPool = new gcrv::WorkerPool(),
UpdateMask = new FieldMask(),
ValidateOnly = false,
AllowMissing = false,
ForceNewRevision = false,
};
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = workerPoolsClient.UpdateWorkerPool(request);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = workerPoolsClient.PollOnceUpdateWorkerPool(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
UpdateWorkerPool(WorkerPool, CallSettings)
public virtual Operation<WorkerPool, WorkerPool> UpdateWorkerPool(WorkerPool workerPool, CallSettings callSettings = null)
Updates a WorkerPool.
Parameters | |
---|---|
Name | Description |
workerPool |
WorkerPool Required. The WorkerPool to be updated. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationWorkerPoolWorkerPool |
The RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = gcrv::WorkerPoolsClient.Create();
// Initialize request argument(s)
gcrv::WorkerPool workerPool = new gcrv::WorkerPool();
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = workerPoolsClient.UpdateWorkerPool(workerPool);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = workerPoolsClient.PollOnceUpdateWorkerPool(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
UpdateWorkerPool(WorkerPool, FieldMask, CallSettings)
public virtual Operation<WorkerPool, WorkerPool> UpdateWorkerPool(WorkerPool workerPool, FieldMask updateMask, CallSettings callSettings = null)
Updates a WorkerPool.
Parameters | |
---|---|
Name | Description |
workerPool |
WorkerPool Required. The WorkerPool to be updated. |
updateMask |
FieldMask Optional. The list of fields to be updated. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationWorkerPoolWorkerPool |
The RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = gcrv::WorkerPoolsClient.Create();
// Initialize request argument(s)
gcrv::WorkerPool workerPool = new gcrv::WorkerPool();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = workerPoolsClient.UpdateWorkerPool(workerPool, updateMask);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = workerPoolsClient.PollOnceUpdateWorkerPool(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
UpdateWorkerPoolAsync(UpdateWorkerPoolRequest, CallSettings)
public virtual Task<Operation<WorkerPool, WorkerPool>> UpdateWorkerPoolAsync(UpdateWorkerPoolRequest request, CallSettings callSettings = null)
Updates a WorkerPool.
Parameters | |
---|---|
Name | Description |
request |
UpdateWorkerPoolRequest 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 |
TaskOperationWorkerPoolWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
gcrv::UpdateWorkerPoolRequest request = new gcrv::UpdateWorkerPoolRequest
{
WorkerPool = new gcrv::WorkerPool(),
UpdateMask = new FieldMask(),
ValidateOnly = false,
AllowMissing = false,
ForceNewRevision = false,
};
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = await workerPoolsClient.UpdateWorkerPoolAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = await workerPoolsClient.PollOnceUpdateWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
UpdateWorkerPoolAsync(UpdateWorkerPoolRequest, CancellationToken)
public virtual Task<Operation<WorkerPool, WorkerPool>> UpdateWorkerPoolAsync(UpdateWorkerPoolRequest request, CancellationToken cancellationToken)
Updates a WorkerPool.
Parameters | |
---|---|
Name | Description |
request |
UpdateWorkerPoolRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationWorkerPoolWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
gcrv::UpdateWorkerPoolRequest request = new gcrv::UpdateWorkerPoolRequest
{
WorkerPool = new gcrv::WorkerPool(),
UpdateMask = new FieldMask(),
ValidateOnly = false,
AllowMissing = false,
ForceNewRevision = false,
};
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = await workerPoolsClient.UpdateWorkerPoolAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = await workerPoolsClient.PollOnceUpdateWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
UpdateWorkerPoolAsync(WorkerPool, CallSettings)
public virtual Task<Operation<WorkerPool, WorkerPool>> UpdateWorkerPoolAsync(WorkerPool workerPool, CallSettings callSettings = null)
Updates a WorkerPool.
Parameters | |
---|---|
Name | Description |
workerPool |
WorkerPool Required. The WorkerPool to be updated. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationWorkerPoolWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
gcrv::WorkerPool workerPool = new gcrv::WorkerPool();
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = await workerPoolsClient.UpdateWorkerPoolAsync(workerPool);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = await workerPoolsClient.PollOnceUpdateWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
UpdateWorkerPoolAsync(WorkerPool, FieldMask, CallSettings)
public virtual Task<Operation<WorkerPool, WorkerPool>> UpdateWorkerPoolAsync(WorkerPool workerPool, FieldMask updateMask, CallSettings callSettings = null)
Updates a WorkerPool.
Parameters | |
---|---|
Name | Description |
workerPool |
WorkerPool Required. The WorkerPool to be updated. |
updateMask |
FieldMask Optional. The list of fields to be updated. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationWorkerPoolWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
gcrv::WorkerPool workerPool = new gcrv::WorkerPool();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = await workerPoolsClient.UpdateWorkerPoolAsync(workerPool, updateMask);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = await workerPoolsClient.PollOnceUpdateWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
UpdateWorkerPoolAsync(WorkerPool, FieldMask, CancellationToken)
public virtual Task<Operation<WorkerPool, WorkerPool>> UpdateWorkerPoolAsync(WorkerPool workerPool, FieldMask updateMask, CancellationToken cancellationToken)
Updates a WorkerPool.
Parameters | |
---|---|
Name | Description |
workerPool |
WorkerPool Required. The WorkerPool to be updated. |
updateMask |
FieldMask Optional. The list of fields to be updated. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationWorkerPoolWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
gcrv::WorkerPool workerPool = new gcrv::WorkerPool();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = await workerPoolsClient.UpdateWorkerPoolAsync(workerPool, updateMask);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = await workerPoolsClient.PollOnceUpdateWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}
UpdateWorkerPoolAsync(WorkerPool, CancellationToken)
public virtual Task<Operation<WorkerPool, WorkerPool>> UpdateWorkerPoolAsync(WorkerPool workerPool, CancellationToken cancellationToken)
Updates a WorkerPool.
Parameters | |
---|---|
Name | Description |
workerPool |
WorkerPool Required. The WorkerPool to be updated. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationWorkerPoolWorkerPool |
A Task containing the RPC response. |
// Create client
gcrv::WorkerPoolsClient workerPoolsClient = await gcrv::WorkerPoolsClient.CreateAsync();
// Initialize request argument(s)
gcrv::WorkerPool workerPool = new gcrv::WorkerPool();
// Make the request
Operation<gcrv::WorkerPool, gcrv::WorkerPool> response = await workerPoolsClient.UpdateWorkerPoolAsync(workerPool);
// Poll until the returned long-running operation is complete
Operation<gcrv::WorkerPool, gcrv::WorkerPool> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcrv::WorkerPool 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<gcrv::WorkerPool, gcrv::WorkerPool> retrievedResponse = await workerPoolsClient.PollOnceUpdateWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::WorkerPool retrievedResult = retrievedResponse.Result;
}