Workload Manager v1 API - Class WorkloadManagerClient (1.0.0-beta01)

public abstract class WorkloadManagerClient

Reference documentation and code samples for the Workload Manager v1 API class WorkloadManagerClient.

WorkloadManager client wrapper, for convenient use.

Inheritance

object > WorkloadManagerClient

Namespace

Google.Cloud.WorkloadManager.V1

Assembly

Google.Cloud.WorkloadManager.V1.dll

Remarks

The Workload Manager provides various tools to deploy, validate and observe your workloads running on Google Cloud.

Properties

CreateEvaluationOperationsClient

public virtual OperationsClient CreateEvaluationOperationsClient { get; }

The long-running operations client for CreateEvaluation.

Property Value
Type Description
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default WorkloadManager scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default WorkloadManager scopes are:

DeleteEvaluationOperationsClient

public virtual OperationsClient DeleteEvaluationOperationsClient { get; }

The long-running operations client for DeleteEvaluation.

Property Value
Type Description
OperationsClient

DeleteExecutionOperationsClient

public virtual OperationsClient DeleteExecutionOperationsClient { get; }

The long-running operations client for DeleteExecution.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual WorkloadManager.WorkloadManagerClient GrpcClient { get; }

The underlying gRPC WorkloadManager client

Property Value
Type Description
WorkloadManagerWorkloadManagerClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

RunEvaluationOperationsClient

public virtual OperationsClient RunEvaluationOperationsClient { get; }

The long-running operations client for RunEvaluation.

Property Value
Type Description
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

UpdateEvaluationOperationsClient

public virtual OperationsClient UpdateEvaluationOperationsClient { get; }

The long-running operations client for UpdateEvaluation.

Property Value
Type Description
OperationsClient

Methods

Create()

public static WorkloadManagerClient Create()

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

Returns
Type Description
WorkloadManagerClient

The created WorkloadManagerClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskWorkloadManagerClient

The task representing the created WorkloadManagerClient.

CreateEvaluation(LocationName, Evaluation, string, CallSettings)

public virtual Operation<Evaluation, OperationMetadata> CreateEvaluation(LocationName parent, Evaluation evaluation, string evaluationId, CallSettings callSettings = null)

Creates a new Evaluation in a given project and location.

Parameters
Name Description
parent LocationName

Required. The resource prefix of the evaluation location using the form: projects/{project_id}/locations/{location_id}.

evaluation Evaluation

Required. The resource being created.

evaluationId string

Required. Id of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEvaluationOperationMetadata

The RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Evaluation evaluation = new Evaluation();
string evaluationId = "";
// Make the request
Operation<Evaluation, OperationMetadata> response = workloadManagerClient.CreateEvaluation(parent, evaluation, evaluationId);

// Poll until the returned long-running operation is complete
Operation<Evaluation, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Evaluation 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<Evaluation, OperationMetadata> retrievedResponse = workloadManagerClient.PollOnceCreateEvaluation(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}

CreateEvaluation(CreateEvaluationRequest, CallSettings)

public virtual Operation<Evaluation, OperationMetadata> CreateEvaluation(CreateEvaluationRequest request, CallSettings callSettings = null)

Creates a new Evaluation in a given project and location.

Parameters
Name Description
request CreateEvaluationRequest

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
OperationEvaluationOperationMetadata

The RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
CreateEvaluationRequest request = new CreateEvaluationRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    EvaluationId = "",
    Evaluation = new Evaluation(),
    RequestId = "",
};
// Make the request
Operation<Evaluation, OperationMetadata> response = workloadManagerClient.CreateEvaluation(request);

// Poll until the returned long-running operation is complete
Operation<Evaluation, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Evaluation 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<Evaluation, OperationMetadata> retrievedResponse = workloadManagerClient.PollOnceCreateEvaluation(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}

CreateEvaluation(string, Evaluation, string, CallSettings)

public virtual Operation<Evaluation, OperationMetadata> CreateEvaluation(string parent, Evaluation evaluation, string evaluationId, CallSettings callSettings = null)

Creates a new Evaluation in a given project and location.

Parameters
Name Description
parent string

Required. The resource prefix of the evaluation location using the form: projects/{project_id}/locations/{location_id}.

evaluation Evaluation

Required. The resource being created.

evaluationId string

Required. Id of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEvaluationOperationMetadata

The RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Evaluation evaluation = new Evaluation();
string evaluationId = "";
// Make the request
Operation<Evaluation, OperationMetadata> response = workloadManagerClient.CreateEvaluation(parent, evaluation, evaluationId);

// Poll until the returned long-running operation is complete
Operation<Evaluation, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Evaluation 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<Evaluation, OperationMetadata> retrievedResponse = workloadManagerClient.PollOnceCreateEvaluation(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}

CreateEvaluationAsync(LocationName, Evaluation, string, CallSettings)

public virtual Task<Operation<Evaluation, OperationMetadata>> CreateEvaluationAsync(LocationName parent, Evaluation evaluation, string evaluationId, CallSettings callSettings = null)

Creates a new Evaluation in a given project and location.

Parameters
Name Description
parent LocationName

Required. The resource prefix of the evaluation location using the form: projects/{project_id}/locations/{location_id}.

evaluation Evaluation

Required. The resource being created.

evaluationId string

Required. Id of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEvaluationOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Evaluation evaluation = new Evaluation();
string evaluationId = "";
// Make the request
Operation<Evaluation, OperationMetadata> response = await workloadManagerClient.CreateEvaluationAsync(parent, evaluation, evaluationId);

// Poll until the returned long-running operation is complete
Operation<Evaluation, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Evaluation 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<Evaluation, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceCreateEvaluationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}

CreateEvaluationAsync(LocationName, Evaluation, string, CancellationToken)

public virtual Task<Operation<Evaluation, OperationMetadata>> CreateEvaluationAsync(LocationName parent, Evaluation evaluation, string evaluationId, CancellationToken cancellationToken)

Creates a new Evaluation in a given project and location.

Parameters
Name Description
parent LocationName

Required. The resource prefix of the evaluation location using the form: projects/{project_id}/locations/{location_id}.

evaluation Evaluation

Required. The resource being created.

evaluationId string

Required. Id of the requesting object.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEvaluationOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Evaluation evaluation = new Evaluation();
string evaluationId = "";
// Make the request
Operation<Evaluation, OperationMetadata> response = await workloadManagerClient.CreateEvaluationAsync(parent, evaluation, evaluationId);

// Poll until the returned long-running operation is complete
Operation<Evaluation, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Evaluation 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<Evaluation, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceCreateEvaluationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}

CreateEvaluationAsync(CreateEvaluationRequest, CallSettings)

public virtual Task<Operation<Evaluation, OperationMetadata>> CreateEvaluationAsync(CreateEvaluationRequest request, CallSettings callSettings = null)

Creates a new Evaluation in a given project and location.

Parameters
Name Description
request CreateEvaluationRequest

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
TaskOperationEvaluationOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
CreateEvaluationRequest request = new CreateEvaluationRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    EvaluationId = "",
    Evaluation = new Evaluation(),
    RequestId = "",
};
// Make the request
Operation<Evaluation, OperationMetadata> response = await workloadManagerClient.CreateEvaluationAsync(request);

// Poll until the returned long-running operation is complete
Operation<Evaluation, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Evaluation 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<Evaluation, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceCreateEvaluationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}

CreateEvaluationAsync(CreateEvaluationRequest, CancellationToken)

public virtual Task<Operation<Evaluation, OperationMetadata>> CreateEvaluationAsync(CreateEvaluationRequest request, CancellationToken cancellationToken)

Creates a new Evaluation in a given project and location.

Parameters
Name Description
request CreateEvaluationRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEvaluationOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
CreateEvaluationRequest request = new CreateEvaluationRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    EvaluationId = "",
    Evaluation = new Evaluation(),
    RequestId = "",
};
// Make the request
Operation<Evaluation, OperationMetadata> response = await workloadManagerClient.CreateEvaluationAsync(request);

// Poll until the returned long-running operation is complete
Operation<Evaluation, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Evaluation 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<Evaluation, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceCreateEvaluationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}

CreateEvaluationAsync(string, Evaluation, string, CallSettings)

public virtual Task<Operation<Evaluation, OperationMetadata>> CreateEvaluationAsync(string parent, Evaluation evaluation, string evaluationId, CallSettings callSettings = null)

Creates a new Evaluation in a given project and location.

Parameters
Name Description
parent string

Required. The resource prefix of the evaluation location using the form: projects/{project_id}/locations/{location_id}.

evaluation Evaluation

Required. The resource being created.

evaluationId string

Required. Id of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEvaluationOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Evaluation evaluation = new Evaluation();
string evaluationId = "";
// Make the request
Operation<Evaluation, OperationMetadata> response = await workloadManagerClient.CreateEvaluationAsync(parent, evaluation, evaluationId);

// Poll until the returned long-running operation is complete
Operation<Evaluation, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Evaluation 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<Evaluation, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceCreateEvaluationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}

CreateEvaluationAsync(string, Evaluation, string, CancellationToken)

public virtual Task<Operation<Evaluation, OperationMetadata>> CreateEvaluationAsync(string parent, Evaluation evaluation, string evaluationId, CancellationToken cancellationToken)

Creates a new Evaluation in a given project and location.

Parameters
Name Description
parent string

Required. The resource prefix of the evaluation location using the form: projects/{project_id}/locations/{location_id}.

evaluation Evaluation

Required. The resource being created.

evaluationId string

Required. Id of the requesting object.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEvaluationOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Evaluation evaluation = new Evaluation();
string evaluationId = "";
// Make the request
Operation<Evaluation, OperationMetadata> response = await workloadManagerClient.CreateEvaluationAsync(parent, evaluation, evaluationId);

// Poll until the returned long-running operation is complete
Operation<Evaluation, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Evaluation 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<Evaluation, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceCreateEvaluationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}

DeleteEvaluation(DeleteEvaluationRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteEvaluation(DeleteEvaluationRequest request, CallSettings callSettings = null)

Deletes a single Evaluation.

Parameters
Name Description
request DeleteEvaluationRequest

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
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
DeleteEvaluationRequest request = new DeleteEvaluationRequest
{
    EvaluationName = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]"),
    RequestId = "",
    Force = false,
};
// Make the request
Operation<Empty, OperationMetadata> response = workloadManagerClient.DeleteEvaluation(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = workloadManagerClient.PollOnceDeleteEvaluation(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;
}

DeleteEvaluation(EvaluationName, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteEvaluation(EvaluationName name, CallSettings callSettings = null)

Deletes a single Evaluation.

Parameters
Name Description
name EvaluationName

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
EvaluationName name = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]");
// Make the request
Operation<Empty, OperationMetadata> response = workloadManagerClient.DeleteEvaluation(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = workloadManagerClient.PollOnceDeleteEvaluation(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;
}

DeleteEvaluation(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteEvaluation(string name, CallSettings callSettings = null)

Deletes a single Evaluation.

Parameters
Name Description
name string

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/evaluations/[EVALUATION]";
// Make the request
Operation<Empty, OperationMetadata> response = workloadManagerClient.DeleteEvaluation(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = workloadManagerClient.PollOnceDeleteEvaluation(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;
}

DeleteEvaluationAsync(DeleteEvaluationRequest, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteEvaluationAsync(DeleteEvaluationRequest request, CallSettings callSettings = null)

Deletes a single Evaluation.

Parameters
Name Description
request DeleteEvaluationRequest

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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
DeleteEvaluationRequest request = new DeleteEvaluationRequest
{
    EvaluationName = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]"),
    RequestId = "",
    Force = false,
};
// Make the request
Operation<Empty, OperationMetadata> response = await workloadManagerClient.DeleteEvaluationAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceDeleteEvaluationAsync(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;
}

DeleteEvaluationAsync(DeleteEvaluationRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteEvaluationAsync(DeleteEvaluationRequest request, CancellationToken cancellationToken)

Deletes a single Evaluation.

Parameters
Name Description
request DeleteEvaluationRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
DeleteEvaluationRequest request = new DeleteEvaluationRequest
{
    EvaluationName = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]"),
    RequestId = "",
    Force = false,
};
// Make the request
Operation<Empty, OperationMetadata> response = await workloadManagerClient.DeleteEvaluationAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceDeleteEvaluationAsync(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;
}

DeleteEvaluationAsync(EvaluationName, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteEvaluationAsync(EvaluationName name, CallSettings callSettings = null)

Deletes a single Evaluation.

Parameters
Name Description
name EvaluationName

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
EvaluationName name = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]");
// Make the request
Operation<Empty, OperationMetadata> response = await workloadManagerClient.DeleteEvaluationAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceDeleteEvaluationAsync(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;
}

DeleteEvaluationAsync(EvaluationName, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteEvaluationAsync(EvaluationName name, CancellationToken cancellationToken)

Deletes a single Evaluation.

Parameters
Name Description
name EvaluationName

Required. Name of the resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
EvaluationName name = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]");
// Make the request
Operation<Empty, OperationMetadata> response = await workloadManagerClient.DeleteEvaluationAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceDeleteEvaluationAsync(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;
}

DeleteEvaluationAsync(string, CallSettings)

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

Deletes a single Evaluation.

Parameters
Name Description
name string

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/evaluations/[EVALUATION]";
// Make the request
Operation<Empty, OperationMetadata> response = await workloadManagerClient.DeleteEvaluationAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceDeleteEvaluationAsync(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;
}

DeleteEvaluationAsync(string, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteEvaluationAsync(string name, CancellationToken cancellationToken)

Deletes a single Evaluation.

Parameters
Name Description
name string

Required. Name of the resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/evaluations/[EVALUATION]";
// Make the request
Operation<Empty, OperationMetadata> response = await workloadManagerClient.DeleteEvaluationAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceDeleteEvaluationAsync(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;
}

DeleteExecution(DeleteExecutionRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteExecution(DeleteExecutionRequest request, CallSettings callSettings = null)

Deletes a single Execution.

Parameters
Name Description
request DeleteExecutionRequest

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
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
DeleteExecutionRequest request = new DeleteExecutionRequest
{
    ExecutionName = ExecutionName.FromProjectLocationEvaluationExecution("[PROJECT]", "[LOCATION]", "[EVALUATION]", "[EXECUTION]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = workloadManagerClient.DeleteExecution(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = workloadManagerClient.PollOnceDeleteExecution(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;
}

DeleteExecution(ExecutionName, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteExecution(ExecutionName name, CallSettings callSettings = null)

Deletes a single Execution.

Parameters
Name Description
name ExecutionName

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
ExecutionName name = ExecutionName.FromProjectLocationEvaluationExecution("[PROJECT]", "[LOCATION]", "[EVALUATION]", "[EXECUTION]");
// Make the request
Operation<Empty, OperationMetadata> response = workloadManagerClient.DeleteExecution(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = workloadManagerClient.PollOnceDeleteExecution(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;
}

DeleteExecution(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteExecution(string name, CallSettings callSettings = null)

Deletes a single Execution.

Parameters
Name Description
name string

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/evaluations/[EVALUATION]/executions/[EXECUTION]";
// Make the request
Operation<Empty, OperationMetadata> response = workloadManagerClient.DeleteExecution(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = workloadManagerClient.PollOnceDeleteExecution(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;
}

DeleteExecutionAsync(DeleteExecutionRequest, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteExecutionAsync(DeleteExecutionRequest request, CallSettings callSettings = null)

Deletes a single Execution.

Parameters
Name Description
request DeleteExecutionRequest

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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
DeleteExecutionRequest request = new DeleteExecutionRequest
{
    ExecutionName = ExecutionName.FromProjectLocationEvaluationExecution("[PROJECT]", "[LOCATION]", "[EVALUATION]", "[EXECUTION]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await workloadManagerClient.DeleteExecutionAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceDeleteExecutionAsync(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;
}

DeleteExecutionAsync(DeleteExecutionRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteExecutionAsync(DeleteExecutionRequest request, CancellationToken cancellationToken)

Deletes a single Execution.

Parameters
Name Description
request DeleteExecutionRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
DeleteExecutionRequest request = new DeleteExecutionRequest
{
    ExecutionName = ExecutionName.FromProjectLocationEvaluationExecution("[PROJECT]", "[LOCATION]", "[EVALUATION]", "[EXECUTION]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await workloadManagerClient.DeleteExecutionAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceDeleteExecutionAsync(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;
}

DeleteExecutionAsync(ExecutionName, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteExecutionAsync(ExecutionName name, CallSettings callSettings = null)

Deletes a single Execution.

Parameters
Name Description
name ExecutionName

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
ExecutionName name = ExecutionName.FromProjectLocationEvaluationExecution("[PROJECT]", "[LOCATION]", "[EVALUATION]", "[EXECUTION]");
// Make the request
Operation<Empty, OperationMetadata> response = await workloadManagerClient.DeleteExecutionAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceDeleteExecutionAsync(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;
}

DeleteExecutionAsync(ExecutionName, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteExecutionAsync(ExecutionName name, CancellationToken cancellationToken)

Deletes a single Execution.

Parameters
Name Description
name ExecutionName

Required. Name of the resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
ExecutionName name = ExecutionName.FromProjectLocationEvaluationExecution("[PROJECT]", "[LOCATION]", "[EVALUATION]", "[EXECUTION]");
// Make the request
Operation<Empty, OperationMetadata> response = await workloadManagerClient.DeleteExecutionAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceDeleteExecutionAsync(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;
}

DeleteExecutionAsync(string, CallSettings)

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

Deletes a single Execution.

Parameters
Name Description
name string

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/evaluations/[EVALUATION]/executions/[EXECUTION]";
// Make the request
Operation<Empty, OperationMetadata> response = await workloadManagerClient.DeleteExecutionAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceDeleteExecutionAsync(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;
}

DeleteExecutionAsync(string, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteExecutionAsync(string name, CancellationToken cancellationToken)

Deletes a single Execution.

Parameters
Name Description
name string

Required. Name of the resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/evaluations/[EVALUATION]/executions/[EXECUTION]";
// Make the request
Operation<Empty, OperationMetadata> response = await workloadManagerClient.DeleteExecutionAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceDeleteExecutionAsync(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;
}

GetEvaluation(EvaluationName, CallSettings)

public virtual Evaluation GetEvaluation(EvaluationName name, CallSettings callSettings = null)

Gets details of a single Evaluation.

Parameters
Name Description
name EvaluationName

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Evaluation

The RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
EvaluationName name = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]");
// Make the request
Evaluation response = workloadManagerClient.GetEvaluation(name);

GetEvaluation(GetEvaluationRequest, CallSettings)

public virtual Evaluation GetEvaluation(GetEvaluationRequest request, CallSettings callSettings = null)

Gets details of a single Evaluation.

Parameters
Name Description
request GetEvaluationRequest

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
Evaluation

The RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
GetEvaluationRequest request = new GetEvaluationRequest
{
    EvaluationName = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]"),
};
// Make the request
Evaluation response = workloadManagerClient.GetEvaluation(request);

GetEvaluation(string, CallSettings)

public virtual Evaluation GetEvaluation(string name, CallSettings callSettings = null)

Gets details of a single Evaluation.

Parameters
Name Description
name string

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Evaluation

The RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/evaluations/[EVALUATION]";
// Make the request
Evaluation response = workloadManagerClient.GetEvaluation(name);

GetEvaluationAsync(EvaluationName, CallSettings)

public virtual Task<Evaluation> GetEvaluationAsync(EvaluationName name, CallSettings callSettings = null)

Gets details of a single Evaluation.

Parameters
Name Description
name EvaluationName

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskEvaluation

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
EvaluationName name = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]");
// Make the request
Evaluation response = await workloadManagerClient.GetEvaluationAsync(name);

GetEvaluationAsync(EvaluationName, CancellationToken)

public virtual Task<Evaluation> GetEvaluationAsync(EvaluationName name, CancellationToken cancellationToken)

Gets details of a single Evaluation.

Parameters
Name Description
name EvaluationName

Required. Name of the resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskEvaluation

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
EvaluationName name = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]");
// Make the request
Evaluation response = await workloadManagerClient.GetEvaluationAsync(name);

GetEvaluationAsync(GetEvaluationRequest, CallSettings)

public virtual Task<Evaluation> GetEvaluationAsync(GetEvaluationRequest request, CallSettings callSettings = null)

Gets details of a single Evaluation.

Parameters
Name Description
request GetEvaluationRequest

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
TaskEvaluation

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
GetEvaluationRequest request = new GetEvaluationRequest
{
    EvaluationName = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]"),
};
// Make the request
Evaluation response = await workloadManagerClient.GetEvaluationAsync(request);

GetEvaluationAsync(GetEvaluationRequest, CancellationToken)

public virtual Task<Evaluation> GetEvaluationAsync(GetEvaluationRequest request, CancellationToken cancellationToken)

Gets details of a single Evaluation.

Parameters
Name Description
request GetEvaluationRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskEvaluation

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
GetEvaluationRequest request = new GetEvaluationRequest
{
    EvaluationName = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]"),
};
// Make the request
Evaluation response = await workloadManagerClient.GetEvaluationAsync(request);

GetEvaluationAsync(string, CallSettings)

public virtual Task<Evaluation> GetEvaluationAsync(string name, CallSettings callSettings = null)

Gets details of a single Evaluation.

Parameters
Name Description
name string

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskEvaluation

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/evaluations/[EVALUATION]";
// Make the request
Evaluation response = await workloadManagerClient.GetEvaluationAsync(name);

GetEvaluationAsync(string, CancellationToken)

public virtual Task<Evaluation> GetEvaluationAsync(string name, CancellationToken cancellationToken)

Gets details of a single Evaluation.

Parameters
Name Description
name string

Required. Name of the resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskEvaluation

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/evaluations/[EVALUATION]";
// Make the request
Evaluation response = await workloadManagerClient.GetEvaluationAsync(name);

GetExecution(ExecutionName, CallSettings)

public virtual Execution GetExecution(ExecutionName name, CallSettings callSettings = null)

Gets details of a single Execution.

Parameters
Name Description
name ExecutionName

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Execution

The RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
ExecutionName name = ExecutionName.FromProjectLocationEvaluationExecution("[PROJECT]", "[LOCATION]", "[EVALUATION]", "[EXECUTION]");
// Make the request
Execution response = workloadManagerClient.GetExecution(name);

GetExecution(GetExecutionRequest, CallSettings)

public virtual Execution GetExecution(GetExecutionRequest request, CallSettings callSettings = null)

Gets details of a single Execution.

Parameters
Name Description
request GetExecutionRequest

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
Execution

The RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
GetExecutionRequest request = new GetExecutionRequest
{
    ExecutionName = ExecutionName.FromProjectLocationEvaluationExecution("[PROJECT]", "[LOCATION]", "[EVALUATION]", "[EXECUTION]"),
};
// Make the request
Execution response = workloadManagerClient.GetExecution(request);

GetExecution(string, CallSettings)

public virtual Execution GetExecution(string name, CallSettings callSettings = null)

Gets details of a single Execution.

Parameters
Name Description
name string

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Execution

The RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/evaluations/[EVALUATION]/executions/[EXECUTION]";
// Make the request
Execution response = workloadManagerClient.GetExecution(name);

GetExecutionAsync(ExecutionName, CallSettings)

public virtual Task<Execution> GetExecutionAsync(ExecutionName name, CallSettings callSettings = null)

Gets details of a single Execution.

Parameters
Name Description
name ExecutionName

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskExecution

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
ExecutionName name = ExecutionName.FromProjectLocationEvaluationExecution("[PROJECT]", "[LOCATION]", "[EVALUATION]", "[EXECUTION]");
// Make the request
Execution response = await workloadManagerClient.GetExecutionAsync(name);

GetExecutionAsync(ExecutionName, CancellationToken)

public virtual Task<Execution> GetExecutionAsync(ExecutionName name, CancellationToken cancellationToken)

Gets details of a single Execution.

Parameters
Name Description
name ExecutionName

Required. Name of the resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskExecution

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
ExecutionName name = ExecutionName.FromProjectLocationEvaluationExecution("[PROJECT]", "[LOCATION]", "[EVALUATION]", "[EXECUTION]");
// Make the request
Execution response = await workloadManagerClient.GetExecutionAsync(name);

GetExecutionAsync(GetExecutionRequest, CallSettings)

public virtual Task<Execution> GetExecutionAsync(GetExecutionRequest request, CallSettings callSettings = null)

Gets details of a single Execution.

Parameters
Name Description
request GetExecutionRequest

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
TaskExecution

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
GetExecutionRequest request = new GetExecutionRequest
{
    ExecutionName = ExecutionName.FromProjectLocationEvaluationExecution("[PROJECT]", "[LOCATION]", "[EVALUATION]", "[EXECUTION]"),
};
// Make the request
Execution response = await workloadManagerClient.GetExecutionAsync(request);

GetExecutionAsync(GetExecutionRequest, CancellationToken)

public virtual Task<Execution> GetExecutionAsync(GetExecutionRequest request, CancellationToken cancellationToken)

Gets details of a single Execution.

Parameters
Name Description
request GetExecutionRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskExecution

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
GetExecutionRequest request = new GetExecutionRequest
{
    ExecutionName = ExecutionName.FromProjectLocationEvaluationExecution("[PROJECT]", "[LOCATION]", "[EVALUATION]", "[EXECUTION]"),
};
// Make the request
Execution response = await workloadManagerClient.GetExecutionAsync(request);

GetExecutionAsync(string, CallSettings)

public virtual Task<Execution> GetExecutionAsync(string name, CallSettings callSettings = null)

Gets details of a single Execution.

Parameters
Name Description
name string

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskExecution

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/evaluations/[EVALUATION]/executions/[EXECUTION]";
// Make the request
Execution response = await workloadManagerClient.GetExecutionAsync(name);

GetExecutionAsync(string, CancellationToken)

public virtual Task<Execution> GetExecutionAsync(string name, CancellationToken cancellationToken)

Gets details of a single Execution.

Parameters
Name Description
name string

Required. Name of the resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskExecution

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/evaluations/[EVALUATION]/executions/[EXECUTION]";
// Make the request
Execution response = await workloadManagerClient.GetExecutionAsync(name);

ListEvaluations(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListEvaluationsResponse, Evaluation> ListEvaluations(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Evaluations in a given project and location.

Parameters
Name Description
parent LocationName

Required. Parent value for ListEvaluationsRequest.

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
PagedEnumerableListEvaluationsResponseEvaluation

A pageable sequence of Evaluation resources.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListEvaluationsResponse, Evaluation> response = workloadManagerClient.ListEvaluations(parent);

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

ListEvaluations(ListEvaluationsRequest, CallSettings)

public virtual PagedEnumerable<ListEvaluationsResponse, Evaluation> ListEvaluations(ListEvaluationsRequest request, CallSettings callSettings = null)

Lists Evaluations in a given project and location.

Parameters
Name Description
request ListEvaluationsRequest

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
PagedEnumerableListEvaluationsResponseEvaluation

A pageable sequence of Evaluation resources.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
ListEvaluationsRequest request = new ListEvaluationsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListEvaluationsResponse, Evaluation> response = workloadManagerClient.ListEvaluations(request);

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

ListEvaluations(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListEvaluationsResponse, Evaluation> ListEvaluations(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Evaluations in a given project and location.

Parameters
Name Description
parent string

Required. Parent value for ListEvaluationsRequest.

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
PagedEnumerableListEvaluationsResponseEvaluation

A pageable sequence of Evaluation resources.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListEvaluationsResponse, Evaluation> response = workloadManagerClient.ListEvaluations(parent);

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

ListEvaluationsAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListEvaluationsResponse, Evaluation> ListEvaluationsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Evaluations in a given project and location.

Parameters
Name Description
parent LocationName

Required. Parent value for ListEvaluationsRequest.

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
PagedAsyncEnumerableListEvaluationsResponseEvaluation

A pageable asynchronous sequence of Evaluation resources.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListEvaluationsResponse, Evaluation> response = workloadManagerClient.ListEvaluationsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (Evaluation item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListEvaluationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Evaluation 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<Evaluation> 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 (Evaluation 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;

ListEvaluationsAsync(ListEvaluationsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListEvaluationsResponse, Evaluation> ListEvaluationsAsync(ListEvaluationsRequest request, CallSettings callSettings = null)

Lists Evaluations in a given project and location.

Parameters
Name Description
request ListEvaluationsRequest

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
PagedAsyncEnumerableListEvaluationsResponseEvaluation

A pageable asynchronous sequence of Evaluation resources.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
ListEvaluationsRequest request = new ListEvaluationsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListEvaluationsResponse, Evaluation> response = workloadManagerClient.ListEvaluationsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (Evaluation item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListEvaluationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Evaluation 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<Evaluation> 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 (Evaluation 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;

ListEvaluationsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListEvaluationsResponse, Evaluation> ListEvaluationsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Evaluations in a given project and location.

Parameters
Name Description
parent string

Required. Parent value for ListEvaluationsRequest.

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
PagedAsyncEnumerableListEvaluationsResponseEvaluation

A pageable asynchronous sequence of Evaluation resources.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListEvaluationsResponse, Evaluation> response = workloadManagerClient.ListEvaluationsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (Evaluation item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListEvaluationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Evaluation 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<Evaluation> 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 (Evaluation 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;

ListExecutionResults(ListExecutionResultsRequest, CallSettings)

public virtual PagedEnumerable<ListExecutionResultsResponse, ExecutionResult> ListExecutionResults(ListExecutionResultsRequest request, CallSettings callSettings = null)

Lists the result of a single evaluation.

Parameters
Name Description
request ListExecutionResultsRequest

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
PagedEnumerableListExecutionResultsResponseExecutionResult

A pageable sequence of ExecutionResult resources.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
ListExecutionResultsRequest request = new ListExecutionResultsRequest
{
    Parent = "",
    Filter = "",
};
// Make the request
PagedEnumerable<ListExecutionResultsResponse, ExecutionResult> response = workloadManagerClient.ListExecutionResults(request);

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

ListExecutionResults(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListExecutionResultsResponse, ExecutionResult> ListExecutionResults(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the result of a single evaluation.

Parameters
Name Description
parent string

Required. The execution results. Format: {parent}/evaluations//executions//results.

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
PagedEnumerableListExecutionResultsResponseExecutionResult

A pageable sequence of ExecutionResult resources.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
string parent = "";
// Make the request
PagedEnumerable<ListExecutionResultsResponse, ExecutionResult> response = workloadManagerClient.ListExecutionResults(parent);

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

ListExecutionResultsAsync(ListExecutionResultsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListExecutionResultsResponse, ExecutionResult> ListExecutionResultsAsync(ListExecutionResultsRequest request, CallSettings callSettings = null)

Lists the result of a single evaluation.

Parameters
Name Description
request ListExecutionResultsRequest

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
PagedAsyncEnumerableListExecutionResultsResponseExecutionResult

A pageable asynchronous sequence of ExecutionResult resources.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
ListExecutionResultsRequest request = new ListExecutionResultsRequest
{
    Parent = "",
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListExecutionResultsResponse, ExecutionResult> response = workloadManagerClient.ListExecutionResultsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (ExecutionResult item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListExecutionResultsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ExecutionResult 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<ExecutionResult> 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 (ExecutionResult 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;

ListExecutionResultsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListExecutionResultsResponse, ExecutionResult> ListExecutionResultsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the result of a single evaluation.

Parameters
Name Description
parent string

Required. The execution results. Format: {parent}/evaluations//executions//results.

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
PagedAsyncEnumerableListExecutionResultsResponseExecutionResult

A pageable asynchronous sequence of ExecutionResult resources.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
// Make the request
PagedAsyncEnumerable<ListExecutionResultsResponse, ExecutionResult> response = workloadManagerClient.ListExecutionResultsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (ExecutionResult item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListExecutionResultsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ExecutionResult 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<ExecutionResult> 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 (ExecutionResult 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;

ListExecutions(EvaluationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListExecutionsResponse, Execution> ListExecutions(EvaluationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Executions in a given project and location.

Parameters
Name Description
parent EvaluationName

Required. The resource prefix of the Execution using the form: projects/{project}/locations/{location}/evaluations/{evaluation}.

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
PagedEnumerableListExecutionsResponseExecution

A pageable sequence of Execution resources.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
EvaluationName parent = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]");
// Make the request
PagedEnumerable<ListExecutionsResponse, Execution> response = workloadManagerClient.ListExecutions(parent);

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

ListExecutions(ListExecutionsRequest, CallSettings)

public virtual PagedEnumerable<ListExecutionsResponse, Execution> ListExecutions(ListExecutionsRequest request, CallSettings callSettings = null)

Lists Executions in a given project and location.

Parameters
Name Description
request ListExecutionsRequest

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
PagedEnumerableListExecutionsResponseExecution

A pageable sequence of Execution resources.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
ListExecutionsRequest request = new ListExecutionsRequest
{
    ParentAsEvaluationName = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListExecutionsResponse, Execution> response = workloadManagerClient.ListExecutions(request);

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

ListExecutions(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListExecutionsResponse, Execution> ListExecutions(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Executions in a given project and location.

Parameters
Name Description
parent string

Required. The resource prefix of the Execution using the form: projects/{project}/locations/{location}/evaluations/{evaluation}.

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
PagedEnumerableListExecutionsResponseExecution

A pageable sequence of Execution resources.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/evaluations/[EVALUATION]";
// Make the request
PagedEnumerable<ListExecutionsResponse, Execution> response = workloadManagerClient.ListExecutions(parent);

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

ListExecutionsAsync(EvaluationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListExecutionsResponse, Execution> ListExecutionsAsync(EvaluationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Executions in a given project and location.

Parameters
Name Description
parent EvaluationName

Required. The resource prefix of the Execution using the form: projects/{project}/locations/{location}/evaluations/{evaluation}.

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
PagedAsyncEnumerableListExecutionsResponseExecution

A pageable asynchronous sequence of Execution resources.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
EvaluationName parent = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]");
// Make the request
PagedAsyncEnumerable<ListExecutionsResponse, Execution> response = workloadManagerClient.ListExecutionsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (Execution item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListExecutionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Execution 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<Execution> 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 (Execution 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;

ListExecutionsAsync(ListExecutionsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListExecutionsResponse, Execution> ListExecutionsAsync(ListExecutionsRequest request, CallSettings callSettings = null)

Lists Executions in a given project and location.

Parameters
Name Description
request ListExecutionsRequest

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
PagedAsyncEnumerableListExecutionsResponseExecution

A pageable asynchronous sequence of Execution resources.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
ListExecutionsRequest request = new ListExecutionsRequest
{
    ParentAsEvaluationName = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListExecutionsResponse, Execution> response = workloadManagerClient.ListExecutionsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (Execution item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListExecutionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Execution 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<Execution> 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 (Execution 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;

ListExecutionsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListExecutionsResponse, Execution> ListExecutionsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Executions in a given project and location.

Parameters
Name Description
parent string

Required. The resource prefix of the Execution using the form: projects/{project}/locations/{location}/evaluations/{evaluation}.

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
PagedAsyncEnumerableListExecutionsResponseExecution

A pageable asynchronous sequence of Execution resources.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/evaluations/[EVALUATION]";
// Make the request
PagedAsyncEnumerable<ListExecutionsResponse, Execution> response = workloadManagerClient.ListExecutionsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (Execution item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListExecutionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Execution 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<Execution> 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 (Execution 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;

ListRules(LocationName, CallSettings)

public virtual ListRulesResponse ListRules(LocationName parent, CallSettings callSettings = null)

Lists rules in a given project.

Parameters
Name Description
parent LocationName

Required. The [project] on which to execute the request. The format is: projects/{project_id}/locations/{location} Currently, the pre-defined rules are global available to all projects and all regions.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ListRulesResponse

The RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
ListRulesResponse response = workloadManagerClient.ListRules(parent);

ListRules(ListRulesRequest, CallSettings)

public virtual ListRulesResponse ListRules(ListRulesRequest request, CallSettings callSettings = null)

Lists rules in a given project.

Parameters
Name Description
request ListRulesRequest

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
ListRulesResponse

The RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
ListRulesRequest request = new ListRulesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    PageSize = 0,
    PageToken = "",
    Filter = "",
    CustomRulesBucket = "",
    EvaluationType = Evaluation.Types.EvaluationType.Unspecified,
};
// Make the request
ListRulesResponse response = workloadManagerClient.ListRules(request);

ListRules(string, CallSettings)

public virtual ListRulesResponse ListRules(string parent, CallSettings callSettings = null)

Lists rules in a given project.

Parameters
Name Description
parent string

Required. The [project] on which to execute the request. The format is: projects/{project_id}/locations/{location} Currently, the pre-defined rules are global available to all projects and all regions.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ListRulesResponse

The RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
ListRulesResponse response = workloadManagerClient.ListRules(parent);

ListRulesAsync(LocationName, CallSettings)

public virtual Task<ListRulesResponse> ListRulesAsync(LocationName parent, CallSettings callSettings = null)

Lists rules in a given project.

Parameters
Name Description
parent LocationName

Required. The [project] on which to execute the request. The format is: projects/{project_id}/locations/{location} Currently, the pre-defined rules are global available to all projects and all regions.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskListRulesResponse

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
ListRulesResponse response = await workloadManagerClient.ListRulesAsync(parent);

ListRulesAsync(LocationName, CancellationToken)

public virtual Task<ListRulesResponse> ListRulesAsync(LocationName parent, CancellationToken cancellationToken)

Lists rules in a given project.

Parameters
Name Description
parent LocationName

Required. The [project] on which to execute the request. The format is: projects/{project_id}/locations/{location} Currently, the pre-defined rules are global available to all projects and all regions.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskListRulesResponse

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
ListRulesResponse response = await workloadManagerClient.ListRulesAsync(parent);

ListRulesAsync(ListRulesRequest, CallSettings)

public virtual Task<ListRulesResponse> ListRulesAsync(ListRulesRequest request, CallSettings callSettings = null)

Lists rules in a given project.

Parameters
Name Description
request ListRulesRequest

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
TaskListRulesResponse

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
ListRulesRequest request = new ListRulesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    PageSize = 0,
    PageToken = "",
    Filter = "",
    CustomRulesBucket = "",
    EvaluationType = Evaluation.Types.EvaluationType.Unspecified,
};
// Make the request
ListRulesResponse response = await workloadManagerClient.ListRulesAsync(request);

ListRulesAsync(ListRulesRequest, CancellationToken)

public virtual Task<ListRulesResponse> ListRulesAsync(ListRulesRequest request, CancellationToken cancellationToken)

Lists rules in a given project.

Parameters
Name Description
request ListRulesRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskListRulesResponse

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
ListRulesRequest request = new ListRulesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    PageSize = 0,
    PageToken = "",
    Filter = "",
    CustomRulesBucket = "",
    EvaluationType = Evaluation.Types.EvaluationType.Unspecified,
};
// Make the request
ListRulesResponse response = await workloadManagerClient.ListRulesAsync(request);

ListRulesAsync(string, CallSettings)

public virtual Task<ListRulesResponse> ListRulesAsync(string parent, CallSettings callSettings = null)

Lists rules in a given project.

Parameters
Name Description
parent string

Required. The [project] on which to execute the request. The format is: projects/{project_id}/locations/{location} Currently, the pre-defined rules are global available to all projects and all regions.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskListRulesResponse

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
ListRulesResponse response = await workloadManagerClient.ListRulesAsync(parent);

ListRulesAsync(string, CancellationToken)

public virtual Task<ListRulesResponse> ListRulesAsync(string parent, CancellationToken cancellationToken)

Lists rules in a given project.

Parameters
Name Description
parent string

Required. The [project] on which to execute the request. The format is: projects/{project_id}/locations/{location} Currently, the pre-defined rules are global available to all projects and all regions.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskListRulesResponse

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
ListRulesResponse response = await workloadManagerClient.ListRulesAsync(parent);

ListScannedResources(ListScannedResourcesRequest, CallSettings)

public virtual PagedEnumerable<ListScannedResourcesResponse, ScannedResource> ListScannedResources(ListScannedResourcesRequest request, CallSettings callSettings = null)

List all scanned resources for a single Execution.

Parameters
Name Description
request ListScannedResourcesRequest

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
PagedEnumerableListScannedResourcesResponseScannedResource

A pageable sequence of ScannedResource resources.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
ListScannedResourcesRequest request = new ListScannedResourcesRequest
{
    Parent = "",
    Rule = "",
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListScannedResourcesResponse, ScannedResource> response = workloadManagerClient.ListScannedResources(request);

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

ListScannedResources(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListScannedResourcesResponse, ScannedResource> ListScannedResources(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List all scanned resources for a single Execution.

Parameters
Name Description
parent string

Required. Parent for ListScannedResourcesRequest.

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
PagedEnumerableListScannedResourcesResponseScannedResource

A pageable sequence of ScannedResource resources.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
string parent = "";
// Make the request
PagedEnumerable<ListScannedResourcesResponse, ScannedResource> response = workloadManagerClient.ListScannedResources(parent);

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

ListScannedResourcesAsync(ListScannedResourcesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListScannedResourcesResponse, ScannedResource> ListScannedResourcesAsync(ListScannedResourcesRequest request, CallSettings callSettings = null)

List all scanned resources for a single Execution.

Parameters
Name Description
request ListScannedResourcesRequest

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
PagedAsyncEnumerableListScannedResourcesResponseScannedResource

A pageable asynchronous sequence of ScannedResource resources.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
ListScannedResourcesRequest request = new ListScannedResourcesRequest
{
    Parent = "",
    Rule = "",
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListScannedResourcesResponse, ScannedResource> response = workloadManagerClient.ListScannedResourcesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (ScannedResource item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListScannedResourcesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ScannedResource 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<ScannedResource> 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 (ScannedResource 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;

ListScannedResourcesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListScannedResourcesResponse, ScannedResource> ListScannedResourcesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List all scanned resources for a single Execution.

Parameters
Name Description
parent string

Required. Parent for ListScannedResourcesRequest.

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
PagedAsyncEnumerableListScannedResourcesResponseScannedResource

A pageable asynchronous sequence of ScannedResource resources.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
// Make the request
PagedAsyncEnumerable<ListScannedResourcesResponse, ScannedResource> response = workloadManagerClient.ListScannedResourcesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (ScannedResource item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListScannedResourcesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ScannedResource 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<ScannedResource> 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 (ScannedResource 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;

PollOnceCreateEvaluation(string, CallSettings)

public virtual Operation<Evaluation, OperationMetadata> PollOnceCreateEvaluation(string operationName, CallSettings callSettings = null)

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

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
OperationEvaluationOperationMetadata

The result of polling the operation.

PollOnceCreateEvaluationAsync(string, CallSettings)

public virtual Task<Operation<Evaluation, OperationMetadata>> PollOnceCreateEvaluationAsync(string operationName, CallSettings callSettings = null)

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

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
TaskOperationEvaluationOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteEvaluation(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> PollOnceDeleteEvaluation(string operationName, CallSettings callSettings = null)

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

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
OperationEmptyOperationMetadata

The result of polling the operation.

PollOnceDeleteEvaluationAsync(string, CallSettings)

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

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

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
TaskOperationEmptyOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteExecution(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> PollOnceDeleteExecution(string operationName, CallSettings callSettings = null)

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

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
OperationEmptyOperationMetadata

The result of polling the operation.

PollOnceDeleteExecutionAsync(string, CallSettings)

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

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

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
TaskOperationEmptyOperationMetadata

A task representing the result of polling the operation.

PollOnceRunEvaluation(string, CallSettings)

public virtual Operation<Execution, OperationMetadata> PollOnceRunEvaluation(string operationName, CallSettings callSettings = null)

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

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
OperationExecutionOperationMetadata

The result of polling the operation.

PollOnceRunEvaluationAsync(string, CallSettings)

public virtual Task<Operation<Execution, OperationMetadata>> PollOnceRunEvaluationAsync(string operationName, CallSettings callSettings = null)

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

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
TaskOperationExecutionOperationMetadata

A task representing the result of polling the operation.

PollOnceUpdateEvaluation(string, CallSettings)

public virtual Operation<Evaluation, OperationMetadata> PollOnceUpdateEvaluation(string operationName, CallSettings callSettings = null)

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

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
OperationEvaluationOperationMetadata

The result of polling the operation.

PollOnceUpdateEvaluationAsync(string, CallSettings)

public virtual Task<Operation<Evaluation, OperationMetadata>> PollOnceUpdateEvaluationAsync(string operationName, CallSettings callSettings = null)

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

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
TaskOperationEvaluationOperationMetadata

A task representing the result of polling the operation.

RunEvaluation(EvaluationName, Execution, string, CallSettings)

public virtual Operation<Execution, OperationMetadata> RunEvaluation(EvaluationName name, Execution execution, string executionId, CallSettings callSettings = null)

Creates a new Execution in a given project and location.

Parameters
Name Description
name EvaluationName

Required. The resource name of the Evaluation using the form: projects/{project}/locations/{location}/evaluations/{evaluation}.

execution Execution

Required. The resource being created.

executionId string

Required. ID of the execution which will be created.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationExecutionOperationMetadata

The RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
EvaluationName name = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]");
Execution execution = new Execution();
string executionId = "";
// Make the request
Operation<Execution, OperationMetadata> response = workloadManagerClient.RunEvaluation(name, execution, executionId);

// Poll until the returned long-running operation is complete
Operation<Execution, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Execution 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<Execution, OperationMetadata> retrievedResponse = workloadManagerClient.PollOnceRunEvaluation(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Execution retrievedResult = retrievedResponse.Result;
}

RunEvaluation(RunEvaluationRequest, CallSettings)

public virtual Operation<Execution, OperationMetadata> RunEvaluation(RunEvaluationRequest request, CallSettings callSettings = null)

Creates a new Execution in a given project and location.

Parameters
Name Description
request RunEvaluationRequest

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
OperationExecutionOperationMetadata

The RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
RunEvaluationRequest request = new RunEvaluationRequest
{
    EvaluationName = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]"),
    ExecutionId = "",
    Execution = new Execution(),
    RequestId = "",
};
// Make the request
Operation<Execution, OperationMetadata> response = workloadManagerClient.RunEvaluation(request);

// Poll until the returned long-running operation is complete
Operation<Execution, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Execution 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<Execution, OperationMetadata> retrievedResponse = workloadManagerClient.PollOnceRunEvaluation(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Execution retrievedResult = retrievedResponse.Result;
}

RunEvaluation(string, Execution, string, CallSettings)

public virtual Operation<Execution, OperationMetadata> RunEvaluation(string name, Execution execution, string executionId, CallSettings callSettings = null)

Creates a new Execution in a given project and location.

Parameters
Name Description
name string

Required. The resource name of the Evaluation using the form: projects/{project}/locations/{location}/evaluations/{evaluation}.

execution Execution

Required. The resource being created.

executionId string

Required. ID of the execution which will be created.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationExecutionOperationMetadata

The RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/evaluations/[EVALUATION]";
Execution execution = new Execution();
string executionId = "";
// Make the request
Operation<Execution, OperationMetadata> response = workloadManagerClient.RunEvaluation(name, execution, executionId);

// Poll until the returned long-running operation is complete
Operation<Execution, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Execution 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<Execution, OperationMetadata> retrievedResponse = workloadManagerClient.PollOnceRunEvaluation(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Execution retrievedResult = retrievedResponse.Result;
}

RunEvaluationAsync(EvaluationName, Execution, string, CallSettings)

public virtual Task<Operation<Execution, OperationMetadata>> RunEvaluationAsync(EvaluationName name, Execution execution, string executionId, CallSettings callSettings = null)

Creates a new Execution in a given project and location.

Parameters
Name Description
name EvaluationName

Required. The resource name of the Evaluation using the form: projects/{project}/locations/{location}/evaluations/{evaluation}.

execution Execution

Required. The resource being created.

executionId string

Required. ID of the execution which will be created.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationExecutionOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
EvaluationName name = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]");
Execution execution = new Execution();
string executionId = "";
// Make the request
Operation<Execution, OperationMetadata> response = await workloadManagerClient.RunEvaluationAsync(name, execution, executionId);

// Poll until the returned long-running operation is complete
Operation<Execution, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Execution 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<Execution, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceRunEvaluationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Execution retrievedResult = retrievedResponse.Result;
}

RunEvaluationAsync(EvaluationName, Execution, string, CancellationToken)

public virtual Task<Operation<Execution, OperationMetadata>> RunEvaluationAsync(EvaluationName name, Execution execution, string executionId, CancellationToken cancellationToken)

Creates a new Execution in a given project and location.

Parameters
Name Description
name EvaluationName

Required. The resource name of the Evaluation using the form: projects/{project}/locations/{location}/evaluations/{evaluation}.

execution Execution

Required. The resource being created.

executionId string

Required. ID of the execution which will be created.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationExecutionOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
EvaluationName name = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]");
Execution execution = new Execution();
string executionId = "";
// Make the request
Operation<Execution, OperationMetadata> response = await workloadManagerClient.RunEvaluationAsync(name, execution, executionId);

// Poll until the returned long-running operation is complete
Operation<Execution, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Execution 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<Execution, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceRunEvaluationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Execution retrievedResult = retrievedResponse.Result;
}

RunEvaluationAsync(RunEvaluationRequest, CallSettings)

public virtual Task<Operation<Execution, OperationMetadata>> RunEvaluationAsync(RunEvaluationRequest request, CallSettings callSettings = null)

Creates a new Execution in a given project and location.

Parameters
Name Description
request RunEvaluationRequest

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
TaskOperationExecutionOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
RunEvaluationRequest request = new RunEvaluationRequest
{
    EvaluationName = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]"),
    ExecutionId = "",
    Execution = new Execution(),
    RequestId = "",
};
// Make the request
Operation<Execution, OperationMetadata> response = await workloadManagerClient.RunEvaluationAsync(request);

// Poll until the returned long-running operation is complete
Operation<Execution, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Execution 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<Execution, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceRunEvaluationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Execution retrievedResult = retrievedResponse.Result;
}

RunEvaluationAsync(RunEvaluationRequest, CancellationToken)

public virtual Task<Operation<Execution, OperationMetadata>> RunEvaluationAsync(RunEvaluationRequest request, CancellationToken cancellationToken)

Creates a new Execution in a given project and location.

Parameters
Name Description
request RunEvaluationRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationExecutionOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
RunEvaluationRequest request = new RunEvaluationRequest
{
    EvaluationName = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]"),
    ExecutionId = "",
    Execution = new Execution(),
    RequestId = "",
};
// Make the request
Operation<Execution, OperationMetadata> response = await workloadManagerClient.RunEvaluationAsync(request);

// Poll until the returned long-running operation is complete
Operation<Execution, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Execution 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<Execution, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceRunEvaluationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Execution retrievedResult = retrievedResponse.Result;
}

RunEvaluationAsync(string, Execution, string, CallSettings)

public virtual Task<Operation<Execution, OperationMetadata>> RunEvaluationAsync(string name, Execution execution, string executionId, CallSettings callSettings = null)

Creates a new Execution in a given project and location.

Parameters
Name Description
name string

Required. The resource name of the Evaluation using the form: projects/{project}/locations/{location}/evaluations/{evaluation}.

execution Execution

Required. The resource being created.

executionId string

Required. ID of the execution which will be created.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationExecutionOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/evaluations/[EVALUATION]";
Execution execution = new Execution();
string executionId = "";
// Make the request
Operation<Execution, OperationMetadata> response = await workloadManagerClient.RunEvaluationAsync(name, execution, executionId);

// Poll until the returned long-running operation is complete
Operation<Execution, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Execution 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<Execution, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceRunEvaluationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Execution retrievedResult = retrievedResponse.Result;
}

RunEvaluationAsync(string, Execution, string, CancellationToken)

public virtual Task<Operation<Execution, OperationMetadata>> RunEvaluationAsync(string name, Execution execution, string executionId, CancellationToken cancellationToken)

Creates a new Execution in a given project and location.

Parameters
Name Description
name string

Required. The resource name of the Evaluation using the form: projects/{project}/locations/{location}/evaluations/{evaluation}.

execution Execution

Required. The resource being created.

executionId string

Required. ID of the execution which will be created.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationExecutionOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/evaluations/[EVALUATION]";
Execution execution = new Execution();
string executionId = "";
// Make the request
Operation<Execution, OperationMetadata> response = await workloadManagerClient.RunEvaluationAsync(name, execution, executionId);

// Poll until the returned long-running operation is complete
Operation<Execution, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Execution 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<Execution, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceRunEvaluationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Execution retrievedResult = retrievedResponse.Result;
}

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.

UpdateEvaluation(Evaluation, FieldMask, CallSettings)

public virtual Operation<Evaluation, OperationMetadata> UpdateEvaluation(Evaluation evaluation, FieldMask updateMask, CallSettings callSettings = null)

Updates the parameters of a single Evaluation.

Parameters
Name Description
evaluation Evaluation

Required. The resource being updated.

updateMask FieldMask

Required. Field mask is used to specify the fields to be overwritten in the Evaluation resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEvaluationOperationMetadata

The RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
Evaluation evaluation = new Evaluation();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Evaluation, OperationMetadata> response = workloadManagerClient.UpdateEvaluation(evaluation, updateMask);

// Poll until the returned long-running operation is complete
Operation<Evaluation, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Evaluation 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<Evaluation, OperationMetadata> retrievedResponse = workloadManagerClient.PollOnceUpdateEvaluation(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}

UpdateEvaluation(UpdateEvaluationRequest, CallSettings)

public virtual Operation<Evaluation, OperationMetadata> UpdateEvaluation(UpdateEvaluationRequest request, CallSettings callSettings = null)

Updates the parameters of a single Evaluation.

Parameters
Name Description
request UpdateEvaluationRequest

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
OperationEvaluationOperationMetadata

The RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = WorkloadManagerClient.Create();
// Initialize request argument(s)
UpdateEvaluationRequest request = new UpdateEvaluationRequest
{
    UpdateMask = new FieldMask(),
    Evaluation = new Evaluation(),
    RequestId = "",
};
// Make the request
Operation<Evaluation, OperationMetadata> response = workloadManagerClient.UpdateEvaluation(request);

// Poll until the returned long-running operation is complete
Operation<Evaluation, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Evaluation 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<Evaluation, OperationMetadata> retrievedResponse = workloadManagerClient.PollOnceUpdateEvaluation(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}

UpdateEvaluationAsync(Evaluation, FieldMask, CallSettings)

public virtual Task<Operation<Evaluation, OperationMetadata>> UpdateEvaluationAsync(Evaluation evaluation, FieldMask updateMask, CallSettings callSettings = null)

Updates the parameters of a single Evaluation.

Parameters
Name Description
evaluation Evaluation

Required. The resource being updated.

updateMask FieldMask

Required. Field mask is used to specify the fields to be overwritten in the Evaluation resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEvaluationOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
Evaluation evaluation = new Evaluation();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Evaluation, OperationMetadata> response = await workloadManagerClient.UpdateEvaluationAsync(evaluation, updateMask);

// Poll until the returned long-running operation is complete
Operation<Evaluation, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Evaluation 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<Evaluation, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceUpdateEvaluationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}

UpdateEvaluationAsync(Evaluation, FieldMask, CancellationToken)

public virtual Task<Operation<Evaluation, OperationMetadata>> UpdateEvaluationAsync(Evaluation evaluation, FieldMask updateMask, CancellationToken cancellationToken)

Updates the parameters of a single Evaluation.

Parameters
Name Description
evaluation Evaluation

Required. The resource being updated.

updateMask FieldMask

Required. Field mask is used to specify the fields to be overwritten in the Evaluation resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEvaluationOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
Evaluation evaluation = new Evaluation();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Evaluation, OperationMetadata> response = await workloadManagerClient.UpdateEvaluationAsync(evaluation, updateMask);

// Poll until the returned long-running operation is complete
Operation<Evaluation, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Evaluation 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<Evaluation, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceUpdateEvaluationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}

UpdateEvaluationAsync(UpdateEvaluationRequest, CallSettings)

public virtual Task<Operation<Evaluation, OperationMetadata>> UpdateEvaluationAsync(UpdateEvaluationRequest request, CallSettings callSettings = null)

Updates the parameters of a single Evaluation.

Parameters
Name Description
request UpdateEvaluationRequest

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
TaskOperationEvaluationOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
UpdateEvaluationRequest request = new UpdateEvaluationRequest
{
    UpdateMask = new FieldMask(),
    Evaluation = new Evaluation(),
    RequestId = "",
};
// Make the request
Operation<Evaluation, OperationMetadata> response = await workloadManagerClient.UpdateEvaluationAsync(request);

// Poll until the returned long-running operation is complete
Operation<Evaluation, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Evaluation 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<Evaluation, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceUpdateEvaluationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}

UpdateEvaluationAsync(UpdateEvaluationRequest, CancellationToken)

public virtual Task<Operation<Evaluation, OperationMetadata>> UpdateEvaluationAsync(UpdateEvaluationRequest request, CancellationToken cancellationToken)

Updates the parameters of a single Evaluation.

Parameters
Name Description
request UpdateEvaluationRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEvaluationOperationMetadata

A Task containing the RPC response.

Example
// Create client
WorkloadManagerClient workloadManagerClient = await WorkloadManagerClient.CreateAsync();
// Initialize request argument(s)
UpdateEvaluationRequest request = new UpdateEvaluationRequest
{
    UpdateMask = new FieldMask(),
    Evaluation = new Evaluation(),
    RequestId = "",
};
// Make the request
Operation<Evaluation, OperationMetadata> response = await workloadManagerClient.UpdateEvaluationAsync(request);

// Poll until the returned long-running operation is complete
Operation<Evaluation, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Evaluation 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<Evaluation, OperationMetadata> retrievedResponse = await workloadManagerClient.PollOnceUpdateEvaluationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}