#[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
source§impl PartialEq for ValidationSettingsBuilder
impl PartialEq for ValidationSettingsBuilder
source§fn eq(&self, other: &ValidationSettingsBuilder) -> bool
fn eq(&self, other: &ValidationSettingsBuilder) -> bool
self and other values to be equal, and is used
by ==.