-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
errors.go
254 lines (217 loc) · 10.3 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package iot
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeCertificateConflictException for service response error code
// "CertificateConflictException".
//
// Unable to verify the CA certificate used to sign the device certificate you
// are attempting to register. This is happens when you have registered more
// than one CA certificate that has the same subject field and public key.
ErrCodeCertificateConflictException = "CertificateConflictException"
// ErrCodeCertificateStateException for service response error code
// "CertificateStateException".
//
// The certificate operation is not allowed.
ErrCodeCertificateStateException = "CertificateStateException"
// ErrCodeCertificateValidationException for service response error code
// "CertificateValidationException".
//
// The certificate is invalid.
ErrCodeCertificateValidationException = "CertificateValidationException"
// ErrCodeConflictException for service response error code
// "ConflictException".
//
// A resource with the same name already exists.
ErrCodeConflictException = "ConflictException"
// ErrCodeConflictingResourceUpdateException for service response error code
// "ConflictingResourceUpdateException".
//
// A conflicting resource update exception. This exception is thrown when two
// pending updates cause a conflict.
ErrCodeConflictingResourceUpdateException = "ConflictingResourceUpdateException"
// ErrCodeDeleteConflictException for service response error code
// "DeleteConflictException".
//
// You can't delete the resource because it is attached to one or more resources.
ErrCodeDeleteConflictException = "DeleteConflictException"
// ErrCodeIndexNotReadyException for service response error code
// "IndexNotReadyException".
//
// The index is not ready.
ErrCodeIndexNotReadyException = "IndexNotReadyException"
// ErrCodeInternalException for service response error code
// "InternalException".
//
// An unexpected error has occurred.
ErrCodeInternalException = "InternalException"
// ErrCodeInternalFailureException for service response error code
// "InternalFailureException".
//
// An unexpected error has occurred.
ErrCodeInternalFailureException = "InternalFailureException"
// ErrCodeInternalServerException for service response error code
// "InternalServerException".
//
// Internal error from the service that indicates an unexpected error or that
// the service is unavailable.
ErrCodeInternalServerException = "InternalServerException"
// ErrCodeInvalidAggregationException for service response error code
// "InvalidAggregationException".
//
// The aggregation is invalid.
ErrCodeInvalidAggregationException = "InvalidAggregationException"
// ErrCodeInvalidQueryException for service response error code
// "InvalidQueryException".
//
// The query is invalid.
ErrCodeInvalidQueryException = "InvalidQueryException"
// ErrCodeInvalidRequestException for service response error code
// "InvalidRequestException".
//
// The request is not valid.
ErrCodeInvalidRequestException = "InvalidRequestException"
// ErrCodeInvalidResponseException for service response error code
// "InvalidResponseException".
//
// The response is invalid.
ErrCodeInvalidResponseException = "InvalidResponseException"
// ErrCodeInvalidStateTransitionException for service response error code
// "InvalidStateTransitionException".
//
// An attempt was made to change to an invalid state, for example by deleting
// a job or a job execution which is "IN_PROGRESS" without setting the force
// parameter.
ErrCodeInvalidStateTransitionException = "InvalidStateTransitionException"
// ErrCodeLimitExceededException for service response error code
// "LimitExceededException".
//
// A limit has been exceeded.
ErrCodeLimitExceededException = "LimitExceededException"
// ErrCodeMalformedPolicyException for service response error code
// "MalformedPolicyException".
//
// The policy documentation is not valid.
ErrCodeMalformedPolicyException = "MalformedPolicyException"
// ErrCodeNotConfiguredException for service response error code
// "NotConfiguredException".
//
// The resource is not configured.
ErrCodeNotConfiguredException = "NotConfiguredException"
// ErrCodeRegistrationCodeValidationException for service response error code
// "RegistrationCodeValidationException".
//
// The registration code is invalid.
ErrCodeRegistrationCodeValidationException = "RegistrationCodeValidationException"
// ErrCodeResourceAlreadyExistsException for service response error code
// "ResourceAlreadyExistsException".
//
// The resource already exists.
ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExistsException"
// ErrCodeResourceNotFoundException for service response error code
// "ResourceNotFoundException".
//
// The specified resource does not exist.
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
// ErrCodeResourceRegistrationFailureException for service response error code
// "ResourceRegistrationFailureException".
//
// The resource registration failed.
ErrCodeResourceRegistrationFailureException = "ResourceRegistrationFailureException"
// ErrCodeServiceQuotaExceededException for service response error code
// "ServiceQuotaExceededException".
//
// A limit has been exceeded.
ErrCodeServiceQuotaExceededException = "ServiceQuotaExceededException"
// ErrCodeServiceUnavailableException for service response error code
// "ServiceUnavailableException".
//
// The service is temporarily unavailable.
ErrCodeServiceUnavailableException = "ServiceUnavailableException"
// ErrCodeSqlParseException for service response error code
// "SqlParseException".
//
// The Rule-SQL expression can't be parsed correctly.
ErrCodeSqlParseException = "SqlParseException"
// ErrCodeTaskAlreadyExistsException for service response error code
// "TaskAlreadyExistsException".
//
// This exception occurs if you attempt to start a task with the same task-id
// as an existing task but with a different clientRequestToken.
ErrCodeTaskAlreadyExistsException = "TaskAlreadyExistsException"
// ErrCodeThrottlingException for service response error code
// "ThrottlingException".
//
// The rate exceeds the limit.
ErrCodeThrottlingException = "ThrottlingException"
// ErrCodeTransferAlreadyCompletedException for service response error code
// "TransferAlreadyCompletedException".
//
// You can't revert the certificate transfer because the transfer is already
// complete.
ErrCodeTransferAlreadyCompletedException = "TransferAlreadyCompletedException"
// ErrCodeTransferConflictException for service response error code
// "TransferConflictException".
//
// You can't transfer the certificate because authorization policies are still
// attached.
ErrCodeTransferConflictException = "TransferConflictException"
// ErrCodeUnauthorizedException for service response error code
// "UnauthorizedException".
//
// You are not authorized to perform this operation.
ErrCodeUnauthorizedException = "UnauthorizedException"
// ErrCodeValidationException for service response error code
// "ValidationException".
//
// The request is not valid.
ErrCodeValidationException = "ValidationException"
// ErrCodeVersionConflictException for service response error code
// "VersionConflictException".
//
// An exception thrown when the version of an entity specified with the expectedVersion
// parameter does not match the latest version in the system.
ErrCodeVersionConflictException = "VersionConflictException"
// ErrCodeVersionsLimitExceededException for service response error code
// "VersionsLimitExceededException".
//
// The number of policy versions exceeds the limit.
ErrCodeVersionsLimitExceededException = "VersionsLimitExceededException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"CertificateConflictException": newErrorCertificateConflictException,
"CertificateStateException": newErrorCertificateStateException,
"CertificateValidationException": newErrorCertificateValidationException,
"ConflictException": newErrorConflictException,
"ConflictingResourceUpdateException": newErrorConflictingResourceUpdateException,
"DeleteConflictException": newErrorDeleteConflictException,
"IndexNotReadyException": newErrorIndexNotReadyException,
"InternalException": newErrorInternalException,
"InternalFailureException": newErrorInternalFailureException,
"InternalServerException": newErrorInternalServerException,
"InvalidAggregationException": newErrorInvalidAggregationException,
"InvalidQueryException": newErrorInvalidQueryException,
"InvalidRequestException": newErrorInvalidRequestException,
"InvalidResponseException": newErrorInvalidResponseException,
"InvalidStateTransitionException": newErrorInvalidStateTransitionException,
"LimitExceededException": newErrorLimitExceededException,
"MalformedPolicyException": newErrorMalformedPolicyException,
"NotConfiguredException": newErrorNotConfiguredException,
"RegistrationCodeValidationException": newErrorRegistrationCodeValidationException,
"ResourceAlreadyExistsException": newErrorResourceAlreadyExistsException,
"ResourceNotFoundException": newErrorResourceNotFoundException,
"ResourceRegistrationFailureException": newErrorResourceRegistrationFailureException,
"ServiceQuotaExceededException": newErrorServiceQuotaExceededException,
"ServiceUnavailableException": newErrorServiceUnavailableException,
"SqlParseException": newErrorSqlParseException,
"TaskAlreadyExistsException": newErrorTaskAlreadyExistsException,
"ThrottlingException": newErrorThrottlingException,
"TransferAlreadyCompletedException": newErrorTransferAlreadyCompletedException,
"TransferConflictException": newErrorTransferConflictException,
"UnauthorizedException": newErrorUnauthorizedException,
"ValidationException": newErrorValidationException,
"VersionConflictException": newErrorVersionConflictException,
"VersionsLimitExceededException": newErrorVersionsLimitExceededException,
}