-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
errors.go
191 lines (162 loc) · 7.57 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
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package databasemigrationservice
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeAccessDeniedFault for service response error code
// "AccessDeniedFault".
//
// DMS was denied access to the endpoint. Check that the role is correctly configured.
ErrCodeAccessDeniedFault = "AccessDeniedFault"
// ErrCodeCollectorNotFoundFault for service response error code
// "CollectorNotFoundFault".
//
// The specified collector doesn't exist.
ErrCodeCollectorNotFoundFault = "CollectorNotFoundFault"
// ErrCodeInsufficientResourceCapacityFault for service response error code
// "InsufficientResourceCapacityFault".
//
// There are not enough resources allocated to the database migration.
ErrCodeInsufficientResourceCapacityFault = "InsufficientResourceCapacityFault"
// ErrCodeInvalidCertificateFault for service response error code
// "InvalidCertificateFault".
//
// The certificate was not valid.
ErrCodeInvalidCertificateFault = "InvalidCertificateFault"
// ErrCodeInvalidOperationFault for service response error code
// "InvalidOperationFault".
//
// The action or operation requested isn't valid.
ErrCodeInvalidOperationFault = "InvalidOperationFault"
// ErrCodeInvalidResourceStateFault for service response error code
// "InvalidResourceStateFault".
//
// The resource is in a state that prevents it from being used for database
// migration.
ErrCodeInvalidResourceStateFault = "InvalidResourceStateFault"
// ErrCodeInvalidSubnet for service response error code
// "InvalidSubnet".
//
// The subnet provided isn't valid.
ErrCodeInvalidSubnet = "InvalidSubnet"
// ErrCodeKMSAccessDeniedFault for service response error code
// "KMSAccessDeniedFault".
//
// The ciphertext references a key that doesn't exist or that the DMS account
// doesn't have access to.
ErrCodeKMSAccessDeniedFault = "KMSAccessDeniedFault"
// ErrCodeKMSDisabledFault for service response error code
// "KMSDisabledFault".
//
// The specified KMS key isn't enabled.
ErrCodeKMSDisabledFault = "KMSDisabledFault"
// ErrCodeKMSFault for service response error code
// "KMSFault".
//
// An Key Management Service (KMS) error is preventing access to KMS.
ErrCodeKMSFault = "KMSFault"
// ErrCodeKMSInvalidStateFault for service response error code
// "KMSInvalidStateFault".
//
// The state of the specified KMS resource isn't valid for this request.
ErrCodeKMSInvalidStateFault = "KMSInvalidStateFault"
// ErrCodeKMSKeyNotAccessibleFault for service response error code
// "KMSKeyNotAccessibleFault".
//
// DMS cannot access the KMS key.
ErrCodeKMSKeyNotAccessibleFault = "KMSKeyNotAccessibleFault"
// ErrCodeKMSNotFoundFault for service response error code
// "KMSNotFoundFault".
//
// The specified KMS entity or resource can't be found.
ErrCodeKMSNotFoundFault = "KMSNotFoundFault"
// ErrCodeKMSThrottlingFault for service response error code
// "KMSThrottlingFault".
//
// This request triggered KMS request throttling.
ErrCodeKMSThrottlingFault = "KMSThrottlingFault"
// ErrCodeReplicationSubnetGroupDoesNotCoverEnoughAZs for service response error code
// "ReplicationSubnetGroupDoesNotCoverEnoughAZs".
//
// The replication subnet group does not cover enough Availability Zones (AZs).
// Edit the replication subnet group and add more AZs.
ErrCodeReplicationSubnetGroupDoesNotCoverEnoughAZs = "ReplicationSubnetGroupDoesNotCoverEnoughAZs"
// ErrCodeResourceAlreadyExistsFault for service response error code
// "ResourceAlreadyExistsFault".
//
// The resource you are attempting to create already exists.
ErrCodeResourceAlreadyExistsFault = "ResourceAlreadyExistsFault"
// ErrCodeResourceNotFoundFault for service response error code
// "ResourceNotFoundFault".
//
// The resource could not be found.
ErrCodeResourceNotFoundFault = "ResourceNotFoundFault"
// ErrCodeResourceQuotaExceededFault for service response error code
// "ResourceQuotaExceededFault".
//
// The quota for this resource quota has been exceeded.
ErrCodeResourceQuotaExceededFault = "ResourceQuotaExceededFault"
// ErrCodeS3AccessDeniedFault for service response error code
// "S3AccessDeniedFault".
//
// Insufficient privileges are preventing access to an Amazon S3 object.
ErrCodeS3AccessDeniedFault = "S3AccessDeniedFault"
// ErrCodeS3ResourceNotFoundFault for service response error code
// "S3ResourceNotFoundFault".
//
// A specified Amazon S3 bucket, bucket folder, or other object can't be found.
ErrCodeS3ResourceNotFoundFault = "S3ResourceNotFoundFault"
// ErrCodeSNSInvalidTopicFault for service response error code
// "SNSInvalidTopicFault".
//
// The SNS topic is invalid.
ErrCodeSNSInvalidTopicFault = "SNSInvalidTopicFault"
// ErrCodeSNSNoAuthorizationFault for service response error code
// "SNSNoAuthorizationFault".
//
// You are not authorized for the SNS subscription.
ErrCodeSNSNoAuthorizationFault = "SNSNoAuthorizationFault"
// ErrCodeStorageQuotaExceededFault for service response error code
// "StorageQuotaExceededFault".
//
// The storage quota has been exceeded.
ErrCodeStorageQuotaExceededFault = "StorageQuotaExceededFault"
// ErrCodeSubnetAlreadyInUse for service response error code
// "SubnetAlreadyInUse".
//
// The specified subnet is already in use.
ErrCodeSubnetAlreadyInUse = "SubnetAlreadyInUse"
// ErrCodeUpgradeDependencyFailureFault for service response error code
// "UpgradeDependencyFailureFault".
//
// An upgrade dependency is preventing the database migration.
ErrCodeUpgradeDependencyFailureFault = "UpgradeDependencyFailureFault"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"AccessDeniedFault": newErrorAccessDeniedFault,
"CollectorNotFoundFault": newErrorCollectorNotFoundFault,
"InsufficientResourceCapacityFault": newErrorInsufficientResourceCapacityFault,
"InvalidCertificateFault": newErrorInvalidCertificateFault,
"InvalidOperationFault": newErrorInvalidOperationFault,
"InvalidResourceStateFault": newErrorInvalidResourceStateFault,
"InvalidSubnet": newErrorInvalidSubnet,
"KMSAccessDeniedFault": newErrorKMSAccessDeniedFault,
"KMSDisabledFault": newErrorKMSDisabledFault,
"KMSFault": newErrorKMSFault,
"KMSInvalidStateFault": newErrorKMSInvalidStateFault,
"KMSKeyNotAccessibleFault": newErrorKMSKeyNotAccessibleFault,
"KMSNotFoundFault": newErrorKMSNotFoundFault,
"KMSThrottlingFault": newErrorKMSThrottlingFault,
"ReplicationSubnetGroupDoesNotCoverEnoughAZs": newErrorReplicationSubnetGroupDoesNotCoverEnoughAZs,
"ResourceAlreadyExistsFault": newErrorResourceAlreadyExistsFault,
"ResourceNotFoundFault": newErrorResourceNotFoundFault,
"ResourceQuotaExceededFault": newErrorResourceQuotaExceededFault,
"S3AccessDeniedFault": newErrorS3AccessDeniedFault,
"S3ResourceNotFoundFault": newErrorS3ResourceNotFoundFault,
"SNSInvalidTopicFault": newErrorSNSInvalidTopicFault,
"SNSNoAuthorizationFault": newErrorSNSNoAuthorizationFault,
"StorageQuotaExceededFault": newErrorStorageQuotaExceededFault,
"SubnetAlreadyInUse": newErrorSubnetAlreadyInUse,
"UpgradeDependencyFailureFault": newErrorUpgradeDependencyFailureFault,
}