#[non_exhaustive]pub struct ValidationSettings {
pub mode: ValidationMode,
}Expand description
A structure that contains Cedar policy validation settings for the policy store. The validation mode determines which validation failures that Cedar considers serious enough to block acceptance of a new or edited static policy or policy template.
This data type is used as a request parameter in the CreatePolicyStore and UpdatePolicyStore operations.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mode: ValidationModeThe 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.
Implementations§
source§impl ValidationSettings
impl ValidationSettings
sourcepub fn mode(&self) -> &ValidationMode
pub fn mode(&self) -> &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.
source§impl ValidationSettings
impl ValidationSettings
sourcepub fn builder() -> ValidationSettingsBuilder
pub fn builder() -> ValidationSettingsBuilder
Creates a new builder-style object to manufacture ValidationSettings.
Trait Implementations§
source§impl Clone for ValidationSettings
impl Clone for ValidationSettings
source§fn clone(&self) -> ValidationSettings
fn clone(&self) -> ValidationSettings
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ValidationSettings
impl Debug for ValidationSettings
source§impl PartialEq for ValidationSettings
impl PartialEq for ValidationSettings
source§fn eq(&self, other: &ValidationSettings) -> bool
fn eq(&self, other: &ValidationSettings) -> bool
self and other values to be equal, and is used
by ==.