-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
errors.go
180 lines (154 loc) · 8.11 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
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package workmail
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeDirectoryInUseException for service response error code
// "DirectoryInUseException".
//
// The directory is already in use by another WorkMail organization in the same
// account and Region.
ErrCodeDirectoryInUseException = "DirectoryInUseException"
// ErrCodeDirectoryServiceAuthenticationFailedException for service response error code
// "DirectoryServiceAuthenticationFailedException".
//
// The directory service doesn't recognize the credentials supplied by WorkMail.
ErrCodeDirectoryServiceAuthenticationFailedException = "DirectoryServiceAuthenticationFailedException"
// ErrCodeDirectoryUnavailableException for service response error code
// "DirectoryUnavailableException".
//
// The directory is unavailable. It might be located in another Region or deleted.
ErrCodeDirectoryUnavailableException = "DirectoryUnavailableException"
// ErrCodeEmailAddressInUseException for service response error code
// "EmailAddressInUseException".
//
// The email address that you're trying to assign is already created for a different
// user, group, or resource.
ErrCodeEmailAddressInUseException = "EmailAddressInUseException"
// ErrCodeEntityAlreadyRegisteredException for service response error code
// "EntityAlreadyRegisteredException".
//
// The user, group, or resource that you're trying to register is already registered.
ErrCodeEntityAlreadyRegisteredException = "EntityAlreadyRegisteredException"
// ErrCodeEntityNotFoundException for service response error code
// "EntityNotFoundException".
//
// The identifier supplied for the user, group, or resource does not exist in
// your organization.
ErrCodeEntityNotFoundException = "EntityNotFoundException"
// ErrCodeEntityStateException for service response error code
// "EntityStateException".
//
// You are performing an operation on a user, group, or resource that isn't
// in the expected state, such as trying to delete an active user.
ErrCodeEntityStateException = "EntityStateException"
// ErrCodeInvalidConfigurationException for service response error code
// "InvalidConfigurationException".
//
// The configuration for a resource isn't valid. A resource must either be able
// to auto-respond to requests or have at least one delegate associated that
// can do so on its behalf.
ErrCodeInvalidConfigurationException = "InvalidConfigurationException"
// ErrCodeInvalidCustomSesConfigurationException for service response error code
// "InvalidCustomSesConfigurationException".
//
// You SES configuration has customizations that WorkMail cannot save. The error
// message lists the invalid setting. For examples of invalid settings, refer
// to CreateReceiptRule (https://docs.aws.amazon.com/ses/latest/APIReference/API_CreateReceiptRule.html).
ErrCodeInvalidCustomSesConfigurationException = "InvalidCustomSesConfigurationException"
// ErrCodeInvalidParameterException for service response error code
// "InvalidParameterException".
//
// One or more of the input parameters don't match the service's restrictions.
ErrCodeInvalidParameterException = "InvalidParameterException"
// ErrCodeInvalidPasswordException for service response error code
// "InvalidPasswordException".
//
// The supplied password doesn't match the minimum security constraints, such
// as length or use of special characters.
ErrCodeInvalidPasswordException = "InvalidPasswordException"
// ErrCodeLimitExceededException for service response error code
// "LimitExceededException".
//
// The request exceeds the limit of the resource.
ErrCodeLimitExceededException = "LimitExceededException"
// ErrCodeMailDomainInUseException for service response error code
// "MailDomainInUseException".
//
// The domain you're trying to change is in use by another user or organization
// in your account. See the error message for details.
ErrCodeMailDomainInUseException = "MailDomainInUseException"
// ErrCodeMailDomainNotFoundException for service response error code
// "MailDomainNotFoundException".
//
// The domain specified is not found in your organization.
ErrCodeMailDomainNotFoundException = "MailDomainNotFoundException"
// ErrCodeMailDomainStateException for service response error code
// "MailDomainStateException".
//
// After a domain has been added to the organization, it must be verified. The
// domain is not yet verified.
ErrCodeMailDomainStateException = "MailDomainStateException"
// ErrCodeNameAvailabilityException for service response error code
// "NameAvailabilityException".
//
// The user, group, or resource name isn't unique in WorkMail.
ErrCodeNameAvailabilityException = "NameAvailabilityException"
// ErrCodeOrganizationNotFoundException for service response error code
// "OrganizationNotFoundException".
//
// An operation received a valid organization identifier that either doesn't
// belong or exist in the system.
ErrCodeOrganizationNotFoundException = "OrganizationNotFoundException"
// ErrCodeOrganizationStateException for service response error code
// "OrganizationStateException".
//
// The organization must have a valid state to perform certain operations on
// the organization or its members.
ErrCodeOrganizationStateException = "OrganizationStateException"
// ErrCodeReservedNameException for service response error code
// "ReservedNameException".
//
// This user, group, or resource name is not allowed in WorkMail.
ErrCodeReservedNameException = "ReservedNameException"
// ErrCodeResourceNotFoundException for service response error code
// "ResourceNotFoundException".
//
// The resource cannot be found.
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
// ErrCodeTooManyTagsException for service response error code
// "TooManyTagsException".
//
// The resource can have up to 50 user-applied tags.
ErrCodeTooManyTagsException = "TooManyTagsException"
// ErrCodeUnsupportedOperationException for service response error code
// "UnsupportedOperationException".
//
// You can't perform a write operation against a read-only directory.
ErrCodeUnsupportedOperationException = "UnsupportedOperationException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"DirectoryInUseException": newErrorDirectoryInUseException,
"DirectoryServiceAuthenticationFailedException": newErrorDirectoryServiceAuthenticationFailedException,
"DirectoryUnavailableException": newErrorDirectoryUnavailableException,
"EmailAddressInUseException": newErrorEmailAddressInUseException,
"EntityAlreadyRegisteredException": newErrorEntityAlreadyRegisteredException,
"EntityNotFoundException": newErrorEntityNotFoundException,
"EntityStateException": newErrorEntityStateException,
"InvalidConfigurationException": newErrorInvalidConfigurationException,
"InvalidCustomSesConfigurationException": newErrorInvalidCustomSesConfigurationException,
"InvalidParameterException": newErrorInvalidParameterException,
"InvalidPasswordException": newErrorInvalidPasswordException,
"LimitExceededException": newErrorLimitExceededException,
"MailDomainInUseException": newErrorMailDomainInUseException,
"MailDomainNotFoundException": newErrorMailDomainNotFoundException,
"MailDomainStateException": newErrorMailDomainStateException,
"NameAvailabilityException": newErrorNameAvailabilityException,
"OrganizationNotFoundException": newErrorOrganizationNotFoundException,
"OrganizationStateException": newErrorOrganizationStateException,
"ReservedNameException": newErrorReservedNameException,
"ResourceNotFoundException": newErrorResourceNotFoundException,
"TooManyTagsException": newErrorTooManyTagsException,
"UnsupportedOperationException": newErrorUnsupportedOperationException,
}