-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
errors.go
482 lines (425 loc) · 24.6 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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package configservice
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeConformancePackTemplateValidationException for service response error code
// "ConformancePackTemplateValidationException".
//
// You have specified a template that is not valid or supported.
ErrCodeConformancePackTemplateValidationException = "ConformancePackTemplateValidationException"
// ErrCodeInsufficientDeliveryPolicyException for service response error code
// "InsufficientDeliveryPolicyException".
//
// Your Amazon S3 bucket policy does not permit Config to write to it.
ErrCodeInsufficientDeliveryPolicyException = "InsufficientDeliveryPolicyException"
// ErrCodeInsufficientPermissionsException for service response error code
// "InsufficientPermissionsException".
//
// Indicates one of the following errors:
//
// * For PutConfigRule, the rule cannot be created because the IAM role assigned
// to Config lacks permissions to perform the config:Put* action.
//
// * For PutConfigRule, the Lambda function cannot be invoked. Check the
// function ARN, and check the function's permissions.
//
// * For PutOrganizationConfigRule, organization Config rule cannot be created
// because you do not have permissions to call IAM GetRole action or create
// a service linked role.
//
// * For PutConformancePack and PutOrganizationConformancePack, a conformance
// pack cannot be created because you do not have permissions: To call IAM
// GetRole action or create a service linked role. To read Amazon S3 bucket.
ErrCodeInsufficientPermissionsException = "InsufficientPermissionsException"
// ErrCodeInvalidConfigurationRecorderNameException for service response error code
// "InvalidConfigurationRecorderNameException".
//
// You have provided a configuration recorder name that is not valid.
ErrCodeInvalidConfigurationRecorderNameException = "InvalidConfigurationRecorderNameException"
// ErrCodeInvalidDeliveryChannelNameException for service response error code
// "InvalidDeliveryChannelNameException".
//
// The specified delivery channel name is not valid.
ErrCodeInvalidDeliveryChannelNameException = "InvalidDeliveryChannelNameException"
// ErrCodeInvalidExpressionException for service response error code
// "InvalidExpressionException".
//
// The syntax of the query is incorrect.
ErrCodeInvalidExpressionException = "InvalidExpressionException"
// ErrCodeInvalidLimitException for service response error code
// "InvalidLimitException".
//
// The specified limit is outside the allowable range.
ErrCodeInvalidLimitException = "InvalidLimitException"
// ErrCodeInvalidNextTokenException for service response error code
// "InvalidNextTokenException".
//
// The specified next token is invalid. Specify the nextToken string that was
// returned in the previous response to get the next page of results.
ErrCodeInvalidNextTokenException = "InvalidNextTokenException"
// ErrCodeInvalidParameterValueException for service response error code
// "InvalidParameterValueException".
//
// One or more of the specified parameters are invalid. Verify that your parameters
// are valid and try again.
ErrCodeInvalidParameterValueException = "InvalidParameterValueException"
// ErrCodeInvalidRecordingGroupException for service response error code
// "InvalidRecordingGroupException".
//
// Config throws an exception if the recording group does not contain a valid
// list of resource types. Invalid values might also be incorrectly formatted.
ErrCodeInvalidRecordingGroupException = "InvalidRecordingGroupException"
// ErrCodeInvalidResultTokenException for service response error code
// "InvalidResultTokenException".
//
// The specified ResultToken is invalid.
ErrCodeInvalidResultTokenException = "InvalidResultTokenException"
// ErrCodeInvalidRoleException for service response error code
// "InvalidRoleException".
//
// You have provided a null or empty role ARN.
ErrCodeInvalidRoleException = "InvalidRoleException"
// ErrCodeInvalidS3KeyPrefixException for service response error code
// "InvalidS3KeyPrefixException".
//
// The specified Amazon S3 key prefix is not valid.
ErrCodeInvalidS3KeyPrefixException = "InvalidS3KeyPrefixException"
// ErrCodeInvalidS3KmsKeyArnException for service response error code
// "InvalidS3KmsKeyArnException".
//
// The specified Amazon KMS Key ARN is not valid.
ErrCodeInvalidS3KmsKeyArnException = "InvalidS3KmsKeyArnException"
// ErrCodeInvalidSNSTopicARNException for service response error code
// "InvalidSNSTopicARNException".
//
// The specified Amazon SNS topic does not exist.
ErrCodeInvalidSNSTopicARNException = "InvalidSNSTopicARNException"
// ErrCodeInvalidTimeRangeException for service response error code
// "InvalidTimeRangeException".
//
// The specified time range is not valid. The earlier time is not chronologically
// before the later time.
ErrCodeInvalidTimeRangeException = "InvalidTimeRangeException"
// ErrCodeLastDeliveryChannelDeleteFailedException for service response error code
// "LastDeliveryChannelDeleteFailedException".
//
// You cannot delete the delivery channel you specified because the configuration
// recorder is running.
ErrCodeLastDeliveryChannelDeleteFailedException = "LastDeliveryChannelDeleteFailedException"
// ErrCodeLimitExceededException for service response error code
// "LimitExceededException".
//
// For StartConfigRulesEvaluation API, this exception is thrown if an evaluation
// is in progress or if you call the StartConfigRulesEvaluation API more than
// once per minute.
//
// For PutConfigurationAggregator API, this exception is thrown if the number
// of accounts and aggregators exceeds the limit.
ErrCodeLimitExceededException = "LimitExceededException"
// ErrCodeMaxActiveResourcesExceededException for service response error code
// "MaxActiveResourcesExceededException".
//
// You have reached the limit (100,000) of active custom resource types in your
// account. Delete unused resources using DeleteResourceConfig.
ErrCodeMaxActiveResourcesExceededException = "MaxActiveResourcesExceededException"
// ErrCodeMaxNumberOfConfigRulesExceededException for service response error code
// "MaxNumberOfConfigRulesExceededException".
//
// Failed to add the Config rule because the account already contains the maximum
// number of 150 rules. Consider deleting any deactivated rules before you add
// new rules.
ErrCodeMaxNumberOfConfigRulesExceededException = "MaxNumberOfConfigRulesExceededException"
// ErrCodeMaxNumberOfConfigurationRecordersExceededException for service response error code
// "MaxNumberOfConfigurationRecordersExceededException".
//
// You have reached the limit of the number of recorders you can create.
ErrCodeMaxNumberOfConfigurationRecordersExceededException = "MaxNumberOfConfigurationRecordersExceededException"
// ErrCodeMaxNumberOfConformancePacksExceededException for service response error code
// "MaxNumberOfConformancePacksExceededException".
//
// You have reached the limit (6) of the number of conformance packs in an account
// (6 conformance pack with 25 Config rules per pack).
ErrCodeMaxNumberOfConformancePacksExceededException = "MaxNumberOfConformancePacksExceededException"
// ErrCodeMaxNumberOfDeliveryChannelsExceededException for service response error code
// "MaxNumberOfDeliveryChannelsExceededException".
//
// You have reached the limit of the number of delivery channels you can create.
ErrCodeMaxNumberOfDeliveryChannelsExceededException = "MaxNumberOfDeliveryChannelsExceededException"
// ErrCodeMaxNumberOfOrganizationConfigRulesExceededException for service response error code
// "MaxNumberOfOrganizationConfigRulesExceededException".
//
// You have reached the limit of the number of organization Config rules you
// can create.
ErrCodeMaxNumberOfOrganizationConfigRulesExceededException = "MaxNumberOfOrganizationConfigRulesExceededException"
// ErrCodeMaxNumberOfOrganizationConformancePacksExceededException for service response error code
// "MaxNumberOfOrganizationConformancePacksExceededException".
//
// You have reached the limit (6) of the number of organization conformance
// packs in an account (6 conformance pack with 25 Config rules per pack per
// account).
ErrCodeMaxNumberOfOrganizationConformancePacksExceededException = "MaxNumberOfOrganizationConformancePacksExceededException"
// ErrCodeMaxNumberOfRetentionConfigurationsExceededException for service response error code
// "MaxNumberOfRetentionConfigurationsExceededException".
//
// Failed to add the retention configuration because a retention configuration
// with that name already exists.
ErrCodeMaxNumberOfRetentionConfigurationsExceededException = "MaxNumberOfRetentionConfigurationsExceededException"
// ErrCodeNoAvailableConfigurationRecorderException for service response error code
// "NoAvailableConfigurationRecorderException".
//
// There are no configuration recorders available to provide the role needed
// to describe your resources. Create a configuration recorder.
ErrCodeNoAvailableConfigurationRecorderException = "NoAvailableConfigurationRecorderException"
// ErrCodeNoAvailableDeliveryChannelException for service response error code
// "NoAvailableDeliveryChannelException".
//
// There is no delivery channel available to record configurations.
ErrCodeNoAvailableDeliveryChannelException = "NoAvailableDeliveryChannelException"
// ErrCodeNoAvailableOrganizationException for service response error code
// "NoAvailableOrganizationException".
//
// Organization is no longer available.
ErrCodeNoAvailableOrganizationException = "NoAvailableOrganizationException"
// ErrCodeNoRunningConfigurationRecorderException for service response error code
// "NoRunningConfigurationRecorderException".
//
// There is no configuration recorder running.
ErrCodeNoRunningConfigurationRecorderException = "NoRunningConfigurationRecorderException"
// ErrCodeNoSuchBucketException for service response error code
// "NoSuchBucketException".
//
// The specified Amazon S3 bucket does not exist.
ErrCodeNoSuchBucketException = "NoSuchBucketException"
// ErrCodeNoSuchConfigRuleException for service response error code
// "NoSuchConfigRuleException".
//
// The Config rule in the request is not valid. Verify that the rule is an Config
// Custom Policy rule, that the rule name is correct, and that valid Amazon
// Resouce Names (ARNs) are used before trying again.
ErrCodeNoSuchConfigRuleException = "NoSuchConfigRuleException"
// ErrCodeNoSuchConfigRuleInConformancePackException for service response error code
// "NoSuchConfigRuleInConformancePackException".
//
// Config rule that you passed in the filter does not exist.
ErrCodeNoSuchConfigRuleInConformancePackException = "NoSuchConfigRuleInConformancePackException"
// ErrCodeNoSuchConfigurationAggregatorException for service response error code
// "NoSuchConfigurationAggregatorException".
//
// You have specified a configuration aggregator that does not exist.
ErrCodeNoSuchConfigurationAggregatorException = "NoSuchConfigurationAggregatorException"
// ErrCodeNoSuchConfigurationRecorderException for service response error code
// "NoSuchConfigurationRecorderException".
//
// You have specified a configuration recorder that does not exist.
ErrCodeNoSuchConfigurationRecorderException = "NoSuchConfigurationRecorderException"
// ErrCodeNoSuchConformancePackException for service response error code
// "NoSuchConformancePackException".
//
// You specified one or more conformance packs that do not exist.
ErrCodeNoSuchConformancePackException = "NoSuchConformancePackException"
// ErrCodeNoSuchDeliveryChannelException for service response error code
// "NoSuchDeliveryChannelException".
//
// You have specified a delivery channel that does not exist.
ErrCodeNoSuchDeliveryChannelException = "NoSuchDeliveryChannelException"
// ErrCodeNoSuchOrganizationConfigRuleException for service response error code
// "NoSuchOrganizationConfigRuleException".
//
// The Config rule in the request is not valid. Verify that the rule is an organization
// Config Custom Policy rule, that the rule name is correct, and that valid
// Amazon Resouce Names (ARNs) are used before trying again.
ErrCodeNoSuchOrganizationConfigRuleException = "NoSuchOrganizationConfigRuleException"
// ErrCodeNoSuchOrganizationConformancePackException for service response error code
// "NoSuchOrganizationConformancePackException".
//
// Config organization conformance pack that you passed in the filter does not
// exist.
//
// For DeleteOrganizationConformancePack, you tried to delete an organization
// conformance pack that does not exist.
ErrCodeNoSuchOrganizationConformancePackException = "NoSuchOrganizationConformancePackException"
// ErrCodeNoSuchRemediationConfigurationException for service response error code
// "NoSuchRemediationConfigurationException".
//
// You specified an Config rule without a remediation configuration.
ErrCodeNoSuchRemediationConfigurationException = "NoSuchRemediationConfigurationException"
// ErrCodeNoSuchRemediationExceptionException for service response error code
// "NoSuchRemediationExceptionException".
//
// You tried to delete a remediation exception that does not exist.
ErrCodeNoSuchRemediationExceptionException = "NoSuchRemediationExceptionException"
// ErrCodeNoSuchRetentionConfigurationException for service response error code
// "NoSuchRetentionConfigurationException".
//
// You have specified a retention configuration that does not exist.
ErrCodeNoSuchRetentionConfigurationException = "NoSuchRetentionConfigurationException"
// ErrCodeOrganizationAccessDeniedException for service response error code
// "OrganizationAccessDeniedException".
//
// For PutConfigurationAggregator API, you can see this exception for the following
// reasons:
//
// * No permission to call EnableAWSServiceAccess API
//
// * The configuration aggregator cannot be updated because your Amazon Web
// Services Organization management account or the delegated administrator
// role changed. Delete this aggregator and create a new one with the current
// Amazon Web Services Organization.
//
// * The configuration aggregator is associated with a previous Amazon Web
// Services Organization and Config cannot aggregate data with current Amazon
// Web Services Organization. Delete this aggregator and create a new one
// with the current Amazon Web Services Organization.
//
// * You are not a registered delegated administrator for Config with permissions
// to call ListDelegatedAdministrators API. Ensure that the management account
// registers delagated administrator for Config service principle name before
// the delegated administrator creates an aggregator.
//
// For all OrganizationConfigRule and OrganizationConformancePack APIs, Config
// throws an exception if APIs are called from member accounts. All APIs must
// be called from organization master account.
ErrCodeOrganizationAccessDeniedException = "OrganizationAccessDeniedException"
// ErrCodeOrganizationAllFeaturesNotEnabledException for service response error code
// "OrganizationAllFeaturesNotEnabledException".
//
// Config resource cannot be created because your organization does not have
// all features enabled.
ErrCodeOrganizationAllFeaturesNotEnabledException = "OrganizationAllFeaturesNotEnabledException"
// ErrCodeOrganizationConformancePackTemplateValidationException for service response error code
// "OrganizationConformancePackTemplateValidationException".
//
// You have specified a template that is not valid or supported.
ErrCodeOrganizationConformancePackTemplateValidationException = "OrganizationConformancePackTemplateValidationException"
// ErrCodeOversizedConfigurationItemException for service response error code
// "OversizedConfigurationItemException".
//
// The configuration item size is outside the allowable range.
ErrCodeOversizedConfigurationItemException = "OversizedConfigurationItemException"
// ErrCodeRemediationInProgressException for service response error code
// "RemediationInProgressException".
//
// Remediation action is in progress. You can either cancel execution in Amazon
// Web Services Systems Manager or wait and try again later.
ErrCodeRemediationInProgressException = "RemediationInProgressException"
// ErrCodeResourceConcurrentModificationException for service response error code
// "ResourceConcurrentModificationException".
//
// Two users are trying to modify the same query at the same time. Wait for
// a moment and try again.
ErrCodeResourceConcurrentModificationException = "ResourceConcurrentModificationException"
// ErrCodeResourceInUseException for service response error code
// "ResourceInUseException".
//
// You see this exception in the following cases:
//
// * For DeleteConfigRule, Config is deleting this rule. Try your request
// again later.
//
// * For DeleteConfigRule, the rule is deleting your evaluation results.
// Try your request again later.
//
// * For DeleteConfigRule, a remediation action is associated with the rule
// and Config cannot delete this rule. Delete the remediation action associated
// with the rule before deleting the rule and try your request again later.
//
// * For PutConfigOrganizationRule, organization Config rule deletion is
// in progress. Try your request again later.
//
// * For DeleteOrganizationConfigRule, organization Config rule creation
// is in progress. Try your request again later.
//
// * For PutConformancePack and PutOrganizationConformancePack, a conformance
// pack creation, update, and deletion is in progress. Try your request again
// later.
//
// * For DeleteConformancePack, a conformance pack creation, update, and
// deletion is in progress. Try your request again later.
ErrCodeResourceInUseException = "ResourceInUseException"
// ErrCodeResourceNotDiscoveredException for service response error code
// "ResourceNotDiscoveredException".
//
// You have specified a resource that is either unknown or has not been discovered.
ErrCodeResourceNotDiscoveredException = "ResourceNotDiscoveredException"
// ErrCodeResourceNotFoundException for service response error code
// "ResourceNotFoundException".
//
// You have specified a resource that does not exist.
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
// ErrCodeTooManyTagsException for service response error code
// "TooManyTagsException".
//
// You have reached the limit of the number of tags you can use. You have more
// than 50 tags.
ErrCodeTooManyTagsException = "TooManyTagsException"
// ErrCodeValidationException for service response error code
// "ValidationException".
//
// The requested action is not valid.
//
// For PutStoredQuery, you will see this exception if there are missing required
// fields or if the input value fails the validation, or if you are trying to
// create more than 300 queries.
//
// For GetStoredQuery, ListStoredQuery, and DeleteStoredQuery you will see this
// exception if there are missing required fields or if the input value fails
// the validation.
ErrCodeValidationException = "ValidationException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"ConformancePackTemplateValidationException": newErrorConformancePackTemplateValidationException,
"InsufficientDeliveryPolicyException": newErrorInsufficientDeliveryPolicyException,
"InsufficientPermissionsException": newErrorInsufficientPermissionsException,
"InvalidConfigurationRecorderNameException": newErrorInvalidConfigurationRecorderNameException,
"InvalidDeliveryChannelNameException": newErrorInvalidDeliveryChannelNameException,
"InvalidExpressionException": newErrorInvalidExpressionException,
"InvalidLimitException": newErrorInvalidLimitException,
"InvalidNextTokenException": newErrorInvalidNextTokenException,
"InvalidParameterValueException": newErrorInvalidParameterValueException,
"InvalidRecordingGroupException": newErrorInvalidRecordingGroupException,
"InvalidResultTokenException": newErrorInvalidResultTokenException,
"InvalidRoleException": newErrorInvalidRoleException,
"InvalidS3KeyPrefixException": newErrorInvalidS3KeyPrefixException,
"InvalidS3KmsKeyArnException": newErrorInvalidS3KmsKeyArnException,
"InvalidSNSTopicARNException": newErrorInvalidSNSTopicARNException,
"InvalidTimeRangeException": newErrorInvalidTimeRangeException,
"LastDeliveryChannelDeleteFailedException": newErrorLastDeliveryChannelDeleteFailedException,
"LimitExceededException": newErrorLimitExceededException,
"MaxActiveResourcesExceededException": newErrorMaxActiveResourcesExceededException,
"MaxNumberOfConfigRulesExceededException": newErrorMaxNumberOfConfigRulesExceededException,
"MaxNumberOfConfigurationRecordersExceededException": newErrorMaxNumberOfConfigurationRecordersExceededException,
"MaxNumberOfConformancePacksExceededException": newErrorMaxNumberOfConformancePacksExceededException,
"MaxNumberOfDeliveryChannelsExceededException": newErrorMaxNumberOfDeliveryChannelsExceededException,
"MaxNumberOfOrganizationConfigRulesExceededException": newErrorMaxNumberOfOrganizationConfigRulesExceededException,
"MaxNumberOfOrganizationConformancePacksExceededException": newErrorMaxNumberOfOrganizationConformancePacksExceededException,
"MaxNumberOfRetentionConfigurationsExceededException": newErrorMaxNumberOfRetentionConfigurationsExceededException,
"NoAvailableConfigurationRecorderException": newErrorNoAvailableConfigurationRecorderException,
"NoAvailableDeliveryChannelException": newErrorNoAvailableDeliveryChannelException,
"NoAvailableOrganizationException": newErrorNoAvailableOrganizationException,
"NoRunningConfigurationRecorderException": newErrorNoRunningConfigurationRecorderException,
"NoSuchBucketException": newErrorNoSuchBucketException,
"NoSuchConfigRuleException": newErrorNoSuchConfigRuleException,
"NoSuchConfigRuleInConformancePackException": newErrorNoSuchConfigRuleInConformancePackException,
"NoSuchConfigurationAggregatorException": newErrorNoSuchConfigurationAggregatorException,
"NoSuchConfigurationRecorderException": newErrorNoSuchConfigurationRecorderException,
"NoSuchConformancePackException": newErrorNoSuchConformancePackException,
"NoSuchDeliveryChannelException": newErrorNoSuchDeliveryChannelException,
"NoSuchOrganizationConfigRuleException": newErrorNoSuchOrganizationConfigRuleException,
"NoSuchOrganizationConformancePackException": newErrorNoSuchOrganizationConformancePackException,
"NoSuchRemediationConfigurationException": newErrorNoSuchRemediationConfigurationException,
"NoSuchRemediationExceptionException": newErrorNoSuchRemediationExceptionException,
"NoSuchRetentionConfigurationException": newErrorNoSuchRetentionConfigurationException,
"OrganizationAccessDeniedException": newErrorOrganizationAccessDeniedException,
"OrganizationAllFeaturesNotEnabledException": newErrorOrganizationAllFeaturesNotEnabledException,
"OrganizationConformancePackTemplateValidationException": newErrorOrganizationConformancePackTemplateValidationException,
"OversizedConfigurationItemException": newErrorOversizedConfigurationItemException,
"RemediationInProgressException": newErrorRemediationInProgressException,
"ResourceConcurrentModificationException": newErrorResourceConcurrentModificationException,
"ResourceInUseException": newErrorResourceInUseException,
"ResourceNotDiscoveredException": newErrorResourceNotDiscoveredException,
"ResourceNotFoundException": newErrorResourceNotFoundException,
"TooManyTagsException": newErrorTooManyTagsException,
"ValidationException": newErrorValidationException,
}