Service to manage AssuredWorkloads.
Equality
Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection>
objects compare equal. Objects that compare equal share the same underlying resources.
Performance
Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.
Thread Safety
Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.
Constructors
AssuredWorkloadsServiceClient(AssuredWorkloadsServiceClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
AssuredWorkloadsServiceClient const &
|
AssuredWorkloadsServiceClient(AssuredWorkloadsServiceClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
AssuredWorkloadsServiceClient &&
|
AssuredWorkloadsServiceClient(std::shared_ptr< AssuredWorkloadsServiceConnection >, Options)
Parameters | |
---|---|
Name | Description |
connection |
std::shared_ptr< AssuredWorkloadsServiceConnection >
|
opts |
Options
|
Operators
operator=(AssuredWorkloadsServiceClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
AssuredWorkloadsServiceClient const &
|
Returns | |
---|---|
Type | Description |
AssuredWorkloadsServiceClient & |
operator=(AssuredWorkloadsServiceClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
AssuredWorkloadsServiceClient &&
|
Returns | |
---|---|
Type | Description |
AssuredWorkloadsServiceClient & |
Functions
CreateWorkload(std::string const &, google::cloud::assuredworkloads::v1::Workload const &, Options)
Creates Assured Workload.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The resource name of the new Workload's parent. Must be of the form |
workload |
google::cloud::assuredworkloads::v1::Workload const &
Required. Assured Workload to create |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::assuredworkloads::v1::Workload > > |
A |
CreateWorkload(NoAwaitTag, std::string const &, google::cloud::assuredworkloads::v1::Workload const &, Options)
Creates Assured Workload.
Specifying the NoAwaitTag
immediately returns the [google::longrunning::Operation
] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.
Parameters | |
---|---|
Name | Description |
|
NoAwaitTag
|
parent |
std::string const &
|
workload |
google::cloud::assuredworkloads::v1::Workload const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
StatusOr< google::longrunning::Operation > |
CreateWorkload(google::cloud::assuredworkloads::v1::CreateWorkloadRequest const &, Options)
Creates Assured Workload.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::assuredworkloads::v1::CreateWorkloadRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::assuredworkloads::v1::Workload > > |
A |
CreateWorkload(NoAwaitTag, google::cloud::assuredworkloads::v1::CreateWorkloadRequest const &, Options)
Creates Assured Workload.
Specifying the NoAwaitTag
immediately returns the [google::longrunning::Operation
] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.
Parameters | |
---|---|
Name | Description |
|
NoAwaitTag
|
request |
google::cloud::assuredworkloads::v1::CreateWorkloadRequest const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
StatusOr< google::longrunning::Operation > |
CreateWorkload(google::longrunning::Operation const &, Options)
Creates Assured Workload.
This method accepts a google::longrunning::Operation
that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.
Parameters | |
---|---|
Name | Description |
operation |
google::longrunning::Operation const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::assuredworkloads::v1::Workload > > |
UpdateWorkload(google::cloud::assuredworkloads::v1::Workload const &, google::protobuf::FieldMask const &, Options)
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 |
google::cloud::assuredworkloads::v1::Workload const &
Required. The workload to update. The workload's |
update_mask |
google::protobuf::FieldMask const &
Required. The list of fields to be updated. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::assuredworkloads::v1::Workload > |
the result of the RPC. The response message type (google.cloud.assuredworkloads.v1.Workload) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
UpdateWorkload(google::cloud::assuredworkloads::v1::UpdateWorkloadRequest const &, Options)
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 |
google::cloud::assuredworkloads::v1::UpdateWorkloadRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::assuredworkloads::v1::Workload > |
the result of the RPC. The response message type (google.cloud.assuredworkloads.v1.Workload) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
RestrictAllowedResources(google::cloud::assuredworkloads::v1::RestrictAllowedResourcesRequest const &, Options)
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 |
google::cloud::assuredworkloads::v1::RestrictAllowedResourcesRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::assuredworkloads::v1::RestrictAllowedResourcesResponse > |
the result of the RPC. The response message type (google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
DeleteWorkload(std::string const &, Options)
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 | |
---|---|
Name | Description |
name |
std::string const &
Required. The |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status |
a |
DeleteWorkload(google::cloud::assuredworkloads::v1::DeleteWorkloadRequest const &, Options)
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 | |
---|---|
Name | Description |
request |
google::cloud::assuredworkloads::v1::DeleteWorkloadRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status |
a |
GetWorkload(std::string const &, Options)
Gets Assured Workload associated with a CRM Node.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The resource name of the Workload to fetch. This is the workload'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". |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::assuredworkloads::v1::Workload > |
the result of the RPC. The response message type (google.cloud.assuredworkloads.v1.Workload) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetWorkload(google::cloud::assuredworkloads::v1::GetWorkloadRequest const &, Options)
Gets Assured Workload associated with a CRM Node.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::assuredworkloads::v1::GetWorkloadRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::assuredworkloads::v1::Workload > |
the result of the RPC. The response message type (google.cloud.assuredworkloads.v1.Workload) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
ListWorkloads(std::string const &, Options)
Lists Assured Workloads under a CRM Node.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. Parent Resource to list workloads from. Must be of the form |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::assuredworkloads::v1::Workload > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListWorkloads(google::cloud::assuredworkloads::v1::ListWorkloadsRequest, Options)
Lists Assured Workloads under a CRM Node.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::assuredworkloads::v1::ListWorkloadsRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::assuredworkloads::v1::Workload > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListViolations(std::string const &, Options)
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 | |
---|---|
Name | Description |
parent |
std::string const &
Required. The Workload name. Format |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::assuredworkloads::v1::Violation > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListViolations(google::cloud::assuredworkloads::v1::ListViolationsRequest, Options)
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 | |
---|---|
Name | Description |
request |
google::cloud::assuredworkloads::v1::ListViolationsRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::assuredworkloads::v1::Violation > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
GetViolation(std::string const &, Options)
Retrieves Assured Workload Violation based on ID.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The resource name of the Violation to fetch (ie. Violation.name). Format: organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation} |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::assuredworkloads::v1::Violation > |
the result of the RPC. The response message type (google.cloud.assuredworkloads.v1.Violation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetViolation(google::cloud::assuredworkloads::v1::GetViolationRequest const &, Options)
Retrieves Assured Workload Violation based on ID.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::assuredworkloads::v1::GetViolationRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::assuredworkloads::v1::Violation > |
the result of the RPC. The response message type (google.cloud.assuredworkloads.v1.Violation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
AcknowledgeViolation(google::cloud::assuredworkloads::v1::AcknowledgeViolationRequest const &, Options)
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 | |
---|---|
Name | Description |
request |
google::cloud::assuredworkloads::v1::AcknowledgeViolationRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::assuredworkloads::v1::AcknowledgeViolationResponse > |
the result of the RPC. The response message type (google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |