OrganizationMethods

Struct OrganizationMethods 

Source
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>

Source

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.
Source

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.
Source

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}
Source

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}
Source

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}
Source

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}
Source

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. Format organizations/{org_id}/locations/{location}/workloads/{workload}.
Source

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”
Source

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 form organizations/{org_id}/locations/{location_id}.
Source

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. The name field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id}
Source

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. The name field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id}
Source

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. The name field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id}
Source

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”.
Source

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 form organizations/{org_id}/locations/{location}.
Source

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. The name field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id}
Source

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.
Source

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”.

Trait Implementations§

Auto Trait Implementations§

§

impl<'a, C> Freeze for OrganizationMethods<'a, C>

§

impl<'a, C> !RefUnwindSafe for OrganizationMethods<'a, C>

§

impl<'a, C> Send for OrganizationMethods<'a, C>
where C: Sync,

§

impl<'a, C> Sync for OrganizationMethods<'a, C>
where C: Sync,

§

impl<'a, C> Unpin for OrganizationMethods<'a, C>

§

impl<'a, C> !UnwindSafe for OrganizationMethods<'a, C>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more