pub fn validate_path(path: &str) -> Result<(), PrincipalError>
Expand description
Verify that a path meets AWS requirements.
The AWS requirements for a path specify:
- The path must contain between 1 and 512 characters.
- The path must start and end with
/
. - All characters in the path must be in the ASCII range 0x21 (
!
) through 0x7E (~
). The AWS documentation erroneously indicates that 0x7F (DEL) is acceptable; however, the IAM APIs reject this character.
If path
meets these requirements, Ok. Otherwise, a PrincipalError::InvalidPath error is returned.