Assured Workloads v1 API - Class AssuredWorkloadsServiceClientImpl (2.2.0)

public sealed class AssuredWorkloadsServiceClientImpl : AssuredWorkloadsServiceClient

Reference documentation and code samples for the Assured Workloads v1 API class AssuredWorkloadsServiceClientImpl.

AssuredWorkloadsService client wrapper implementation, for convenient use.

Inheritance

Object > AssuredWorkloadsServiceClient > AssuredWorkloadsServiceClientImpl

Namespace

Google.Cloud.AssuredWorkloads.V1

Assembly

Google.Cloud.AssuredWorkloads.V1.dll

Remarks

Service to manage AssuredWorkloads.

Constructors

AssuredWorkloadsServiceClientImpl(AssuredWorkloadsService.AssuredWorkloadsServiceClient, AssuredWorkloadsServiceSettings, ILogger)

public AssuredWorkloadsServiceClientImpl(AssuredWorkloadsService.AssuredWorkloadsServiceClient grpcClient, AssuredWorkloadsServiceSettings settings, ILogger logger)

Constructs a client wrapper for the AssuredWorkloadsService service, with the specified gRPC client and settings.

Parameters
NameDescription
grpcClientAssuredWorkloadsService.AssuredWorkloadsServiceClient

The underlying gRPC client.

settingsAssuredWorkloadsServiceSettings

The base AssuredWorkloadsServiceSettings used within this client.

loggerILogger

Optional ILogger to use within this client.

Properties

CreateWorkloadOperationsClient

public override OperationsClient CreateWorkloadOperationsClient { get; }

The long-running operations client for CreateWorkload.

Property Value
TypeDescription
OperationsClient
Overrides

GrpcClient

public override AssuredWorkloadsService.AssuredWorkloadsServiceClient GrpcClient { get; }

The underlying gRPC AssuredWorkloadsService client

Property Value
TypeDescription
AssuredWorkloadsService.AssuredWorkloadsServiceClient
Overrides

Methods

AcknowledgeViolation(AcknowledgeViolationRequest, CallSettings)

public override AcknowledgeViolationResponse AcknowledgeViolation(AcknowledgeViolationRequest request, CallSettings callSettings = null)

Acknowledges an existing violation. By acknowledging a violation, users acknowledge the existence of a compliance violation in their workload and decide to ignore it due to a valid business justification. Acknowledgement is a permanent operation and it cannot be reverted.

Parameters
NameDescription
requestAcknowledgeViolationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AcknowledgeViolationResponse

The RPC response.

Overrides

AcknowledgeViolationAsync(AcknowledgeViolationRequest, CallSettings)

public override Task<AcknowledgeViolationResponse> AcknowledgeViolationAsync(AcknowledgeViolationRequest request, CallSettings callSettings = null)

Acknowledges an existing violation. By acknowledging a violation, users acknowledge the existence of a compliance violation in their workload and decide to ignore it due to a valid business justification. Acknowledgement is a permanent operation and it cannot be reverted.

Parameters
NameDescription
requestAcknowledgeViolationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AcknowledgeViolationResponse>

A Task containing the RPC response.

Overrides

CreateWorkload(CreateWorkloadRequest, CallSettings)

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

Creates Assured Workload.

Parameters
NameDescription
requestCreateWorkloadRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Workload, CreateWorkloadOperationMetadata>

The RPC response.

Overrides

CreateWorkloadAsync(CreateWorkloadRequest, CallSettings)

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

Creates Assured Workload.

Parameters
NameDescription
requestCreateWorkloadRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Workload, CreateWorkloadOperationMetadata>>

A Task containing the RPC response.

Overrides

DeleteWorkload(DeleteWorkloadRequest, CallSettings)

public override 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.

Parameters
NameDescription
requestDeleteWorkloadRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Overrides

DeleteWorkloadAsync(DeleteWorkloadRequest, CallSettings)

public override 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.

Parameters
NameDescription
requestDeleteWorkloadRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Overrides

GetViolation(GetViolationRequest, CallSettings)

public override Violation GetViolation(GetViolationRequest request, CallSettings callSettings = null)

Retrieves Assured Workload Violation based on ID.

Parameters
NameDescription
requestGetViolationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Violation

The RPC response.

Overrides

GetViolationAsync(GetViolationRequest, CallSettings)

public override Task<Violation> GetViolationAsync(GetViolationRequest request, CallSettings callSettings = null)

Retrieves Assured Workload Violation based on ID.

Parameters
NameDescription
requestGetViolationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Violation>

A Task containing the RPC response.

Overrides

GetWorkload(GetWorkloadRequest, CallSettings)

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

Gets Assured Workload associated with a CRM Node

Parameters
NameDescription
requestGetWorkloadRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Workload

The RPC response.

Overrides

GetWorkloadAsync(GetWorkloadRequest, CallSettings)

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

Gets Assured Workload associated with a CRM Node

Parameters
NameDescription
requestGetWorkloadRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Workload>

A Task containing the RPC response.

Overrides

ListViolations(ListViolationsRequest, CallSettings)

public override PagedEnumerable<ListViolationsResponse, Violation> ListViolations(ListViolationsRequest request, CallSettings callSettings = null)

Lists the Violations in the AssuredWorkload Environment. Callers may also choose to read across multiple Workloads as per AIP-159 by using '-' (the hyphen or dash character) as a wildcard character instead of workload-id in the parent. Format organizations/{org_id}/locations/{location}/workloads/-

Parameters
NameDescription
requestListViolationsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListViolationsResponse, Violation>

A pageable sequence of Violation resources.

Overrides

ListViolationsAsync(ListViolationsRequest, CallSettings)

public override PagedAsyncEnumerable<ListViolationsResponse, Violation> ListViolationsAsync(ListViolationsRequest request, CallSettings callSettings = null)

Lists the Violations in the AssuredWorkload Environment. Callers may also choose to read across multiple Workloads as per AIP-159 by using '-' (the hyphen or dash character) as a wildcard character instead of workload-id in the parent. Format organizations/{org_id}/locations/{location}/workloads/-

Parameters
NameDescription
requestListViolationsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListViolationsResponse, Violation>

A pageable asynchronous sequence of Violation resources.

Overrides

ListWorkloads(ListWorkloadsRequest, CallSettings)

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

Lists Assured Workloads under a CRM Node.

Parameters
NameDescription
requestListWorkloadsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListWorkloadsResponse, Workload>

A pageable sequence of Workload resources.

Overrides

ListWorkloadsAsync(ListWorkloadsRequest, CallSettings)

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

Lists Assured Workloads under a CRM Node.

Parameters
NameDescription
requestListWorkloadsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListWorkloadsResponse, Workload>

A pageable asynchronous sequence of Workload resources.

Overrides

RestrictAllowedResources(RestrictAllowedResourcesRequest, CallSettings)

public override 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
NameDescription
requestRestrictAllowedResourcesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RestrictAllowedResourcesResponse

The RPC response.

Overrides

RestrictAllowedResourcesAsync(RestrictAllowedResourcesRequest, CallSettings)

public override 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
NameDescription
requestRestrictAllowedResourcesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<RestrictAllowedResourcesResponse>

A Task containing the RPC response.

Overrides

UpdateWorkload(UpdateWorkloadRequest, CallSettings)

public override 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
NameDescription
requestUpdateWorkloadRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Workload

The RPC response.

Overrides

UpdateWorkloadAsync(UpdateWorkloadRequest, CallSettings)

public override 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
NameDescription
requestUpdateWorkloadRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Workload>

A Task containing the RPC response.

Overrides