Struct gapi_grpc::google::cloud::orgpolicy::v2::Constraint[][src]

pub struct Constraint {
    pub name: String,
    pub display_name: String,
    pub description: String,
    pub constraint_default: i32,
    pub constraint_type: Option<ConstraintType>,
}

A constraint describes a way to restrict resource’s configuration. For example, you could enforce a constraint that controls which cloud services can be activated across an organization, or whether a Compute Engine instance can have serial port connections established. Constraints can be configured by the organization’s policy adminstrator to fit the needs of the organzation by setting a policy that includes constraints at different locations in the organization’s resource hierarchy. Policies are inherited down the resource hierarchy from higher levels, but can also be overridden. For details about the inheritance rules please read about [policies][google.cloud.OrgPolicy.v2.Policy].

Constraints have a default behavior determined by the constraint_default field, which is the enforcement behavior that is used in the absence of a policy being defined or inherited for the resource in question.

Fields

name: String

Immutable. The resource name of the Constraint. Must be in one of the following forms:

For example, “/projects/123/constraints/compute.disableSerialPortAccess”.

display_name: String

The human readable name.

Mutable.

description: String

Detailed description of what this Constraint controls as well as how and where it is enforced.

Mutable.

constraint_default: i32

The evaluation behavior of this constraint in the absence of ‘Policy’.

constraint_type: Option<ConstraintType>

The type of restrictions for this Constraint.

Immutable after creation.

Implementations

impl Constraint[src]

pub fn constraint_default(&self) -> ConstraintDefault[src]

Returns the enum value of constraint_default, or the default if the field is set to an invalid enum value.

pub fn set_constraint_default(&mut self, value: ConstraintDefault)[src]

Sets constraint_default to the provided enum value.

Trait Implementations

impl Clone for Constraint[src]

impl Debug for Constraint[src]

impl Default for Constraint[src]

impl Message for Constraint[src]

impl PartialEq<Constraint> for Constraint[src]

impl StructuralPartialEq for Constraint[src]

Auto Trait Implementations

impl RefUnwindSafe for Constraint

impl Send for Constraint

impl Sync for Constraint

impl Unpin for Constraint

impl UnwindSafe for Constraint

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> WithSubscriber for T[src]