# frozen_string_literal: true # WARNING ABOUT GENERATED CODE # # This file is generated. See the contributing guide for more information: # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md # # WARNING ABOUT GENERATED CODE module Aws::CognitoIdentityProvider # When CognitoIdentityProvider returns an error response, the Ruby SDK constructs and raises an error. # These errors all extend Aws::CognitoIdentityProvider::Errors::ServiceError < {Aws::Errors::ServiceError} # # You can rescue all CognitoIdentityProvider errors using ServiceError: # # begin # # do stuff # rescue Aws::CognitoIdentityProvider::Errors::ServiceError # # rescues all CognitoIdentityProvider API errors # end # # # ## Request Context # ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns # information about the request that generated the error. # See {Seahorse::Client::RequestContext} for more information. # # ## Error Classes # * {AliasExistsException} # * {CodeDeliveryFailureException} # * {CodeMismatchException} # * {ConcurrentModificationException} # * {DuplicateProviderException} # * {EnableSoftwareTokenMFAException} # * {ExpiredCodeException} # * {GroupExistsException} # * {InternalErrorException} # * {InvalidEmailRoleAccessPolicyException} # * {InvalidLambdaResponseException} # * {InvalidOAuthFlowException} # * {InvalidParameterException} # * {InvalidPasswordException} # * {InvalidSmsRoleAccessPolicyException} # * {InvalidSmsRoleTrustRelationshipException} # * {InvalidUserPoolConfigurationException} # * {LimitExceededException} # * {MFAMethodNotFoundException} # * {NotAuthorizedException} # * {PasswordResetRequiredException} # * {PreconditionNotMetException} # * {ResourceNotFoundException} # * {ScopeDoesNotExistException} # * {SoftwareTokenMFANotFoundException} # * {TooManyFailedAttemptsException} # * {TooManyRequestsException} # * {UnauthorizedException} # * {UnexpectedLambdaException} # * {UnsupportedIdentityProviderException} # * {UnsupportedOperationException} # * {UnsupportedTokenTypeException} # * {UnsupportedUserStateException} # * {UserImportInProgressException} # * {UserLambdaValidationException} # * {UserNotConfirmedException} # * {UserNotFoundException} # * {UserPoolAddOnNotEnabledException} # * {UserPoolTaggingException} # * {UsernameExistsException} # # Additionally, error classes are dynamically generated for service errors based on the error code # if they are not defined above. module Errors extend Aws::Errors::DynamicErrors class AliasExistsException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::AliasExistsException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class CodeDeliveryFailureException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::CodeDeliveryFailureException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class CodeMismatchException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::CodeMismatchException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class ConcurrentModificationException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::ConcurrentModificationException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class DuplicateProviderException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::DuplicateProviderException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class EnableSoftwareTokenMFAException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::EnableSoftwareTokenMFAException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class ExpiredCodeException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::ExpiredCodeException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class GroupExistsException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::GroupExistsException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InternalErrorException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::InternalErrorException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidEmailRoleAccessPolicyException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::InvalidEmailRoleAccessPolicyException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidLambdaResponseException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::InvalidLambdaResponseException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidOAuthFlowException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::InvalidOAuthFlowException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidParameterException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::InvalidParameterException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidPasswordException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::InvalidPasswordException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidSmsRoleAccessPolicyException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::InvalidSmsRoleAccessPolicyException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidSmsRoleTrustRelationshipException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::InvalidSmsRoleTrustRelationshipException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidUserPoolConfigurationException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::InvalidUserPoolConfigurationException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class LimitExceededException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::LimitExceededException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class MFAMethodNotFoundException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::MFAMethodNotFoundException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class NotAuthorizedException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::NotAuthorizedException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class PasswordResetRequiredException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::PasswordResetRequiredException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class PreconditionNotMetException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::PreconditionNotMetException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class ResourceNotFoundException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::ResourceNotFoundException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class ScopeDoesNotExistException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::ScopeDoesNotExistException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class SoftwareTokenMFANotFoundException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::SoftwareTokenMFANotFoundException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class TooManyFailedAttemptsException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::TooManyFailedAttemptsException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class TooManyRequestsException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::TooManyRequestsException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class UnauthorizedException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::UnauthorizedException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class UnexpectedLambdaException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::UnexpectedLambdaException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class UnsupportedIdentityProviderException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::UnsupportedIdentityProviderException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class UnsupportedOperationException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::UnsupportedOperationException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class UnsupportedTokenTypeException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::UnsupportedTokenTypeException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class UnsupportedUserStateException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::UnsupportedUserStateException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class UserImportInProgressException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::UserImportInProgressException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class UserLambdaValidationException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::UserLambdaValidationException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class UserNotConfirmedException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::UserNotConfirmedException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class UserNotFoundException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::UserNotFoundException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class UserPoolAddOnNotEnabledException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::UserPoolAddOnNotEnabledException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class UserPoolTaggingException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::UserPoolTaggingException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class UsernameExistsException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CognitoIdentityProvider::Types::UsernameExistsException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end end end