/
errors.go
280 lines (238 loc) · 7.38 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
// Code generated by smithy-go-codegen DO NOT EDIT.
package types
import (
"fmt"
smithy "github.com/aws/smithy-go"
)
// The request failed because an active instance refresh or rollback for the
// specified Auto Scaling group was not found.
type ActiveInstanceRefreshNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ActiveInstanceRefreshNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ActiveInstanceRefreshNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ActiveInstanceRefreshNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ActiveInstanceRefreshNotFound"
}
return *e.ErrorCodeOverride
}
func (e *ActiveInstanceRefreshNotFoundFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// You already have an Auto Scaling group or launch configuration with this name.
type AlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *AlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *AlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *AlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "AlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *AlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The request failed because an active instance refresh already exists for the
// specified Auto Scaling group.
type InstanceRefreshInProgressFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InstanceRefreshInProgressFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InstanceRefreshInProgressFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InstanceRefreshInProgressFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InstanceRefreshInProgress"
}
return *e.ErrorCodeOverride
}
func (e *InstanceRefreshInProgressFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The NextToken value is not valid.
type InvalidNextToken struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidNextToken) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidNextToken) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidNextToken) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidNextToken"
}
return *e.ErrorCodeOverride
}
func (e *InvalidNextToken) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The request failed because a desired configuration was not found or an
// incompatible launch template (uses a Systems Manager parameter instead of an AMI
// ID) or launch template version ( $Latest or $Default ) is present on the Auto
// Scaling group.
type IrreversibleInstanceRefreshFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *IrreversibleInstanceRefreshFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *IrreversibleInstanceRefreshFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *IrreversibleInstanceRefreshFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "IrreversibleInstanceRefresh"
}
return *e.ErrorCodeOverride
}
func (e *IrreversibleInstanceRefreshFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// You have already reached a limit for your Amazon EC2 Auto Scaling resources
// (for example, Auto Scaling groups, launch configurations, or lifecycle hooks).
// For more information, see DescribeAccountLimits (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_DescribeAccountLimits.html)
// in the Amazon EC2 Auto Scaling API Reference.
type LimitExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *LimitExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *LimitExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *LimitExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "LimitExceeded"
}
return *e.ErrorCodeOverride
}
func (e *LimitExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// You already have a pending update to an Amazon EC2 Auto Scaling resource (for
// example, an Auto Scaling group, instance, or load balancer).
type ResourceContentionFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ResourceContentionFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ResourceContentionFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ResourceContentionFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ResourceContention"
}
return *e.ErrorCodeOverride
}
func (e *ResourceContentionFault) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
// The operation can't be performed because the resource is in use.
type ResourceInUseFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ResourceInUseFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ResourceInUseFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ResourceInUseFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ResourceInUse"
}
return *e.ErrorCodeOverride
}
func (e *ResourceInUseFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The operation can't be performed because there are scaling activities in
// progress.
type ScalingActivityInProgressFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ScalingActivityInProgressFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ScalingActivityInProgressFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ScalingActivityInProgressFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ScalingActivityInProgress"
}
return *e.ErrorCodeOverride
}
func (e *ScalingActivityInProgressFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The service-linked role is not yet ready for use.
type ServiceLinkedRoleFailure struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ServiceLinkedRoleFailure) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ServiceLinkedRoleFailure) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ServiceLinkedRoleFailure) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ServiceLinkedRoleFailure"
}
return *e.ErrorCodeOverride
}
func (e *ServiceLinkedRoleFailure) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }