github.com/aavshr/aws-sdk-go@v1.41.3/service/cognitoidentityprovider/errors.go (about)

     1  // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
     2  
     3  package cognitoidentityprovider
     4  
     5  import (
     6  	"github.com/aavshr/aws-sdk-go/private/protocol"
     7  )
     8  
     9  const (
    10  
    11  	// ErrCodeAliasExistsException for service response error code
    12  	// "AliasExistsException".
    13  	//
    14  	// This exception is thrown when a user tries to confirm the account with an
    15  	// email or phone number that has already been supplied as an alias from a different
    16  	// account. This exception tells user that an account with this email or phone
    17  	// already exists.
    18  	ErrCodeAliasExistsException = "AliasExistsException"
    19  
    20  	// ErrCodeCodeDeliveryFailureException for service response error code
    21  	// "CodeDeliveryFailureException".
    22  	//
    23  	// This exception is thrown when a verification code fails to deliver successfully.
    24  	ErrCodeCodeDeliveryFailureException = "CodeDeliveryFailureException"
    25  
    26  	// ErrCodeCodeMismatchException for service response error code
    27  	// "CodeMismatchException".
    28  	//
    29  	// This exception is thrown if the provided code does not match what the server
    30  	// was expecting.
    31  	ErrCodeCodeMismatchException = "CodeMismatchException"
    32  
    33  	// ErrCodeConcurrentModificationException for service response error code
    34  	// "ConcurrentModificationException".
    35  	//
    36  	// This exception is thrown if two or more modifications are happening concurrently.
    37  	ErrCodeConcurrentModificationException = "ConcurrentModificationException"
    38  
    39  	// ErrCodeDuplicateProviderException for service response error code
    40  	// "DuplicateProviderException".
    41  	//
    42  	// This exception is thrown when the provider is already supported by the user
    43  	// pool.
    44  	ErrCodeDuplicateProviderException = "DuplicateProviderException"
    45  
    46  	// ErrCodeEnableSoftwareTokenMFAException for service response error code
    47  	// "EnableSoftwareTokenMFAException".
    48  	//
    49  	// This exception is thrown when there is a code mismatch and the service fails
    50  	// to configure the software token TOTP multi-factor authentication (MFA).
    51  	ErrCodeEnableSoftwareTokenMFAException = "EnableSoftwareTokenMFAException"
    52  
    53  	// ErrCodeExpiredCodeException for service response error code
    54  	// "ExpiredCodeException".
    55  	//
    56  	// This exception is thrown if a code has expired.
    57  	ErrCodeExpiredCodeException = "ExpiredCodeException"
    58  
    59  	// ErrCodeGroupExistsException for service response error code
    60  	// "GroupExistsException".
    61  	//
    62  	// This exception is thrown when Amazon Cognito encounters a group that already
    63  	// exists in the user pool.
    64  	ErrCodeGroupExistsException = "GroupExistsException"
    65  
    66  	// ErrCodeInternalErrorException for service response error code
    67  	// "InternalErrorException".
    68  	//
    69  	// This exception is thrown when Amazon Cognito encounters an internal error.
    70  	ErrCodeInternalErrorException = "InternalErrorException"
    71  
    72  	// ErrCodeInvalidEmailRoleAccessPolicyException for service response error code
    73  	// "InvalidEmailRoleAccessPolicyException".
    74  	//
    75  	// This exception is thrown when Amazon Cognito is not allowed to use your email
    76  	// identity. HTTP status code: 400.
    77  	ErrCodeInvalidEmailRoleAccessPolicyException = "InvalidEmailRoleAccessPolicyException"
    78  
    79  	// ErrCodeInvalidLambdaResponseException for service response error code
    80  	// "InvalidLambdaResponseException".
    81  	//
    82  	// This exception is thrown when the Amazon Cognito service encounters an invalid
    83  	// Lambda response.
    84  	ErrCodeInvalidLambdaResponseException = "InvalidLambdaResponseException"
    85  
    86  	// ErrCodeInvalidOAuthFlowException for service response error code
    87  	// "InvalidOAuthFlowException".
    88  	//
    89  	// This exception is thrown when the specified OAuth flow is invalid.
    90  	ErrCodeInvalidOAuthFlowException = "InvalidOAuthFlowException"
    91  
    92  	// ErrCodeInvalidParameterException for service response error code
    93  	// "InvalidParameterException".
    94  	//
    95  	// This exception is thrown when the Amazon Cognito service encounters an invalid
    96  	// parameter.
    97  	ErrCodeInvalidParameterException = "InvalidParameterException"
    98  
    99  	// ErrCodeInvalidPasswordException for service response error code
   100  	// "InvalidPasswordException".
   101  	//
   102  	// This exception is thrown when the Amazon Cognito service encounters an invalid
   103  	// password.
   104  	ErrCodeInvalidPasswordException = "InvalidPasswordException"
   105  
   106  	// ErrCodeInvalidSmsRoleAccessPolicyException for service response error code
   107  	// "InvalidSmsRoleAccessPolicyException".
   108  	//
   109  	// This exception is returned when the role provided for SMS configuration does
   110  	// not have permission to publish using Amazon SNS.
   111  	ErrCodeInvalidSmsRoleAccessPolicyException = "InvalidSmsRoleAccessPolicyException"
   112  
   113  	// ErrCodeInvalidSmsRoleTrustRelationshipException for service response error code
   114  	// "InvalidSmsRoleTrustRelationshipException".
   115  	//
   116  	// This exception is thrown when the trust relationship is invalid for the role
   117  	// provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com
   118  	// or the external ID provided in the role does not match what is provided in
   119  	// the SMS configuration for the user pool.
   120  	ErrCodeInvalidSmsRoleTrustRelationshipException = "InvalidSmsRoleTrustRelationshipException"
   121  
   122  	// ErrCodeInvalidUserPoolConfigurationException for service response error code
   123  	// "InvalidUserPoolConfigurationException".
   124  	//
   125  	// This exception is thrown when the user pool configuration is invalid.
   126  	ErrCodeInvalidUserPoolConfigurationException = "InvalidUserPoolConfigurationException"
   127  
   128  	// ErrCodeLimitExceededException for service response error code
   129  	// "LimitExceededException".
   130  	//
   131  	// This exception is thrown when a user exceeds the limit for a requested Amazon
   132  	// Web Services resource.
   133  	ErrCodeLimitExceededException = "LimitExceededException"
   134  
   135  	// ErrCodeMFAMethodNotFoundException for service response error code
   136  	// "MFAMethodNotFoundException".
   137  	//
   138  	// This exception is thrown when Amazon Cognito cannot find a multi-factor authentication
   139  	// (MFA) method.
   140  	ErrCodeMFAMethodNotFoundException = "MFAMethodNotFoundException"
   141  
   142  	// ErrCodeNotAuthorizedException for service response error code
   143  	// "NotAuthorizedException".
   144  	//
   145  	// This exception is thrown when a user is not authorized.
   146  	ErrCodeNotAuthorizedException = "NotAuthorizedException"
   147  
   148  	// ErrCodePasswordResetRequiredException for service response error code
   149  	// "PasswordResetRequiredException".
   150  	//
   151  	// This exception is thrown when a password reset is required.
   152  	ErrCodePasswordResetRequiredException = "PasswordResetRequiredException"
   153  
   154  	// ErrCodePreconditionNotMetException for service response error code
   155  	// "PreconditionNotMetException".
   156  	//
   157  	// This exception is thrown when a precondition is not met.
   158  	ErrCodePreconditionNotMetException = "PreconditionNotMetException"
   159  
   160  	// ErrCodeResourceNotFoundException for service response error code
   161  	// "ResourceNotFoundException".
   162  	//
   163  	// This exception is thrown when the Amazon Cognito service cannot find the
   164  	// requested resource.
   165  	ErrCodeResourceNotFoundException = "ResourceNotFoundException"
   166  
   167  	// ErrCodeScopeDoesNotExistException for service response error code
   168  	// "ScopeDoesNotExistException".
   169  	//
   170  	// This exception is thrown when the specified scope does not exist.
   171  	ErrCodeScopeDoesNotExistException = "ScopeDoesNotExistException"
   172  
   173  	// ErrCodeSoftwareTokenMFANotFoundException for service response error code
   174  	// "SoftwareTokenMFANotFoundException".
   175  	//
   176  	// This exception is thrown when the software token TOTP multi-factor authentication
   177  	// (MFA) is not enabled for the user pool.
   178  	ErrCodeSoftwareTokenMFANotFoundException = "SoftwareTokenMFANotFoundException"
   179  
   180  	// ErrCodeTooManyFailedAttemptsException for service response error code
   181  	// "TooManyFailedAttemptsException".
   182  	//
   183  	// This exception is thrown when the user has made too many failed attempts
   184  	// for a given action (e.g., sign in).
   185  	ErrCodeTooManyFailedAttemptsException = "TooManyFailedAttemptsException"
   186  
   187  	// ErrCodeTooManyRequestsException for service response error code
   188  	// "TooManyRequestsException".
   189  	//
   190  	// This exception is thrown when the user has made too many requests for a given
   191  	// operation.
   192  	ErrCodeTooManyRequestsException = "TooManyRequestsException"
   193  
   194  	// ErrCodeUnauthorizedException for service response error code
   195  	// "UnauthorizedException".
   196  	//
   197  	// This exception is thrown when the request is not authorized. This can happen
   198  	// due to an invalid access token in the request.
   199  	ErrCodeUnauthorizedException = "UnauthorizedException"
   200  
   201  	// ErrCodeUnexpectedLambdaException for service response error code
   202  	// "UnexpectedLambdaException".
   203  	//
   204  	// This exception is thrown when the Amazon Cognito service encounters an unexpected
   205  	// exception with the Lambda service.
   206  	ErrCodeUnexpectedLambdaException = "UnexpectedLambdaException"
   207  
   208  	// ErrCodeUnsupportedIdentityProviderException for service response error code
   209  	// "UnsupportedIdentityProviderException".
   210  	//
   211  	// This exception is thrown when the specified identifier is not supported.
   212  	ErrCodeUnsupportedIdentityProviderException = "UnsupportedIdentityProviderException"
   213  
   214  	// ErrCodeUnsupportedOperationException for service response error code
   215  	// "UnsupportedOperationException".
   216  	//
   217  	// This exception is thrown when you attempt to perform an operation that is
   218  	// not enabled for the user pool client.
   219  	ErrCodeUnsupportedOperationException = "UnsupportedOperationException"
   220  
   221  	// ErrCodeUnsupportedTokenTypeException for service response error code
   222  	// "UnsupportedTokenTypeException".
   223  	//
   224  	// This exception is thrown when an unsupported token is passed to an operation.
   225  	ErrCodeUnsupportedTokenTypeException = "UnsupportedTokenTypeException"
   226  
   227  	// ErrCodeUnsupportedUserStateException for service response error code
   228  	// "UnsupportedUserStateException".
   229  	//
   230  	// The request failed because the user is in an unsupported state.
   231  	ErrCodeUnsupportedUserStateException = "UnsupportedUserStateException"
   232  
   233  	// ErrCodeUserImportInProgressException for service response error code
   234  	// "UserImportInProgressException".
   235  	//
   236  	// This exception is thrown when you are trying to modify a user pool while
   237  	// a user import job is in progress for that pool.
   238  	ErrCodeUserImportInProgressException = "UserImportInProgressException"
   239  
   240  	// ErrCodeUserLambdaValidationException for service response error code
   241  	// "UserLambdaValidationException".
   242  	//
   243  	// This exception is thrown when the Amazon Cognito service encounters a user
   244  	// validation exception with the Lambda service.
   245  	ErrCodeUserLambdaValidationException = "UserLambdaValidationException"
   246  
   247  	// ErrCodeUserNotConfirmedException for service response error code
   248  	// "UserNotConfirmedException".
   249  	//
   250  	// This exception is thrown when a user is not confirmed successfully.
   251  	ErrCodeUserNotConfirmedException = "UserNotConfirmedException"
   252  
   253  	// ErrCodeUserNotFoundException for service response error code
   254  	// "UserNotFoundException".
   255  	//
   256  	// This exception is thrown when a user is not found.
   257  	ErrCodeUserNotFoundException = "UserNotFoundException"
   258  
   259  	// ErrCodeUserPoolAddOnNotEnabledException for service response error code
   260  	// "UserPoolAddOnNotEnabledException".
   261  	//
   262  	// This exception is thrown when user pool add-ons are not enabled.
   263  	ErrCodeUserPoolAddOnNotEnabledException = "UserPoolAddOnNotEnabledException"
   264  
   265  	// ErrCodeUserPoolTaggingException for service response error code
   266  	// "UserPoolTaggingException".
   267  	//
   268  	// This exception is thrown when a user pool tag cannot be set or updated.
   269  	ErrCodeUserPoolTaggingException = "UserPoolTaggingException"
   270  
   271  	// ErrCodeUsernameExistsException for service response error code
   272  	// "UsernameExistsException".
   273  	//
   274  	// This exception is thrown when Amazon Cognito encounters a user name that
   275  	// already exists in the user pool.
   276  	ErrCodeUsernameExistsException = "UsernameExistsException"
   277  )
   278  
   279  var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
   280  	"AliasExistsException":                     newErrorAliasExistsException,
   281  	"CodeDeliveryFailureException":             newErrorCodeDeliveryFailureException,
   282  	"CodeMismatchException":                    newErrorCodeMismatchException,
   283  	"ConcurrentModificationException":          newErrorConcurrentModificationException,
   284  	"DuplicateProviderException":               newErrorDuplicateProviderException,
   285  	"EnableSoftwareTokenMFAException":          newErrorEnableSoftwareTokenMFAException,
   286  	"ExpiredCodeException":                     newErrorExpiredCodeException,
   287  	"GroupExistsException":                     newErrorGroupExistsException,
   288  	"InternalErrorException":                   newErrorInternalErrorException,
   289  	"InvalidEmailRoleAccessPolicyException":    newErrorInvalidEmailRoleAccessPolicyException,
   290  	"InvalidLambdaResponseException":           newErrorInvalidLambdaResponseException,
   291  	"InvalidOAuthFlowException":                newErrorInvalidOAuthFlowException,
   292  	"InvalidParameterException":                newErrorInvalidParameterException,
   293  	"InvalidPasswordException":                 newErrorInvalidPasswordException,
   294  	"InvalidSmsRoleAccessPolicyException":      newErrorInvalidSmsRoleAccessPolicyException,
   295  	"InvalidSmsRoleTrustRelationshipException": newErrorInvalidSmsRoleTrustRelationshipException,
   296  	"InvalidUserPoolConfigurationException":    newErrorInvalidUserPoolConfigurationException,
   297  	"LimitExceededException":                   newErrorLimitExceededException,
   298  	"MFAMethodNotFoundException":               newErrorMFAMethodNotFoundException,
   299  	"NotAuthorizedException":                   newErrorNotAuthorizedException,
   300  	"PasswordResetRequiredException":           newErrorPasswordResetRequiredException,
   301  	"PreconditionNotMetException":              newErrorPreconditionNotMetException,
   302  	"ResourceNotFoundException":                newErrorResourceNotFoundException,
   303  	"ScopeDoesNotExistException":               newErrorScopeDoesNotExistException,
   304  	"SoftwareTokenMFANotFoundException":        newErrorSoftwareTokenMFANotFoundException,
   305  	"TooManyFailedAttemptsException":           newErrorTooManyFailedAttemptsException,
   306  	"TooManyRequestsException":                 newErrorTooManyRequestsException,
   307  	"UnauthorizedException":                    newErrorUnauthorizedException,
   308  	"UnexpectedLambdaException":                newErrorUnexpectedLambdaException,
   309  	"UnsupportedIdentityProviderException":     newErrorUnsupportedIdentityProviderException,
   310  	"UnsupportedOperationException":            newErrorUnsupportedOperationException,
   311  	"UnsupportedTokenTypeException":            newErrorUnsupportedTokenTypeException,
   312  	"UnsupportedUserStateException":            newErrorUnsupportedUserStateException,
   313  	"UserImportInProgressException":            newErrorUserImportInProgressException,
   314  	"UserLambdaValidationException":            newErrorUserLambdaValidationException,
   315  	"UserNotConfirmedException":                newErrorUserNotConfirmedException,
   316  	"UserNotFoundException":                    newErrorUserNotFoundException,
   317  	"UserPoolAddOnNotEnabledException":         newErrorUserPoolAddOnNotEnabledException,
   318  	"UserPoolTaggingException":                 newErrorUserPoolTaggingException,
   319  	"UsernameExistsException":                  newErrorUsernameExistsException,
   320  }