errors.go 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package wafv2
  3. import (
  4. "github.com/aws/aws-sdk-go/private/protocol"
  5. )
  6. const (
  7. // ErrCodeWAFAssociatedItemException for service response error code
  8. // "WAFAssociatedItemException".
  9. //
  10. // WAF couldn’t perform the operation because your resource is being used
  11. // by another resource or it’s associated with another resource.
  12. ErrCodeWAFAssociatedItemException = "WAFAssociatedItemException"
  13. // ErrCodeWAFConfigurationWarningException for service response error code
  14. // "WAFConfigurationWarningException".
  15. //
  16. // The operation failed because you are inspecting the web request body, headers,
  17. // or cookies without specifying how to handle oversize components. Rules that
  18. // inspect the body must either provide an OversizeHandling configuration or
  19. // they must be preceded by a SizeConstraintStatement that blocks the body content
  20. // from being too large. Rules that inspect the headers or cookies must provide
  21. // an OversizeHandling configuration.
  22. //
  23. // Provide the handling configuration and retry your operation.
  24. //
  25. // Alternately, you can suppress this warning by adding the following tag to
  26. // the resource that you provide to this operation: Tag (key:WAF:OversizeFieldsHandlingConstraintOptOut,
  27. // value:true).
  28. ErrCodeWAFConfigurationWarningException = "WAFConfigurationWarningException"
  29. // ErrCodeWAFDuplicateItemException for service response error code
  30. // "WAFDuplicateItemException".
  31. //
  32. // WAF couldn’t perform the operation because the resource that you tried
  33. // to save is a duplicate of an existing one.
  34. ErrCodeWAFDuplicateItemException = "WAFDuplicateItemException"
  35. // ErrCodeWAFExpiredManagedRuleGroupVersionException for service response error code
  36. // "WAFExpiredManagedRuleGroupVersionException".
  37. //
  38. // The operation failed because the specified version for the managed rule group
  39. // has expired. You can retrieve the available versions for the managed rule
  40. // group by calling ListAvailableManagedRuleGroupVersions.
  41. ErrCodeWAFExpiredManagedRuleGroupVersionException = "WAFExpiredManagedRuleGroupVersionException"
  42. // ErrCodeWAFInternalErrorException for service response error code
  43. // "WAFInternalErrorException".
  44. //
  45. // Your request is valid, but WAF couldn’t perform the operation because of
  46. // a system problem. Retry your request.
  47. ErrCodeWAFInternalErrorException = "WAFInternalErrorException"
  48. // ErrCodeWAFInvalidOperationException for service response error code
  49. // "WAFInvalidOperationException".
  50. //
  51. // The operation isn't valid.
  52. ErrCodeWAFInvalidOperationException = "WAFInvalidOperationException"
  53. // ErrCodeWAFInvalidParameterException for service response error code
  54. // "WAFInvalidParameterException".
  55. //
  56. // The operation failed because WAF didn't recognize a parameter in the request.
  57. // For example:
  58. //
  59. // * You specified a parameter name or value that isn't valid.
  60. //
  61. // * Your nested statement isn't valid. You might have tried to nest a statement
  62. // that can’t be nested.
  63. //
  64. // * You tried to update a WebACL with a DefaultAction that isn't among the
  65. // types available at DefaultAction.
  66. //
  67. // * Your request references an ARN that is malformed, or corresponds to
  68. // a resource with which a web ACL can't be associated.
  69. ErrCodeWAFInvalidParameterException = "WAFInvalidParameterException"
  70. // ErrCodeWAFInvalidPermissionPolicyException for service response error code
  71. // "WAFInvalidPermissionPolicyException".
  72. //
  73. // The operation failed because the specified policy isn't in the proper format.
  74. //
  75. // The policy specifications must conform to the following:
  76. //
  77. // * The policy must be composed using IAM Policy version 2012-10-17 or version
  78. // 2015-01-01.
  79. //
  80. // * The policy must include specifications for Effect, Action, and Principal.
  81. //
  82. // * Effect must specify Allow.
  83. //
  84. // * Action must specify wafv2:CreateWebACL, wafv2:UpdateWebACL, and wafv2:PutFirewallManagerRuleGroups
  85. // and may optionally specify wafv2:GetRuleGroup. WAF rejects any extra actions
  86. // or wildcard actions in the policy.
  87. //
  88. // * The policy must not include a Resource parameter.
  89. //
  90. // For more information, see IAM Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html).
  91. ErrCodeWAFInvalidPermissionPolicyException = "WAFInvalidPermissionPolicyException"
  92. // ErrCodeWAFInvalidResourceException for service response error code
  93. // "WAFInvalidResourceException".
  94. //
  95. // WAF couldn’t perform the operation because the resource that you requested
  96. // isn’t valid. Check the resource, and try again.
  97. ErrCodeWAFInvalidResourceException = "WAFInvalidResourceException"
  98. // ErrCodeWAFLimitsExceededException for service response error code
  99. // "WAFLimitsExceededException".
  100. //
  101. // WAF couldn’t perform the operation because you exceeded your resource limit.
  102. // For example, the maximum number of WebACL objects that you can create for
  103. // an Amazon Web Services account. For more information, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  104. // in the WAF Developer Guide.
  105. ErrCodeWAFLimitsExceededException = "WAFLimitsExceededException"
  106. // ErrCodeWAFLogDestinationPermissionIssueException for service response error code
  107. // "WAFLogDestinationPermissionIssueException".
  108. //
  109. // The operation failed because you don't have the permissions that your logging
  110. // configuration requires. For information, see Logging web ACL traffic information
  111. // (https://docs.aws.amazon.com/waf/latest/developerguide/logging.html) in the
  112. // WAF Developer Guide.
  113. ErrCodeWAFLogDestinationPermissionIssueException = "WAFLogDestinationPermissionIssueException"
  114. // ErrCodeWAFNonexistentItemException for service response error code
  115. // "WAFNonexistentItemException".
  116. //
  117. // WAF couldn’t perform the operation because your resource doesn't exist.
  118. // If you've just created a resource that you're using in this operation, you
  119. // might just need to wait a few minutes. It can take from a few seconds to
  120. // a number of minutes for changes to propagate.
  121. ErrCodeWAFNonexistentItemException = "WAFNonexistentItemException"
  122. // ErrCodeWAFOptimisticLockException for service response error code
  123. // "WAFOptimisticLockException".
  124. //
  125. // WAF couldn’t save your changes because you tried to update or delete a
  126. // resource that has changed since you last retrieved it. Get the resource again,
  127. // make any changes you need to make to the new copy, and retry your operation.
  128. ErrCodeWAFOptimisticLockException = "WAFOptimisticLockException"
  129. // ErrCodeWAFServiceLinkedRoleErrorException for service response error code
  130. // "WAFServiceLinkedRoleErrorException".
  131. //
  132. // WAF is not able to access the service linked role. This can be caused by
  133. // a previous PutLoggingConfiguration request, which can lock the service linked
  134. // role for about 20 seconds. Please try your request again. The service linked
  135. // role can also be locked by a previous DeleteServiceLinkedRole request, which
  136. // can lock the role for 15 minutes or more. If you recently made a call to
  137. // DeleteServiceLinkedRole, wait at least 15 minutes and try the request again.
  138. // If you receive this same exception again, you will have to wait additional
  139. // time until the role is unlocked.
  140. ErrCodeWAFServiceLinkedRoleErrorException = "WAFServiceLinkedRoleErrorException"
  141. // ErrCodeWAFSubscriptionNotFoundException for service response error code
  142. // "WAFSubscriptionNotFoundException".
  143. //
  144. // You tried to use a managed rule group that's available by subscription, but
  145. // you aren't subscribed to it yet.
  146. ErrCodeWAFSubscriptionNotFoundException = "WAFSubscriptionNotFoundException"
  147. // ErrCodeWAFTagOperationException for service response error code
  148. // "WAFTagOperationException".
  149. //
  150. // An error occurred during the tagging operation. Retry your request.
  151. ErrCodeWAFTagOperationException = "WAFTagOperationException"
  152. // ErrCodeWAFTagOperationInternalErrorException for service response error code
  153. // "WAFTagOperationInternalErrorException".
  154. //
  155. // WAF couldn’t perform your tagging operation because of an internal error.
  156. // Retry your request.
  157. ErrCodeWAFTagOperationInternalErrorException = "WAFTagOperationInternalErrorException"
  158. // ErrCodeWAFUnavailableEntityException for service response error code
  159. // "WAFUnavailableEntityException".
  160. //
  161. // WAF couldn’t retrieve a resource that you specified for this operation.
  162. // If you've just created a resource that you're using in this operation, you
  163. // might just need to wait a few minutes. It can take from a few seconds to
  164. // a number of minutes for changes to propagate. Verify the resources that you
  165. // are specifying in your request parameters and then retry the operation.
  166. ErrCodeWAFUnavailableEntityException = "WAFUnavailableEntityException"
  167. )
  168. var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
  169. "WAFAssociatedItemException": newErrorWAFAssociatedItemException,
  170. "WAFConfigurationWarningException": newErrorWAFConfigurationWarningException,
  171. "WAFDuplicateItemException": newErrorWAFDuplicateItemException,
  172. "WAFExpiredManagedRuleGroupVersionException": newErrorWAFExpiredManagedRuleGroupVersionException,
  173. "WAFInternalErrorException": newErrorWAFInternalErrorException,
  174. "WAFInvalidOperationException": newErrorWAFInvalidOperationException,
  175. "WAFInvalidParameterException": newErrorWAFInvalidParameterException,
  176. "WAFInvalidPermissionPolicyException": newErrorWAFInvalidPermissionPolicyException,
  177. "WAFInvalidResourceException": newErrorWAFInvalidResourceException,
  178. "WAFLimitsExceededException": newErrorWAFLimitsExceededException,
  179. "WAFLogDestinationPermissionIssueException": newErrorWAFLogDestinationPermissionIssueException,
  180. "WAFNonexistentItemException": newErrorWAFNonexistentItemException,
  181. "WAFOptimisticLockException": newErrorWAFOptimisticLockException,
  182. "WAFServiceLinkedRoleErrorException": newErrorWAFServiceLinkedRoleErrorException,
  183. "WAFSubscriptionNotFoundException": newErrorWAFSubscriptionNotFoundException,
  184. "WAFTagOperationException": newErrorWAFTagOperationException,
  185. "WAFTagOperationInternalErrorException": newErrorWAFTagOperationInternalErrorException,
  186. "WAFUnavailableEntityException": newErrorWAFUnavailableEntityException,
  187. }