/
errors.go
519 lines (445 loc) · 16.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
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
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
// Code generated by smithy-go-codegen DO NOT EDIT.
package types
import (
"fmt"
smithy "github.com/aws/smithy-go"
)
// You don't have authorization to perform the requested action.
type AccessDeniedException struct {
Message *string
noSmithyDocumentSerde
}
func (e *AccessDeniedException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *AccessDeniedException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *AccessDeniedException) ErrorCode() string { return "AccessDeniedException" }
func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// You can apply up to 10 custom attributes for each resource. You can view the
// attributes of a resource with ListAttributes. You can remove existing attributes
// on a resource with DeleteAttributes.
type AttributeLimitExceededException struct {
Message *string
noSmithyDocumentSerde
}
func (e *AttributeLimitExceededException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *AttributeLimitExceededException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *AttributeLimitExceededException) ErrorCode() string {
return "AttributeLimitExceededException"
}
func (e *AttributeLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Your Amazon Web Services account was blocked. For more information, contact
// Amazon Web Services Support (http://aws.amazon.com/contact-us/).
type BlockedException struct {
Message *string
noSmithyDocumentSerde
}
func (e *BlockedException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *BlockedException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *BlockedException) ErrorCode() string { return "BlockedException" }
func (e *BlockedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// These errors are usually caused by a client action. This client action might be
// using an action or resource on behalf of a user that doesn't have permissions to
// use the action or resource,. Or, it might be specifying an identifier that isn't
// valid.
type ClientException struct {
Message *string
noSmithyDocumentSerde
}
func (e *ClientException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ClientException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ClientException) ErrorCode() string { return "ClientException" }
func (e *ClientException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// You can't delete a cluster that has registered container instances. First,
// deregister the container instances before you can delete the cluster. For more
// information, see DeregisterContainerInstance.
type ClusterContainsContainerInstancesException struct {
Message *string
noSmithyDocumentSerde
}
func (e *ClusterContainsContainerInstancesException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ClusterContainsContainerInstancesException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ClusterContainsContainerInstancesException) ErrorCode() string {
return "ClusterContainsContainerInstancesException"
}
func (e *ClusterContainsContainerInstancesException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// You can't delete a cluster that contains services. First, update the service to
// reduce its desired task count to 0, and then delete the service. For more
// information, see UpdateService and DeleteService.
type ClusterContainsServicesException struct {
Message *string
noSmithyDocumentSerde
}
func (e *ClusterContainsServicesException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ClusterContainsServicesException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ClusterContainsServicesException) ErrorCode() string {
return "ClusterContainsServicesException"
}
func (e *ClusterContainsServicesException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// You can't delete a cluster that has active tasks.
type ClusterContainsTasksException struct {
Message *string
noSmithyDocumentSerde
}
func (e *ClusterContainsTasksException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ClusterContainsTasksException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ClusterContainsTasksException) ErrorCode() string { return "ClusterContainsTasksException" }
func (e *ClusterContainsTasksException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified cluster wasn't found. You can view your available clusters with
// ListClusters. Amazon ECS clusters are Region specific.
type ClusterNotFoundException struct {
Message *string
noSmithyDocumentSerde
}
func (e *ClusterNotFoundException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ClusterNotFoundException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ClusterNotFoundException) ErrorCode() string { return "ClusterNotFoundException" }
func (e *ClusterNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified parameter isn't valid. Review the available parameters for the API
// request.
type InvalidParameterException struct {
Message *string
noSmithyDocumentSerde
}
func (e *InvalidParameterException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidParameterException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidParameterException) ErrorCode() string { return "InvalidParameterException" }
func (e *InvalidParameterException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The limit for the resource was exceeded.
type LimitExceededException struct {
Message *string
noSmithyDocumentSerde
}
func (e *LimitExceededException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *LimitExceededException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *LimitExceededException) ErrorCode() string { return "LimitExceededException" }
func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Amazon ECS can't determine the current version of the Amazon ECS container agent
// on the container instance and doesn't have enough information to proceed with an
// update. This could be because the agent running on the container instance is a
// previous or custom version that doesn't use our version information.
type MissingVersionException struct {
Message *string
noSmithyDocumentSerde
}
func (e *MissingVersionException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *MissingVersionException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *MissingVersionException) ErrorCode() string { return "MissingVersionException" }
func (e *MissingVersionException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// There's no update available for this Amazon ECS container agent. This might be
// because the agent is already running the latest version or because it's so old
// that there's no update path to the current version.
type NoUpdateAvailableException struct {
Message *string
noSmithyDocumentSerde
}
func (e *NoUpdateAvailableException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *NoUpdateAvailableException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *NoUpdateAvailableException) ErrorCode() string { return "NoUpdateAvailableException" }
func (e *NoUpdateAvailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified platform version doesn't satisfy the required capabilities of the
// task definition.
type PlatformTaskDefinitionIncompatibilityException struct {
Message *string
noSmithyDocumentSerde
}
func (e *PlatformTaskDefinitionIncompatibilityException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *PlatformTaskDefinitionIncompatibilityException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *PlatformTaskDefinitionIncompatibilityException) ErrorCode() string {
return "PlatformTaskDefinitionIncompatibilityException"
}
func (e *PlatformTaskDefinitionIncompatibilityException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The specified platform version doesn't exist.
type PlatformUnknownException struct {
Message *string
noSmithyDocumentSerde
}
func (e *PlatformUnknownException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *PlatformUnknownException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *PlatformUnknownException) ErrorCode() string { return "PlatformUnknownException" }
func (e *PlatformUnknownException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified resource is in-use and can't be removed.
type ResourceInUseException struct {
Message *string
noSmithyDocumentSerde
}
func (e *ResourceInUseException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ResourceInUseException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ResourceInUseException) ErrorCode() string { return "ResourceInUseException" }
func (e *ResourceInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified resource wasn't found.
type ResourceNotFoundException struct {
Message *string
noSmithyDocumentSerde
}
func (e *ResourceNotFoundException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ResourceNotFoundException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" }
func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// These errors are usually caused by a server issue.
type ServerException struct {
Message *string
noSmithyDocumentSerde
}
func (e *ServerException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ServerException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ServerException) ErrorCode() string { return "ServerException" }
func (e *ServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
// The specified service isn't active. You can't update a service that's inactive.
// If you have previously deleted a service, you can re-create it with
// CreateService.
type ServiceNotActiveException struct {
Message *string
noSmithyDocumentSerde
}
func (e *ServiceNotActiveException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ServiceNotActiveException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ServiceNotActiveException) ErrorCode() string { return "ServiceNotActiveException" }
func (e *ServiceNotActiveException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified service wasn't found. You can view your available services with
// ListServices. Amazon ECS services are cluster specific and Region specific.
type ServiceNotFoundException struct {
Message *string
noSmithyDocumentSerde
}
func (e *ServiceNotFoundException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ServiceNotFoundException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ServiceNotFoundException) ErrorCode() string { return "ServiceNotFoundException" }
func (e *ServiceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The execute command cannot run. This error can be caused by any of the following
// configuration issues:
//
// * Incorrect IAM permissions
//
// * The SSM agent is not
// installed or is not running
//
// * There is an interface Amazon VPC endpoint for
// Amazon ECS, but there is not one for for Systems Manager Session Manager
//
// For
// information about how to troubleshoot the issues, see Troubleshooting issues
// with ECS Exec
// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html) in
// the Amazon Elastic Container Service Developer Guide.
type TargetNotConnectedException struct {
Message *string
noSmithyDocumentSerde
}
func (e *TargetNotConnectedException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *TargetNotConnectedException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *TargetNotConnectedException) ErrorCode() string { return "TargetNotConnectedException" }
func (e *TargetNotConnectedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified target wasn't found. You can view your available container
// instances with ListContainerInstances. Amazon ECS container instances are
// cluster-specific and Region-specific.
type TargetNotFoundException struct {
Message *string
noSmithyDocumentSerde
}
func (e *TargetNotFoundException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *TargetNotFoundException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *TargetNotFoundException) ErrorCode() string { return "TargetNotFoundException" }
func (e *TargetNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified task set wasn't found. You can view your available task sets with
// DescribeTaskSets. Task sets are specific to each cluster, service and Region.
type TaskSetNotFoundException struct {
Message *string
noSmithyDocumentSerde
}
func (e *TaskSetNotFoundException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *TaskSetNotFoundException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *TaskSetNotFoundException) ErrorCode() string { return "TaskSetNotFoundException" }
func (e *TaskSetNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified task isn't supported in this Region.
type UnsupportedFeatureException struct {
Message *string
noSmithyDocumentSerde
}
func (e *UnsupportedFeatureException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *UnsupportedFeatureException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *UnsupportedFeatureException) ErrorCode() string { return "UnsupportedFeatureException" }
func (e *UnsupportedFeatureException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// There's already a current Amazon ECS container agent update in progress on the
// container instance that's specified. If the container agent becomes disconnected
// while it's in a transitional stage, such as PENDING or STAGING, the update
// process can get stuck in that state. However, when the agent reconnects, it
// resumes where it stopped previously.
type UpdateInProgressException struct {
Message *string
noSmithyDocumentSerde
}
func (e *UpdateInProgressException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *UpdateInProgressException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *UpdateInProgressException) ErrorCode() string { return "UpdateInProgressException" }
func (e *UpdateInProgressException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }