-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
errors.go
234 lines (202 loc) · 11.8 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
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ram
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeIdempotentParameterMismatchException for service response error code
// "IdempotentParameterMismatchException".
//
// The operation failed because the client token input parameter matched one
// that was used with a previous call to the operation, but at least one of
// the other input parameters is different from the previous call.
ErrCodeIdempotentParameterMismatchException = "IdempotentParameterMismatchException"
// ErrCodeInvalidClientTokenException for service response error code
// "InvalidClientTokenException".
//
// The operation failed because the specified client token isn't valid.
ErrCodeInvalidClientTokenException = "InvalidClientTokenException"
// ErrCodeInvalidMaxResultsException for service response error code
// "InvalidMaxResultsException".
//
// The operation failed because the specified value for MaxResults isn't valid.
ErrCodeInvalidMaxResultsException = "InvalidMaxResultsException"
// ErrCodeInvalidNextTokenException for service response error code
// "InvalidNextTokenException".
//
// The operation failed because the specified value for NextToken isn't valid.
// You must specify a value you received in the NextToken response of a previous
// call to this operation.
ErrCodeInvalidNextTokenException = "InvalidNextTokenException"
// ErrCodeInvalidParameterException for service response error code
// "InvalidParameterException".
//
// The operation failed because a parameter you specified isn't valid.
ErrCodeInvalidParameterException = "InvalidParameterException"
// ErrCodeInvalidPolicyException for service response error code
// "InvalidPolicyException".
//
// The operation failed because a policy you specified isn't valid.
ErrCodeInvalidPolicyException = "InvalidPolicyException"
// ErrCodeInvalidResourceTypeException for service response error code
// "InvalidResourceTypeException".
//
// The operation failed because the specified resource type isn't valid.
ErrCodeInvalidResourceTypeException = "InvalidResourceTypeException"
// ErrCodeInvalidStateTransitionException for service response error code
// "InvalidStateTransitionException".
//
// The operation failed because the requested operation isn't valid for the
// resource share in its current state.
ErrCodeInvalidStateTransitionException = "InvalidStateTransitionException"
// ErrCodeMalformedArnException for service response error code
// "MalformedArnException".
//
// The operation failed because the specified Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
// has a format that isn't valid.
ErrCodeMalformedArnException = "MalformedArnException"
// ErrCodeMalformedPolicyTemplateException for service response error code
// "MalformedPolicyTemplateException".
//
// The operation failed because the policy template that you provided isn't
// valid.
ErrCodeMalformedPolicyTemplateException = "MalformedPolicyTemplateException"
// ErrCodeMissingRequiredParameterException for service response error code
// "MissingRequiredParameterException".
//
// The operation failed because a required input parameter is missing.
ErrCodeMissingRequiredParameterException = "MissingRequiredParameterException"
// ErrCodeOperationNotPermittedException for service response error code
// "OperationNotPermittedException".
//
// The operation failed because the requested operation isn't permitted.
ErrCodeOperationNotPermittedException = "OperationNotPermittedException"
// ErrCodePermissionAlreadyExistsException for service response error code
// "PermissionAlreadyExistsException".
//
// The operation failed because a permission with the specified name already
// exists in the requested Amazon Web Services Region. Choose a different name.
ErrCodePermissionAlreadyExistsException = "PermissionAlreadyExistsException"
// ErrCodePermissionLimitExceededException for service response error code
// "PermissionLimitExceededException".
//
// The operation failed because it would exceed the maximum number of permissions
// you can create in each Amazon Web Services Region. To view the limits for
// your Amazon Web Services account, see the RAM page in the Service Quotas
// console (https://console.aws.amazon.com/servicequotas/home/services/ram/quotas).
ErrCodePermissionLimitExceededException = "PermissionLimitExceededException"
// ErrCodePermissionVersionsLimitExceededException for service response error code
// "PermissionVersionsLimitExceededException".
//
// The operation failed because it would exceed the limit for the number of
// versions you can have for a permission. To view the limits for your Amazon
// Web Services account, see the RAM page in the Service Quotas console (https://console.aws.amazon.com/servicequotas/home/services/ram/quotas).
ErrCodePermissionVersionsLimitExceededException = "PermissionVersionsLimitExceededException"
// ErrCodeResourceArnNotFoundException for service response error code
// "ResourceArnNotFoundException".
//
// The operation failed because the specified Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
// was not found.
ErrCodeResourceArnNotFoundException = "ResourceArnNotFoundException"
// ErrCodeResourceShareInvitationAlreadyAcceptedException for service response error code
// "ResourceShareInvitationAlreadyAcceptedException".
//
// The operation failed because the specified invitation was already accepted.
ErrCodeResourceShareInvitationAlreadyAcceptedException = "ResourceShareInvitationAlreadyAcceptedException"
// ErrCodeResourceShareInvitationAlreadyRejectedException for service response error code
// "ResourceShareInvitationAlreadyRejectedException".
//
// The operation failed because the specified invitation was already rejected.
ErrCodeResourceShareInvitationAlreadyRejectedException = "ResourceShareInvitationAlreadyRejectedException"
// ErrCodeResourceShareInvitationArnNotFoundException for service response error code
// "ResourceShareInvitationArnNotFoundException".
//
// The operation failed because the specified Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
// for an invitation was not found.
ErrCodeResourceShareInvitationArnNotFoundException = "ResourceShareInvitationArnNotFoundException"
// ErrCodeResourceShareInvitationExpiredException for service response error code
// "ResourceShareInvitationExpiredException".
//
// The operation failed because the specified invitation is past its expiration
// date and time.
ErrCodeResourceShareInvitationExpiredException = "ResourceShareInvitationExpiredException"
// ErrCodeResourceShareLimitExceededException for service response error code
// "ResourceShareLimitExceededException".
//
// The operation failed because it would exceed the limit for resource shares
// for your account. To view the limits for your Amazon Web Services account,
// see the RAM page in the Service Quotas console (https://console.aws.amazon.com/servicequotas/home/services/ram/quotas).
ErrCodeResourceShareLimitExceededException = "ResourceShareLimitExceededException"
// ErrCodeServerInternalException for service response error code
// "ServerInternalException".
//
// The operation failed because the service could not respond to the request
// due to an internal problem. Try again later.
ErrCodeServerInternalException = "ServerInternalException"
// ErrCodeServiceUnavailableException for service response error code
// "ServiceUnavailableException".
//
// The operation failed because the service isn't available. Try again later.
ErrCodeServiceUnavailableException = "ServiceUnavailableException"
// ErrCodeTagLimitExceededException for service response error code
// "TagLimitExceededException".
//
// The operation failed because it would exceed the limit for tags for your
// Amazon Web Services account.
ErrCodeTagLimitExceededException = "TagLimitExceededException"
// ErrCodeTagPolicyViolationException for service response error code
// "TagPolicyViolationException".
//
// The operation failed because the specified tag key is a reserved word and
// can't be used.
ErrCodeTagPolicyViolationException = "TagPolicyViolationException"
// ErrCodeThrottlingException for service response error code
// "ThrottlingException".
//
// The operation failed because it exceeded the rate at which you are allowed
// to perform this operation. Please try again later.
ErrCodeThrottlingException = "ThrottlingException"
// ErrCodeUnknownResourceException for service response error code
// "UnknownResourceException".
//
// The operation failed because a specified resource couldn't be found.
ErrCodeUnknownResourceException = "UnknownResourceException"
// ErrCodeUnmatchedPolicyPermissionException for service response error code
// "UnmatchedPolicyPermissionException".
//
// There isn't an existing managed permission defined in RAM that has the same
// IAM permissions as the resource-based policy attached to the resource. You
// should first run PromotePermissionCreatedFromPolicy to create that managed
// permission.
ErrCodeUnmatchedPolicyPermissionException = "UnmatchedPolicyPermissionException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"IdempotentParameterMismatchException": newErrorIdempotentParameterMismatchException,
"InvalidClientTokenException": newErrorInvalidClientTokenException,
"InvalidMaxResultsException": newErrorInvalidMaxResultsException,
"InvalidNextTokenException": newErrorInvalidNextTokenException,
"InvalidParameterException": newErrorInvalidParameterException,
"InvalidPolicyException": newErrorInvalidPolicyException,
"InvalidResourceTypeException": newErrorInvalidResourceTypeException,
"InvalidStateTransitionException": newErrorInvalidStateTransitionException,
"MalformedArnException": newErrorMalformedArnException,
"MalformedPolicyTemplateException": newErrorMalformedPolicyTemplateException,
"MissingRequiredParameterException": newErrorMissingRequiredParameterException,
"OperationNotPermittedException": newErrorOperationNotPermittedException,
"PermissionAlreadyExistsException": newErrorPermissionAlreadyExistsException,
"PermissionLimitExceededException": newErrorPermissionLimitExceededException,
"PermissionVersionsLimitExceededException": newErrorPermissionVersionsLimitExceededException,
"ResourceArnNotFoundException": newErrorResourceArnNotFoundException,
"ResourceShareInvitationAlreadyAcceptedException": newErrorResourceShareInvitationAlreadyAcceptedException,
"ResourceShareInvitationAlreadyRejectedException": newErrorResourceShareInvitationAlreadyRejectedException,
"ResourceShareInvitationArnNotFoundException": newErrorResourceShareInvitationArnNotFoundException,
"ResourceShareInvitationExpiredException": newErrorResourceShareInvitationExpiredException,
"ResourceShareLimitExceededException": newErrorResourceShareLimitExceededException,
"ServerInternalException": newErrorServerInternalException,
"ServiceUnavailableException": newErrorServiceUnavailableException,
"TagLimitExceededException": newErrorTagLimitExceededException,
"TagPolicyViolationException": newErrorTagPolicyViolationException,
"ThrottlingException": newErrorThrottlingException,
"UnknownResourceException": newErrorUnknownResourceException,
"UnmatchedPolicyPermissionException": newErrorUnmatchedPolicyPermissionException,
}