#[non_exhaustive]pub struct ValidationException {
pub message: String,
pub field_list: Option<Vec<ValidationExceptionField>>,
/* private fields */
}Expand description
The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.
The possible reasons include the following:
-
UnrecognizedEntityType
The policy includes an entity type that isn't found in the schema.
-
UnrecognizedActionId
The policy includes an action id that isn't found in the schema.
-
InvalidActionApplication
The policy includes an action that, according to the schema, doesn't support the specified principal and resource.
-
UnexpectedType
The policy included an operand that isn't a valid type for the specified operation.
-
IncompatibleTypes
The types of elements included in a
set, or the types of expressions used in anif...then...elseclause aren't compatible in this context. -
MissingAttribute
The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.
-
UnsafeOptionalAttributeAccess
The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.
-
ImpossiblePolicy
Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.
-
WrongNumberArguments
The policy references an extension type with the wrong number of arguments.
-
FunctionArgumentValidationError
Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.
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.message: String§field_list: Option<Vec<ValidationExceptionField>>The list of fields that aren't valid.
Implementations§
source§impl ValidationException
impl ValidationException
sourcepub fn field_list(&self) -> &[ValidationExceptionField]
pub fn field_list(&self) -> &[ValidationExceptionField]
The list of fields that aren't valid.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .field_list.is_none().
source§impl ValidationException
impl ValidationException
sourcepub fn builder() -> ValidationExceptionBuilder
pub fn builder() -> ValidationExceptionBuilder
Creates a new builder-style object to manufacture ValidationException.
Trait Implementations§
source§impl Clone for ValidationException
impl Clone for ValidationException
source§fn clone(&self) -> ValidationException
fn clone(&self) -> ValidationException
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ValidationException
impl Debug for ValidationException
source§impl Display for ValidationException
impl Display for ValidationException
source§impl Error for ValidationException
impl Error for ValidationException
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl PartialEq for ValidationException
impl PartialEq for ValidationException
source§fn eq(&self, other: &ValidationException) -> bool
fn eq(&self, other: &ValidationException) -> bool
self and other values to be equal, and is used
by ==.source§impl ProvideErrorMetadata for ValidationException
impl ProvideErrorMetadata for ValidationException
source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
source§impl RequestId for ValidationException
impl RequestId for ValidationException
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None if the service could not be reached.impl StructuralPartialEq for ValidationException
Auto Trait Implementations§
impl Freeze for ValidationException
impl RefUnwindSafe for ValidationException
impl Send for ValidationException
impl Sync for ValidationException
impl Unpin for ValidationException
impl UnwindSafe for ValidationException
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> 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