-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
errors.go
138 lines (117 loc) · 6.05 KB
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package servicequotas
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeAWSServiceAccessNotEnabledException for service response error code
// "AWSServiceAccessNotEnabledException".
//
// The action you attempted is not allowed unless Service Access with Service
// Quotas is enabled in your organization.
ErrCodeAWSServiceAccessNotEnabledException = "AWSServiceAccessNotEnabledException"
// ErrCodeAccessDeniedException for service response error code
// "AccessDeniedException".
//
// You do not have sufficient permission to perform this action.
ErrCodeAccessDeniedException = "AccessDeniedException"
// ErrCodeDependencyAccessDeniedException for service response error code
// "DependencyAccessDeniedException".
//
// You can't perform this action because a dependency does not have access.
ErrCodeDependencyAccessDeniedException = "DependencyAccessDeniedException"
// ErrCodeIllegalArgumentException for service response error code
// "IllegalArgumentException".
//
// Invalid input was provided.
ErrCodeIllegalArgumentException = "IllegalArgumentException"
// ErrCodeInvalidPaginationTokenException for service response error code
// "InvalidPaginationTokenException".
//
// Invalid input was provided.
ErrCodeInvalidPaginationTokenException = "InvalidPaginationTokenException"
// ErrCodeInvalidResourceStateException for service response error code
// "InvalidResourceStateException".
//
// The resource is in an invalid state.
ErrCodeInvalidResourceStateException = "InvalidResourceStateException"
// ErrCodeNoAvailableOrganizationException for service response error code
// "NoAvailableOrganizationException".
//
// The account making this call is not a member of an organization.
ErrCodeNoAvailableOrganizationException = "NoAvailableOrganizationException"
// ErrCodeNoSuchResourceException for service response error code
// "NoSuchResourceException".
//
// The specified resource does not exist.
ErrCodeNoSuchResourceException = "NoSuchResourceException"
// ErrCodeOrganizationNotInAllFeaturesModeException for service response error code
// "OrganizationNotInAllFeaturesModeException".
//
// The organization that your account belongs to is not in All Features mode.
ErrCodeOrganizationNotInAllFeaturesModeException = "OrganizationNotInAllFeaturesModeException"
// ErrCodeQuotaExceededException for service response error code
// "QuotaExceededException".
//
// You have exceeded your service quota. To perform the requested action, remove
// some of the relevant resources, or use Service Quotas to request a service
// quota increase.
ErrCodeQuotaExceededException = "QuotaExceededException"
// ErrCodeResourceAlreadyExistsException for service response error code
// "ResourceAlreadyExistsException".
//
// The specified resource already exists.
ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExistsException"
// ErrCodeServiceException for service response error code
// "ServiceException".
//
// Something went wrong.
ErrCodeServiceException = "ServiceException"
// ErrCodeServiceQuotaTemplateNotInUseException for service response error code
// "ServiceQuotaTemplateNotInUseException".
//
// The quota request template is not associated with your organization.
ErrCodeServiceQuotaTemplateNotInUseException = "ServiceQuotaTemplateNotInUseException"
// ErrCodeTagPolicyViolationException for service response error code
// "TagPolicyViolationException".
//
// The specified tag is a reserved word and cannot be used.
ErrCodeTagPolicyViolationException = "TagPolicyViolationException"
// ErrCodeTemplatesNotAvailableInRegionException for service response error code
// "TemplatesNotAvailableInRegionException".
//
// The Service Quotas template is not available in this AWS Region.
ErrCodeTemplatesNotAvailableInRegionException = "TemplatesNotAvailableInRegionException"
// ErrCodeTooManyRequestsException for service response error code
// "TooManyRequestsException".
//
// Due to throttling, the request was denied. Slow down the rate of request
// calls, or request an increase for this quota.
ErrCodeTooManyRequestsException = "TooManyRequestsException"
// ErrCodeTooManyTagsException for service response error code
// "TooManyTagsException".
//
// You've exceeded the number of tags allowed for a resource. For more information,
// see Tag restrictions (https://docs.aws.amazon.com/servicequotas/latest/userguide/sq-tagging.html#sq-tagging-restrictions)
// in the Service Quotas User Guide.
ErrCodeTooManyTagsException = "TooManyTagsException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"AWSServiceAccessNotEnabledException": newErrorAWSServiceAccessNotEnabledException,
"AccessDeniedException": newErrorAccessDeniedException,
"DependencyAccessDeniedException": newErrorDependencyAccessDeniedException,
"IllegalArgumentException": newErrorIllegalArgumentException,
"InvalidPaginationTokenException": newErrorInvalidPaginationTokenException,
"InvalidResourceStateException": newErrorInvalidResourceStateException,
"NoAvailableOrganizationException": newErrorNoAvailableOrganizationException,
"NoSuchResourceException": newErrorNoSuchResourceException,
"OrganizationNotInAllFeaturesModeException": newErrorOrganizationNotInAllFeaturesModeException,
"QuotaExceededException": newErrorQuotaExceededException,
"ResourceAlreadyExistsException": newErrorResourceAlreadyExistsException,
"ServiceException": newErrorServiceException,
"ServiceQuotaTemplateNotInUseException": newErrorServiceQuotaTemplateNotInUseException,
"TagPolicyViolationException": newErrorTagPolicyViolationException,
"TemplatesNotAvailableInRegionException": newErrorTemplatesNotAvailableInRegionException,
"TooManyRequestsException": newErrorTooManyRequestsException,
"TooManyTagsException": newErrorTooManyTagsException,
}