-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
errors.go
242 lines (210 loc) · 10.2 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
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package efs
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeAccessPointAlreadyExists for service response error code
// "AccessPointAlreadyExists".
//
// Returned if the access point you are trying to create already exists, with
// the creation token you provided in the request.
ErrCodeAccessPointAlreadyExists = "AccessPointAlreadyExists"
// ErrCodeAccessPointLimitExceeded for service response error code
// "AccessPointLimitExceeded".
//
// Returned if the Amazon Web Services account has already created the maximum
// number of access points allowed per file system.
ErrCodeAccessPointLimitExceeded = "AccessPointLimitExceeded"
// ErrCodeAccessPointNotFound for service response error code
// "AccessPointNotFound".
//
// Returned if the specified AccessPointId value doesn't exist in the requester's
// Amazon Web Services account.
ErrCodeAccessPointNotFound = "AccessPointNotFound"
// ErrCodeAvailabilityZonesMismatch for service response error code
// "AvailabilityZonesMismatch".
//
// Returned if the Availability Zone that was specified for a mount target is
// different from the Availability Zone that was specified for One Zone storage
// classes. For more information, see Regional and One Zone storage redundancy
// (https://docs.aws.amazon.com/efs/latest/ug/availability-durability.html).
ErrCodeAvailabilityZonesMismatch = "AvailabilityZonesMismatch"
// ErrCodeBadRequest for service response error code
// "BadRequest".
//
// Returned if the request is malformed or contains an error such as an invalid
// parameter value or a missing required parameter.
ErrCodeBadRequest = "BadRequest"
// ErrCodeDependencyTimeout for service response error code
// "DependencyTimeout".
//
// The service timed out trying to fulfill the request, and the client should
// try the call again.
ErrCodeDependencyTimeout = "DependencyTimeout"
// ErrCodeFileSystemAlreadyExists for service response error code
// "FileSystemAlreadyExists".
//
// Returned if the file system you are trying to create already exists, with
// the creation token you provided.
ErrCodeFileSystemAlreadyExists = "FileSystemAlreadyExists"
// ErrCodeFileSystemInUse for service response error code
// "FileSystemInUse".
//
// Returned if a file system has mount targets.
ErrCodeFileSystemInUse = "FileSystemInUse"
// ErrCodeFileSystemLimitExceeded for service response error code
// "FileSystemLimitExceeded".
//
// Returned if the Amazon Web Services account has already created the maximum
// number of file systems allowed per account.
ErrCodeFileSystemLimitExceeded = "FileSystemLimitExceeded"
// ErrCodeFileSystemNotFound for service response error code
// "FileSystemNotFound".
//
// Returned if the specified FileSystemId value doesn't exist in the requester's
// Amazon Web Services account.
ErrCodeFileSystemNotFound = "FileSystemNotFound"
// ErrCodeIncorrectFileSystemLifeCycleState for service response error code
// "IncorrectFileSystemLifeCycleState".
//
// Returned if the file system's lifecycle state is not "available".
ErrCodeIncorrectFileSystemLifeCycleState = "IncorrectFileSystemLifeCycleState"
// ErrCodeIncorrectMountTargetState for service response error code
// "IncorrectMountTargetState".
//
// Returned if the mount target is not in the correct state for the operation.
ErrCodeIncorrectMountTargetState = "IncorrectMountTargetState"
// ErrCodeInsufficientThroughputCapacity for service response error code
// "InsufficientThroughputCapacity".
//
// Returned if there's not enough capacity to provision additional throughput.
// This value might be returned when you try to create a file system in provisioned
// throughput mode, when you attempt to increase the provisioned throughput
// of an existing file system, or when you attempt to change an existing file
// system from bursting to provisioned throughput mode. Try again later.
ErrCodeInsufficientThroughputCapacity = "InsufficientThroughputCapacity"
// ErrCodeInternalServerError for service response error code
// "InternalServerError".
//
// Returned if an error occurred on the server side.
ErrCodeInternalServerError = "InternalServerError"
// ErrCodeInvalidPolicyException for service response error code
// "InvalidPolicyException".
//
// Returned if the FileSystemPolicy is is malformed or contains an error such
// as an invalid parameter value or a missing required parameter. Returned in
// the case of a policy lockout safety check error.
ErrCodeInvalidPolicyException = "InvalidPolicyException"
// ErrCodeIpAddressInUse for service response error code
// "IpAddressInUse".
//
// Returned if the request specified an IpAddress that is already in use in
// the subnet.
ErrCodeIpAddressInUse = "IpAddressInUse"
// ErrCodeMountTargetConflict for service response error code
// "MountTargetConflict".
//
// Returned if the mount target would violate one of the specified restrictions
// based on the file system's existing mount targets.
ErrCodeMountTargetConflict = "MountTargetConflict"
// ErrCodeMountTargetNotFound for service response error code
// "MountTargetNotFound".
//
// Returned if there is no mount target with the specified ID found in the caller's
// Amazon Web Services account.
ErrCodeMountTargetNotFound = "MountTargetNotFound"
// ErrCodeNetworkInterfaceLimitExceeded for service response error code
// "NetworkInterfaceLimitExceeded".
//
// The calling account has reached the limit for elastic network interfaces
// for the specific Amazon Web Services Region. The client should try to delete
// some elastic network interfaces or get the account limit raised. For more
// information, see Amazon VPC Limits (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html)
// in the Amazon VPC User Guide (see the Network interfaces per VPC entry in
// the table).
ErrCodeNetworkInterfaceLimitExceeded = "NetworkInterfaceLimitExceeded"
// ErrCodeNoFreeAddressesInSubnet for service response error code
// "NoFreeAddressesInSubnet".
//
// Returned if IpAddress was not specified in the request and there are no free
// IP addresses in the subnet.
ErrCodeNoFreeAddressesInSubnet = "NoFreeAddressesInSubnet"
// ErrCodePolicyNotFound for service response error code
// "PolicyNotFound".
//
// Returned if the default file system policy is in effect for the EFS file
// system specified.
ErrCodePolicyNotFound = "PolicyNotFound"
// ErrCodeSecurityGroupLimitExceeded for service response error code
// "SecurityGroupLimitExceeded".
//
// Returned if the size of SecurityGroups specified in the request is greater
// than five.
ErrCodeSecurityGroupLimitExceeded = "SecurityGroupLimitExceeded"
// ErrCodeSecurityGroupNotFound for service response error code
// "SecurityGroupNotFound".
//
// Returned if one of the specified security groups doesn't exist in the subnet's
// VPC.
ErrCodeSecurityGroupNotFound = "SecurityGroupNotFound"
// ErrCodeSubnetNotFound for service response error code
// "SubnetNotFound".
//
// Returned if there is no subnet with ID SubnetId provided in the request.
ErrCodeSubnetNotFound = "SubnetNotFound"
// ErrCodeThroughputLimitExceeded for service response error code
// "ThroughputLimitExceeded".
//
// Returned if the throughput mode or amount of provisioned throughput can't
// be changed because the throughput limit of 1024 MiB/s has been reached.
ErrCodeThroughputLimitExceeded = "ThroughputLimitExceeded"
// ErrCodeTooManyRequests for service response error code
// "TooManyRequests".
//
// Returned if you don’t wait at least 24 hours before changing the throughput
// mode, or decreasing the Provisioned Throughput value.
ErrCodeTooManyRequests = "TooManyRequests"
// ErrCodeUnsupportedAvailabilityZone for service response error code
// "UnsupportedAvailabilityZone".
//
// Returned if the requested Amazon EFS functionality is not available in the
// specified Availability Zone.
ErrCodeUnsupportedAvailabilityZone = "UnsupportedAvailabilityZone"
// ErrCodeValidationException for service response error code
// "ValidationException".
//
// Returned if the Backup service is not available in the Amazon Web Services
// Region in which the request was made.
ErrCodeValidationException = "ValidationException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"AccessPointAlreadyExists": newErrorAccessPointAlreadyExists,
"AccessPointLimitExceeded": newErrorAccessPointLimitExceeded,
"AccessPointNotFound": newErrorAccessPointNotFound,
"AvailabilityZonesMismatch": newErrorAvailabilityZonesMismatch,
"BadRequest": newErrorBadRequest,
"DependencyTimeout": newErrorDependencyTimeout,
"FileSystemAlreadyExists": newErrorFileSystemAlreadyExists,
"FileSystemInUse": newErrorFileSystemInUse,
"FileSystemLimitExceeded": newErrorFileSystemLimitExceeded,
"FileSystemNotFound": newErrorFileSystemNotFound,
"IncorrectFileSystemLifeCycleState": newErrorIncorrectFileSystemLifeCycleState,
"IncorrectMountTargetState": newErrorIncorrectMountTargetState,
"InsufficientThroughputCapacity": newErrorInsufficientThroughputCapacity,
"InternalServerError": newErrorInternalServerError,
"InvalidPolicyException": newErrorInvalidPolicyException,
"IpAddressInUse": newErrorIpAddressInUse,
"MountTargetConflict": newErrorMountTargetConflict,
"MountTargetNotFound": newErrorMountTargetNotFound,
"NetworkInterfaceLimitExceeded": newErrorNetworkInterfaceLimitExceeded,
"NoFreeAddressesInSubnet": newErrorNoFreeAddressesInSubnet,
"PolicyNotFound": newErrorPolicyNotFound,
"SecurityGroupLimitExceeded": newErrorSecurityGroupLimitExceeded,
"SecurityGroupNotFound": newErrorSecurityGroupNotFound,
"SubnetNotFound": newErrorSubnetNotFound,
"ThroughputLimitExceeded": newErrorThroughputLimitExceeded,
"TooManyRequests": newErrorTooManyRequests,
"UnsupportedAvailabilityZone": newErrorUnsupportedAvailabilityZone,
"ValidationException": newErrorValidationException,
}