pub struct OrganizationMethods<'a, C>where
C: 'a,{ /* private fields */ }Expand description
A builder providing access to all methods supported on organization resources.
It is not used directly, but through the Assuredworkloads hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_assuredworkloads1 as assuredworkloads1;
use assuredworkloads1::{Assuredworkloads, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
let secret: yup_oauth2::ApplicationSecret = Default::default();
let connector = hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_only()
.enable_http2()
.build();
let executor = hyper_util::rt::TokioExecutor::new();
let auth = yup_oauth2::InstalledFlowAuthenticator::with_client(
secret,
yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
yup_oauth2::client::CustomHyperClientBuilder::from(
hyper_util::client::legacy::Client::builder(executor).build(connector),
),
).build().await.unwrap();
let client = hyper_util::client::legacy::Client::builder(
hyper_util::rt::TokioExecutor::new()
)
.build(
hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_or_http()
.enable_http2()
.build()
);
let mut hub = Assuredworkloads::new(client, auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `locations_operations_get(...)`, `locations_operations_list(...)`, `locations_workloads_analyze_workload_move(...)`, `locations_workloads_create(...)`, `locations_workloads_delete(...)`, `locations_workloads_enable_compliance_updates(...)`, `locations_workloads_enable_resource_monitoring(...)`, `locations_workloads_get(...)`, `locations_workloads_list(...)`, `locations_workloads_mutate_partner_permissions(...)`, `locations_workloads_patch(...)`, `locations_workloads_restrict_allowed_resources(...)`, `locations_workloads_updates_apply(...)`, `locations_workloads_updates_list(...)`, `locations_workloads_violations_acknowledge(...)`, `locations_workloads_violations_get(...)` and `locations_workloads_violations_list(...)`
// to build up your call.
let rb = hub.organizations();Implementations§
Source§impl<'a, C> OrganizationMethods<'a, C>
impl<'a, C> OrganizationMethods<'a, C>
Sourcepub fn locations_operations_get(
&self,
name: &str,
) -> OrganizationLocationOperationGetCall<'a, C>
pub fn locations_operations_get( &self, name: &str, ) -> OrganizationLocationOperationGetCall<'a, C>
Create a builder to help you perform the following task:
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
§Arguments
name- The name of the operation resource.
Sourcepub fn locations_operations_list(
&self,
name: &str,
) -> OrganizationLocationOperationListCall<'a, C>
pub fn locations_operations_list( &self, name: &str, ) -> OrganizationLocationOperationListCall<'a, C>
Create a builder to help you perform the following task:
Lists operations that match the specified filter in the request. If the server doesn’t support this method, it returns UNIMPLEMENTED.
§Arguments
name- The name of the operation’s parent resource.
Sourcepub fn locations_workloads_updates_apply(
&self,
request: GoogleCloudAssuredworkloadsV1ApplyWorkloadUpdateRequest,
name: &str,
) -> OrganizationLocationWorkloadUpdateApplyCall<'a, C>
pub fn locations_workloads_updates_apply( &self, request: GoogleCloudAssuredworkloadsV1ApplyWorkloadUpdateRequest, name: &str, ) -> OrganizationLocationWorkloadUpdateApplyCall<'a, C>
Create a builder to help you perform the following task:
This endpoint creates a new operation to apply the given update.
§Arguments
request- No description provided.name- Required. The resource name of the update. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id}/updates/{update_id}
Sourcepub fn locations_workloads_updates_list(
&self,
parent: &str,
) -> OrganizationLocationWorkloadUpdateListCall<'a, C>
pub fn locations_workloads_updates_list( &self, parent: &str, ) -> OrganizationLocationWorkloadUpdateListCall<'a, C>
Create a builder to help you perform the following task:
This endpoint lists all updates for the given workload.
§Arguments
parent- Required. organizations/{org_id}/locations/{location_id}/workloads/{workload_id}
Sourcepub fn locations_workloads_violations_acknowledge(
&self,
request: GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest,
name: &str,
) -> OrganizationLocationWorkloadViolationAcknowledgeCall<'a, C>
pub fn locations_workloads_violations_acknowledge( &self, request: GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest, name: &str, ) -> OrganizationLocationWorkloadViolationAcknowledgeCall<'a, C>
Create a builder to help you perform the following task:
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.
§Arguments
request- No description provided.name- Required. The resource name of the Violation to acknowledge. Format: organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}
Sourcepub fn locations_workloads_violations_get(
&self,
name: &str,
) -> OrganizationLocationWorkloadViolationGetCall<'a, C>
pub fn locations_workloads_violations_get( &self, name: &str, ) -> OrganizationLocationWorkloadViolationGetCall<'a, C>
Create a builder to help you perform the following task:
Retrieves Assured Workload Violation based on ID.
§Arguments
name- Required. The resource name of the Violation to fetch (ie. Violation.name). Format: organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}
Sourcepub fn locations_workloads_violations_list(
&self,
parent: &str,
) -> OrganizationLocationWorkloadViolationListCall<'a, C>
pub fn locations_workloads_violations_list( &self, parent: &str, ) -> OrganizationLocationWorkloadViolationListCall<'a, C>
Create a builder to help you perform the following task:
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/-
§Arguments
parent- Required. The Workload name. Formatorganizations/{org_id}/locations/{location}/workloads/{workload}.
Sourcepub fn locations_workloads_analyze_workload_move(
&self,
target: &str,
) -> OrganizationLocationWorkloadAnalyzeWorkloadMoveCall<'a, C>
pub fn locations_workloads_analyze_workload_move( &self, target: &str, ) -> OrganizationLocationWorkloadAnalyzeWorkloadMoveCall<'a, C>
Create a builder to help you perform the following task:
Analyzes a hypothetical move of a source resource to a target workload to surface compliance risks. The analysis is best effort and is not guaranteed to be exhaustive.
§Arguments
target- Required. The resource ID of the folder-based destination workload. This workload is where the source resource 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”
Sourcepub fn locations_workloads_create(
&self,
request: GoogleCloudAssuredworkloadsV1Workload,
parent: &str,
) -> OrganizationLocationWorkloadCreateCall<'a, C>
pub fn locations_workloads_create( &self, request: GoogleCloudAssuredworkloadsV1Workload, parent: &str, ) -> OrganizationLocationWorkloadCreateCall<'a, C>
Create a builder to help you perform the following task:
Creates Assured Workload.
§Arguments
request- No description provided.parent- Required. The resource name of the new Workload’s parent. Must be of the formorganizations/{org_id}/locations/{location_id}.
Sourcepub fn locations_workloads_delete(
&self,
name: &str,
) -> OrganizationLocationWorkloadDeleteCall<'a, C>
pub fn locations_workloads_delete( &self, name: &str, ) -> OrganizationLocationWorkloadDeleteCall<'a, C>
Create a builder to help you perform the following task:
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.
§Arguments
name- Required. Thenamefield is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id}
Sourcepub fn locations_workloads_enable_compliance_updates(
&self,
name: &str,
) -> OrganizationLocationWorkloadEnableComplianceUpdateCall<'a, C>
pub fn locations_workloads_enable_compliance_updates( &self, name: &str, ) -> OrganizationLocationWorkloadEnableComplianceUpdateCall<'a, C>
Create a builder to help you perform the following task:
This endpoint enables Assured Workloads service to offer compliance updates for the folder based assured workload. It sets up an Assured Workloads Service Agent, having permissions to read compliance controls (for example: Org Policies) applied on the workload. The caller must have resourcemanager.folders.getIamPolicy and resourcemanager.folders.setIamPolicy permissions on the assured workload folder.
§Arguments
name- Required. Thenamefield is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id}
Sourcepub fn locations_workloads_enable_resource_monitoring(
&self,
name: &str,
) -> OrganizationLocationWorkloadEnableResourceMonitoringCall<'a, C>
pub fn locations_workloads_enable_resource_monitoring( &self, name: &str, ) -> OrganizationLocationWorkloadEnableResourceMonitoringCall<'a, C>
Create a builder to help you perform the following task:
Enable resource violation monitoring for a workload.
§Arguments
name- Required. Thenamefield is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id}
Sourcepub fn locations_workloads_get(
&self,
name: &str,
) -> OrganizationLocationWorkloadGetCall<'a, C>
pub fn locations_workloads_get( &self, name: &str, ) -> OrganizationLocationWorkloadGetCall<'a, C>
Create a builder to help you perform the following task:
Gets Assured Workload associated with a CRM Node
§Arguments
name- 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”.
Sourcepub fn locations_workloads_list(
&self,
parent: &str,
) -> OrganizationLocationWorkloadListCall<'a, C>
pub fn locations_workloads_list( &self, parent: &str, ) -> OrganizationLocationWorkloadListCall<'a, C>
Create a builder to help you perform the following task:
Lists Assured Workloads under a CRM Node.
§Arguments
parent- Required. Parent Resource to list workloads from. Must be of the formorganizations/{org_id}/locations/{location}.
Sourcepub fn locations_workloads_mutate_partner_permissions(
&self,
request: GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest,
name: &str,
) -> OrganizationLocationWorkloadMutatePartnerPermissionCall<'a, C>
pub fn locations_workloads_mutate_partner_permissions( &self, request: GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest, name: &str, ) -> OrganizationLocationWorkloadMutatePartnerPermissionCall<'a, C>
Create a builder to help you perform the following task:
Update the permissions settings for an existing partner workload. For force updates don’t set etag field in the Workload. Only one update operation per workload can be in progress.
§Arguments
request- No description provided.name- Required. Thenamefield is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id}
Sourcepub fn locations_workloads_patch(
&self,
request: GoogleCloudAssuredworkloadsV1Workload,
name: &str,
) -> OrganizationLocationWorkloadPatchCall<'a, C>
pub fn locations_workloads_patch( &self, request: GoogleCloudAssuredworkloadsV1Workload, name: &str, ) -> OrganizationLocationWorkloadPatchCall<'a, C>
Create a builder to help you perform the following task:
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.
§Arguments
request- No description provided.name- Optional. The resource name of the workload. Format: organizations/{organization}/locations/{location}/workloads/{workload} Read-only.
Sourcepub fn locations_workloads_restrict_allowed_resources(
&self,
request: GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest,
name: &str,
) -> OrganizationLocationWorkloadRestrictAllowedResourceCall<'a, C>
pub fn locations_workloads_restrict_allowed_resources( &self, request: GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest, name: &str, ) -> OrganizationLocationWorkloadRestrictAllowedResourceCall<'a, C>
Create a builder to help you perform the following task:
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.
§Arguments
request- No description provided.name- Required. The resource name of the Workload. 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”.