@aws-sdk/client-account 3.787.0 → 3.794.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 (35) hide show
  1. package/README.md +16 -0
  2. package/dist-cjs/index.js +152 -5
  3. package/dist-es/Account.js +4 -0
  4. package/dist-es/commands/GetAccountInformationCommand.js +23 -0
  5. package/dist-es/commands/PutAccountNameCommand.js +23 -0
  6. package/dist-es/commands/index.js +2 -0
  7. package/dist-es/models/models_0.js +18 -0
  8. package/dist-es/protocols/Aws_restJson1.js +71 -6
  9. package/dist-types/Account.d.ts +15 -0
  10. package/dist-types/AccountClient.d.ts +4 -2
  11. package/dist-types/commands/AcceptPrimaryEmailUpdateCommand.d.ts +5 -11
  12. package/dist-types/commands/DeleteAlternateContactCommand.d.ts +4 -15
  13. package/dist-types/commands/DisableRegionCommand.d.ts +5 -14
  14. package/dist-types/commands/EnableRegionCommand.d.ts +4 -9
  15. package/dist-types/commands/GetAccountInformationCommand.d.ts +86 -0
  16. package/dist-types/commands/GetAlternateContactCommand.d.ts +4 -15
  17. package/dist-types/commands/GetContactInformationCommand.d.ts +4 -9
  18. package/dist-types/commands/GetPrimaryEmailCommand.d.ts +3 -6
  19. package/dist-types/commands/GetRegionOptStatusCommand.d.ts +3 -6
  20. package/dist-types/commands/ListRegionsCommand.d.ts +4 -9
  21. package/dist-types/commands/PutAccountNameCommand.d.ts +83 -0
  22. package/dist-types/commands/PutAlternateContactCommand.d.ts +4 -15
  23. package/dist-types/commands/PutContactInformationCommand.d.ts +4 -9
  24. package/dist-types/commands/StartPrimaryEmailUpdateCommand.d.ts +5 -11
  25. package/dist-types/commands/index.d.ts +2 -0
  26. package/dist-types/models/models_0.d.ts +116 -278
  27. package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
  28. package/dist-types/ts3.4/Account.d.ts +35 -0
  29. package/dist-types/ts3.4/AccountClient.d.ts +12 -0
  30. package/dist-types/ts3.4/commands/GetAccountInformationCommand.d.ts +51 -0
  31. package/dist-types/ts3.4/commands/PutAccountNameCommand.d.ts +45 -0
  32. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  33. package/dist-types/ts3.4/models/models_0.d.ts +23 -0
  34. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +24 -0
  35. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
2
  import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client";
3
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
4
4
  import { AccountServiceException as __BaseException } from "../models/AccountServiceException";
5
5
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, TooManyRequestsException, ValidationException, } from "../models/models_0";
6
6
  export const se_AcceptPrimaryEmailUpdateCommand = async (input, context) => {
@@ -60,6 +60,19 @@ export const se_EnableRegionCommand = async (input, context) => {
60
60
  b.m("POST").h(headers).b(body);
61
61
  return b.build();
62
62
  };
63
+ export const se_GetAccountInformationCommand = async (input, context) => {
64
+ const b = rb(input, context);
65
+ const headers = {
66
+ "content-type": "application/json",
67
+ };
68
+ b.bp("/getAccountInformation");
69
+ let body;
70
+ body = JSON.stringify(take(input, {
71
+ AccountId: [],
72
+ }));
73
+ b.m("POST").h(headers).b(body);
74
+ return b.build();
75
+ };
63
76
  export const se_GetAlternateContactCommand = async (input, context) => {
64
77
  const b = rb(input, context);
65
78
  const headers = {
@@ -130,6 +143,20 @@ export const se_ListRegionsCommand = async (input, context) => {
130
143
  b.m("POST").h(headers).b(body);
131
144
  return b.build();
132
145
  };
146
+ export const se_PutAccountNameCommand = async (input, context) => {
147
+ const b = rb(input, context);
148
+ const headers = {
149
+ "content-type": "application/json",
150
+ };
151
+ b.bp("/putAccountName");
152
+ let body;
153
+ body = JSON.stringify(take(input, {
154
+ AccountId: [],
155
+ AccountName: [],
156
+ }));
157
+ b.m("POST").h(headers).b(body);
158
+ return b.build();
159
+ };
133
160
  export const se_PutAlternateContactCommand = async (input, context) => {
134
161
  const b = rb(input, context);
135
162
  const headers = {
@@ -220,6 +247,22 @@ export const de_EnableRegionCommand = async (output, context) => {
220
247
  await collectBody(output.body, context);
221
248
  return contents;
222
249
  };
250
+ export const de_GetAccountInformationCommand = async (output, context) => {
251
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
252
+ return de_CommandError(output, context);
253
+ }
254
+ const contents = map({
255
+ $metadata: deserializeMetadata(output),
256
+ });
257
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
258
+ const doc = take(data, {
259
+ AccountCreatedDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
260
+ AccountId: __expectString,
261
+ AccountName: __expectString,
262
+ });
263
+ Object.assign(contents, doc);
264
+ return contents;
265
+ };
223
266
  export const de_GetAlternateContactCommand = async (output, context) => {
224
267
  if (output.statusCode !== 200 && output.statusCode >= 300) {
225
268
  return de_CommandError(output, context);
@@ -292,6 +335,16 @@ export const de_ListRegionsCommand = async (output, context) => {
292
335
  Object.assign(contents, doc);
293
336
  return contents;
294
337
  };
338
+ export const de_PutAccountNameCommand = async (output, context) => {
339
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
340
+ return de_CommandError(output, context);
341
+ }
342
+ const contents = map({
343
+ $metadata: deserializeMetadata(output),
344
+ });
345
+ await collectBody(output.body, context);
346
+ return contents;
347
+ };
295
348
  export const de_PutAlternateContactCommand = async (output, context) => {
296
349
  if (output.statusCode !== 200 && output.statusCode >= 300) {
297
350
  return de_CommandError(output, context);
@@ -362,7 +415,9 @@ const de_CommandError = async (output, context) => {
362
415
  };
363
416
  const throwDefaultError = withBaseException(__BaseException);
364
417
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
365
- const contents = map({});
418
+ const contents = map({
419
+ [_eT]: [, parsedOutput.headers[_xae]],
420
+ });
366
421
  const data = parsedOutput.body;
367
422
  const doc = take(data, {
368
423
  message: __expectString,
@@ -375,7 +430,9 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
375
430
  return __decorateServiceException(exception, parsedOutput.body);
376
431
  };
377
432
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
378
- const contents = map({});
433
+ const contents = map({
434
+ [_eT]: [, parsedOutput.headers[_xae]],
435
+ });
379
436
  const data = parsedOutput.body;
380
437
  const doc = take(data, {
381
438
  message: __expectString,
@@ -388,7 +445,9 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
388
445
  return __decorateServiceException(exception, parsedOutput.body);
389
446
  };
390
447
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
391
- const contents = map({});
448
+ const contents = map({
449
+ [_eT]: [, parsedOutput.headers[_xae]],
450
+ });
392
451
  const data = parsedOutput.body;
393
452
  const doc = take(data, {
394
453
  message: __expectString,
@@ -401,7 +460,9 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
401
460
  return __decorateServiceException(exception, parsedOutput.body);
402
461
  };
403
462
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
404
- const contents = map({});
463
+ const contents = map({
464
+ [_eT]: [, parsedOutput.headers[_xae]],
465
+ });
405
466
  const data = parsedOutput.body;
406
467
  const doc = take(data, {
407
468
  message: __expectString,
@@ -414,7 +475,9 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
414
475
  return __decorateServiceException(exception, parsedOutput.body);
415
476
  };
416
477
  const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
417
- const contents = map({});
478
+ const contents = map({
479
+ [_eT]: [, parsedOutput.headers[_xae]],
480
+ });
418
481
  const data = parsedOutput.body;
419
482
  const doc = take(data, {
420
483
  message: __expectString,
@@ -448,3 +511,5 @@ const deserializeMetadata = (output) => ({
448
511
  cfId: output.headers["x-amz-cf-id"],
449
512
  });
450
513
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
514
+ const _eT = "errorType";
515
+ const _xae = "x-amzn-errortype";
@@ -4,11 +4,13 @@ import { AcceptPrimaryEmailUpdateCommandInput, AcceptPrimaryEmailUpdateCommandOu
4
4
  import { DeleteAlternateContactCommandInput, DeleteAlternateContactCommandOutput } from "./commands/DeleteAlternateContactCommand";
5
5
  import { DisableRegionCommandInput, DisableRegionCommandOutput } from "./commands/DisableRegionCommand";
6
6
  import { EnableRegionCommandInput, EnableRegionCommandOutput } from "./commands/EnableRegionCommand";
7
+ import { GetAccountInformationCommandInput, GetAccountInformationCommandOutput } from "./commands/GetAccountInformationCommand";
7
8
  import { GetAlternateContactCommandInput, GetAlternateContactCommandOutput } from "./commands/GetAlternateContactCommand";
8
9
  import { GetContactInformationCommandInput, GetContactInformationCommandOutput } from "./commands/GetContactInformationCommand";
9
10
  import { GetPrimaryEmailCommandInput, GetPrimaryEmailCommandOutput } from "./commands/GetPrimaryEmailCommand";
10
11
  import { GetRegionOptStatusCommandInput, GetRegionOptStatusCommandOutput } from "./commands/GetRegionOptStatusCommand";
11
12
  import { ListRegionsCommandInput, ListRegionsCommandOutput } from "./commands/ListRegionsCommand";
13
+ import { PutAccountNameCommandInput, PutAccountNameCommandOutput } from "./commands/PutAccountNameCommand";
12
14
  import { PutAlternateContactCommandInput, PutAlternateContactCommandOutput } from "./commands/PutAlternateContactCommand";
13
15
  import { PutContactInformationCommandInput, PutContactInformationCommandOutput } from "./commands/PutContactInformationCommand";
14
16
  import { StartPrimaryEmailUpdateCommandInput, StartPrimaryEmailUpdateCommandOutput } from "./commands/StartPrimaryEmailUpdateCommand";
@@ -37,6 +39,13 @@ export interface Account {
37
39
  enableRegion(args: EnableRegionCommandInput, options?: __HttpHandlerOptions): Promise<EnableRegionCommandOutput>;
38
40
  enableRegion(args: EnableRegionCommandInput, cb: (err: any, data?: EnableRegionCommandOutput) => void): void;
39
41
  enableRegion(args: EnableRegionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: EnableRegionCommandOutput) => void): void;
42
+ /**
43
+ * @see {@link GetAccountInformationCommand}
44
+ */
45
+ getAccountInformation(): Promise<GetAccountInformationCommandOutput>;
46
+ getAccountInformation(args: GetAccountInformationCommandInput, options?: __HttpHandlerOptions): Promise<GetAccountInformationCommandOutput>;
47
+ getAccountInformation(args: GetAccountInformationCommandInput, cb: (err: any, data?: GetAccountInformationCommandOutput) => void): void;
48
+ getAccountInformation(args: GetAccountInformationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetAccountInformationCommandOutput) => void): void;
40
49
  /**
41
50
  * @see {@link GetAlternateContactCommand}
42
51
  */
@@ -69,6 +78,12 @@ export interface Account {
69
78
  listRegions(args: ListRegionsCommandInput, options?: __HttpHandlerOptions): Promise<ListRegionsCommandOutput>;
70
79
  listRegions(args: ListRegionsCommandInput, cb: (err: any, data?: ListRegionsCommandOutput) => void): void;
71
80
  listRegions(args: ListRegionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListRegionsCommandOutput) => void): void;
81
+ /**
82
+ * @see {@link PutAccountNameCommand}
83
+ */
84
+ putAccountName(args: PutAccountNameCommandInput, options?: __HttpHandlerOptions): Promise<PutAccountNameCommandOutput>;
85
+ putAccountName(args: PutAccountNameCommandInput, cb: (err: any, data?: PutAccountNameCommandOutput) => void): void;
86
+ putAccountName(args: PutAccountNameCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutAccountNameCommandOutput) => void): void;
72
87
  /**
73
88
  * @see {@link PutAlternateContactCommand}
74
89
  */
@@ -11,11 +11,13 @@ import { AcceptPrimaryEmailUpdateCommandInput, AcceptPrimaryEmailUpdateCommandOu
11
11
  import { DeleteAlternateContactCommandInput, DeleteAlternateContactCommandOutput } from "./commands/DeleteAlternateContactCommand";
12
12
  import { DisableRegionCommandInput, DisableRegionCommandOutput } from "./commands/DisableRegionCommand";
13
13
  import { EnableRegionCommandInput, EnableRegionCommandOutput } from "./commands/EnableRegionCommand";
14
+ import { GetAccountInformationCommandInput, GetAccountInformationCommandOutput } from "./commands/GetAccountInformationCommand";
14
15
  import { GetAlternateContactCommandInput, GetAlternateContactCommandOutput } from "./commands/GetAlternateContactCommand";
15
16
  import { GetContactInformationCommandInput, GetContactInformationCommandOutput } from "./commands/GetContactInformationCommand";
16
17
  import { GetPrimaryEmailCommandInput, GetPrimaryEmailCommandOutput } from "./commands/GetPrimaryEmailCommand";
17
18
  import { GetRegionOptStatusCommandInput, GetRegionOptStatusCommandOutput } from "./commands/GetRegionOptStatusCommand";
18
19
  import { ListRegionsCommandInput, ListRegionsCommandOutput } from "./commands/ListRegionsCommand";
20
+ import { PutAccountNameCommandInput, PutAccountNameCommandOutput } from "./commands/PutAccountNameCommand";
19
21
  import { PutAlternateContactCommandInput, PutAlternateContactCommandOutput } from "./commands/PutAlternateContactCommand";
20
22
  import { PutContactInformationCommandInput, PutContactInformationCommandOutput } from "./commands/PutContactInformationCommand";
21
23
  import { StartPrimaryEmailUpdateCommandInput, StartPrimaryEmailUpdateCommandOutput } from "./commands/StartPrimaryEmailUpdateCommand";
@@ -25,11 +27,11 @@ export { __Client };
25
27
  /**
26
28
  * @public
27
29
  */
28
- export type ServiceInputTypes = AcceptPrimaryEmailUpdateCommandInput | DeleteAlternateContactCommandInput | DisableRegionCommandInput | EnableRegionCommandInput | GetAlternateContactCommandInput | GetContactInformationCommandInput | GetPrimaryEmailCommandInput | GetRegionOptStatusCommandInput | ListRegionsCommandInput | PutAlternateContactCommandInput | PutContactInformationCommandInput | StartPrimaryEmailUpdateCommandInput;
30
+ export type ServiceInputTypes = AcceptPrimaryEmailUpdateCommandInput | DeleteAlternateContactCommandInput | DisableRegionCommandInput | EnableRegionCommandInput | GetAccountInformationCommandInput | GetAlternateContactCommandInput | GetContactInformationCommandInput | GetPrimaryEmailCommandInput | GetRegionOptStatusCommandInput | ListRegionsCommandInput | PutAccountNameCommandInput | PutAlternateContactCommandInput | PutContactInformationCommandInput | StartPrimaryEmailUpdateCommandInput;
29
31
  /**
30
32
  * @public
31
33
  */
32
- export type ServiceOutputTypes = AcceptPrimaryEmailUpdateCommandOutput | DeleteAlternateContactCommandOutput | DisableRegionCommandOutput | EnableRegionCommandOutput | GetAlternateContactCommandOutput | GetContactInformationCommandOutput | GetPrimaryEmailCommandOutput | GetRegionOptStatusCommandOutput | ListRegionsCommandOutput | PutAlternateContactCommandOutput | PutContactInformationCommandOutput | StartPrimaryEmailUpdateCommandOutput;
34
+ export type ServiceOutputTypes = AcceptPrimaryEmailUpdateCommandOutput | DeleteAlternateContactCommandOutput | DisableRegionCommandOutput | EnableRegionCommandOutput | GetAccountInformationCommandOutput | GetAlternateContactCommandOutput | GetContactInformationCommandOutput | GetPrimaryEmailCommandOutput | GetRegionOptStatusCommandOutput | ListRegionsCommandOutput | PutAccountNameCommandOutput | PutAlternateContactCommandOutput | PutContactInformationCommandOutput | StartPrimaryEmailUpdateCommandOutput;
33
35
  /**
34
36
  * @public
35
37
  */
@@ -27,8 +27,7 @@ declare const AcceptPrimaryEmailUpdateCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * <p>Accepts the request that originated from <a>StartPrimaryEmailUpdate</a> to update the primary email address (also known
31
- * as the root user email address) for the specified account.</p>
30
+ * <p>Accepts the request that originated from <a>StartPrimaryEmailUpdate</a> to update the primary email address (also known as the root user email address) for the specified account.</p>
32
31
  * @example
33
32
  * Use a bare-bones client and the command you need to make an API call.
34
33
  * ```javascript
@@ -55,24 +54,19 @@ declare const AcceptPrimaryEmailUpdateCommand_base: {
55
54
  * @see {@link AccountClientResolvedConfig | config} for AccountClient's `config` shape.
56
55
  *
57
56
  * @throws {@link AccessDeniedException} (client fault)
58
- * <p>The operation failed because the calling identity doesn't have the minimum required
59
- * permissions.</p>
57
+ * <p>The operation failed because the calling identity doesn't have the minimum required permissions.</p>
60
58
  *
61
59
  * @throws {@link ConflictException} (client fault)
62
- * <p>The request could not be processed because of a conflict in the current status of the
63
- * resource. For example, this happens if you try to enable a Region that is currently being disabled
64
- * (in a status of DISABLING).</p>
60
+ * <p>The request could not be processed because of a conflict in the current status of the resource. For example, this happens if you try to enable a Region that is currently being disabled (in a status of DISABLING) or if you try to change an account’s root user email to an email address which is already in use.</p>
65
61
  *
66
62
  * @throws {@link InternalServerException} (server fault)
67
- * <p>The operation failed because of an error internal to Amazon Web Services. Try your operation again
68
- * later.</p>
63
+ * <p>The operation failed because of an error internal to Amazon Web Services. Try your operation again later.</p>
69
64
  *
70
65
  * @throws {@link ResourceNotFoundException} (client fault)
71
66
  * <p>The operation failed because it specified a resource that can't be found.</p>
72
67
  *
73
68
  * @throws {@link TooManyRequestsException} (client fault)
74
- * <p>The operation failed because it was called too frequently and exceeded a throttle
75
- * limit.</p>
69
+ * <p>The operation failed because it was called too frequently and exceeded a throttle limit.</p>
76
70
  *
77
71
  * @throws {@link ValidationException} (client fault)
78
72
  * <p>The operation failed because one of the input parameters was invalid.</p>
@@ -27,15 +27,7 @@ declare const DeleteAlternateContactCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * <p>Deletes the specified alternate contact from an Amazon Web Services account.</p>
31
- * <p>For complete details about how to use the alternate contact operations, see <a href="https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-update-contact.html">Access or
32
- * updating the alternate contacts</a>.</p>
33
- * <note>
34
- * <p>Before you can update the alternate contact information for an
35
- * Amazon Web Services account that is managed by Organizations, you must first enable integration between Amazon Web Services Account Management
36
- * and Organizations. For more information, see <a href="https://docs.aws.amazon.com/accounts/latest/reference/using-orgs-trusted-access.html">Enabling trusted access for
37
- * Amazon Web Services Account Management</a>.</p>
38
- * </note>
30
+ * <p>Deletes the specified alternate contact from an Amazon Web Services account.</p> <p>For complete details about how to use the alternate contact operations, see <a href="https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-update-contact.html">Access or updating the alternate contacts</a>.</p> <note> <p>Before you can update the alternate contact information for an Amazon Web Services account that is managed by Organizations, you must first enable integration between Amazon Web Services Account Management and Organizations. For more information, see <a href="https://docs.aws.amazon.com/accounts/latest/reference/using-orgs-trusted-access.html">Enabling trusted access for Amazon Web Services Account Management</a>.</p> </note>
39
31
  * @example
40
32
  * Use a bare-bones client and the command you need to make an API call.
41
33
  * ```javascript
@@ -59,19 +51,16 @@ declare const DeleteAlternateContactCommand_base: {
59
51
  * @see {@link AccountClientResolvedConfig | config} for AccountClient's `config` shape.
60
52
  *
61
53
  * @throws {@link AccessDeniedException} (client fault)
62
- * <p>The operation failed because the calling identity doesn't have the minimum required
63
- * permissions.</p>
54
+ * <p>The operation failed because the calling identity doesn't have the minimum required permissions.</p>
64
55
  *
65
56
  * @throws {@link InternalServerException} (server fault)
66
- * <p>The operation failed because of an error internal to Amazon Web Services. Try your operation again
67
- * later.</p>
57
+ * <p>The operation failed because of an error internal to Amazon Web Services. Try your operation again later.</p>
68
58
  *
69
59
  * @throws {@link ResourceNotFoundException} (client fault)
70
60
  * <p>The operation failed because it specified a resource that can't be found.</p>
71
61
  *
72
62
  * @throws {@link TooManyRequestsException} (client fault)
73
- * <p>The operation failed because it was called too frequently and exceeded a throttle
74
- * limit.</p>
63
+ * <p>The operation failed because it was called too frequently and exceeded a throttle limit.</p>
75
64
  *
76
65
  * @throws {@link ValidationException} (client fault)
77
66
  * <p>The operation failed because one of the input parameters was invalid.</p>
@@ -27,11 +27,7 @@ declare const DisableRegionCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * <p>Disables (opts-out) a particular Region for an account.</p>
31
- * <note>
32
- * <p>The act of disabling a Region will remove all IAM access to any resources that
33
- * reside in that Region.</p>
34
- * </note>
30
+ * <p>Disables (opts-out) a particular Region for an account.</p> <note> <p>The act of disabling a Region will remove all IAM access to any resources that reside in that Region.</p> </note>
35
31
  * @example
36
32
  * Use a bare-bones client and the command you need to make an API call.
37
33
  * ```javascript
@@ -55,21 +51,16 @@ declare const DisableRegionCommand_base: {
55
51
  * @see {@link AccountClientResolvedConfig | config} for AccountClient's `config` shape.
56
52
  *
57
53
  * @throws {@link AccessDeniedException} (client fault)
58
- * <p>The operation failed because the calling identity doesn't have the minimum required
59
- * permissions.</p>
54
+ * <p>The operation failed because the calling identity doesn't have the minimum required permissions.</p>
60
55
  *
61
56
  * @throws {@link ConflictException} (client fault)
62
- * <p>The request could not be processed because of a conflict in the current status of the
63
- * resource. For example, this happens if you try to enable a Region that is currently being disabled
64
- * (in a status of DISABLING).</p>
57
+ * <p>The request could not be processed because of a conflict in the current status of the resource. For example, this happens if you try to enable a Region that is currently being disabled (in a status of DISABLING) or if you try to change an account’s root user email to an email address which is already in use.</p>
65
58
  *
66
59
  * @throws {@link InternalServerException} (server fault)
67
- * <p>The operation failed because of an error internal to Amazon Web Services. Try your operation again
68
- * later.</p>
60
+ * <p>The operation failed because of an error internal to Amazon Web Services. Try your operation again later.</p>
69
61
  *
70
62
  * @throws {@link TooManyRequestsException} (client fault)
71
- * <p>The operation failed because it was called too frequently and exceeded a throttle
72
- * limit.</p>
63
+ * <p>The operation failed because it was called too frequently and exceeded a throttle limit.</p>
73
64
  *
74
65
  * @throws {@link ValidationException} (client fault)
75
66
  * <p>The operation failed because one of the input parameters was invalid.</p>
@@ -51,21 +51,16 @@ declare const EnableRegionCommand_base: {
51
51
  * @see {@link AccountClientResolvedConfig | config} for AccountClient's `config` shape.
52
52
  *
53
53
  * @throws {@link AccessDeniedException} (client fault)
54
- * <p>The operation failed because the calling identity doesn't have the minimum required
55
- * permissions.</p>
54
+ * <p>The operation failed because the calling identity doesn't have the minimum required permissions.</p>
56
55
  *
57
56
  * @throws {@link ConflictException} (client fault)
58
- * <p>The request could not be processed because of a conflict in the current status of the
59
- * resource. For example, this happens if you try to enable a Region that is currently being disabled
60
- * (in a status of DISABLING).</p>
57
+ * <p>The request could not be processed because of a conflict in the current status of the resource. For example, this happens if you try to enable a Region that is currently being disabled (in a status of DISABLING) or if you try to change an account’s root user email to an email address which is already in use.</p>
61
58
  *
62
59
  * @throws {@link InternalServerException} (server fault)
63
- * <p>The operation failed because of an error internal to Amazon Web Services. Try your operation again
64
- * later.</p>
60
+ * <p>The operation failed because of an error internal to Amazon Web Services. Try your operation again later.</p>
65
61
  *
66
62
  * @throws {@link TooManyRequestsException} (client fault)
67
- * <p>The operation failed because it was called too frequently and exceeded a throttle
68
- * limit.</p>
63
+ * <p>The operation failed because it was called too frequently and exceeded a throttle limit.</p>
69
64
  *
70
65
  * @throws {@link ValidationException} (client fault)
71
66
  * <p>The operation failed because one of the input parameters was invalid.</p>
@@ -0,0 +1,86 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { AccountClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AccountClient";
4
+ import { GetAccountInformationRequest, GetAccountInformationResponse } from "../models/models_0";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link GetAccountInformationCommand}.
14
+ */
15
+ export interface GetAccountInformationCommandInput extends GetAccountInformationRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link GetAccountInformationCommand}.
21
+ */
22
+ export interface GetAccountInformationCommandOutput extends GetAccountInformationResponse, __MetadataBearer {
23
+ }
24
+ declare const GetAccountInformationCommand_base: {
25
+ new (input: GetAccountInformationCommandInput): import("@smithy/smithy-client").CommandImpl<GetAccountInformationCommandInput, GetAccountInformationCommandOutput, AccountClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (...[input]: [] | [GetAccountInformationCommandInput]): import("@smithy/smithy-client").CommandImpl<GetAccountInformationCommandInput, GetAccountInformationCommandOutput, AccountClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Retrieves information about the specified account including its account name, account ID, and account creation date and time. To use this API, an IAM user or role must have the <code>account:GetAccountInformation</code> IAM permission. </p>
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { AccountClient, GetAccountInformationCommand } from "@aws-sdk/client-account"; // ES Modules import
35
+ * // const { AccountClient, GetAccountInformationCommand } = require("@aws-sdk/client-account"); // CommonJS import
36
+ * const client = new AccountClient(config);
37
+ * const input = { // GetAccountInformationRequest
38
+ * AccountId: "STRING_VALUE",
39
+ * };
40
+ * const command = new GetAccountInformationCommand(input);
41
+ * const response = await client.send(command);
42
+ * // { // GetAccountInformationResponse
43
+ * // AccountId: "STRING_VALUE",
44
+ * // AccountName: "STRING_VALUE",
45
+ * // AccountCreatedDate: new Date("TIMESTAMP"),
46
+ * // };
47
+ *
48
+ * ```
49
+ *
50
+ * @param GetAccountInformationCommandInput - {@link GetAccountInformationCommandInput}
51
+ * @returns {@link GetAccountInformationCommandOutput}
52
+ * @see {@link GetAccountInformationCommandInput} for command's `input` shape.
53
+ * @see {@link GetAccountInformationCommandOutput} for command's `response` shape.
54
+ * @see {@link AccountClientResolvedConfig | config} for AccountClient's `config` shape.
55
+ *
56
+ * @throws {@link AccessDeniedException} (client fault)
57
+ * <p>The operation failed because the calling identity doesn't have the minimum required permissions.</p>
58
+ *
59
+ * @throws {@link InternalServerException} (server fault)
60
+ * <p>The operation failed because of an error internal to Amazon Web Services. Try your operation again later.</p>
61
+ *
62
+ * @throws {@link TooManyRequestsException} (client fault)
63
+ * <p>The operation failed because it was called too frequently and exceeded a throttle limit.</p>
64
+ *
65
+ * @throws {@link ValidationException} (client fault)
66
+ * <p>The operation failed because one of the input parameters was invalid.</p>
67
+ *
68
+ * @throws {@link AccountServiceException}
69
+ * <p>Base exception class for all service exceptions from Account service.</p>
70
+ *
71
+ *
72
+ * @public
73
+ */
74
+ export declare class GetAccountInformationCommand extends GetAccountInformationCommand_base {
75
+ /** @internal type navigation helper, not in runtime. */
76
+ protected static __types: {
77
+ api: {
78
+ input: GetAccountInformationRequest;
79
+ output: GetAccountInformationResponse;
80
+ };
81
+ sdk: {
82
+ input: GetAccountInformationCommandInput;
83
+ output: GetAccountInformationCommandOutput;
84
+ };
85
+ };
86
+ }
@@ -27,15 +27,7 @@ declare const GetAlternateContactCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * <p>Retrieves the specified alternate contact attached to an Amazon Web Services account.</p>
31
- * <p>For complete details about how to use the alternate contact operations, see <a href="https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-update-contact.html">Access or
32
- * updating the alternate contacts</a>.</p>
33
- * <note>
34
- * <p>Before you can update the alternate contact information for an
35
- * Amazon Web Services account that is managed by Organizations, you must first enable integration between Amazon Web Services Account Management
36
- * and Organizations. For more information, see <a href="https://docs.aws.amazon.com/accounts/latest/reference/using-orgs-trusted-access.html">Enabling trusted access for
37
- * Amazon Web Services Account Management</a>.</p>
38
- * </note>
30
+ * <p>Retrieves the specified alternate contact attached to an Amazon Web Services account.</p> <p>For complete details about how to use the alternate contact operations, see <a href="https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-update-contact.html">Access or updating the alternate contacts</a>.</p> <note> <p>Before you can update the alternate contact information for an Amazon Web Services account that is managed by Organizations, you must first enable integration between Amazon Web Services Account Management and Organizations. For more information, see <a href="https://docs.aws.amazon.com/accounts/latest/reference/using-orgs-trusted-access.html">Enabling trusted access for Amazon Web Services Account Management</a>.</p> </note>
39
31
  * @example
40
32
  * Use a bare-bones client and the command you need to make an API call.
41
33
  * ```javascript
@@ -67,19 +59,16 @@ declare const GetAlternateContactCommand_base: {
67
59
  * @see {@link AccountClientResolvedConfig | config} for AccountClient's `config` shape.
68
60
  *
69
61
  * @throws {@link AccessDeniedException} (client fault)
70
- * <p>The operation failed because the calling identity doesn't have the minimum required
71
- * permissions.</p>
62
+ * <p>The operation failed because the calling identity doesn't have the minimum required permissions.</p>
72
63
  *
73
64
  * @throws {@link InternalServerException} (server fault)
74
- * <p>The operation failed because of an error internal to Amazon Web Services. Try your operation again
75
- * later.</p>
65
+ * <p>The operation failed because of an error internal to Amazon Web Services. Try your operation again later.</p>
76
66
  *
77
67
  * @throws {@link ResourceNotFoundException} (client fault)
78
68
  * <p>The operation failed because it specified a resource that can't be found.</p>
79
69
  *
80
70
  * @throws {@link TooManyRequestsException} (client fault)
81
- * <p>The operation failed because it was called too frequently and exceeded a throttle
82
- * limit.</p>
71
+ * <p>The operation failed because it was called too frequently and exceeded a throttle limit.</p>
83
72
  *
84
73
  * @throws {@link ValidationException} (client fault)
85
74
  * <p>The operation failed because one of the input parameters was invalid.</p>
@@ -27,9 +27,7 @@ declare const GetContactInformationCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * <p>Retrieves the primary contact information of an Amazon Web Services account.</p>
31
- * <p>For complete details about how to use the primary contact operations, see <a href="https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-update-contact.html">Update
32
- * the primary and alternate contact information</a>.</p>
30
+ * <p>Retrieves the primary contact information of an Amazon Web Services account.</p> <p>For complete details about how to use the primary contact operations, see <a href="https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-update-contact.html">Update the primary and alternate contact information</a>.</p>
33
31
  * @example
34
32
  * Use a bare-bones client and the command you need to make an API call.
35
33
  * ```javascript
@@ -67,19 +65,16 @@ declare const GetContactInformationCommand_base: {
67
65
  * @see {@link AccountClientResolvedConfig | config} for AccountClient's `config` shape.
68
66
  *
69
67
  * @throws {@link AccessDeniedException} (client fault)
70
- * <p>The operation failed because the calling identity doesn't have the minimum required
71
- * permissions.</p>
68
+ * <p>The operation failed because the calling identity doesn't have the minimum required permissions.</p>
72
69
  *
73
70
  * @throws {@link InternalServerException} (server fault)
74
- * <p>The operation failed because of an error internal to Amazon Web Services. Try your operation again
75
- * later.</p>
71
+ * <p>The operation failed because of an error internal to Amazon Web Services. Try your operation again later.</p>
76
72
  *
77
73
  * @throws {@link ResourceNotFoundException} (client fault)
78
74
  * <p>The operation failed because it specified a resource that can't be found.</p>
79
75
  *
80
76
  * @throws {@link TooManyRequestsException} (client fault)
81
- * <p>The operation failed because it was called too frequently and exceeded a throttle
82
- * limit.</p>
77
+ * <p>The operation failed because it was called too frequently and exceeded a throttle limit.</p>
83
78
  *
84
79
  * @throws {@link ValidationException} (client fault)
85
80
  * <p>The operation failed because one of the input parameters was invalid.</p>
@@ -52,19 +52,16 @@ declare const GetPrimaryEmailCommand_base: {
52
52
  * @see {@link AccountClientResolvedConfig | config} for AccountClient's `config` shape.
53
53
  *
54
54
  * @throws {@link AccessDeniedException} (client fault)
55
- * <p>The operation failed because the calling identity doesn't have the minimum required
56
- * permissions.</p>
55
+ * <p>The operation failed because the calling identity doesn't have the minimum required permissions.</p>
57
56
  *
58
57
  * @throws {@link InternalServerException} (server fault)
59
- * <p>The operation failed because of an error internal to Amazon Web Services. Try your operation again
60
- * later.</p>
58
+ * <p>The operation failed because of an error internal to Amazon Web Services. Try your operation again later.</p>
61
59
  *
62
60
  * @throws {@link ResourceNotFoundException} (client fault)
63
61
  * <p>The operation failed because it specified a resource that can't be found.</p>
64
62
  *
65
63
  * @throws {@link TooManyRequestsException} (client fault)
66
- * <p>The operation failed because it was called too frequently and exceeded a throttle
67
- * limit.</p>
64
+ * <p>The operation failed because it was called too frequently and exceeded a throttle limit.</p>
68
65
  *
69
66
  * @throws {@link ValidationException} (client fault)
70
67
  * <p>The operation failed because one of the input parameters was invalid.</p>
@@ -54,16 +54,13 @@ declare const GetRegionOptStatusCommand_base: {
54
54
  * @see {@link AccountClientResolvedConfig | config} for AccountClient's `config` shape.
55
55
  *
56
56
  * @throws {@link AccessDeniedException} (client fault)
57
- * <p>The operation failed because the calling identity doesn't have the minimum required
58
- * permissions.</p>
57
+ * <p>The operation failed because the calling identity doesn't have the minimum required permissions.</p>
59
58
  *
60
59
  * @throws {@link InternalServerException} (server fault)
61
- * <p>The operation failed because of an error internal to Amazon Web Services. Try your operation again
62
- * later.</p>
60
+ * <p>The operation failed because of an error internal to Amazon Web Services. Try your operation again later.</p>
63
61
  *
64
62
  * @throws {@link TooManyRequestsException} (client fault)
65
- * <p>The operation failed because it was called too frequently and exceeded a throttle
66
- * limit.</p>
63
+ * <p>The operation failed because it was called too frequently and exceeded a throttle limit.</p>
67
64
  *
68
65
  * @throws {@link ValidationException} (client fault)
69
66
  * <p>The operation failed because one of the input parameters was invalid.</p>
@@ -27,9 +27,7 @@ declare const ListRegionsCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * <p>Lists all the Regions for a given account and their respective opt-in statuses.
31
- * Optionally, this list can be filtered by the <code>region-opt-status-contains</code>
32
- * parameter. </p>
30
+ * <p>Lists all the Regions for a given account and their respective opt-in statuses. Optionally, this list can be filtered by the <code>region-opt-status-contains</code> parameter. </p>
33
31
  * @example
34
32
  * Use a bare-bones client and the command you need to make an API call.
35
33
  * ```javascript
@@ -65,16 +63,13 @@ declare const ListRegionsCommand_base: {
65
63
  * @see {@link AccountClientResolvedConfig | config} for AccountClient's `config` shape.
66
64
  *
67
65
  * @throws {@link AccessDeniedException} (client fault)
68
- * <p>The operation failed because the calling identity doesn't have the minimum required
69
- * permissions.</p>
66
+ * <p>The operation failed because the calling identity doesn't have the minimum required permissions.</p>
70
67
  *
71
68
  * @throws {@link InternalServerException} (server fault)
72
- * <p>The operation failed because of an error internal to Amazon Web Services. Try your operation again
73
- * later.</p>
69
+ * <p>The operation failed because of an error internal to Amazon Web Services. Try your operation again later.</p>
74
70
  *
75
71
  * @throws {@link TooManyRequestsException} (client fault)
76
- * <p>The operation failed because it was called too frequently and exceeded a throttle
77
- * limit.</p>
72
+ * <p>The operation failed because it was called too frequently and exceeded a throttle limit.</p>
78
73
  *
79
74
  * @throws {@link ValidationException} (client fault)
80
75
  * <p>The operation failed because one of the input parameters was invalid.</p>