-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
errors.go
269 lines (230 loc) · 10.9 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
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package fsx
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeActiveDirectoryError for service response error code
// "ActiveDirectoryError".
//
// An Active Directory error.
ErrCodeActiveDirectoryError = "ActiveDirectoryError"
// ErrCodeBackupBeingCopied for service response error code
// "BackupBeingCopied".
//
// You can't delete a backup while it's being copied.
ErrCodeBackupBeingCopied = "BackupBeingCopied"
// ErrCodeBackupInProgress for service response error code
// "BackupInProgress".
//
// Another backup is already under way. Wait for completion before initiating
// additional backups of this file system.
ErrCodeBackupInProgress = "BackupInProgress"
// ErrCodeBackupNotFound for service response error code
// "BackupNotFound".
//
// No Amazon FSx backups were found based upon the supplied parameters.
ErrCodeBackupNotFound = "BackupNotFound"
// ErrCodeBackupRestoring for service response error code
// "BackupRestoring".
//
// You can't delete a backup while it's being used to restore a file system.
ErrCodeBackupRestoring = "BackupRestoring"
// ErrCodeBadRequest for service response error code
// "BadRequest".
//
// A generic error indicating a failure with a client request.
ErrCodeBadRequest = "BadRequest"
// ErrCodeDataRepositoryAssociationNotFound for service response error code
// "DataRepositoryAssociationNotFound".
//
// No data repository associations were found based upon the supplied parameters.
ErrCodeDataRepositoryAssociationNotFound = "DataRepositoryAssociationNotFound"
// ErrCodeDataRepositoryTaskEnded for service response error code
// "DataRepositoryTaskEnded".
//
// The data repository task could not be canceled because the task has already
// ended.
ErrCodeDataRepositoryTaskEnded = "DataRepositoryTaskEnded"
// ErrCodeDataRepositoryTaskExecuting for service response error code
// "DataRepositoryTaskExecuting".
//
// An existing data repository task is currently executing on the file system.
// Wait until the existing task has completed, then create the new task.
ErrCodeDataRepositoryTaskExecuting = "DataRepositoryTaskExecuting"
// ErrCodeDataRepositoryTaskNotFound for service response error code
// "DataRepositoryTaskNotFound".
//
// The data repository task or tasks you specified could not be found.
ErrCodeDataRepositoryTaskNotFound = "DataRepositoryTaskNotFound"
// ErrCodeFileCacheNotFound for service response error code
// "FileCacheNotFound".
//
// No caches were found based upon supplied parameters.
ErrCodeFileCacheNotFound = "FileCacheNotFound"
// ErrCodeFileSystemNotFound for service response error code
// "FileSystemNotFound".
//
// No Amazon FSx file systems were found based upon supplied parameters.
ErrCodeFileSystemNotFound = "FileSystemNotFound"
// ErrCodeIncompatibleParameterError for service response error code
// "IncompatibleParameterError".
//
// The error returned when a second request is received with the same client
// request token but different parameters settings. A client request token should
// always uniquely identify a single request.
ErrCodeIncompatibleParameterError = "IncompatibleParameterError"
// ErrCodeIncompatibleRegionForMultiAZ for service response error code
// "IncompatibleRegionForMultiAZ".
//
// Amazon FSx doesn't support Multi-AZ Windows File Server copy backup in the
// destination Region, so the copied backup can't be restored.
ErrCodeIncompatibleRegionForMultiAZ = "IncompatibleRegionForMultiAZ"
// ErrCodeInternalServerError for service response error code
// "InternalServerError".
//
// A generic error indicating a server-side failure.
ErrCodeInternalServerError = "InternalServerError"
// ErrCodeInvalidDataRepositoryType for service response error code
// "InvalidDataRepositoryType".
//
// You have filtered the response to a data repository type that is not supported.
ErrCodeInvalidDataRepositoryType = "InvalidDataRepositoryType"
// ErrCodeInvalidDestinationKmsKey for service response error code
// "InvalidDestinationKmsKey".
//
// The Key Management Service (KMS) key of the destination backup is not valid.
ErrCodeInvalidDestinationKmsKey = "InvalidDestinationKmsKey"
// ErrCodeInvalidExportPath for service response error code
// "InvalidExportPath".
//
// The path provided for data repository export isn't valid.
ErrCodeInvalidExportPath = "InvalidExportPath"
// ErrCodeInvalidImportPath for service response error code
// "InvalidImportPath".
//
// The path provided for data repository import isn't valid.
ErrCodeInvalidImportPath = "InvalidImportPath"
// ErrCodeInvalidNetworkSettings for service response error code
// "InvalidNetworkSettings".
//
// One or more network settings specified in the request are invalid.
ErrCodeInvalidNetworkSettings = "InvalidNetworkSettings"
// ErrCodeInvalidPerUnitStorageThroughput for service response error code
// "InvalidPerUnitStorageThroughput".
//
// An invalid value for PerUnitStorageThroughput was provided. Please create
// your file system again, using a valid value.
ErrCodeInvalidPerUnitStorageThroughput = "InvalidPerUnitStorageThroughput"
// ErrCodeInvalidRegion for service response error code
// "InvalidRegion".
//
// The Region provided for SourceRegion is not valid or is in a different Amazon
// Web Services partition.
ErrCodeInvalidRegion = "InvalidRegion"
// ErrCodeInvalidSourceKmsKey for service response error code
// "InvalidSourceKmsKey".
//
// The Key Management Service (KMS) key of the source backup is not valid.
ErrCodeInvalidSourceKmsKey = "InvalidSourceKmsKey"
// ErrCodeMissingFileCacheConfiguration for service response error code
// "MissingFileCacheConfiguration".
//
// A cache configuration is required for this operation.
ErrCodeMissingFileCacheConfiguration = "MissingFileCacheConfiguration"
// ErrCodeMissingFileSystemConfiguration for service response error code
// "MissingFileSystemConfiguration".
//
// A file system configuration is required for this operation.
ErrCodeMissingFileSystemConfiguration = "MissingFileSystemConfiguration"
// ErrCodeMissingVolumeConfiguration for service response error code
// "MissingVolumeConfiguration".
//
// A volume configuration is required for this operation.
ErrCodeMissingVolumeConfiguration = "MissingVolumeConfiguration"
// ErrCodeNotServiceResourceError for service response error code
// "NotServiceResourceError".
//
// The resource specified for the tagging operation is not a resource type owned
// by Amazon FSx. Use the API of the relevant service to perform the operation.
ErrCodeNotServiceResourceError = "NotServiceResourceError"
// ErrCodeResourceDoesNotSupportTagging for service response error code
// "ResourceDoesNotSupportTagging".
//
// The resource specified does not support tagging.
ErrCodeResourceDoesNotSupportTagging = "ResourceDoesNotSupportTagging"
// ErrCodeResourceNotFound for service response error code
// "ResourceNotFound".
//
// The resource specified by the Amazon Resource Name (ARN) can't be found.
ErrCodeResourceNotFound = "ResourceNotFound"
// ErrCodeServiceLimitExceeded for service response error code
// "ServiceLimitExceeded".
//
// An error indicating that a particular service limit was exceeded. You can
// increase some service limits by contacting Amazon Web Services Support.
ErrCodeServiceLimitExceeded = "ServiceLimitExceeded"
// ErrCodeSnapshotNotFound for service response error code
// "SnapshotNotFound".
//
// No Amazon FSx snapshots were found based on the supplied parameters.
ErrCodeSnapshotNotFound = "SnapshotNotFound"
// ErrCodeSourceBackupUnavailable for service response error code
// "SourceBackupUnavailable".
//
// The request was rejected because the lifecycle status of the source backup
// isn't AVAILABLE.
ErrCodeSourceBackupUnavailable = "SourceBackupUnavailable"
// ErrCodeStorageVirtualMachineNotFound for service response error code
// "StorageVirtualMachineNotFound".
//
// No FSx for ONTAP SVMs were found based upon the supplied parameters.
ErrCodeStorageVirtualMachineNotFound = "StorageVirtualMachineNotFound"
// ErrCodeUnsupportedOperation for service response error code
// "UnsupportedOperation".
//
// The requested operation is not supported for this resource or API.
ErrCodeUnsupportedOperation = "UnsupportedOperation"
// ErrCodeVolumeNotFound for service response error code
// "VolumeNotFound".
//
// No Amazon FSx volumes were found based upon the supplied parameters.
ErrCodeVolumeNotFound = "VolumeNotFound"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"ActiveDirectoryError": newErrorActiveDirectoryError,
"BackupBeingCopied": newErrorBackupBeingCopied,
"BackupInProgress": newErrorBackupInProgress,
"BackupNotFound": newErrorBackupNotFound,
"BackupRestoring": newErrorBackupRestoring,
"BadRequest": newErrorBadRequest,
"DataRepositoryAssociationNotFound": newErrorDataRepositoryAssociationNotFound,
"DataRepositoryTaskEnded": newErrorDataRepositoryTaskEnded,
"DataRepositoryTaskExecuting": newErrorDataRepositoryTaskExecuting,
"DataRepositoryTaskNotFound": newErrorDataRepositoryTaskNotFound,
"FileCacheNotFound": newErrorFileCacheNotFound,
"FileSystemNotFound": newErrorFileSystemNotFound,
"IncompatibleParameterError": newErrorIncompatibleParameterError,
"IncompatibleRegionForMultiAZ": newErrorIncompatibleRegionForMultiAZ,
"InternalServerError": newErrorInternalServerError,
"InvalidDataRepositoryType": newErrorInvalidDataRepositoryType,
"InvalidDestinationKmsKey": newErrorInvalidDestinationKmsKey,
"InvalidExportPath": newErrorInvalidExportPath,
"InvalidImportPath": newErrorInvalidImportPath,
"InvalidNetworkSettings": newErrorInvalidNetworkSettings,
"InvalidPerUnitStorageThroughput": newErrorInvalidPerUnitStorageThroughput,
"InvalidRegion": newErrorInvalidRegion,
"InvalidSourceKmsKey": newErrorInvalidSourceKmsKey,
"MissingFileCacheConfiguration": newErrorMissingFileCacheConfiguration,
"MissingFileSystemConfiguration": newErrorMissingFileSystemConfiguration,
"MissingVolumeConfiguration": newErrorMissingVolumeConfiguration,
"NotServiceResourceError": newErrorNotServiceResourceError,
"ResourceDoesNotSupportTagging": newErrorResourceDoesNotSupportTagging,
"ResourceNotFound": newErrorResourceNotFound,
"ServiceLimitExceeded": newErrorServiceLimitExceeded,
"SnapshotNotFound": newErrorSnapshotNotFound,
"SourceBackupUnavailable": newErrorSourceBackupUnavailable,
"StorageVirtualMachineNotFound": newErrorStorageVirtualMachineNotFound,
"UnsupportedOperation": newErrorUnsupportedOperation,
"VolumeNotFound": newErrorVolumeNotFound,
}