#[non_exhaustive]pub struct ValidationSettingsBuilder { /* private fields */ }Expand description
A builder for ValidationSettings.
Implementations§
source§impl ValidationSettingsBuilder
impl ValidationSettingsBuilder
sourcepub fn mode(self, input: ValidationMode) -> Self
pub fn mode(self, input: ValidationMode) -> Self
The validation mode currently configured for this policy store. The valid values are:
-
OFF – Neither Verified Permissions nor Cedar perform any validation on policies. No validation errors are reported by either service.
-
STRICT – Requires a schema to be present in the policy store. Cedar performs validation on all submitted new or updated static policies and policy templates. Any that fail validation are rejected and Cedar doesn't store them in the policy store.
If Mode=STRICT and the policy store doesn't contain a schema, Verified Permissions rejects all static policies and policy templates because there is no schema to validate against.
To submit a static policy or policy template without a schema, you must turn off validation.
sourcepub fn set_mode(self, input: Option<ValidationMode>) -> Self
pub fn set_mode(self, input: Option<ValidationMode>) -> Self
The validation mode currently configured for this policy store. The valid values are:
-
OFF – Neither Verified Permissions nor Cedar perform any validation on policies. No validation errors are reported by either service.
-
STRICT – Requires a schema to be present in the policy store. Cedar performs validation on all submitted new or updated static policies and policy templates. Any that fail validation are rejected and Cedar doesn't store them in the policy store.
If Mode=STRICT and the policy store doesn't contain a schema, Verified Permissions rejects all static policies and policy templates because there is no schema to validate against.
To submit a static policy or policy template without a schema, you must turn off validation.
sourcepub fn get_mode(&self) -> &Option<ValidationMode>
pub fn get_mode(&self) -> &Option<ValidationMode>
The validation mode currently configured for this policy store. The valid values are:
-
OFF – Neither Verified Permissions nor Cedar perform any validation on policies. No validation errors are reported by either service.
-
STRICT – Requires a schema to be present in the policy store. Cedar performs validation on all submitted new or updated static policies and policy templates. Any that fail validation are rejected and Cedar doesn't store them in the policy store.
If Mode=STRICT and the policy store doesn't contain a schema, Verified Permissions rejects all static policies and policy templates because there is no schema to validate against.
To submit a static policy or policy template without a schema, you must turn off validation.
sourcepub fn build(self) -> Result<ValidationSettings, BuildError>
pub fn build(self) -> Result<ValidationSettings, BuildError>
Consumes the builder and constructs a ValidationSettings.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for ValidationSettingsBuilder
impl Clone for ValidationSettingsBuilder
source§fn clone(&self) -> ValidationSettingsBuilder
fn clone(&self) -> ValidationSettingsBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ValidationSettingsBuilder
impl Debug for ValidationSettingsBuilder
source§impl Default for ValidationSettingsBuilder
impl Default for ValidationSettingsBuilder
source§fn default() -> ValidationSettingsBuilder
fn default() -> ValidationSettingsBuilder
impl StructuralPartialEq for ValidationSettingsBuilder
Auto Trait Implementations§
impl Freeze for ValidationSettingsBuilder
impl RefUnwindSafe for ValidationSettingsBuilder
impl Send for ValidationSettingsBuilder
impl Sync for ValidationSettingsBuilder
impl Unpin for ValidationSettingsBuilder
impl UnwindSafe for ValidationSettingsBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more