Class AccessDeniedException

All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<AccessDeniedException.Builder,AccessDeniedException>

@Generated("software.amazon.awssdk:codegen") public final class AccessDeniedException extends SigninException implements ToCopyableBuilder<AccessDeniedException.Builder,AccessDeniedException>

Error thrown for access denied scenarios with flexible HTTP status mapping

Runtime HTTP Status Code Mapping:

  • HTTP 401 (Unauthorized): TOKEN_EXPIRED, AUTHCODE_EXPIRED
  • HTTP 403 (Forbidden): USER_CREDENTIALS_CHANGED, INSUFFICIENT_PERMISSIONS

The specific HTTP status code is determined at runtime based on the error enum value. Consumers should use the error field to determine the specific access denial reason.

See Also: