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

     1  // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
     2  
     3  package wafregional
     4  
     5  import (
     6  	"github.com/aavshr/aws-sdk-go/private/protocol"
     7  )
     8  
     9  const (
    10  
    11  	// ErrCodeWAFBadRequestException for service response error code
    12  	// "WAFBadRequestException".
    13  	ErrCodeWAFBadRequestException = "WAFBadRequestException"
    14  
    15  	// ErrCodeWAFDisallowedNameException for service response error code
    16  	// "WAFDisallowedNameException".
    17  	//
    18  	// The name specified is invalid.
    19  	ErrCodeWAFDisallowedNameException = "WAFDisallowedNameException"
    20  
    21  	// ErrCodeWAFEntityMigrationException for service response error code
    22  	// "WAFEntityMigrationException".
    23  	//
    24  	// The operation failed due to a problem with the migration. The failure cause
    25  	// is provided in the exception, in the MigrationErrorType:
    26  	//
    27  	//    * ENTITY_NOT_SUPPORTED - The web ACL has an unsupported entity but the
    28  	//    IgnoreUnsupportedType is not set to true.
    29  	//
    30  	//    * ENTITY_NOT_FOUND - The web ACL doesn't exist.
    31  	//
    32  	//    * S3_BUCKET_NO_PERMISSION - You don't have permission to perform the PutObject
    33  	//    action to the specified Amazon S3 bucket.
    34  	//
    35  	//    * S3_BUCKET_NOT_ACCESSIBLE - The bucket policy doesn't allow AWS WAF to
    36  	//    perform the PutObject action in the bucket.
    37  	//
    38  	//    * S3_BUCKET_NOT_FOUND - The S3 bucket doesn't exist.
    39  	//
    40  	//    * S3_BUCKET_INVALID_REGION - The S3 bucket is not in the same Region as
    41  	//    the web ACL.
    42  	//
    43  	//    * S3_INTERNAL_ERROR - AWS WAF failed to create the template in the S3
    44  	//    bucket for another reason.
    45  	ErrCodeWAFEntityMigrationException = "WAFEntityMigrationException"
    46  
    47  	// ErrCodeWAFInternalErrorException for service response error code
    48  	// "WAFInternalErrorException".
    49  	//
    50  	// The operation failed because of a system problem, even though the request
    51  	// was valid. Retry your request.
    52  	ErrCodeWAFInternalErrorException = "WAFInternalErrorException"
    53  
    54  	// ErrCodeWAFInvalidAccountException for service response error code
    55  	// "WAFInvalidAccountException".
    56  	//
    57  	// The operation failed because you tried to create, update, or delete an object
    58  	// by using an invalid account identifier.
    59  	ErrCodeWAFInvalidAccountException = "WAFInvalidAccountException"
    60  
    61  	// ErrCodeWAFInvalidOperationException for service response error code
    62  	// "WAFInvalidOperationException".
    63  	//
    64  	// The operation failed because there was nothing to do. For example:
    65  	//
    66  	//    * You tried to remove a Rule from a WebACL, but the Rule isn't in the
    67  	//    specified WebACL.
    68  	//
    69  	//    * You tried to remove an IP address from an IPSet, but the IP address
    70  	//    isn't in the specified IPSet.
    71  	//
    72  	//    * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple
    73  	//    isn't in the specified WebACL.
    74  	//
    75  	//    * You tried to add a Rule to a WebACL, but the Rule already exists in
    76  	//    the specified WebACL.
    77  	//
    78  	//    * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple
    79  	//    already exists in the specified WebACL.
    80  	ErrCodeWAFInvalidOperationException = "WAFInvalidOperationException"
    81  
    82  	// ErrCodeWAFInvalidParameterException for service response error code
    83  	// "WAFInvalidParameterException".
    84  	//
    85  	// The operation failed because AWS WAF didn't recognize a parameter in the
    86  	// request. For example:
    87  	//
    88  	//    * You specified an invalid parameter name.
    89  	//
    90  	//    * You specified an invalid value.
    91  	//
    92  	//    * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
    93  	//    using an action other than INSERT or DELETE.
    94  	//
    95  	//    * You tried to create a WebACL with a DefaultAction Type other than ALLOW,
    96  	//    BLOCK, or COUNT.
    97  	//
    98  	//    * You tried to create a RateBasedRule with a RateKey value other than
    99  	//    IP.
   100  	//
   101  	//    * You tried to update a WebACL with a WafAction Type other than ALLOW,
   102  	//    BLOCK, or COUNT.
   103  	//
   104  	//    * You tried to update a ByteMatchSet with a FieldToMatch Type other than
   105  	//    HEADER, METHOD, QUERY_STRING, URI, or BODY.
   106  	//
   107  	//    * You tried to update a ByteMatchSet with a Field of HEADER but no value
   108  	//    for Data.
   109  	//
   110  	//    * Your request references an ARN that is malformed, or corresponds to
   111  	//    a resource with which a web ACL cannot be associated.
   112  	ErrCodeWAFInvalidParameterException = "WAFInvalidParameterException"
   113  
   114  	// ErrCodeWAFInvalidPermissionPolicyException for service response error code
   115  	// "WAFInvalidPermissionPolicyException".
   116  	//
   117  	// The operation failed because the specified policy is not in the proper format.
   118  	//
   119  	// The policy is subject to the following restrictions:
   120  	//
   121  	//    * You can attach only one policy with each PutPermissionPolicy request.
   122  	//
   123  	//    * The policy must include an Effect, Action and Principal.
   124  	//
   125  	//    * Effect must specify Allow.
   126  	//
   127  	//    * The Action in the policy must be waf:UpdateWebACL, waf-regional:UpdateWebACL,
   128  	//    waf:GetRuleGroup and waf-regional:GetRuleGroup . Any extra or wildcard
   129  	//    actions in the policy will be rejected.
   130  	//
   131  	//    * The policy cannot include a Resource parameter.
   132  	//
   133  	//    * The ARN in the request must be a valid WAF RuleGroup ARN and the RuleGroup
   134  	//    must exist in the same region.
   135  	//
   136  	//    * The user making the request must be the owner of the RuleGroup.
   137  	//
   138  	//    * Your policy must be composed using IAM Policy version 2012-10-17.
   139  	ErrCodeWAFInvalidPermissionPolicyException = "WAFInvalidPermissionPolicyException"
   140  
   141  	// ErrCodeWAFInvalidRegexPatternException for service response error code
   142  	// "WAFInvalidRegexPatternException".
   143  	//
   144  	// The regular expression (regex) you specified in RegexPatternString is invalid.
   145  	ErrCodeWAFInvalidRegexPatternException = "WAFInvalidRegexPatternException"
   146  
   147  	// ErrCodeWAFLimitsExceededException for service response error code
   148  	// "WAFLimitsExceededException".
   149  	//
   150  	// The operation exceeds a resource limit, for example, the maximum number of
   151  	// WebACL objects that you can create for an AWS account. For more information,
   152  	// see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
   153  	// in the AWS WAF Developer Guide.
   154  	ErrCodeWAFLimitsExceededException = "WAFLimitsExceededException"
   155  
   156  	// ErrCodeWAFNonEmptyEntityException for service response error code
   157  	// "WAFNonEmptyEntityException".
   158  	//
   159  	// The operation failed because you tried to delete an object that isn't empty.
   160  	// For example:
   161  	//
   162  	//    * You tried to delete a WebACL that still contains one or more Rule objects.
   163  	//
   164  	//    * You tried to delete a Rule that still contains one or more ByteMatchSet
   165  	//    objects or other predicates.
   166  	//
   167  	//    * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple
   168  	//    objects.
   169  	//
   170  	//    * You tried to delete an IPSet that references one or more IP addresses.
   171  	ErrCodeWAFNonEmptyEntityException = "WAFNonEmptyEntityException"
   172  
   173  	// ErrCodeWAFNonexistentContainerException for service response error code
   174  	// "WAFNonexistentContainerException".
   175  	//
   176  	// The operation failed because you tried to add an object to or delete an object
   177  	// from another object that doesn't exist. For example:
   178  	//
   179  	//    * You tried to add a Rule to or delete a Rule from a WebACL that doesn't
   180  	//    exist.
   181  	//
   182  	//    * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule
   183  	//    that doesn't exist.
   184  	//
   185  	//    * You tried to add an IP address to or delete an IP address from an IPSet
   186  	//    that doesn't exist.
   187  	//
   188  	//    * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from
   189  	//    a ByteMatchSet that doesn't exist.
   190  	ErrCodeWAFNonexistentContainerException = "WAFNonexistentContainerException"
   191  
   192  	// ErrCodeWAFNonexistentItemException for service response error code
   193  	// "WAFNonexistentItemException".
   194  	//
   195  	// The operation failed because the referenced object doesn't exist.
   196  	ErrCodeWAFNonexistentItemException = "WAFNonexistentItemException"
   197  
   198  	// ErrCodeWAFReferencedItemException for service response error code
   199  	// "WAFReferencedItemException".
   200  	//
   201  	// The operation failed because you tried to delete an object that is still
   202  	// in use. For example:
   203  	//
   204  	//    * You tried to delete a ByteMatchSet that is still referenced by a Rule.
   205  	//
   206  	//    * You tried to delete a Rule that is still referenced by a WebACL.
   207  	ErrCodeWAFReferencedItemException = "WAFReferencedItemException"
   208  
   209  	// ErrCodeWAFServiceLinkedRoleErrorException for service response error code
   210  	// "WAFServiceLinkedRoleErrorException".
   211  	//
   212  	// AWS WAF is not able to access the service linked role. This can be caused
   213  	// by a previous PutLoggingConfiguration request, which can lock the service
   214  	// linked role for about 20 seconds. Please try your request again. The service
   215  	// linked role can also be locked by a previous DeleteServiceLinkedRole request,
   216  	// which can lock the role for 15 minutes or more. If you recently made a DeleteServiceLinkedRole,
   217  	// wait at least 15 minutes and try the request again. If you receive this same
   218  	// exception again, you will have to wait additional time until the role is
   219  	// unlocked.
   220  	ErrCodeWAFServiceLinkedRoleErrorException = "WAFServiceLinkedRoleErrorException"
   221  
   222  	// ErrCodeWAFStaleDataException for service response error code
   223  	// "WAFStaleDataException".
   224  	//
   225  	// The operation failed because you tried to create, update, or delete an object
   226  	// by using a change token that has already been used.
   227  	ErrCodeWAFStaleDataException = "WAFStaleDataException"
   228  
   229  	// ErrCodeWAFSubscriptionNotFoundException for service response error code
   230  	// "WAFSubscriptionNotFoundException".
   231  	//
   232  	// The specified subscription does not exist.
   233  	ErrCodeWAFSubscriptionNotFoundException = "WAFSubscriptionNotFoundException"
   234  
   235  	// ErrCodeWAFTagOperationException for service response error code
   236  	// "WAFTagOperationException".
   237  	ErrCodeWAFTagOperationException = "WAFTagOperationException"
   238  
   239  	// ErrCodeWAFTagOperationInternalErrorException for service response error code
   240  	// "WAFTagOperationInternalErrorException".
   241  	ErrCodeWAFTagOperationInternalErrorException = "WAFTagOperationInternalErrorException"
   242  
   243  	// ErrCodeWAFUnavailableEntityException for service response error code
   244  	// "WAFUnavailableEntityException".
   245  	//
   246  	// The operation failed because the entity referenced is temporarily unavailable.
   247  	// Retry your request.
   248  	ErrCodeWAFUnavailableEntityException = "WAFUnavailableEntityException"
   249  )
   250  
   251  var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
   252  	"WAFBadRequestException":                newErrorWAFBadRequestException,
   253  	"WAFDisallowedNameException":            newErrorWAFDisallowedNameException,
   254  	"WAFEntityMigrationException":           newErrorWAFEntityMigrationException,
   255  	"WAFInternalErrorException":             newErrorWAFInternalErrorException,
   256  	"WAFInvalidAccountException":            newErrorWAFInvalidAccountException,
   257  	"WAFInvalidOperationException":          newErrorWAFInvalidOperationException,
   258  	"WAFInvalidParameterException":          newErrorWAFInvalidParameterException,
   259  	"WAFInvalidPermissionPolicyException":   newErrorWAFInvalidPermissionPolicyException,
   260  	"WAFInvalidRegexPatternException":       newErrorWAFInvalidRegexPatternException,
   261  	"WAFLimitsExceededException":            newErrorWAFLimitsExceededException,
   262  	"WAFNonEmptyEntityException":            newErrorWAFNonEmptyEntityException,
   263  	"WAFNonexistentContainerException":      newErrorWAFNonexistentContainerException,
   264  	"WAFNonexistentItemException":           newErrorWAFNonexistentItemException,
   265  	"WAFReferencedItemException":            newErrorWAFReferencedItemException,
   266  	"WAFServiceLinkedRoleErrorException":    newErrorWAFServiceLinkedRoleErrorException,
   267  	"WAFStaleDataException":                 newErrorWAFStaleDataException,
   268  	"WAFSubscriptionNotFoundException":      newErrorWAFSubscriptionNotFoundException,
   269  	"WAFTagOperationException":              newErrorWAFTagOperationException,
   270  	"WAFTagOperationInternalErrorException": newErrorWAFTagOperationInternalErrorException,
   271  	"WAFUnavailableEntityException":         newErrorWAFUnavailableEntityException,
   272  }