@aws-sdk/client-organizations 3.58.0 → 3.72.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +30 -29
  3. package/dist-cjs/Organizations.js +15 -0
  4. package/dist-cjs/commands/CloseAccountCommand.js +36 -0
  5. package/dist-cjs/commands/index.js +1 -0
  6. package/dist-cjs/models/models_0.js +44 -4
  7. package/dist-cjs/protocols/Aws_json1_1.js +109 -3
  8. package/dist-es/Organizations.js +15 -0
  9. package/dist-es/commands/CloseAccountCommand.js +39 -0
  10. package/dist-es/commands/index.js +1 -0
  11. package/dist-es/models/models_0.js +36 -0
  12. package/dist-es/protocols/Aws_json1_1.js +133 -1
  13. package/dist-types/Organizations.d.ts +213 -205
  14. package/dist-types/OrganizationsClient.d.ts +31 -29
  15. package/dist-types/commands/AcceptHandshakeCommand.d.ts +8 -7
  16. package/dist-types/commands/AttachPolicyCommand.d.ts +1 -1
  17. package/dist-types/commands/CloseAccountCommand.d.ts +35 -0
  18. package/dist-types/commands/CreateAccountCommand.d.ts +24 -27
  19. package/dist-types/commands/CreateGovCloudAccountCommand.d.ts +39 -40
  20. package/dist-types/commands/CreateOrganizationCommand.d.ts +1 -1
  21. package/dist-types/commands/CreateOrganizationalUnitCommand.d.ts +1 -1
  22. package/dist-types/commands/CreatePolicyCommand.d.ts +1 -1
  23. package/dist-types/commands/DeregisterDelegatedAdministratorCommand.d.ts +6 -6
  24. package/dist-types/commands/DescribeAccountCommand.d.ts +2 -2
  25. package/dist-types/commands/DescribeCreateAccountStatusCommand.d.ts +1 -1
  26. package/dist-types/commands/DescribeEffectivePolicyCommand.d.ts +3 -3
  27. package/dist-types/commands/DescribeOrganizationalUnitCommand.d.ts +1 -1
  28. package/dist-types/commands/DescribePolicyCommand.d.ts +1 -1
  29. package/dist-types/commands/DetachPolicyCommand.d.ts +1 -1
  30. package/dist-types/commands/DisableAWSServiceAccessCommand.d.ts +12 -12
  31. package/dist-types/commands/DisablePolicyTypeCommand.d.ts +2 -2
  32. package/dist-types/commands/EnableAWSServiceAccessCommand.d.ts +9 -8
  33. package/dist-types/commands/EnableAllFeaturesCommand.d.ts +2 -2
  34. package/dist-types/commands/EnablePolicyTypeCommand.d.ts +1 -1
  35. package/dist-types/commands/InviteAccountToOrganizationCommand.d.ts +6 -6
  36. package/dist-types/commands/LeaveOrganizationCommand.d.ts +9 -9
  37. package/dist-types/commands/ListAWSServiceAccessForOrganizationCommand.d.ts +5 -5
  38. package/dist-types/commands/ListAccountsCommand.d.ts +1 -1
  39. package/dist-types/commands/ListAccountsForParentCommand.d.ts +1 -1
  40. package/dist-types/commands/ListChildrenCommand.d.ts +1 -1
  41. package/dist-types/commands/ListCreateAccountStatusCommand.d.ts +1 -1
  42. package/dist-types/commands/ListDelegatedAdministratorsCommand.d.ts +2 -2
  43. package/dist-types/commands/ListDelegatedServicesForAccountCommand.d.ts +2 -2
  44. package/dist-types/commands/ListHandshakesForAccountCommand.d.ts +4 -3
  45. package/dist-types/commands/ListHandshakesForOrganizationCommand.d.ts +5 -4
  46. package/dist-types/commands/ListOrganizationalUnitsForParentCommand.d.ts +1 -1
  47. package/dist-types/commands/ListParentsCommand.d.ts +1 -1
  48. package/dist-types/commands/ListPoliciesCommand.d.ts +1 -1
  49. package/dist-types/commands/ListPoliciesForTargetCommand.d.ts +1 -1
  50. package/dist-types/commands/ListRootsCommand.d.ts +1 -1
  51. package/dist-types/commands/ListTagsForResourceCommand.d.ts +3 -3
  52. package/dist-types/commands/ListTargetsForPolicyCommand.d.ts +1 -1
  53. package/dist-types/commands/RegisterDelegatedAdministratorCommand.d.ts +5 -5
  54. package/dist-types/commands/RemoveAccountFromOrganizationCommand.d.ts +7 -7
  55. package/dist-types/commands/TagResourceCommand.d.ts +2 -2
  56. package/dist-types/commands/UntagResourceCommand.d.ts +2 -2
  57. package/dist-types/commands/index.d.ts +1 -0
  58. package/dist-types/models/models_0.d.ts +255 -148
  59. package/dist-types/protocols/Aws_json1_1.d.ts +3 -0
  60. package/dist-types/ts3.4/Organizations.d.ts +5 -0
  61. package/dist-types/ts3.4/OrganizationsClient.d.ts +3 -2
  62. package/dist-types/ts3.4/commands/CloseAccountCommand.d.ts +17 -0
  63. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  64. package/dist-types/ts3.4/models/models_0.d.ts +30 -0
  65. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +3 -0
  66. package/package.json +6 -6
@@ -118,6 +118,7 @@ export var HandshakeConstraintViolationExceptionReason;
118
118
  HandshakeConstraintViolationExceptionReason["ALREADY_IN_AN_ORGANIZATION"] = "ALREADY_IN_AN_ORGANIZATION";
119
119
  HandshakeConstraintViolationExceptionReason["HANDSHAKE_RATE_LIMIT_EXCEEDED"] = "HANDSHAKE_RATE_LIMIT_EXCEEDED";
120
120
  HandshakeConstraintViolationExceptionReason["INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES"] = "INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES";
121
+ HandshakeConstraintViolationExceptionReason["MANAGEMENT_ACCOUNT_EMAIL_NOT_VERIFIED"] = "MANAGEMENT_ACCOUNT_EMAIL_NOT_VERIFIED";
121
122
  HandshakeConstraintViolationExceptionReason["ORGANIZATION_ALREADY_HAS_ALL_FEATURES"] = "ORGANIZATION_ALREADY_HAS_ALL_FEATURES";
122
123
  HandshakeConstraintViolationExceptionReason["ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD"] = "ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD";
123
124
  HandshakeConstraintViolationExceptionReason["ORGANIZATION_IS_ALREADY_PENDING_ALL_FEATURES_MIGRATION"] = "ORGANIZATION_IS_ALREADY_PENDING_ALL_FEATURES_MIGRATION";
@@ -240,12 +241,26 @@ export var AccountJoinedMethod;
240
241
  export var AccountStatus;
241
242
  (function (AccountStatus) {
242
243
  AccountStatus["ACTIVE"] = "ACTIVE";
244
+ AccountStatus["PENDING_CLOSURE"] = "PENDING_CLOSURE";
243
245
  AccountStatus["SUSPENDED"] = "SUSPENDED";
244
246
  })(AccountStatus || (AccountStatus = {}));
245
247
  export var Account;
246
248
  (function (Account) {
247
249
  Account.filterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.Email && { Email: SENSITIVE_STRING })), (obj.Name && { Name: SENSITIVE_STRING }))); };
248
250
  })(Account || (Account = {}));
251
+ var AccountAlreadyClosedException = (function (_super) {
252
+ __extends(AccountAlreadyClosedException, _super);
253
+ function AccountAlreadyClosedException(opts) {
254
+ var _this = _super.call(this, __assign({ name: "AccountAlreadyClosedException", $fault: "client" }, opts)) || this;
255
+ _this.name = "AccountAlreadyClosedException";
256
+ _this.$fault = "client";
257
+ Object.setPrototypeOf(_this, AccountAlreadyClosedException.prototype);
258
+ _this.Message = opts.Message;
259
+ return _this;
260
+ }
261
+ return AccountAlreadyClosedException;
262
+ }(__BaseException));
263
+ export { AccountAlreadyClosedException };
249
264
  var AccountAlreadyRegisteredException = (function (_super) {
250
265
  __extends(AccountAlreadyRegisteredException, _super);
251
266
  function AccountAlreadyRegisteredException(opts) {
@@ -322,8 +337,11 @@ export var ConstraintViolationExceptionReason;
322
337
  ConstraintViolationExceptionReason["ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION"] = "ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION";
323
338
  ConstraintViolationExceptionReason["ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED"] = "ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED";
324
339
  ConstraintViolationExceptionReason["ACCOUNT_NUMBER_LIMIT_EXCEEDED"] = "ACCOUNT_NUMBER_LIMIT_EXCEEDED";
340
+ ConstraintViolationExceptionReason["CANNOT_CLOSE_MANAGEMENT_ACCOUNT"] = "CANNOT_CLOSE_MANAGEMENT_ACCOUNT";
325
341
  ConstraintViolationExceptionReason["CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR"] = "CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR";
326
342
  ConstraintViolationExceptionReason["CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG"] = "CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG";
343
+ ConstraintViolationExceptionReason["CLOSE_ACCOUNT_QUOTA_EXCEEDED"] = "CLOSE_ACCOUNT_QUOTA_EXCEEDED";
344
+ ConstraintViolationExceptionReason["CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED"] = "CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED";
327
345
  ConstraintViolationExceptionReason["CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION"] = "CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION";
328
346
  ConstraintViolationExceptionReason["DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE"] = "DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE";
329
347
  ConstraintViolationExceptionReason["EMAIL_VERIFICATION_CODE_EXPIRED"] = "EMAIL_VERIFICATION_CODE_EXPIRED";
@@ -343,6 +361,7 @@ export var ConstraintViolationExceptionReason;
343
361
  ConstraintViolationExceptionReason["OU_NUMBER_LIMIT_EXCEEDED"] = "OU_NUMBER_LIMIT_EXCEEDED";
344
362
  ConstraintViolationExceptionReason["POLICY_CONTENT_LIMIT_EXCEEDED"] = "POLICY_CONTENT_LIMIT_EXCEEDED";
345
363
  ConstraintViolationExceptionReason["POLICY_NUMBER_LIMIT_EXCEEDED"] = "POLICY_NUMBER_LIMIT_EXCEEDED";
364
+ ConstraintViolationExceptionReason["SERVICE_ACCESS_NOT_ENABLED"] = "SERVICE_ACCESS_NOT_ENABLED";
346
365
  ConstraintViolationExceptionReason["TAG_POLICY_VIOLATION"] = "TAG_POLICY_VIOLATION";
347
366
  ConstraintViolationExceptionReason["WAIT_PERIOD_ACTIVE"] = "WAIT_PERIOD_ACTIVE";
348
367
  })(ConstraintViolationExceptionReason || (ConstraintViolationExceptionReason = {}));
@@ -442,6 +461,23 @@ export var CancelHandshakeRequest;
442
461
  (function (CancelHandshakeRequest) {
443
462
  CancelHandshakeRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
444
463
  })(CancelHandshakeRequest || (CancelHandshakeRequest = {}));
464
+ export var CloseAccountRequest;
465
+ (function (CloseAccountRequest) {
466
+ CloseAccountRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
467
+ })(CloseAccountRequest || (CloseAccountRequest = {}));
468
+ var ConflictException = (function (_super) {
469
+ __extends(ConflictException, _super);
470
+ function ConflictException(opts) {
471
+ var _this = _super.call(this, __assign({ name: "ConflictException", $fault: "client" }, opts)) || this;
472
+ _this.name = "ConflictException";
473
+ _this.$fault = "client";
474
+ Object.setPrototypeOf(_this, ConflictException.prototype);
475
+ _this.Message = opts.Message;
476
+ return _this;
477
+ }
478
+ return ConflictException;
479
+ }(__BaseException));
480
+ export { ConflictException };
445
481
  export var IAMUserAccessToBilling;
446
482
  (function (IAMUserAccessToBilling) {
447
483
  IAMUserAccessToBilling["ALLOW"] = "ALLOW";
@@ -1,7 +1,7 @@
1
1
  import { __assign, __awaiter, __generator } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
3
  import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, } from "@aws-sdk/smithy-client";
4
- import { AccessDeniedException, AccessDeniedForDependencyException, AccountAlreadyRegisteredException, AccountNotFoundException, AccountNotRegisteredException, AccountOwnerNotVerifiedException, AlreadyInOrganizationException, AWSOrganizationsNotInUseException, ChildNotFoundException, ConcurrentModificationException, ConstraintViolationException, CreateAccountStatusNotFoundException, DestinationParentNotFoundException, DuplicateAccountException, DuplicateHandshakeException, DuplicateOrganizationalUnitException, DuplicatePolicyAttachmentException, DuplicatePolicyException, EffectivePolicyNotFoundException, FinalizingOrganizationException, HandshakeAlreadyInStateException, HandshakeConstraintViolationException, HandshakeNotFoundException, InvalidHandshakeTransitionException, InvalidInputException, MalformedPolicyDocumentException, MasterCannotLeaveOrganizationException, OrganizationalUnitNotEmptyException, OrganizationalUnitNotFoundException, OrganizationNotEmptyException, ParentNotFoundException, PolicyChangesInProgressException, PolicyInUseException, PolicyNotAttachedException, PolicyNotFoundException, PolicyTypeAlreadyEnabledException, PolicyTypeNotAvailableForOrganizationException, PolicyTypeNotEnabledException, RootNotFoundException, ServiceException, SourceParentNotFoundException, TargetNotFoundException, TooManyRequestsException, UnsupportedAPIEndpointException, } from "../models/models_0";
4
+ import { AccessDeniedException, AccessDeniedForDependencyException, AccountAlreadyClosedException, AccountAlreadyRegisteredException, AccountNotFoundException, AccountNotRegisteredException, AccountOwnerNotVerifiedException, AlreadyInOrganizationException, AWSOrganizationsNotInUseException, ChildNotFoundException, ConcurrentModificationException, ConflictException, ConstraintViolationException, CreateAccountStatusNotFoundException, DestinationParentNotFoundException, DuplicateAccountException, DuplicateHandshakeException, DuplicateOrganizationalUnitException, DuplicatePolicyAttachmentException, DuplicatePolicyException, EffectivePolicyNotFoundException, FinalizingOrganizationException, HandshakeAlreadyInStateException, HandshakeConstraintViolationException, HandshakeNotFoundException, InvalidHandshakeTransitionException, InvalidInputException, MalformedPolicyDocumentException, MasterCannotLeaveOrganizationException, OrganizationalUnitNotEmptyException, OrganizationalUnitNotFoundException, OrganizationNotEmptyException, ParentNotFoundException, PolicyChangesInProgressException, PolicyInUseException, PolicyNotAttachedException, PolicyNotFoundException, PolicyTypeAlreadyEnabledException, PolicyTypeNotAvailableForOrganizationException, PolicyTypeNotEnabledException, RootNotFoundException, ServiceException, SourceParentNotFoundException, TargetNotFoundException, TooManyRequestsException, UnsupportedAPIEndpointException, } from "../models/models_0";
5
5
  import { OrganizationsServiceException as __BaseException } from "../models/OrganizationsServiceException";
6
6
  export var serializeAws_json1_1AcceptHandshakeCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
7
7
  var headers, body;
@@ -36,6 +36,17 @@ export var serializeAws_json1_1CancelHandshakeCommand = function (input, context
36
36
  return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
37
37
  });
38
38
  }); };
39
+ export var serializeAws_json1_1CloseAccountCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
40
+ var headers, body;
41
+ return __generator(this, function (_a) {
42
+ headers = {
43
+ "content-type": "application/x-amz-json-1.1",
44
+ "x-amz-target": "AWSOrganizationsV20161128.CloseAccount",
45
+ };
46
+ body = JSON.stringify(serializeAws_json1_1CloseAccountRequest(input, context));
47
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
48
+ });
49
+ }); };
39
50
  export var serializeAws_json1_1CreateAccountCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
40
51
  var headers, body;
41
52
  return __generator(this, function (_a) {
@@ -830,6 +841,96 @@ var deserializeAws_json1_1CancelHandshakeCommandError = function (output, contex
830
841
  }
831
842
  });
832
843
  }); };
844
+ export var deserializeAws_json1_1CloseAccountCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
845
+ var response;
846
+ return __generator(this, function (_a) {
847
+ switch (_a.label) {
848
+ case 0:
849
+ if (output.statusCode >= 300) {
850
+ return [2, deserializeAws_json1_1CloseAccountCommandError(output, context)];
851
+ }
852
+ return [4, collectBody(output.body, context)];
853
+ case 1:
854
+ _a.sent();
855
+ response = {
856
+ $metadata: deserializeMetadata(output),
857
+ };
858
+ return [2, Promise.resolve(response)];
859
+ }
860
+ });
861
+ }); };
862
+ var deserializeAws_json1_1CloseAccountCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
863
+ var parsedOutput, _a, response, errorCode, _b, parsedBody;
864
+ var _c;
865
+ return __generator(this, function (_d) {
866
+ switch (_d.label) {
867
+ case 0:
868
+ _a = [__assign({}, output)];
869
+ _c = {};
870
+ return [4, parseBody(output.body, context)];
871
+ case 1:
872
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
873
+ errorCode = "UnknownError";
874
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
875
+ _b = errorCode;
876
+ switch (_b) {
877
+ case "AccessDeniedException": return [3, 2];
878
+ case "com.amazonaws.organizations#AccessDeniedException": return [3, 2];
879
+ case "AccountAlreadyClosedException": return [3, 4];
880
+ case "com.amazonaws.organizations#AccountAlreadyClosedException": return [3, 4];
881
+ case "AccountNotFoundException": return [3, 6];
882
+ case "com.amazonaws.organizations#AccountNotFoundException": return [3, 6];
883
+ case "AWSOrganizationsNotInUseException": return [3, 8];
884
+ case "com.amazonaws.organizations#AWSOrganizationsNotInUseException": return [3, 8];
885
+ case "ConcurrentModificationException": return [3, 10];
886
+ case "com.amazonaws.organizations#ConcurrentModificationException": return [3, 10];
887
+ case "ConflictException": return [3, 12];
888
+ case "com.amazonaws.organizations#ConflictException": return [3, 12];
889
+ case "ConstraintViolationException": return [3, 14];
890
+ case "com.amazonaws.organizations#ConstraintViolationException": return [3, 14];
891
+ case "InvalidInputException": return [3, 16];
892
+ case "com.amazonaws.organizations#InvalidInputException": return [3, 16];
893
+ case "ServiceException": return [3, 18];
894
+ case "com.amazonaws.organizations#ServiceException": return [3, 18];
895
+ case "TooManyRequestsException": return [3, 20];
896
+ case "com.amazonaws.organizations#TooManyRequestsException": return [3, 20];
897
+ case "UnsupportedAPIEndpointException": return [3, 22];
898
+ case "com.amazonaws.organizations#UnsupportedAPIEndpointException": return [3, 22];
899
+ }
900
+ return [3, 24];
901
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
902
+ case 3: throw _d.sent();
903
+ case 4: return [4, deserializeAws_json1_1AccountAlreadyClosedExceptionResponse(parsedOutput, context)];
904
+ case 5: throw _d.sent();
905
+ case 6: return [4, deserializeAws_json1_1AccountNotFoundExceptionResponse(parsedOutput, context)];
906
+ case 7: throw _d.sent();
907
+ case 8: return [4, deserializeAws_json1_1AWSOrganizationsNotInUseExceptionResponse(parsedOutput, context)];
908
+ case 9: throw _d.sent();
909
+ case 10: return [4, deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)];
910
+ case 11: throw _d.sent();
911
+ case 12: return [4, deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context)];
912
+ case 13: throw _d.sent();
913
+ case 14: return [4, deserializeAws_json1_1ConstraintViolationExceptionResponse(parsedOutput, context)];
914
+ case 15: throw _d.sent();
915
+ case 16: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
916
+ case 17: throw _d.sent();
917
+ case 18: return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
918
+ case 19: throw _d.sent();
919
+ case 20: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
920
+ case 21: throw _d.sent();
921
+ case 22: return [4, deserializeAws_json1_1UnsupportedAPIEndpointExceptionResponse(parsedOutput, context)];
922
+ case 23: throw _d.sent();
923
+ case 24:
924
+ parsedBody = parsedOutput.body;
925
+ response = new __BaseException({
926
+ name: parsedBody.code || parsedBody.Code || errorCode,
927
+ $fault: "client",
928
+ $metadata: deserializeMetadata(output),
929
+ });
930
+ throw __decorateServiceException(response, parsedBody);
931
+ }
932
+ });
933
+ }); };
833
934
  export var deserializeAws_json1_1CreateAccountCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
834
935
  var data, contents, response;
835
936
  return __generator(this, function (_a) {
@@ -4564,6 +4665,15 @@ var deserializeAws_json1_1AccessDeniedForDependencyExceptionResponse = function
4564
4665
  return [2, __decorateServiceException(exception, body)];
4565
4666
  });
4566
4667
  }); };
4668
+ var deserializeAws_json1_1AccountAlreadyClosedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
4669
+ var body, deserialized, exception;
4670
+ return __generator(this, function (_a) {
4671
+ body = parsedOutput.body;
4672
+ deserialized = deserializeAws_json1_1AccountAlreadyClosedException(body, context);
4673
+ exception = new AccountAlreadyClosedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
4674
+ return [2, __decorateServiceException(exception, body)];
4675
+ });
4676
+ }); };
4567
4677
  var deserializeAws_json1_1AccountAlreadyRegisteredExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
4568
4678
  var body, deserialized, exception;
4569
4679
  return __generator(this, function (_a) {
@@ -4636,6 +4746,15 @@ var deserializeAws_json1_1ConcurrentModificationExceptionResponse = function (pa
4636
4746
  return [2, __decorateServiceException(exception, body)];
4637
4747
  });
4638
4748
  }); };
4749
+ var deserializeAws_json1_1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
4750
+ var body, deserialized, exception;
4751
+ return __generator(this, function (_a) {
4752
+ body = parsedOutput.body;
4753
+ deserialized = deserializeAws_json1_1ConflictException(body, context);
4754
+ exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
4755
+ return [2, __decorateServiceException(exception, body)];
4756
+ });
4757
+ }); };
4639
4758
  var deserializeAws_json1_1ConstraintViolationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
4640
4759
  var body, deserialized, exception;
4641
4760
  return __generator(this, function (_a) {
@@ -4951,6 +5070,9 @@ var serializeAws_json1_1AttachPolicyRequest = function (input, context) {
4951
5070
  var serializeAws_json1_1CancelHandshakeRequest = function (input, context) {
4952
5071
  return __assign({}, (input.HandshakeId !== undefined && input.HandshakeId !== null && { HandshakeId: input.HandshakeId }));
4953
5072
  };
5073
+ var serializeAws_json1_1CloseAccountRequest = function (input, context) {
5074
+ return __assign({}, (input.AccountId !== undefined && input.AccountId !== null && { AccountId: input.AccountId }));
5075
+ };
4954
5076
  var serializeAws_json1_1CreateAccountRequest = function (input, context) {
4955
5077
  return __assign(__assign(__assign(__assign(__assign({}, (input.AccountName !== undefined && input.AccountName !== null && { AccountName: input.AccountName })), (input.Email !== undefined && input.Email !== null && { Email: input.Email })), (input.IamUserAccessToBilling !== undefined &&
4956
5078
  input.IamUserAccessToBilling !== null && { IamUserAccessToBilling: input.IamUserAccessToBilling })), (input.RoleName !== undefined && input.RoleName !== null && { RoleName: input.RoleName })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1Tags(input.Tags, context) }));
@@ -5175,6 +5297,11 @@ var deserializeAws_json1_1Account = function (output, context) {
5175
5297
  Status: __expectString(output.Status),
5176
5298
  };
5177
5299
  };
5300
+ var deserializeAws_json1_1AccountAlreadyClosedException = function (output, context) {
5301
+ return {
5302
+ Message: __expectString(output.Message),
5303
+ };
5304
+ };
5178
5305
  var deserializeAws_json1_1AccountAlreadyRegisteredException = function (output, context) {
5179
5306
  return {
5180
5307
  Message: __expectString(output.Message),
@@ -5250,6 +5377,11 @@ var deserializeAws_json1_1ConcurrentModificationException = function (output, co
5250
5377
  Message: __expectString(output.Message),
5251
5378
  };
5252
5379
  };
5380
+ var deserializeAws_json1_1ConflictException = function (output, context) {
5381
+ return {
5382
+ Message: __expectString(output.Message),
5383
+ };
5384
+ };
5253
5385
  var deserializeAws_json1_1ConstraintViolationException = function (output, context) {
5254
5386
  return {
5255
5387
  Message: __expectString(output.Message),