Skip to main content

Workload

Struct Workload 

Source
#[non_exhaustive]
pub struct Workload {
Show 16 fields pub name: String, pub display_name: String, pub resources: Vec<ResourceInfo>, pub compliance_regime: ComplianceRegime, pub create_time: Option<Timestamp>, pub billing_account: String, pub etag: String, pub labels: HashMap<String, String>, pub provisioned_resources_parent: String, pub kms_settings: Option<KMSSettings>, pub resource_settings: Vec<ResourceSettings>, pub kaj_enrollment_state: KajEnrollmentState, pub enable_sovereign_controls: bool, pub saa_enrollment_response: Option<SaaEnrollmentResponse>, pub compliant_but_disallowed_services: Vec<String>, pub partner: Partner, /* private fields */
}
Expand description

A Workload object for managing highly regulated workloads of cloud customers.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§name: String

Optional. The resource name of the workload. Format: organizations/{organization}/locations/{location}/workloads/{workload}

Read-only.

§display_name: String

Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces.

Example: My Workload

§resources: Vec<ResourceInfo>

Output only. The resources associated with this workload. These resources will be created when creating the workload. If any of the projects already exist, the workload creation will fail. Always read only.

§compliance_regime: ComplianceRegime

Required. Immutable. Compliance Regime associated with this workload.

§create_time: Option<Timestamp>

Output only. Immutable. The Workload creation timestamp.

§billing_account: String

Optional. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form billingAccounts/{billing_account_id}. For example, billingAccounts/012345-567890-ABCDEF.

§etag: String

Optional. ETag of the workload, it is calculated on the basis of the Workload contents. It will be used in Update & Delete operations.

§labels: HashMap<String, String>

Optional. Labels applied to the workload.

§provisioned_resources_parent: String

Input only. The parent resource for the resources managed by this Assured Workload. May be either empty or a folder resource which is a child of the Workload parent. If not specified all resources are created under the parent organization. Format: folders/{folder_id}

§kms_settings: Option<KMSSettings>
👎Deprecated

Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS CMEK key is provisioned. This field is deprecated as of Feb 28, 2022. In order to create a Keyring, callers should specify, ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.

§resource_settings: Vec<ResourceSettings>

Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible. This field is optional.

§kaj_enrollment_state: KajEnrollmentState

Output only. Represents the KAJ enrollment state of the given workload.

§enable_sovereign_controls: bool

Optional. Indicates the sovereignty status of the given workload. Currently meant to be used by Europe/Canada customers.

§saa_enrollment_response: Option<SaaEnrollmentResponse>

Output only. Represents the SAA enrollment response of the given workload. SAA enrollment response is queried during GetWorkload call. In failure cases, user friendly error message is shown in SAA details page.

§compliant_but_disallowed_services: Vec<String>

Output only. Urls for services which are compliant for this Assured Workload, but which are currently disallowed by the ResourceUsageRestriction org policy. Invoke RestrictAllowedResources endpoint to allow your project developers to use these services in their environment.“

§partner: Partner

Optional. Compliance Regime associated with this workload.

Implementations§

Source§

impl Workload

Source

pub fn new() -> Self

Source

pub fn set_name<T: Into<String>>(self, v: T) -> Self

Sets the value of name.

§Example
let x = Workload::new().set_name("example");
Source

pub fn set_display_name<T: Into<String>>(self, v: T) -> Self

Sets the value of display_name.

§Example
let x = Workload::new().set_display_name("example");
Source

pub fn set_resources<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<ResourceInfo>,

Sets the value of resources.

§Example
use google_cloud_assuredworkloads_v1::model::workload::ResourceInfo;
let x = Workload::new()
    .set_resources([
        ResourceInfo::default()/* use setters */,
        ResourceInfo::default()/* use (different) setters */,
    ]);
Source

pub fn set_compliance_regime<T: Into<ComplianceRegime>>(self, v: T) -> Self

Sets the value of compliance_regime.

§Example
use google_cloud_assuredworkloads_v1::model::workload::ComplianceRegime;
let x0 = Workload::new().set_compliance_regime(ComplianceRegime::Il4);
let x1 = Workload::new().set_compliance_regime(ComplianceRegime::Cjis);
let x2 = Workload::new().set_compliance_regime(ComplianceRegime::FedrampHigh);
Source

pub fn set_create_time<T>(self, v: T) -> Self
where T: Into<Timestamp>,

Sets the value of create_time.

§Example
use wkt::Timestamp;
let x = Workload::new().set_create_time(Timestamp::default()/* use setters */);
Source

pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
where T: Into<Timestamp>,

Sets or clears the value of create_time.

§Example
use wkt::Timestamp;
let x = Workload::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Workload::new().set_or_clear_create_time(None::<Timestamp>);
Source

pub fn set_billing_account<T: Into<String>>(self, v: T) -> Self

Sets the value of billing_account.

§Example
let x = Workload::new().set_billing_account("example");
Source

pub fn set_etag<T: Into<String>>(self, v: T) -> Self

Sets the value of etag.

§Example
let x = Workload::new().set_etag("example");
Source

pub fn set_labels<T, K, V>(self, v: T) -> Self
where T: IntoIterator<Item = (K, V)>, K: Into<String>, V: Into<String>,

Sets the value of labels.

§Example
let x = Workload::new().set_labels([
    ("key0", "abc"),
    ("key1", "xyz"),
]);
Source

pub fn set_provisioned_resources_parent<T: Into<String>>(self, v: T) -> Self

Sets the value of provisioned_resources_parent.

§Example
let x = Workload::new().set_provisioned_resources_parent("example");
Source

pub fn set_kms_settings<T>(self, v: T) -> Self
where T: Into<KMSSettings>,

👎Deprecated

Sets the value of kms_settings.

§Example
use google_cloud_assuredworkloads_v1::model::workload::KMSSettings;
let x = Workload::new().set_kms_settings(KMSSettings::default()/* use setters */);
Source

pub fn set_or_clear_kms_settings<T>(self, v: Option<T>) -> Self
where T: Into<KMSSettings>,

👎Deprecated

Sets or clears the value of kms_settings.

§Example
use google_cloud_assuredworkloads_v1::model::workload::KMSSettings;
let x = Workload::new().set_or_clear_kms_settings(Some(KMSSettings::default()/* use setters */));
let x = Workload::new().set_or_clear_kms_settings(None::<KMSSettings>);
Source

pub fn set_resource_settings<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<ResourceSettings>,

Sets the value of resource_settings.

§Example
use google_cloud_assuredworkloads_v1::model::workload::ResourceSettings;
let x = Workload::new()
    .set_resource_settings([
        ResourceSettings::default()/* use setters */,
        ResourceSettings::default()/* use (different) setters */,
    ]);
Source

pub fn set_kaj_enrollment_state<T: Into<KajEnrollmentState>>(self, v: T) -> Self

Sets the value of kaj_enrollment_state.

§Example
use google_cloud_assuredworkloads_v1::model::workload::KajEnrollmentState;
let x0 = Workload::new().set_kaj_enrollment_state(KajEnrollmentState::Pending);
let x1 = Workload::new().set_kaj_enrollment_state(KajEnrollmentState::Complete);
Source

pub fn set_enable_sovereign_controls<T: Into<bool>>(self, v: T) -> Self

Sets the value of enable_sovereign_controls.

§Example
let x = Workload::new().set_enable_sovereign_controls(true);
Source

pub fn set_saa_enrollment_response<T>(self, v: T) -> Self

Sets the value of saa_enrollment_response.

§Example
use google_cloud_assuredworkloads_v1::model::workload::SaaEnrollmentResponse;
let x = Workload::new().set_saa_enrollment_response(SaaEnrollmentResponse::default()/* use setters */);
Source

pub fn set_or_clear_saa_enrollment_response<T>(self, v: Option<T>) -> Self

Sets or clears the value of saa_enrollment_response.

§Example
use google_cloud_assuredworkloads_v1::model::workload::SaaEnrollmentResponse;
let x = Workload::new().set_or_clear_saa_enrollment_response(Some(SaaEnrollmentResponse::default()/* use setters */));
let x = Workload::new().set_or_clear_saa_enrollment_response(None::<SaaEnrollmentResponse>);
Source

pub fn set_compliant_but_disallowed_services<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of compliant_but_disallowed_services.

§Example
let x = Workload::new().set_compliant_but_disallowed_services(["a", "b", "c"]);
Source

pub fn set_partner<T: Into<Partner>>(self, v: T) -> Self

Sets the value of partner.

§Example
use google_cloud_assuredworkloads_v1::model::workload::Partner;
let x0 = Workload::new().set_partner(Partner::LocalControlsByS3Ns);

Trait Implementations§

Source§

impl Clone for Workload

Source§

fn clone(&self) -> Workload

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Workload

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Workload

Source§

fn default() -> Workload

Returns the “default value” for a type. Read more
Source§

impl Message for Workload

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for Workload

Source§

fn eq(&self, other: &Workload) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Workload

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,