/
errors.go
242 lines (207 loc) · 10.5 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 directoryservice
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeAccessDeniedException for service response error code
// "AccessDeniedException".
//
// You do not have sufficient access to perform this action.
ErrCodeAccessDeniedException = "AccessDeniedException"
// ErrCodeAuthenticationFailedException for service response error code
// "AuthenticationFailedException".
//
// An authentication error occurred.
ErrCodeAuthenticationFailedException = "AuthenticationFailedException"
// ErrCodeCertificateAlreadyExistsException for service response error code
// "CertificateAlreadyExistsException".
//
// The certificate has already been registered into the system.
ErrCodeCertificateAlreadyExistsException = "CertificateAlreadyExistsException"
// ErrCodeCertificateDoesNotExistException for service response error code
// "CertificateDoesNotExistException".
//
// The certificate is not present in the system for describe or deregister activities.
ErrCodeCertificateDoesNotExistException = "CertificateDoesNotExistException"
// ErrCodeCertificateInUseException for service response error code
// "CertificateInUseException".
//
// The certificate is being used for the LDAP security connection and cannot
// be removed without disabling LDAP security.
ErrCodeCertificateInUseException = "CertificateInUseException"
// ErrCodeCertificateLimitExceededException for service response error code
// "CertificateLimitExceededException".
//
// The certificate could not be added because the certificate limit has been
// reached.
ErrCodeCertificateLimitExceededException = "CertificateLimitExceededException"
// ErrCodeClientException for service response error code
// "ClientException".
//
// A client exception has occurred.
ErrCodeClientException = "ClientException"
// ErrCodeDirectoryAlreadySharedException for service response error code
// "DirectoryAlreadySharedException".
//
// The specified directory has already been shared with this AWS account.
ErrCodeDirectoryAlreadySharedException = "DirectoryAlreadySharedException"
// ErrCodeDirectoryDoesNotExistException for service response error code
// "DirectoryDoesNotExistException".
//
// The specified directory does not exist in the system.
ErrCodeDirectoryDoesNotExistException = "DirectoryDoesNotExistException"
// ErrCodeDirectoryLimitExceededException for service response error code
// "DirectoryLimitExceededException".
//
// The maximum number of directories in the region has been reached. You can
// use the GetDirectoryLimits operation to determine your directory limits in
// the region.
ErrCodeDirectoryLimitExceededException = "DirectoryLimitExceededException"
// ErrCodeDirectoryNotSharedException for service response error code
// "DirectoryNotSharedException".
//
// The specified directory has not been shared with this AWS account.
ErrCodeDirectoryNotSharedException = "DirectoryNotSharedException"
// ErrCodeDirectoryUnavailableException for service response error code
// "DirectoryUnavailableException".
//
// The specified directory is unavailable or could not be found.
ErrCodeDirectoryUnavailableException = "DirectoryUnavailableException"
// ErrCodeDomainControllerLimitExceededException for service response error code
// "DomainControllerLimitExceededException".
//
// The maximum allowed number of domain controllers per directory was exceeded.
// The default limit per directory is 20 domain controllers.
ErrCodeDomainControllerLimitExceededException = "DomainControllerLimitExceededException"
// ErrCodeEntityAlreadyExistsException for service response error code
// "EntityAlreadyExistsException".
//
// The specified entity already exists.
ErrCodeEntityAlreadyExistsException = "EntityAlreadyExistsException"
// ErrCodeEntityDoesNotExistException for service response error code
// "EntityDoesNotExistException".
//
// The specified entity could not be found.
ErrCodeEntityDoesNotExistException = "EntityDoesNotExistException"
// ErrCodeInsufficientPermissionsException for service response error code
// "InsufficientPermissionsException".
//
// The account does not have sufficient permission to perform the operation.
ErrCodeInsufficientPermissionsException = "InsufficientPermissionsException"
// ErrCodeInvalidCertificateException for service response error code
// "InvalidCertificateException".
//
// The certificate PEM that was provided has incorrect encoding.
ErrCodeInvalidCertificateException = "InvalidCertificateException"
// ErrCodeInvalidLDAPSStatusException for service response error code
// "InvalidLDAPSStatusException".
//
// The LDAP activities could not be performed because they are limited by the
// LDAPS status.
ErrCodeInvalidLDAPSStatusException = "InvalidLDAPSStatusException"
// ErrCodeInvalidNextTokenException for service response error code
// "InvalidNextTokenException".
//
// The NextToken value is not valid.
ErrCodeInvalidNextTokenException = "InvalidNextTokenException"
// ErrCodeInvalidParameterException for service response error code
// "InvalidParameterException".
//
// One or more parameters are not valid.
ErrCodeInvalidParameterException = "InvalidParameterException"
// ErrCodeInvalidPasswordException for service response error code
// "InvalidPasswordException".
//
// The new password provided by the user does not meet the password complexity
// requirements defined in your directory.
ErrCodeInvalidPasswordException = "InvalidPasswordException"
// ErrCodeInvalidTargetException for service response error code
// "InvalidTargetException".
//
// The specified shared target is not valid.
ErrCodeInvalidTargetException = "InvalidTargetException"
// ErrCodeIpRouteLimitExceededException for service response error code
// "IpRouteLimitExceededException".
//
// The maximum allowed number of IP addresses was exceeded. The default limit
// is 100 IP address blocks.
ErrCodeIpRouteLimitExceededException = "IpRouteLimitExceededException"
// ErrCodeNoAvailableCertificateException for service response error code
// "NoAvailableCertificateException".
//
// The LDAP activities could not be performed because at least one valid certificate
// must be registered with the system.
ErrCodeNoAvailableCertificateException = "NoAvailableCertificateException"
// ErrCodeOrganizationsException for service response error code
// "OrganizationsException".
//
// Exception encountered while trying to access your AWS organization.
ErrCodeOrganizationsException = "OrganizationsException"
// ErrCodeServiceException for service response error code
// "ServiceException".
//
// An exception has occurred in AWS Directory Service.
ErrCodeServiceException = "ServiceException"
// ErrCodeShareLimitExceededException for service response error code
// "ShareLimitExceededException".
//
// The maximum number of AWS accounts that you can share with this directory
// has been reached.
ErrCodeShareLimitExceededException = "ShareLimitExceededException"
// ErrCodeSnapshotLimitExceededException for service response error code
// "SnapshotLimitExceededException".
//
// The maximum number of manual snapshots for the directory has been reached.
// You can use the GetSnapshotLimits operation to determine the snapshot limits
// for a directory.
ErrCodeSnapshotLimitExceededException = "SnapshotLimitExceededException"
// ErrCodeTagLimitExceededException for service response error code
// "TagLimitExceededException".
//
// The maximum allowed number of tags was exceeded.
ErrCodeTagLimitExceededException = "TagLimitExceededException"
// ErrCodeUnsupportedOperationException for service response error code
// "UnsupportedOperationException".
//
// The operation is not supported.
ErrCodeUnsupportedOperationException = "UnsupportedOperationException"
// ErrCodeUserDoesNotExistException for service response error code
// "UserDoesNotExistException".
//
// The user provided a username that does not exist in your directory.
ErrCodeUserDoesNotExistException = "UserDoesNotExistException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"AccessDeniedException": newErrorAccessDeniedException,
"AuthenticationFailedException": newErrorAuthenticationFailedException,
"CertificateAlreadyExistsException": newErrorCertificateAlreadyExistsException,
"CertificateDoesNotExistException": newErrorCertificateDoesNotExistException,
"CertificateInUseException": newErrorCertificateInUseException,
"CertificateLimitExceededException": newErrorCertificateLimitExceededException,
"ClientException": newErrorClientException,
"DirectoryAlreadySharedException": newErrorDirectoryAlreadySharedException,
"DirectoryDoesNotExistException": newErrorDirectoryDoesNotExistException,
"DirectoryLimitExceededException": newErrorDirectoryLimitExceededException,
"DirectoryNotSharedException": newErrorDirectoryNotSharedException,
"DirectoryUnavailableException": newErrorDirectoryUnavailableException,
"DomainControllerLimitExceededException": newErrorDomainControllerLimitExceededException,
"EntityAlreadyExistsException": newErrorEntityAlreadyExistsException,
"EntityDoesNotExistException": newErrorEntityDoesNotExistException,
"InsufficientPermissionsException": newErrorInsufficientPermissionsException,
"InvalidCertificateException": newErrorInvalidCertificateException,
"InvalidLDAPSStatusException": newErrorInvalidLDAPSStatusException,
"InvalidNextTokenException": newErrorInvalidNextTokenException,
"InvalidParameterException": newErrorInvalidParameterException,
"InvalidPasswordException": newErrorInvalidPasswordException,
"InvalidTargetException": newErrorInvalidTargetException,
"IpRouteLimitExceededException": newErrorIpRouteLimitExceededException,
"NoAvailableCertificateException": newErrorNoAvailableCertificateException,
"OrganizationsException": newErrorOrganizationsException,
"ServiceException": newErrorServiceException,
"ShareLimitExceededException": newErrorShareLimitExceededException,
"SnapshotLimitExceededException": newErrorSnapshotLimitExceededException,
"TagLimitExceededException": newErrorTagLimitExceededException,
"UnsupportedOperationException": newErrorUnsupportedOperationException,
"UserDoesNotExistException": newErrorUserDoesNotExistException,
}