/
errors.go
650 lines (600 loc) · 32.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
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
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package organizations
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeAWSOrganizationsNotInUseException for service response error code
// "AWSOrganizationsNotInUseException".
//
// Your account isn't a member of an organization. To make this request, you
// must use the credentials of an account that belongs to an organization.
ErrCodeAWSOrganizationsNotInUseException = "AWSOrganizationsNotInUseException"
// ErrCodeAccessDeniedException for service response error code
// "AccessDeniedException".
//
// You don't have permissions to perform the requested operation. The user or
// role that is making the request must have at least one IAM permissions policy
// attached that grants the required permissions. For more information, see
// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
// in the IAM User Guide.
ErrCodeAccessDeniedException = "AccessDeniedException"
// ErrCodeAccessDeniedForDependencyException for service response error code
// "AccessDeniedForDependencyException".
//
// The operation that you attempted requires you to have the iam:CreateServiceLinkedRole
// for organizations.amazonaws.com permission so that Organizations can create
// the required service-linked role. You don't have that permission.
ErrCodeAccessDeniedForDependencyException = "AccessDeniedForDependencyException"
// ErrCodeAccountAlreadyClosedException for service response error code
// "AccountAlreadyClosedException".
//
// You attempted to close an account that is already closed.
ErrCodeAccountAlreadyClosedException = "AccountAlreadyClosedException"
// ErrCodeAccountAlreadyRegisteredException for service response error code
// "AccountAlreadyRegisteredException".
//
// The specified account is already a delegated administrator for this Amazon
// Web Services service.
ErrCodeAccountAlreadyRegisteredException = "AccountAlreadyRegisteredException"
// ErrCodeAccountNotFoundException for service response error code
// "AccountNotFoundException".
//
// We can't find an Amazon Web Services account with the AccountId that you
// specified, or the account whose credentials you used to make this request
// isn't a member of an organization.
ErrCodeAccountNotFoundException = "AccountNotFoundException"
// ErrCodeAccountNotRegisteredException for service response error code
// "AccountNotRegisteredException".
//
// The specified account is not a delegated administrator for this Amazon Web
// Services service.
ErrCodeAccountNotRegisteredException = "AccountNotRegisteredException"
// ErrCodeAccountOwnerNotVerifiedException for service response error code
// "AccountOwnerNotVerifiedException".
//
// You can't invite an existing account to your organization until you verify
// that you own the email address associated with the management account. For
// more information, see Email Address Verification (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_create.html#about-email-verification)
// in the Organizations User Guide.
ErrCodeAccountOwnerNotVerifiedException = "AccountOwnerNotVerifiedException"
// ErrCodeAlreadyInOrganizationException for service response error code
// "AlreadyInOrganizationException".
//
// This account is already a member of an organization. An account can belong
// to only one organization at a time.
ErrCodeAlreadyInOrganizationException = "AlreadyInOrganizationException"
// ErrCodeChildNotFoundException for service response error code
// "ChildNotFoundException".
//
// We can't find an organizational unit (OU) or Amazon Web Services account
// with the ChildId that you specified.
ErrCodeChildNotFoundException = "ChildNotFoundException"
// ErrCodeConcurrentModificationException for service response error code
// "ConcurrentModificationException".
//
// The target of the operation is currently being modified by a different request.
// Try again later.
ErrCodeConcurrentModificationException = "ConcurrentModificationException"
// ErrCodeConflictException for service response error code
// "ConflictException".
//
// The request failed because it conflicts with the current state of the specified
// resource.
ErrCodeConflictException = "ConflictException"
// ErrCodeConstraintViolationException for service response error code
// "ConstraintViolationException".
//
// Performing this operation violates a minimum or maximum value limit. For
// example, attempting to remove the last service control policy (SCP) from
// an OU or root, inviting or creating too many accounts to the organization,
// or attaching too many policies to an account, OU, or root. This exception
// includes a reason that contains additional information about the violated
// limit:
//
// Some of the reasons in the following list might not be applicable to this
// specific API or operation.
//
// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
// account from the organization. You can't remove the management account.
// Instead, after you remove all member accounts, delete the organization
// itself.
//
// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
// an account from the organization that doesn't yet have enough information
// to exist as a standalone account. This account requires you to first complete
// phone verification. Follow the steps at Removing a member account from
// your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
// in the Organizations User Guide.
//
// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
// of accounts that you can create in one day.
//
// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
// the number of accounts in an organization. If you need more accounts,
// contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
// to request an increase in your limit. Or the number of invitations that
// you tried to send would cause you to exceed the limit of accounts in your
// organization. Send fewer invitations or contact Amazon Web Services Support
// to request an increase in the number of accounts. Deleted and closed accounts
// still count toward your limit. If you get this exception when running
// a command immediately after creating the organization, wait one hour and
// try again. After an hour, if the command continues to fail with this error,
// contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
//
// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
// register the management account of the organization as a delegated administrator
// for an Amazon Web Services service integrated with Organizations. You
// can designate only a member account as a delegated administrator.
//
// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
// an account that is registered as a delegated administrator for a service
// integrated with your organization. To complete this operation, you must
// first deregister this account as a delegated administrator.
//
// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
// organization in the specified region, you must enable all features mode.
//
// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
// an Amazon Web Services account as a delegated administrator for an Amazon
// Web Services service that already has a delegated administrator. To complete
// this operation, you must first deregister any existing delegated administrators
// for this service.
//
// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
// valid for a limited period of time. You must resubmit the request and
// generate a new verfication code.
//
// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
// handshakes that you can send in one day.
//
// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
// in this organization, you first must migrate the organization's management
// account to the marketplace that corresponds to the management account's
// address. For example, accounts with India addresses must be associated
// with the AISPL marketplace. All accounts in an organization must be associated
// with the same marketplace.
//
// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
// Web Services /> Regions in China. To create an organization, the master
// must have a valid business license. For more information, contact customer
// support.
//
// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
// must first provide a valid contact address and phone number for the management
// account. Then try the operation again.
//
// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
// management account must have an associated account in the Amazon Web Services
// GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
// in the Amazon Web Services GovCloud User Guide.
//
// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
// with this management account, you first must associate a valid payment
// instrument, such as a credit card, with the account. Follow the steps
// at To leave an organization when all required account information has
// not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
// in the Organizations User Guide.
//
// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
// to register more delegated administrators than allowed for the service
// principal.
//
// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
// number of policies of a certain type that can be attached to an entity
// at one time.
//
// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
// on this resource.
//
// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
// with this member account, you first must associate a valid payment instrument,
// such as a credit card, with the account. Follow the steps at To leave
// an organization when all required account information has not yet been
// provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
// in the Organizations User Guide.
//
// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
// policy from an entity that would cause the entity to have fewer than the
// minimum number of policies of a certain type required.
//
// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
// that requires the organization to be configured to support all features.
// An organization that supports only consolidated billing features can't
// perform this operation.
//
// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
// too many levels deep.
//
// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
// that you can have in an organization.
//
// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
// is larger than the maximum size.
//
// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
// policies that you can have in an organization.
//
// * SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
// before you enabled service access. Call the EnableAWSServiceAccess API
// first.
//
// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
// tags that are not compliant with the tag policy requirements for this
// account.
//
// * WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
// there is a waiting period before you can remove it from the organization.
// If you get an error that indicates that a wait period is required, try
// again in a few days.
ErrCodeConstraintViolationException = "ConstraintViolationException"
// ErrCodeCreateAccountStatusNotFoundException for service response error code
// "CreateAccountStatusNotFoundException".
//
// We can't find an create account request with the CreateAccountRequestId that
// you specified.
ErrCodeCreateAccountStatusNotFoundException = "CreateAccountStatusNotFoundException"
// ErrCodeDestinationParentNotFoundException for service response error code
// "DestinationParentNotFoundException".
//
// We can't find the destination container (a root or OU) with the ParentId
// that you specified.
ErrCodeDestinationParentNotFoundException = "DestinationParentNotFoundException"
// ErrCodeDuplicateAccountException for service response error code
// "DuplicateAccountException".
//
// That account is already present in the specified destination.
ErrCodeDuplicateAccountException = "DuplicateAccountException"
// ErrCodeDuplicateHandshakeException for service response error code
// "DuplicateHandshakeException".
//
// A handshake with the same action and target already exists. For example,
// if you invited an account to join your organization, the invited account
// might already have a pending invitation from this organization. If you intend
// to resend an invitation to an account, ensure that existing handshakes that
// might be considered duplicates are canceled or declined.
ErrCodeDuplicateHandshakeException = "DuplicateHandshakeException"
// ErrCodeDuplicateOrganizationalUnitException for service response error code
// "DuplicateOrganizationalUnitException".
//
// An OU with the same name already exists.
ErrCodeDuplicateOrganizationalUnitException = "DuplicateOrganizationalUnitException"
// ErrCodeDuplicatePolicyAttachmentException for service response error code
// "DuplicatePolicyAttachmentException".
//
// The selected policy is already attached to the specified target.
ErrCodeDuplicatePolicyAttachmentException = "DuplicatePolicyAttachmentException"
// ErrCodeDuplicatePolicyException for service response error code
// "DuplicatePolicyException".
//
// A policy with the same name already exists.
ErrCodeDuplicatePolicyException = "DuplicatePolicyException"
// ErrCodeEffectivePolicyNotFoundException for service response error code
// "EffectivePolicyNotFoundException".
//
// If you ran this action on the management account, this policy type is not
// enabled. If you ran the action on a member account, the account doesn't have
// an effective policy of this type. Contact the administrator of your organization
// about attaching a policy of this type to the account.
ErrCodeEffectivePolicyNotFoundException = "EffectivePolicyNotFoundException"
// ErrCodeFinalizingOrganizationException for service response error code
// "FinalizingOrganizationException".
//
// Organizations couldn't perform the operation because your organization hasn't
// finished initializing. This can take up to an hour. Try again later. If after
// one hour you continue to receive this error, contact Amazon Web Services
// Support (https://console.aws.amazon.com/support/home#/).
ErrCodeFinalizingOrganizationException = "FinalizingOrganizationException"
// ErrCodeHandshakeAlreadyInStateException for service response error code
// "HandshakeAlreadyInStateException".
//
// The specified handshake is already in the requested state. For example, you
// can't accept a handshake that was already accepted.
ErrCodeHandshakeAlreadyInStateException = "HandshakeAlreadyInStateException"
// ErrCodeHandshakeConstraintViolationException for service response error code
// "HandshakeConstraintViolationException".
//
// The requested operation would violate the constraint identified in the reason
// code.
//
// Some of the reasons in the following list might not be applicable to this
// specific API or operation:
//
// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
// the number of accounts in an organization. Note that deleted and closed
// accounts still count toward your limit. If you get this exception immediately
// after creating the organization, wait one hour and try again. If after
// an hour it continues to fail with this error, contact Amazon Web Services
// Support (https://docs.aws.amazon.com/support/home#/).
//
// * ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because
// the invited account is already a member of an organization.
//
// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
// handshakes that you can send in one day.
//
// * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations
// to join an organization while it's in the process of enabling all features.
// You can resume inviting accounts after you finalize the process when all
// accounts have agreed to the change.
//
// * ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid
// because the organization has already enabled all features.
//
// * ORGANIZATION_IS_ALREADY_PENDING_ALL_FEATURES_MIGRATION: The handshake
// request is invalid because the organization has already started the process
// to enable all features.
//
// * ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because
// the account is from a different marketplace than the accounts in the organization.
// For example, accounts with India addresses must be associated with the
// AISPL marketplace. All accounts in an organization must be from the same
// marketplace.
//
// * ORGANIZATION_MEMBERSHIP_CHANGE_RATE_LIMIT_EXCEEDED: You attempted to
// change the membership of an account too quickly after its previous change.
//
// * PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an
// account that doesn't have a payment instrument, such as a credit card,
// associated with it.
ErrCodeHandshakeConstraintViolationException = "HandshakeConstraintViolationException"
// ErrCodeHandshakeNotFoundException for service response error code
// "HandshakeNotFoundException".
//
// We can't find a handshake with the HandshakeId that you specified.
ErrCodeHandshakeNotFoundException = "HandshakeNotFoundException"
// ErrCodeInvalidHandshakeTransitionException for service response error code
// "InvalidHandshakeTransitionException".
//
// You can't perform the operation on the handshake in its current state. For
// example, you can't cancel a handshake that was already accepted or accept
// a handshake that was already declined.
ErrCodeInvalidHandshakeTransitionException = "InvalidHandshakeTransitionException"
// ErrCodeInvalidInputException for service response error code
// "InvalidInputException".
//
// The requested operation failed because you provided invalid values for one
// or more of the request parameters. This exception includes a reason that
// contains additional information about the violated limit:
//
// Some of the reasons in the following list might not be applicable to this
// specific API or operation.
//
// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
// the same entity.
//
// * IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
// Services and can't be modified.
//
// * INPUT_REQUIRED: You must include a value for all required parameters.
//
// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
// for the invited account owner.
//
// * INVALID_ENUM: You specified an invalid value.
//
// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
//
// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
// characters.
//
// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
// at least one invalid value.
//
// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
// from the response to a previous call of the operation.
//
// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
// organization, or email) as a party.
//
// * INVALID_PATTERN: You provided a value that doesn't match the required
// pattern.
//
// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
// match the required pattern.
//
// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
// name can't begin with the reserved prefix AWSServiceRoleFor.
//
// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
// Name (ARN) for the organization.
//
// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
//
// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
// tag. You can’t add, edit, or delete system tag keys because they're
// reserved for Amazon Web Services use. System tags don’t count against
// your tags per resource limit.
//
// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
// for the operation.
//
// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
// than allowed.
//
// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
// value than allowed.
//
// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
// than allowed.
//
// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
// value than allowed.
//
// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
// between entities in the same root.
//
// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
// target entity.
//
// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
// isn't recognized.
ErrCodeInvalidInputException = "InvalidInputException"
// ErrCodeMalformedPolicyDocumentException for service response error code
// "MalformedPolicyDocumentException".
//
// The provided policy document doesn't meet the requirements of the specified
// policy type. For example, the syntax might be incorrect. For details about
// service control policy syntax, see Service Control Policy Syntax (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html)
// in the Organizations User Guide.
ErrCodeMalformedPolicyDocumentException = "MalformedPolicyDocumentException"
// ErrCodeMasterCannotLeaveOrganizationException for service response error code
// "MasterCannotLeaveOrganizationException".
//
// You can't remove a management account from an organization. If you want the
// management account to become a member account in another organization, you
// must first delete the current organization of the management account.
ErrCodeMasterCannotLeaveOrganizationException = "MasterCannotLeaveOrganizationException"
// ErrCodeOrganizationNotEmptyException for service response error code
// "OrganizationNotEmptyException".
//
// The organization isn't empty. To delete an organization, you must first remove
// all accounts except the management account, delete all OUs, and delete all
// policies.
ErrCodeOrganizationNotEmptyException = "OrganizationNotEmptyException"
// ErrCodeOrganizationalUnitNotEmptyException for service response error code
// "OrganizationalUnitNotEmptyException".
//
// The specified OU is not empty. Move all accounts to another root or to other
// OUs, remove all child OUs, and try the operation again.
ErrCodeOrganizationalUnitNotEmptyException = "OrganizationalUnitNotEmptyException"
// ErrCodeOrganizationalUnitNotFoundException for service response error code
// "OrganizationalUnitNotFoundException".
//
// We can't find an OU with the OrganizationalUnitId that you specified.
ErrCodeOrganizationalUnitNotFoundException = "OrganizationalUnitNotFoundException"
// ErrCodeParentNotFoundException for service response error code
// "ParentNotFoundException".
//
// We can't find a root or OU with the ParentId that you specified.
ErrCodeParentNotFoundException = "ParentNotFoundException"
// ErrCodePolicyChangesInProgressException for service response error code
// "PolicyChangesInProgressException".
//
// Changes to the effective policy are in progress, and its contents can't be
// returned. Try the operation again later.
ErrCodePolicyChangesInProgressException = "PolicyChangesInProgressException"
// ErrCodePolicyInUseException for service response error code
// "PolicyInUseException".
//
// The policy is attached to one or more entities. You must detach it from all
// roots, OUs, and accounts before performing this operation.
ErrCodePolicyInUseException = "PolicyInUseException"
// ErrCodePolicyNotAttachedException for service response error code
// "PolicyNotAttachedException".
//
// The policy isn't attached to the specified target in the specified root.
ErrCodePolicyNotAttachedException = "PolicyNotAttachedException"
// ErrCodePolicyNotFoundException for service response error code
// "PolicyNotFoundException".
//
// We can't find a policy with the PolicyId that you specified.
ErrCodePolicyNotFoundException = "PolicyNotFoundException"
// ErrCodePolicyTypeAlreadyEnabledException for service response error code
// "PolicyTypeAlreadyEnabledException".
//
// The specified policy type is already enabled in the specified root.
ErrCodePolicyTypeAlreadyEnabledException = "PolicyTypeAlreadyEnabledException"
// ErrCodePolicyTypeNotAvailableForOrganizationException for service response error code
// "PolicyTypeNotAvailableForOrganizationException".
//
// You can't use the specified policy type with the feature set currently enabled
// for this organization. For example, you can enable SCPs only after you enable
// all features in the organization. For more information, see Managing Organizations
// Policies (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root)in
// the Organizations User Guide.
ErrCodePolicyTypeNotAvailableForOrganizationException = "PolicyTypeNotAvailableForOrganizationException"
// ErrCodePolicyTypeNotEnabledException for service response error code
// "PolicyTypeNotEnabledException".
//
// The specified policy type isn't currently enabled in this root. You can't
// attach policies of the specified type to entities in a root until you enable
// that type in the root. For more information, see Enabling All Features in
// Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html)
// in the Organizations User Guide.
ErrCodePolicyTypeNotEnabledException = "PolicyTypeNotEnabledException"
// ErrCodeRootNotFoundException for service response error code
// "RootNotFoundException".
//
// We can't find a root with the RootId that you specified.
ErrCodeRootNotFoundException = "RootNotFoundException"
// ErrCodeServiceException for service response error code
// "ServiceException".
//
// Organizations can't complete your request because of an internal service
// error. Try again later.
ErrCodeServiceException = "ServiceException"
// ErrCodeSourceParentNotFoundException for service response error code
// "SourceParentNotFoundException".
//
// We can't find a source root or OU with the ParentId that you specified.
ErrCodeSourceParentNotFoundException = "SourceParentNotFoundException"
// ErrCodeTargetNotFoundException for service response error code
// "TargetNotFoundException".
//
// We can't find a root, OU, account, or policy with the TargetId that you specified.
ErrCodeTargetNotFoundException = "TargetNotFoundException"
// ErrCodeTooManyRequestsException for service response error code
// "TooManyRequestsException".
//
// You have sent too many requests in too short a period of time. The quota
// helps protect against denial-of-service attacks. Try again later.
//
// For information about quotas that affect Organizations, see Quotas for Organizations
// (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
// the Organizations User Guide.
ErrCodeTooManyRequestsException = "TooManyRequestsException"
// ErrCodeUnsupportedAPIEndpointException for service response error code
// "UnsupportedAPIEndpointException".
//
// This action isn't available in the current Amazon Web Services Region.
ErrCodeUnsupportedAPIEndpointException = "UnsupportedAPIEndpointException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"AWSOrganizationsNotInUseException": newErrorAWSOrganizationsNotInUseException,
"AccessDeniedException": newErrorAccessDeniedException,
"AccessDeniedForDependencyException": newErrorAccessDeniedForDependencyException,
"AccountAlreadyClosedException": newErrorAccountAlreadyClosedException,
"AccountAlreadyRegisteredException": newErrorAccountAlreadyRegisteredException,
"AccountNotFoundException": newErrorAccountNotFoundException,
"AccountNotRegisteredException": newErrorAccountNotRegisteredException,
"AccountOwnerNotVerifiedException": newErrorAccountOwnerNotVerifiedException,
"AlreadyInOrganizationException": newErrorAlreadyInOrganizationException,
"ChildNotFoundException": newErrorChildNotFoundException,
"ConcurrentModificationException": newErrorConcurrentModificationException,
"ConflictException": newErrorConflictException,
"ConstraintViolationException": newErrorConstraintViolationException,
"CreateAccountStatusNotFoundException": newErrorCreateAccountStatusNotFoundException,
"DestinationParentNotFoundException": newErrorDestinationParentNotFoundException,
"DuplicateAccountException": newErrorDuplicateAccountException,
"DuplicateHandshakeException": newErrorDuplicateHandshakeException,
"DuplicateOrganizationalUnitException": newErrorDuplicateOrganizationalUnitException,
"DuplicatePolicyAttachmentException": newErrorDuplicatePolicyAttachmentException,
"DuplicatePolicyException": newErrorDuplicatePolicyException,
"EffectivePolicyNotFoundException": newErrorEffectivePolicyNotFoundException,
"FinalizingOrganizationException": newErrorFinalizingOrganizationException,
"HandshakeAlreadyInStateException": newErrorHandshakeAlreadyInStateException,
"HandshakeConstraintViolationException": newErrorHandshakeConstraintViolationException,
"HandshakeNotFoundException": newErrorHandshakeNotFoundException,
"InvalidHandshakeTransitionException": newErrorInvalidHandshakeTransitionException,
"InvalidInputException": newErrorInvalidInputException,
"MalformedPolicyDocumentException": newErrorMalformedPolicyDocumentException,
"MasterCannotLeaveOrganizationException": newErrorMasterCannotLeaveOrganizationException,
"OrganizationNotEmptyException": newErrorOrganizationNotEmptyException,
"OrganizationalUnitNotEmptyException": newErrorOrganizationalUnitNotEmptyException,
"OrganizationalUnitNotFoundException": newErrorOrganizationalUnitNotFoundException,
"ParentNotFoundException": newErrorParentNotFoundException,
"PolicyChangesInProgressException": newErrorPolicyChangesInProgressException,
"PolicyInUseException": newErrorPolicyInUseException,
"PolicyNotAttachedException": newErrorPolicyNotAttachedException,
"PolicyNotFoundException": newErrorPolicyNotFoundException,
"PolicyTypeAlreadyEnabledException": newErrorPolicyTypeAlreadyEnabledException,
"PolicyTypeNotAvailableForOrganizationException": newErrorPolicyTypeNotAvailableForOrganizationException,
"PolicyTypeNotEnabledException": newErrorPolicyTypeNotEnabledException,
"RootNotFoundException": newErrorRootNotFoundException,
"ServiceException": newErrorServiceException,
"SourceParentNotFoundException": newErrorSourceParentNotFoundException,
"TargetNotFoundException": newErrorTargetNotFoundException,
"TooManyRequestsException": newErrorTooManyRequestsException,
"UnsupportedAPIEndpointException": newErrorUnsupportedAPIEndpointException,
}