# Assured Workloads v1beta1 API - Class AssuredWorkloadsServiceClient (2.0.0-beta09)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.0.0-beta09 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AssuredWorkloadsServiceClient)
- [2.0.0-beta08](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/2.0.0-beta08/Google.Cloud.AssuredWorkloads.V1Beta1.AssuredWorkloadsServiceClient)
- [1.0.0-beta08](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/1.0.0-beta08/Google.Cloud.AssuredWorkloads.V1Beta1.AssuredWorkloadsServiceClient)

    public abstract class AssuredWorkloadsServiceClient

Reference documentation and code samples for the Assured Workloads v1beta1 API class AssuredWorkloadsServiceClient.

AssuredWorkloadsService client wrapper, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> AssuredWorkloadsServiceClient

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Derived Types

[AssuredWorkloadsServiceClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AssuredWorkloadsServiceClientImpl)

## Namespace

[Google.Cloud.AssuredWorkloads.V1Beta1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1)

## Assembly

Google.Cloud.AssuredWorkloads.V1Beta1.dll

## Remarks

Service to manage AssuredWorkloads.

## Properties

### CreateWorkloadOperationsClient

    public virtual OperationsClient CreateWorkloadOperationsClient { get; }

The long-running operations client for `CreateWorkload`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default AssuredWorkloadsService scopes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1https://learn.microsoft.com/dotnet/api/system.string` |   |

**Remarks** The default AssuredWorkloadsService scopes are:

- <https://www.googleapis.com/auth/cloud-platform>

<br />

### GrpcClient

    public virtual AssuredWorkloadsService.AssuredWorkloadsServiceClient GrpcClient { get; }

The underlying gRPC AssuredWorkloadsService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AssuredWorkloadsServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AssuredWorkloadsService.AssuredWorkloadsServiceClient` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ServiceMetadata.html` |   |

## Methods

### AnalyzeWorkloadMove(AnalyzeWorkloadMoveRequest, CallSettings)

    public virtual AnalyzeWorkloadMoveResponse AnalyzeWorkloadMove(AnalyzeWorkloadMoveRequest request, CallSettings callSettings = null)

Analyze if the source Assured Workloads can be moved to the target Assured
Workload

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AnalyzeWorkloadMoveRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AnalyzeWorkloadMoveResponse` | The RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = AssuredWorkloadsServiceClient.Create();
    // Initialize request argument(s)
    AnalyzeWorkloadMoveRequest request = new AnalyzeWorkloadMoveRequest
    {
        Source = "",
        Target = "",
    };
    // Make the request
    AnalyzeWorkloadMoveResponse response = assuredWorkloadsServiceClient.AnalyzeWorkloadMove(request);

### AnalyzeWorkloadMove(string, string, CallSettings)

    public virtual AnalyzeWorkloadMoveResponse AnalyzeWorkloadMove(string project, string target, CallSettings callSettings = null)

Analyze if the source Assured Workloads can be moved to the target Assured
Workload

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` The source type is a project. Specify the project's relative resource name, formatted as either a project number or a project ID: "projects/{PROJECT_NUMBER}" or "projects/{PROJECT_ID}" For example: "projects/951040570662" when specifying a project number, or "projects/my-project-123" when specifying a project ID. |
| `target` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource ID of the folder-based destination workload. This workload is where the source project will hypothetically be moved to. Specify the workload's relative resource name, formatted as: "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}" For example: "organizations/123/locations/us-east1/workloads/assured-workload-2" |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AnalyzeWorkloadMoveResponse` | The RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = AssuredWorkloadsServiceClient.Create();
    // Initialize request argument(s)
    string project = "";
    string target = "";
    // Make the request
    AnalyzeWorkloadMoveResponse response = assuredWorkloadsServiceClient.AnalyzeWorkloadMove(project, target);

### AnalyzeWorkloadMoveAsync(AnalyzeWorkloadMoveRequest, CallSettings)

    public virtual Task<AnalyzeWorkloadMoveResponse> AnalyzeWorkloadMoveAsync(AnalyzeWorkloadMoveRequest request, CallSettings callSettings = null)

Analyze if the source Assured Workloads can be moved to the target Assured
Workload

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AnalyzeWorkloadMoveRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AnalyzeWorkloadMoveResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    AnalyzeWorkloadMoveRequest request = new AnalyzeWorkloadMoveRequest
    {
        Source = "",
        Target = "",
    };
    // Make the request
    AnalyzeWorkloadMoveResponse response = await assuredWorkloadsServiceClient.AnalyzeWorkloadMoveAsync(request);

### AnalyzeWorkloadMoveAsync(AnalyzeWorkloadMoveRequest, CancellationToken)

    public virtual Task<AnalyzeWorkloadMoveResponse> AnalyzeWorkloadMoveAsync(AnalyzeWorkloadMoveRequest request, CancellationToken cancellationToken)

Analyze if the source Assured Workloads can be moved to the target Assured
Workload

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AnalyzeWorkloadMoveRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AnalyzeWorkloadMoveResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    AnalyzeWorkloadMoveRequest request = new AnalyzeWorkloadMoveRequest
    {
        Source = "",
        Target = "",
    };
    // Make the request
    AnalyzeWorkloadMoveResponse response = await assuredWorkloadsServiceClient.AnalyzeWorkloadMoveAsync(request);

### AnalyzeWorkloadMoveAsync(string, string, CallSettings)

    public virtual Task<AnalyzeWorkloadMoveResponse> AnalyzeWorkloadMoveAsync(string project, string target, CallSettings callSettings = null)

Analyze if the source Assured Workloads can be moved to the target Assured
Workload

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` The source type is a project. Specify the project's relative resource name, formatted as either a project number or a project ID: "projects/{PROJECT_NUMBER}" or "projects/{PROJECT_ID}" For example: "projects/951040570662" when specifying a project number, or "projects/my-project-123" when specifying a project ID. |
| `target` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource ID of the folder-based destination workload. This workload is where the source project will hypothetically be moved to. Specify the workload's relative resource name, formatted as: "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}" For example: "organizations/123/locations/us-east1/workloads/assured-workload-2" |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AnalyzeWorkloadMoveResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    string target = "";
    // Make the request
    AnalyzeWorkloadMoveResponse response = await assuredWorkloadsServiceClient.AnalyzeWorkloadMoveAsync(project, target);

### AnalyzeWorkloadMoveAsync(string, string, CancellationToken)

    public virtual Task<AnalyzeWorkloadMoveResponse> AnalyzeWorkloadMoveAsync(string project, string target, CancellationToken cancellationToken)

Analyze if the source Assured Workloads can be moved to the target Assured
Workload

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` The source type is a project. Specify the project's relative resource name, formatted as either a project number or a project ID: "projects/{PROJECT_NUMBER}" or "projects/{PROJECT_ID}" For example: "projects/951040570662" when specifying a project number, or "projects/my-project-123" when specifying a project ID. |
| `target` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource ID of the folder-based destination workload. This workload is where the source project will hypothetically be moved to. Specify the workload's relative resource name, formatted as: "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}" For example: "organizations/123/locations/us-east1/workloads/assured-workload-2" |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AnalyzeWorkloadMoveResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    string target = "";
    // Make the request
    AnalyzeWorkloadMoveResponse response = await assuredWorkloadsServiceClient.AnalyzeWorkloadMoveAsync(project, target);

### Create()

    public static AssuredWorkloadsServiceClient Create()

Synchronously creates a [AssuredWorkloadsServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AssuredWorkloadsServiceClient) using the default credentials, endpoint
and settings. To specify custom credentials or other settings, use
[AssuredWorkloadsServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AssuredWorkloadsServiceClientBuilder).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AssuredWorkloadsServiceClient` | The created [AssuredWorkloadsServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AssuredWorkloadsServiceClient). |

### CreateAsync(CancellationToken)

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

Asynchronously creates a [AssuredWorkloadsServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AssuredWorkloadsServiceClient) using the default credentials, endpoint
and settings. To specify custom credentials or other settings, use
[AssuredWorkloadsServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AssuredWorkloadsServiceClientBuilder).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AssuredWorkloadsServiceClient` | The task representing the created [AssuredWorkloadsServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AssuredWorkloadsServiceClient). |

### CreateWorkload(CreateWorkloadRequest, CallSettings)

    public virtual Operation<Workload, CreateWorkloadOperationMetadata> CreateWorkload(CreateWorkloadRequest request, CallSettings callSettings = null)

Creates Assured Workload.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.CreateWorkloadRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workloadhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.CreateWorkloadOperationMetadata` | The RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = AssuredWorkloadsServiceClient.Create();
    // Initialize request argument(s)
    CreateWorkloadRequest request = new CreateWorkloadRequest
    {
        ParentAsLocationName = LocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
        Workload = new Workload(),
        ExternalId = "",
    };
    // Make the request
    Operation<Workload, CreateWorkloadOperationMetadata> response = assuredWorkloadsServiceClient.CreateWorkload(request);

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

### CreateWorkload(LocationName, Workload, CallSettings)

    public virtual Operation<Workload, CreateWorkloadOperationMetadata> CreateWorkload(LocationName parent, Workload workload, CallSettings callSettings = null)

Creates Assured Workload.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.LocationName` Required. The resource name of the new Workload's parent. Must be of the form `organizations/{org_id}/locations/{location_id}`. |
| `workload` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` Required. Assured Workload to create |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workloadhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.CreateWorkloadOperationMetadata` | The RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = AssuredWorkloadsServiceClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
    Workload workload = new Workload();
    // Make the request
    Operation<Workload, CreateWorkloadOperationMetadata> response = assuredWorkloadsServiceClient.CreateWorkload(parent, workload);

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

### CreateWorkload(string, Workload, CallSettings)

    public virtual Operation<Workload, CreateWorkloadOperationMetadata> CreateWorkload(string parent, Workload workload, CallSettings callSettings = null)

Creates Assured Workload.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the new Workload's parent. Must be of the form `organizations/{org_id}/locations/{location_id}`. |
| `workload` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` Required. Assured Workload to create |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workloadhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.CreateWorkloadOperationMetadata` | The RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = AssuredWorkloadsServiceClient.Create();
    // Initialize request argument(s)
    string parent = "organizations/[ORGANIZATION]/locations/[LOCATION]";
    Workload workload = new Workload();
    // Make the request
    Operation<Workload, CreateWorkloadOperationMetadata> response = assuredWorkloadsServiceClient.CreateWorkload(parent, workload);

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

### CreateWorkloadAsync(CreateWorkloadRequest, CallSettings)

    public virtual Task<Operation<Workload, CreateWorkloadOperationMetadata>> CreateWorkloadAsync(CreateWorkloadRequest request, CallSettings callSettings = null)

Creates Assured Workload.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.CreateWorkloadRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workloadhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.CreateWorkloadOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    CreateWorkloadRequest request = new CreateWorkloadRequest
    {
        ParentAsLocationName = LocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
        Workload = new Workload(),
        ExternalId = "",
    };
    // Make the request
    Operation<Workload, CreateWorkloadOperationMetadata> response = await assuredWorkloadsServiceClient.CreateWorkloadAsync(request);

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

### CreateWorkloadAsync(CreateWorkloadRequest, CancellationToken)

    public virtual Task<Operation<Workload, CreateWorkloadOperationMetadata>> CreateWorkloadAsync(CreateWorkloadRequest request, CancellationToken cancellationToken)

Creates Assured Workload.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.CreateWorkloadRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workloadhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.CreateWorkloadOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    CreateWorkloadRequest request = new CreateWorkloadRequest
    {
        ParentAsLocationName = LocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
        Workload = new Workload(),
        ExternalId = "",
    };
    // Make the request
    Operation<Workload, CreateWorkloadOperationMetadata> response = await assuredWorkloadsServiceClient.CreateWorkloadAsync(request);

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

### CreateWorkloadAsync(LocationName, Workload, CallSettings)

    public virtual Task<Operation<Workload, CreateWorkloadOperationMetadata>> CreateWorkloadAsync(LocationName parent, Workload workload, CallSettings callSettings = null)

Creates Assured Workload.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.LocationName` Required. The resource name of the new Workload's parent. Must be of the form `organizations/{org_id}/locations/{location_id}`. |
| `workload` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` Required. Assured Workload to create |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workloadhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.CreateWorkloadOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
    Workload workload = new Workload();
    // Make the request
    Operation<Workload, CreateWorkloadOperationMetadata> response = await assuredWorkloadsServiceClient.CreateWorkloadAsync(parent, workload);

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

### CreateWorkloadAsync(LocationName, Workload, CancellationToken)

    public virtual Task<Operation<Workload, CreateWorkloadOperationMetadata>> CreateWorkloadAsync(LocationName parent, Workload workload, CancellationToken cancellationToken)

Creates Assured Workload.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.LocationName` Required. The resource name of the new Workload's parent. Must be of the form `organizations/{org_id}/locations/{location_id}`. |
| `workload` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` Required. Assured Workload to create |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workloadhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.CreateWorkloadOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
    Workload workload = new Workload();
    // Make the request
    Operation<Workload, CreateWorkloadOperationMetadata> response = await assuredWorkloadsServiceClient.CreateWorkloadAsync(parent, workload);

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

### CreateWorkloadAsync(string, Workload, CallSettings)

    public virtual Task<Operation<Workload, CreateWorkloadOperationMetadata>> CreateWorkloadAsync(string parent, Workload workload, CallSettings callSettings = null)

Creates Assured Workload.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the new Workload's parent. Must be of the form `organizations/{org_id}/locations/{location_id}`. |
| `workload` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` Required. Assured Workload to create |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workloadhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.CreateWorkloadOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "organizations/[ORGANIZATION]/locations/[LOCATION]";
    Workload workload = new Workload();
    // Make the request
    Operation<Workload, CreateWorkloadOperationMetadata> response = await assuredWorkloadsServiceClient.CreateWorkloadAsync(parent, workload);

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

### CreateWorkloadAsync(string, Workload, CancellationToken)

    public virtual Task<Operation<Workload, CreateWorkloadOperationMetadata>> CreateWorkloadAsync(string parent, Workload workload, CancellationToken cancellationToken)

Creates Assured Workload.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the new Workload's parent. Must be of the form `organizations/{org_id}/locations/{location_id}`. |
| `workload` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` Required. Assured Workload to create |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workloadhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.CreateWorkloadOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "organizations/[ORGANIZATION]/locations/[LOCATION]";
    Workload workload = new Workload();
    // Make the request
    Operation<Workload, CreateWorkloadOperationMetadata> response = await assuredWorkloadsServiceClient.CreateWorkloadAsync(parent, workload);

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

### DeleteWorkload(DeleteWorkloadRequest, CallSettings)

    public virtual void DeleteWorkload(DeleteWorkloadRequest request, CallSettings callSettings = null)

Deletes the workload. Make sure that workload's direct children are already
in a deleted state, otherwise the request will fail with a
FAILED_PRECONDITION error.
In addition to assuredworkloads.workload.delete permission, the user should
also have orgpolicy.policy.set permission on the deleted folder to remove
Assured Workloads OrgPolicies.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.DeleteWorkloadRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = AssuredWorkloadsServiceClient.Create();
    // Initialize request argument(s)
    DeleteWorkloadRequest request = new DeleteWorkloadRequest
    {
        WorkloadName = WorkloadName.FromOrganizationLocationWorkload("[ORGANIZATION]", "[LOCATION]", "[WORKLOAD]"),
        Etag = "",
    };
    // Make the request
    assuredWorkloadsServiceClient.DeleteWorkload(request);

### DeleteWorkload(WorkloadName, CallSettings)

    public virtual void DeleteWorkload(WorkloadName name, CallSettings callSettings = null)

Deletes the workload. Make sure that workload's direct children are already
in a deleted state, otherwise the request will fail with a
FAILED_PRECONDITION error.
In addition to assuredworkloads.workload.delete permission, the user should
also have orgpolicy.policy.set permission on the deleted folder to remove
Assured Workloads OrgPolicies.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.WorkloadName` Required. The `name` field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id} |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = AssuredWorkloadsServiceClient.Create();
    // Initialize request argument(s)
    WorkloadName name = WorkloadName.FromOrganizationLocationWorkload("[ORGANIZATION]", "[LOCATION]", "[WORKLOAD]");
    // Make the request
    assuredWorkloadsServiceClient.DeleteWorkload(name);

### DeleteWorkload(string, CallSettings)

    public virtual void DeleteWorkload(string name, CallSettings callSettings = null)

Deletes the workload. Make sure that workload's direct children are already
in a deleted state, otherwise the request will fail with a
FAILED_PRECONDITION error.
In addition to assuredworkloads.workload.delete permission, the user should
also have orgpolicy.policy.set permission on the deleted folder to remove
Assured Workloads OrgPolicies.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The `name` field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id} |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = AssuredWorkloadsServiceClient.Create();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/workloads/[WORKLOAD]";
    // Make the request
    assuredWorkloadsServiceClient.DeleteWorkload(name);

### DeleteWorkloadAsync(DeleteWorkloadRequest, CallSettings)

    public virtual Task DeleteWorkloadAsync(DeleteWorkloadRequest request, CallSettings callSettings = null)

Deletes the workload. Make sure that workload's direct children are already
in a deleted state, otherwise the request will fail with a
FAILED_PRECONDITION error.
In addition to assuredworkloads.workload.delete permission, the user should
also have orgpolicy.policy.set permission on the deleted folder to remove
Assured Workloads OrgPolicies.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.DeleteWorkloadRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    DeleteWorkloadRequest request = new DeleteWorkloadRequest
    {
        WorkloadName = WorkloadName.FromOrganizationLocationWorkload("[ORGANIZATION]", "[LOCATION]", "[WORKLOAD]"),
        Etag = "",
    };
    // Make the request
    await assuredWorkloadsServiceClient.DeleteWorkloadAsync(request);

### DeleteWorkloadAsync(DeleteWorkloadRequest, CancellationToken)

    public virtual Task DeleteWorkloadAsync(DeleteWorkloadRequest request, CancellationToken cancellationToken)

Deletes the workload. Make sure that workload's direct children are already
in a deleted state, otherwise the request will fail with a
FAILED_PRECONDITION error.
In addition to assuredworkloads.workload.delete permission, the user should
also have orgpolicy.policy.set permission on the deleted folder to remove
Assured Workloads OrgPolicies.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.DeleteWorkloadRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    DeleteWorkloadRequest request = new DeleteWorkloadRequest
    {
        WorkloadName = WorkloadName.FromOrganizationLocationWorkload("[ORGANIZATION]", "[LOCATION]", "[WORKLOAD]"),
        Etag = "",
    };
    // Make the request
    await assuredWorkloadsServiceClient.DeleteWorkloadAsync(request);

### DeleteWorkloadAsync(WorkloadName, CallSettings)

    public virtual Task DeleteWorkloadAsync(WorkloadName name, CallSettings callSettings = null)

Deletes the workload. Make sure that workload's direct children are already
in a deleted state, otherwise the request will fail with a
FAILED_PRECONDITION error.
In addition to assuredworkloads.workload.delete permission, the user should
also have orgpolicy.policy.set permission on the deleted folder to remove
Assured Workloads OrgPolicies.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.WorkloadName` Required. The `name` field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id} |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    WorkloadName name = WorkloadName.FromOrganizationLocationWorkload("[ORGANIZATION]", "[LOCATION]", "[WORKLOAD]");
    // Make the request
    await assuredWorkloadsServiceClient.DeleteWorkloadAsync(name);

### DeleteWorkloadAsync(WorkloadName, CancellationToken)

    public virtual Task DeleteWorkloadAsync(WorkloadName name, CancellationToken cancellationToken)

Deletes the workload. Make sure that workload's direct children are already
in a deleted state, otherwise the request will fail with a
FAILED_PRECONDITION error.
In addition to assuredworkloads.workload.delete permission, the user should
also have orgpolicy.policy.set permission on the deleted folder to remove
Assured Workloads OrgPolicies.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.WorkloadName` Required. The `name` field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id} |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    WorkloadName name = WorkloadName.FromOrganizationLocationWorkload("[ORGANIZATION]", "[LOCATION]", "[WORKLOAD]");
    // Make the request
    await assuredWorkloadsServiceClient.DeleteWorkloadAsync(name);

### DeleteWorkloadAsync(string, CallSettings)

    public virtual Task DeleteWorkloadAsync(string name, CallSettings callSettings = null)

Deletes the workload. Make sure that workload's direct children are already
in a deleted state, otherwise the request will fail with a
FAILED_PRECONDITION error.
In addition to assuredworkloads.workload.delete permission, the user should
also have orgpolicy.policy.set permission on the deleted folder to remove
Assured Workloads OrgPolicies.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The `name` field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id} |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/workloads/[WORKLOAD]";
    // Make the request
    await assuredWorkloadsServiceClient.DeleteWorkloadAsync(name);

### DeleteWorkloadAsync(string, CancellationToken)

    public virtual Task DeleteWorkloadAsync(string name, CancellationToken cancellationToken)

Deletes the workload. Make sure that workload's direct children are already
in a deleted state, otherwise the request will fail with a
FAILED_PRECONDITION error.
In addition to assuredworkloads.workload.delete permission, the user should
also have orgpolicy.policy.set permission on the deleted folder to remove
Assured Workloads OrgPolicies.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The `name` field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id} |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/workloads/[WORKLOAD]";
    // Make the request
    await assuredWorkloadsServiceClient.DeleteWorkloadAsync(name);

### GetWorkload(GetWorkloadRequest, CallSettings)

    public virtual Workload GetWorkload(GetWorkloadRequest request, CallSettings callSettings = null)

Gets Assured Workload associated with a CRM Node

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.GetWorkloadRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` | The RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = AssuredWorkloadsServiceClient.Create();
    // Initialize request argument(s)
    GetWorkloadRequest request = new GetWorkloadRequest
    {
        WorkloadName = WorkloadName.FromOrganizationLocationWorkload("[ORGANIZATION]", "[LOCATION]", "[WORKLOAD]"),
    };
    // Make the request
    Workload response = assuredWorkloadsServiceClient.GetWorkload(request);

### GetWorkload(WorkloadName, CallSettings)

    public virtual Workload GetWorkload(WorkloadName name, CallSettings callSettings = null)

Gets Assured Workload associated with a CRM Node

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.WorkloadName` Required. The resource name of the Workload to fetch. This is the workloads's relative path in the API, formatted as "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}". For example, "organizations/123/locations/us-east1/workloads/assured-workload-1". |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` | The RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = AssuredWorkloadsServiceClient.Create();
    // Initialize request argument(s)
    WorkloadName name = WorkloadName.FromOrganizationLocationWorkload("[ORGANIZATION]", "[LOCATION]", "[WORKLOAD]");
    // Make the request
    Workload response = assuredWorkloadsServiceClient.GetWorkload(name);

### GetWorkload(string, CallSettings)

    public virtual Workload GetWorkload(string name, CallSettings callSettings = null)

Gets Assured Workload associated with a CRM Node

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the Workload to fetch. This is the workloads's relative path in the API, formatted as "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}". For example, "organizations/123/locations/us-east1/workloads/assured-workload-1". |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` | The RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = AssuredWorkloadsServiceClient.Create();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/workloads/[WORKLOAD]";
    // Make the request
    Workload response = assuredWorkloadsServiceClient.GetWorkload(name);

### GetWorkloadAsync(GetWorkloadRequest, CallSettings)

    public virtual Task<Workload> GetWorkloadAsync(GetWorkloadRequest request, CallSettings callSettings = null)

Gets Assured Workload associated with a CRM Node

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.GetWorkloadRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetWorkloadRequest request = new GetWorkloadRequest
    {
        WorkloadName = WorkloadName.FromOrganizationLocationWorkload("[ORGANIZATION]", "[LOCATION]", "[WORKLOAD]"),
    };
    // Make the request
    Workload response = await assuredWorkloadsServiceClient.GetWorkloadAsync(request);

### GetWorkloadAsync(GetWorkloadRequest, CancellationToken)

    public virtual Task<Workload> GetWorkloadAsync(GetWorkloadRequest request, CancellationToken cancellationToken)

Gets Assured Workload associated with a CRM Node

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.GetWorkloadRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetWorkloadRequest request = new GetWorkloadRequest
    {
        WorkloadName = WorkloadName.FromOrganizationLocationWorkload("[ORGANIZATION]", "[LOCATION]", "[WORKLOAD]"),
    };
    // Make the request
    Workload response = await assuredWorkloadsServiceClient.GetWorkloadAsync(request);

### GetWorkloadAsync(WorkloadName, CallSettings)

    public virtual Task<Workload> GetWorkloadAsync(WorkloadName name, CallSettings callSettings = null)

Gets Assured Workload associated with a CRM Node

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.WorkloadName` Required. The resource name of the Workload to fetch. This is the workloads's relative path in the API, formatted as "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}". For example, "organizations/123/locations/us-east1/workloads/assured-workload-1". |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    WorkloadName name = WorkloadName.FromOrganizationLocationWorkload("[ORGANIZATION]", "[LOCATION]", "[WORKLOAD]");
    // Make the request
    Workload response = await assuredWorkloadsServiceClient.GetWorkloadAsync(name);

### GetWorkloadAsync(WorkloadName, CancellationToken)

    public virtual Task<Workload> GetWorkloadAsync(WorkloadName name, CancellationToken cancellationToken)

Gets Assured Workload associated with a CRM Node

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.WorkloadName` Required. The resource name of the Workload to fetch. This is the workloads's relative path in the API, formatted as "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}". For example, "organizations/123/locations/us-east1/workloads/assured-workload-1". |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    WorkloadName name = WorkloadName.FromOrganizationLocationWorkload("[ORGANIZATION]", "[LOCATION]", "[WORKLOAD]");
    // Make the request
    Workload response = await assuredWorkloadsServiceClient.GetWorkloadAsync(name);

### GetWorkloadAsync(string, CallSettings)

    public virtual Task<Workload> GetWorkloadAsync(string name, CallSettings callSettings = null)

Gets Assured Workload associated with a CRM Node

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the Workload to fetch. This is the workloads's relative path in the API, formatted as "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}". For example, "organizations/123/locations/us-east1/workloads/assured-workload-1". |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/workloads/[WORKLOAD]";
    // Make the request
    Workload response = await assuredWorkloadsServiceClient.GetWorkloadAsync(name);

### GetWorkloadAsync(string, CancellationToken)

    public virtual Task<Workload> GetWorkloadAsync(string name, CancellationToken cancellationToken)

Gets Assured Workload associated with a CRM Node

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the Workload to fetch. This is the workloads's relative path in the API, formatted as "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}". For example, "organizations/123/locations/us-east1/workloads/assured-workload-1". |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/workloads/[WORKLOAD]";
    // Make the request
    Workload response = await assuredWorkloadsServiceClient.GetWorkloadAsync(name);

### ListWorkloads(ListWorkloadsRequest, CallSettings)

    public virtual PagedEnumerable<ListWorkloadsResponse, Workload> ListWorkloads(ListWorkloadsRequest request, CallSettings callSettings = null)

Lists Assured Workloads under a CRM Node.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.ListWorkloadsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.ListWorkloadsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` | A pageable sequence of [Workload](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload) resources. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = AssuredWorkloadsServiceClient.Create();
    // Initialize request argument(s)
    ListWorkloadsRequest request = new ListWorkloadsRequest
    {
        ParentAsLocationName = LocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
        Filter = "",
    };
    // Make the request
    PagedEnumerable<ListWorkloadsResponse, Workload> response = assuredWorkloadsServiceClient.ListWorkloads(request);

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

### ListWorkloads(LocationName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListWorkloadsResponse, Workload> ListWorkloads(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Assured Workloads under a CRM Node.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.LocationName` Required. Parent Resource to list workloads from. Must be of the form `organizations/{org_id}/locations/{location}`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` 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` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.ListWorkloadsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` | A pageable sequence of [Workload](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload) resources. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = AssuredWorkloadsServiceClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
    // Make the request
    PagedEnumerable<ListWorkloadsResponse, Workload> response = assuredWorkloadsServiceClient.ListWorkloads(parent);

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

### ListWorkloads(string, string, int?, CallSettings)

    public virtual PagedEnumerable<ListWorkloadsResponse, Workload> ListWorkloads(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Assured Workloads under a CRM Node.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Parent Resource to list workloads from. Must be of the form `organizations/{org_id}/locations/{location}`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` 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` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.ListWorkloadsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` | A pageable sequence of [Workload](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload) resources. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = AssuredWorkloadsServiceClient.Create();
    // Initialize request argument(s)
    string parent = "organizations/[ORGANIZATION]/locations/[LOCATION]";
    // Make the request
    PagedEnumerable<ListWorkloadsResponse, Workload> response = assuredWorkloadsServiceClient.ListWorkloads(parent);

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

### ListWorkloadsAsync(ListWorkloadsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListWorkloadsResponse, Workload> ListWorkloadsAsync(ListWorkloadsRequest request, CallSettings callSettings = null)

Lists Assured Workloads under a CRM Node.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.ListWorkloadsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.ListWorkloadsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` | A pageable asynchronous sequence of [Workload](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload) resources. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    ListWorkloadsRequest request = new ListWorkloadsRequest
    {
        ParentAsLocationName = LocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
        Filter = "",
    };
    // Make the request
    PagedAsyncEnumerable<ListWorkloadsResponse, Workload> response = assuredWorkloadsServiceClient.ListWorkloadsAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((Workload item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

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

### ListWorkloadsAsync(LocationName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListWorkloadsResponse, Workload> ListWorkloadsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Assured Workloads under a CRM Node.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.LocationName` Required. Parent Resource to list workloads from. Must be of the form `organizations/{org_id}/locations/{location}`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` 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` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.ListWorkloadsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` | A pageable asynchronous sequence of [Workload](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload) resources. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
    // Make the request
    PagedAsyncEnumerable<ListWorkloadsResponse, Workload> response = assuredWorkloadsServiceClient.ListWorkloadsAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((Workload item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

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

### ListWorkloadsAsync(string, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListWorkloadsResponse, Workload> ListWorkloadsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Assured Workloads under a CRM Node.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Parent Resource to list workloads from. Must be of the form `organizations/{org_id}/locations/{location}`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` 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` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.ListWorkloadsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` | A pageable asynchronous sequence of [Workload](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload) resources. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "organizations/[ORGANIZATION]/locations/[LOCATION]";
    // Make the request
    PagedAsyncEnumerable<ListWorkloadsResponse, Workload> response = assuredWorkloadsServiceClient.ListWorkloadsAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((Workload item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

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

### PollOnceCreateWorkload(string, CallSettings)

    public virtual Operation<Workload, CreateWorkloadOperationMetadata> PollOnceCreateWorkload(string operationName, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workloadhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.CreateWorkloadOperationMetadata` | The result of polling the operation. |

### PollOnceCreateWorkloadAsync(string, CallSettings)

    public virtual Task<Operation<Workload, CreateWorkloadOperationMetadata>> PollOnceCreateWorkloadAsync(string operationName, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workloadhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.CreateWorkloadOperationMetadata` | A task representing the result of polling the operation. |

### RestrictAllowedResources(RestrictAllowedResourcesRequest, CallSettings)

    public virtual RestrictAllowedResourcesResponse RestrictAllowedResources(RestrictAllowedResourcesRequest request, CallSettings callSettings = null)

Restrict the list of resources allowed in the Workload environment.
The current list of allowed products can be found at
<https://cloud.google.com/assured-workloads/docs/supported-products>
In addition to assuredworkloads.workload.update permission, the user should
also have orgpolicy.policy.set permission on the folder resource
to use this functionality.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.RestrictAllowedResourcesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.RestrictAllowedResourcesResponse` | The RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = AssuredWorkloadsServiceClient.Create();
    // Initialize request argument(s)
    RestrictAllowedResourcesRequest request = new RestrictAllowedResourcesRequest
    {
        Name = "",
        RestrictionType = RestrictAllowedResourcesRequest.Types.RestrictionType.Unspecified,
    };
    // Make the request
    RestrictAllowedResourcesResponse response = assuredWorkloadsServiceClient.RestrictAllowedResources(request);

### RestrictAllowedResourcesAsync(RestrictAllowedResourcesRequest, CallSettings)

    public virtual Task<RestrictAllowedResourcesResponse> RestrictAllowedResourcesAsync(RestrictAllowedResourcesRequest request, CallSettings callSettings = null)

Restrict the list of resources allowed in the Workload environment.
The current list of allowed products can be found at
<https://cloud.google.com/assured-workloads/docs/supported-products>
In addition to assuredworkloads.workload.update permission, the user should
also have orgpolicy.policy.set permission on the folder resource
to use this functionality.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.RestrictAllowedResourcesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.RestrictAllowedResourcesResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    RestrictAllowedResourcesRequest request = new RestrictAllowedResourcesRequest
    {
        Name = "",
        RestrictionType = RestrictAllowedResourcesRequest.Types.RestrictionType.Unspecified,
    };
    // Make the request
    RestrictAllowedResourcesResponse response = await assuredWorkloadsServiceClient.RestrictAllowedResourcesAsync(request);

### RestrictAllowedResourcesAsync(RestrictAllowedResourcesRequest, CancellationToken)

    public virtual Task<RestrictAllowedResourcesResponse> RestrictAllowedResourcesAsync(RestrictAllowedResourcesRequest request, CancellationToken cancellationToken)

Restrict the list of resources allowed in the Workload environment.
The current list of allowed products can be found at
<https://cloud.google.com/assured-workloads/docs/supported-products>
In addition to assuredworkloads.workload.update permission, the user should
also have orgpolicy.policy.set permission on the folder resource
to use this functionality.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.RestrictAllowedResourcesRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.RestrictAllowedResourcesResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    RestrictAllowedResourcesRequest request = new RestrictAllowedResourcesRequest
    {
        Name = "",
        RestrictionType = RestrictAllowedResourcesRequest.Types.RestrictionType.Unspecified,
    };
    // Make the request
    RestrictAllowedResourcesResponse response = await assuredWorkloadsServiceClient.RestrictAllowedResourcesAsync(request);

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AssuredWorkloadsServiceClient#Google_Cloud_AssuredWorkloads_V1Beta1_AssuredWorkloadsServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AssuredWorkloadsServiceClient#Google_Cloud_AssuredWorkloads_V1Beta1_AssuredWorkloadsServiceClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AssuredWorkloadsServiceClient#Google_Cloud_AssuredWorkloads_V1Beta1_AssuredWorkloadsServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.AssuredWorkloadsServiceClient#Google_Cloud_AssuredWorkloads_V1Beta1_AssuredWorkloadsServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.

### UpdateWorkload(UpdateWorkloadRequest, CallSettings)

    public virtual Workload UpdateWorkload(UpdateWorkloadRequest request, CallSettings callSettings = null)

Updates an existing workload.
Currently allows updating of workload display_name and labels.
For force updates don't set etag field in the Workload.
Only one update operation per workload can be in progress.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.UpdateWorkloadRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` | The RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = AssuredWorkloadsServiceClient.Create();
    // Initialize request argument(s)
    UpdateWorkloadRequest request = new UpdateWorkloadRequest
    {
        Workload = new Workload(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Workload response = assuredWorkloadsServiceClient.UpdateWorkload(request);

### UpdateWorkload(Workload, FieldMask, CallSettings)

    public virtual Workload UpdateWorkload(Workload workload, FieldMask updateMask, CallSettings callSettings = null)

Updates an existing workload.
Currently allows updating of workload display_name and labels.
For force updates don't set etag field in the Workload.
Only one update operation per workload can be in progress.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `workload` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` Required. The workload to update. The workload's `name` field is used to identify the workload to be updated. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id} |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. The list of fields to be updated. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` | The RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = AssuredWorkloadsServiceClient.Create();
    // Initialize request argument(s)
    Workload workload = new Workload();
    FieldMask updateMask = new FieldMask();
    // Make the request
    Workload response = assuredWorkloadsServiceClient.UpdateWorkload(workload, updateMask);

### UpdateWorkloadAsync(UpdateWorkloadRequest, CallSettings)

    public virtual Task<Workload> UpdateWorkloadAsync(UpdateWorkloadRequest request, CallSettings callSettings = null)

Updates an existing workload.
Currently allows updating of workload display_name and labels.
For force updates don't set etag field in the Workload.
Only one update operation per workload can be in progress.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.UpdateWorkloadRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    UpdateWorkloadRequest request = new UpdateWorkloadRequest
    {
        Workload = new Workload(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Workload response = await assuredWorkloadsServiceClient.UpdateWorkloadAsync(request);

### UpdateWorkloadAsync(UpdateWorkloadRequest, CancellationToken)

    public virtual Task<Workload> UpdateWorkloadAsync(UpdateWorkloadRequest request, CancellationToken cancellationToken)

Updates an existing workload.
Currently allows updating of workload display_name and labels.
For force updates don't set etag field in the Workload.
Only one update operation per workload can be in progress.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.UpdateWorkloadRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    UpdateWorkloadRequest request = new UpdateWorkloadRequest
    {
        Workload = new Workload(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Workload response = await assuredWorkloadsServiceClient.UpdateWorkloadAsync(request);

### UpdateWorkloadAsync(Workload, FieldMask, CallSettings)

    public virtual Task<Workload> UpdateWorkloadAsync(Workload workload, FieldMask updateMask, CallSettings callSettings = null)

Updates an existing workload.
Currently allows updating of workload display_name and labels.
For force updates don't set etag field in the Workload.
Only one update operation per workload can be in progress.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `workload` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` Required. The workload to update. The workload's `name` field is used to identify the workload to be updated. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id} |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. The list of fields to be updated. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    Workload workload = new Workload();
    FieldMask updateMask = new FieldMask();
    // Make the request
    Workload response = await assuredWorkloadsServiceClient.UpdateWorkloadAsync(workload, updateMask);

### UpdateWorkloadAsync(Workload, FieldMask, CancellationToken)

    public virtual Task<Workload> UpdateWorkloadAsync(Workload workload, FieldMask updateMask, CancellationToken cancellationToken)

Updates an existing workload.
Currently allows updating of workload display_name and labels.
For force updates don't set etag field in the Workload.
Only one update operation per workload can be in progress.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `workload` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` Required. The workload to update. The workload's `name` field is used to identify the workload to be updated. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id} |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. The list of fields to be updated. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest/Google.Cloud.AssuredWorkloads.V1Beta1.Workload` | A Task containing the RPC response. |

**Example**

    // Create client
    AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = await AssuredWorkloadsServiceClient.CreateAsync();
    // Initialize request argument(s)
    Workload workload = new Workload();
    FieldMask updateMask = new FieldMask();
    // Make the request
    Workload response = await assuredWorkloadsServiceClient.UpdateWorkloadAsync(workload, updateMask);