-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
errors.go
309 lines (267 loc) · 14.5 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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package lambda
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeCodeSigningConfigNotFoundException for service response error code
// "CodeSigningConfigNotFoundException".
//
// The specified code signing configuration does not exist.
ErrCodeCodeSigningConfigNotFoundException = "CodeSigningConfigNotFoundException"
// ErrCodeCodeStorageExceededException for service response error code
// "CodeStorageExceededException".
//
// Your Amazon Web Services account has exceeded its maximum total code size.
// For more information, see Lambda quotas (https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html).
ErrCodeCodeStorageExceededException = "CodeStorageExceededException"
// ErrCodeCodeVerificationFailedException for service response error code
// "CodeVerificationFailedException".
//
// The code signature failed one or more of the validation checks for signature
// mismatch or expiry, and the code signing policy is set to ENFORCE. Lambda
// blocks the deployment.
ErrCodeCodeVerificationFailedException = "CodeVerificationFailedException"
// ErrCodeEC2AccessDeniedException for service response error code
// "EC2AccessDeniedException".
//
// Need additional permissions to configure VPC settings.
ErrCodeEC2AccessDeniedException = "EC2AccessDeniedException"
// ErrCodeEC2ThrottledException for service response error code
// "EC2ThrottledException".
//
// Amazon EC2 throttled Lambda during Lambda function initialization using the
// execution role provided for the function.
ErrCodeEC2ThrottledException = "EC2ThrottledException"
// ErrCodeEC2UnexpectedException for service response error code
// "EC2UnexpectedException".
//
// Lambda received an unexpected Amazon EC2 client exception while setting up
// for the Lambda function.
ErrCodeEC2UnexpectedException = "EC2UnexpectedException"
// ErrCodeEFSIOException for service response error code
// "EFSIOException".
//
// An error occurred when reading from or writing to a connected file system.
ErrCodeEFSIOException = "EFSIOException"
// ErrCodeEFSMountConnectivityException for service response error code
// "EFSMountConnectivityException".
//
// The Lambda function couldn't make a network connection to the configured
// file system.
ErrCodeEFSMountConnectivityException = "EFSMountConnectivityException"
// ErrCodeEFSMountFailureException for service response error code
// "EFSMountFailureException".
//
// The Lambda function couldn't mount the configured file system due to a permission
// or configuration issue.
ErrCodeEFSMountFailureException = "EFSMountFailureException"
// ErrCodeEFSMountTimeoutException for service response error code
// "EFSMountTimeoutException".
//
// The Lambda function made a network connection to the configured file system,
// but the mount operation timed out.
ErrCodeEFSMountTimeoutException = "EFSMountTimeoutException"
// ErrCodeENILimitReachedException for service response error code
// "ENILimitReachedException".
//
// Lambda couldn't create an elastic network interface in the VPC, specified
// as part of Lambda function configuration, because the limit for network interfaces
// has been reached. For more information, see Lambda quotas (https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html).
ErrCodeENILimitReachedException = "ENILimitReachedException"
// ErrCodeInvalidCodeSignatureException for service response error code
// "InvalidCodeSignatureException".
//
// The code signature failed the integrity check. If the integrity check fails,
// then Lambda blocks deployment, even if the code signing policy is set to
// WARN.
ErrCodeInvalidCodeSignatureException = "InvalidCodeSignatureException"
// ErrCodeInvalidParameterValueException for service response error code
// "InvalidParameterValueException".
//
// One of the parameters in the request is not valid.
ErrCodeInvalidParameterValueException = "InvalidParameterValueException"
// ErrCodeInvalidRequestContentException for service response error code
// "InvalidRequestContentException".
//
// The request body could not be parsed as JSON.
ErrCodeInvalidRequestContentException = "InvalidRequestContentException"
// ErrCodeInvalidRuntimeException for service response error code
// "InvalidRuntimeException".
//
// The runtime or runtime version specified is not supported.
ErrCodeInvalidRuntimeException = "InvalidRuntimeException"
// ErrCodeInvalidSecurityGroupIDException for service response error code
// "InvalidSecurityGroupIDException".
//
// The security group ID provided in the Lambda function VPC configuration is
// not valid.
ErrCodeInvalidSecurityGroupIDException = "InvalidSecurityGroupIDException"
// ErrCodeInvalidSubnetIDException for service response error code
// "InvalidSubnetIDException".
//
// The subnet ID provided in the Lambda function VPC configuration is not valid.
ErrCodeInvalidSubnetIDException = "InvalidSubnetIDException"
// ErrCodeInvalidZipFileException for service response error code
// "InvalidZipFileException".
//
// Lambda could not unzip the deployment package.
ErrCodeInvalidZipFileException = "InvalidZipFileException"
// ErrCodeKMSAccessDeniedException for service response error code
// "KMSAccessDeniedException".
//
// Lambda couldn't decrypt the environment variables because KMS access was
// denied. Check the Lambda function's KMS permissions.
ErrCodeKMSAccessDeniedException = "KMSAccessDeniedException"
// ErrCodeKMSDisabledException for service response error code
// "KMSDisabledException".
//
// Lambda couldn't decrypt the environment variables because the KMS key used
// is disabled. Check the Lambda function's KMS key settings.
ErrCodeKMSDisabledException = "KMSDisabledException"
// ErrCodeKMSInvalidStateException for service response error code
// "KMSInvalidStateException".
//
// Lambda couldn't decrypt the environment variables because the state of the
// KMS key used is not valid for Decrypt. Check the function's KMS key settings.
ErrCodeKMSInvalidStateException = "KMSInvalidStateException"
// ErrCodeKMSNotFoundException for service response error code
// "KMSNotFoundException".
//
// Lambda couldn't decrypt the environment variables because the KMS key was
// not found. Check the function's KMS key settings.
ErrCodeKMSNotFoundException = "KMSNotFoundException"
// ErrCodePolicyLengthExceededException for service response error code
// "PolicyLengthExceededException".
//
// The permissions policy for the resource is too large. For more information,
// see Lambda quotas (https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html).
ErrCodePolicyLengthExceededException = "PolicyLengthExceededException"
// ErrCodePreconditionFailedException for service response error code
// "PreconditionFailedException".
//
// The RevisionId provided does not match the latest RevisionId for the Lambda
// function or alias. Call the GetFunction or the GetAlias API operation to
// retrieve the latest RevisionId for your resource.
ErrCodePreconditionFailedException = "PreconditionFailedException"
// ErrCodeProvisionedConcurrencyConfigNotFoundException for service response error code
// "ProvisionedConcurrencyConfigNotFoundException".
//
// The specified configuration does not exist.
ErrCodeProvisionedConcurrencyConfigNotFoundException = "ProvisionedConcurrencyConfigNotFoundException"
// ErrCodeRecursiveInvocationException for service response error code
// "RecursiveInvocationException".
//
// Lambda has detected your function being invoked in a recursive loop with
// other Amazon Web Services resources and stopped your function's invocation.
ErrCodeRecursiveInvocationException = "RecursiveInvocationException"
// ErrCodeRequestTooLargeException for service response error code
// "RequestTooLargeException".
//
// The request payload exceeded the Invoke request body JSON input quota. For
// more information, see Lambda quotas (https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html).
ErrCodeRequestTooLargeException = "RequestTooLargeException"
// ErrCodeResourceConflictException for service response error code
// "ResourceConflictException".
//
// The resource already exists, or another operation is in progress.
ErrCodeResourceConflictException = "ResourceConflictException"
// ErrCodeResourceInUseException for service response error code
// "ResourceInUseException".
//
// The operation conflicts with the resource's availability. For example, you
// tried to update an event source mapping in the CREATING state, or you tried
// to delete an event source mapping currently UPDATING.
ErrCodeResourceInUseException = "ResourceInUseException"
// ErrCodeResourceNotFoundException for service response error code
// "ResourceNotFoundException".
//
// The resource specified in the request does not exist.
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
// ErrCodeResourceNotReadyException for service response error code
// "ResourceNotReadyException".
//
// The function is inactive and its VPC connection is no longer available. Wait
// for the VPC connection to reestablish and try again.
ErrCodeResourceNotReadyException = "ResourceNotReadyException"
// ErrCodeServiceException for service response error code
// "ServiceException".
//
// The Lambda service encountered an internal error.
ErrCodeServiceException = "ServiceException"
// ErrCodeSnapStartException for service response error code
// "SnapStartException".
//
// The afterRestore() runtime hook (https://docs.aws.amazon.com/lambda/latest/dg/snapstart-runtime-hooks.html)
// encountered an error. For more information, check the Amazon CloudWatch logs.
ErrCodeSnapStartException = "SnapStartException"
// ErrCodeSnapStartNotReadyException for service response error code
// "SnapStartNotReadyException".
//
// Lambda is initializing your function. You can invoke the function when the
// function state (https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html)
// becomes Active.
ErrCodeSnapStartNotReadyException = "SnapStartNotReadyException"
// ErrCodeSnapStartTimeoutException for service response error code
// "SnapStartTimeoutException".
//
// Lambda couldn't restore the snapshot within the timeout limit.
ErrCodeSnapStartTimeoutException = "SnapStartTimeoutException"
// ErrCodeSubnetIPAddressLimitReachedException for service response error code
// "SubnetIPAddressLimitReachedException".
//
// Lambda couldn't set up VPC access for the Lambda function because one or
// more configured subnets has no available IP addresses.
ErrCodeSubnetIPAddressLimitReachedException = "SubnetIPAddressLimitReachedException"
// ErrCodeTooManyRequestsException for service response error code
// "TooManyRequestsException".
//
// The request throughput limit was exceeded. For more information, see Lambda
// quotas (https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests).
ErrCodeTooManyRequestsException = "TooManyRequestsException"
// ErrCodeUnsupportedMediaTypeException for service response error code
// "UnsupportedMediaTypeException".
//
// The content type of the Invoke request body is not JSON.
ErrCodeUnsupportedMediaTypeException = "UnsupportedMediaTypeException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"CodeSigningConfigNotFoundException": newErrorCodeSigningConfigNotFoundException,
"CodeStorageExceededException": newErrorCodeStorageExceededException,
"CodeVerificationFailedException": newErrorCodeVerificationFailedException,
"EC2AccessDeniedException": newErrorEC2AccessDeniedException,
"EC2ThrottledException": newErrorEC2ThrottledException,
"EC2UnexpectedException": newErrorEC2UnexpectedException,
"EFSIOException": newErrorEFSIOException,
"EFSMountConnectivityException": newErrorEFSMountConnectivityException,
"EFSMountFailureException": newErrorEFSMountFailureException,
"EFSMountTimeoutException": newErrorEFSMountTimeoutException,
"ENILimitReachedException": newErrorENILimitReachedException,
"InvalidCodeSignatureException": newErrorInvalidCodeSignatureException,
"InvalidParameterValueException": newErrorInvalidParameterValueException,
"InvalidRequestContentException": newErrorInvalidRequestContentException,
"InvalidRuntimeException": newErrorInvalidRuntimeException,
"InvalidSecurityGroupIDException": newErrorInvalidSecurityGroupIDException,
"InvalidSubnetIDException": newErrorInvalidSubnetIDException,
"InvalidZipFileException": newErrorInvalidZipFileException,
"KMSAccessDeniedException": newErrorKMSAccessDeniedException,
"KMSDisabledException": newErrorKMSDisabledException,
"KMSInvalidStateException": newErrorKMSInvalidStateException,
"KMSNotFoundException": newErrorKMSNotFoundException,
"PolicyLengthExceededException": newErrorPolicyLengthExceededException,
"PreconditionFailedException": newErrorPreconditionFailedException,
"ProvisionedConcurrencyConfigNotFoundException": newErrorProvisionedConcurrencyConfigNotFoundException,
"RecursiveInvocationException": newErrorRecursiveInvocationException,
"RequestTooLargeException": newErrorRequestTooLargeException,
"ResourceConflictException": newErrorResourceConflictException,
"ResourceInUseException": newErrorResourceInUseException,
"ResourceNotFoundException": newErrorResourceNotFoundException,
"ResourceNotReadyException": newErrorResourceNotReadyException,
"ServiceException": newErrorServiceException,
"SnapStartException": newErrorSnapStartException,
"SnapStartNotReadyException": newErrorSnapStartNotReadyException,
"SnapStartTimeoutException": newErrorSnapStartTimeoutException,
"SubnetIPAddressLimitReachedException": newErrorSubnetIPAddressLimitReachedException,
"TooManyRequestsException": newErrorTooManyRequestsException,
"UnsupportedMediaTypeException": newErrorUnsupportedMediaTypeException,
}