@aws-sdk/client-account 3.131.0 → 3.141.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.
- package/CHANGELOG.md +33 -0
- package/README.md +1 -1
- package/dist-cjs/Account.js +30 -0
- package/dist-cjs/commands/DeleteAlternateContactCommand.js +1 -1
- package/dist-cjs/commands/GetAlternateContactCommand.js +2 -2
- package/dist-cjs/commands/GetContactInformationCommand.js +36 -0
- package/dist-cjs/commands/PutAlternateContactCommand.js +1 -1
- package/dist-cjs/commands/PutContactInformationCommand.js +36 -0
- package/dist-cjs/commands/index.js +2 -0
- package/dist-cjs/models/models_0.js +60 -40
- package/dist-cjs/protocols/Aws_restJson1.js +171 -1
- package/dist-es/Account.js +30 -0
- package/dist-es/commands/DeleteAlternateContactCommand.js +2 -2
- package/dist-es/commands/GetAlternateContactCommand.js +3 -3
- package/dist-es/commands/GetContactInformationCommand.js +39 -0
- package/dist-es/commands/PutAlternateContactCommand.js +2 -2
- package/dist-es/commands/PutContactInformationCommand.js +39 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/models/models_0.js +9 -20
- package/dist-es/protocols/Aws_restJson1.js +205 -0
- package/dist-types/Account.d.ts +38 -2
- package/dist-types/AccountClient.d.ts +4 -2
- package/dist-types/commands/DeleteAlternateContactCommand.d.ts +6 -0
- package/dist-types/commands/GetAlternateContactCommand.d.ts +7 -1
- package/dist-types/commands/GetContactInformationCommand.d.ts +37 -0
- package/dist-types/commands/PutAlternateContactCommand.d.ts +7 -1
- package/dist-types/commands/PutContactInformationCommand.d.ts +37 -0
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +142 -27
- package/dist-types/protocols/Aws_restJson1.d.ts +6 -0
- package/dist-types/ts3.4/Account.d.ts +10 -0
- package/dist-types/ts3.4/AccountClient.d.ts +4 -2
- package/dist-types/ts3.4/commands/GetContactInformationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/PutContactInformationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/dist-types/ts3.4/models/models_0.d.ts +57 -18
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +6 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,39 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.141.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.140.0...v3.141.0) (2022-08-01)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **clients:** update client endpoints as of 2022-08-01 ([aaf49f2](https://github.com/aws/aws-sdk-js-v3/commit/aaf49f21b371412e6ea7e00890b71a7b31991b66))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.137.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.136.1...v3.137.0) (2022-07-26)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **namespaces:** remove namespaces with only a log filter ([#3823](https://github.com/aws/aws-sdk-js-v3/issues/3823)) ([33e6822](https://github.com/aws/aws-sdk-js-v3/commit/33e68228fb64c53dd8f89e6be76dd5f46edc3cfd))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# [3.136.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.135.0...v3.136.0) (2022-07-22)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
|
|
33
|
+
* **client-account:** This release enables customers to manage the primary contact information for their AWS accounts. For more information, see https://docs.aws.amazon.com/accounts/latest/reference/API_Operations.html ([f456886](https://github.com/aws/aws-sdk-js-v3/commit/f4568862de4e51d2a4d318d4fc5eba8f1fcaffad))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
6
39
|
# [3.131.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.130.0...v3.131.0) (2022-07-15)
|
|
7
40
|
|
|
8
41
|
**Note:** Version bump only for package @aws-sdk/client-account
|
package/README.md
CHANGED
|
@@ -165,7 +165,7 @@ try {
|
|
|
165
165
|
const data = await client.send(command);
|
|
166
166
|
// process data.
|
|
167
167
|
} catch (error) {
|
|
168
|
-
const { requestId, cfId, extendedRequestId } = error
|
|
168
|
+
const { requestId, cfId, extendedRequestId } = error.$$metadata;
|
|
169
169
|
console.log({ requestId, cfId, extendedRequestId });
|
|
170
170
|
/**
|
|
171
171
|
* The keys within exceptions are also parsed.
|
package/dist-cjs/Account.js
CHANGED
|
@@ -4,7 +4,9 @@ exports.Account = void 0;
|
|
|
4
4
|
const AccountClient_1 = require("./AccountClient");
|
|
5
5
|
const DeleteAlternateContactCommand_1 = require("./commands/DeleteAlternateContactCommand");
|
|
6
6
|
const GetAlternateContactCommand_1 = require("./commands/GetAlternateContactCommand");
|
|
7
|
+
const GetContactInformationCommand_1 = require("./commands/GetContactInformationCommand");
|
|
7
8
|
const PutAlternateContactCommand_1 = require("./commands/PutAlternateContactCommand");
|
|
9
|
+
const PutContactInformationCommand_1 = require("./commands/PutContactInformationCommand");
|
|
8
10
|
class Account extends AccountClient_1.AccountClient {
|
|
9
11
|
deleteAlternateContact(args, optionsOrCb, cb) {
|
|
10
12
|
const command = new DeleteAlternateContactCommand_1.DeleteAlternateContactCommand(args);
|
|
@@ -34,6 +36,20 @@ class Account extends AccountClient_1.AccountClient {
|
|
|
34
36
|
return this.send(command, optionsOrCb);
|
|
35
37
|
}
|
|
36
38
|
}
|
|
39
|
+
getContactInformation(args, optionsOrCb, cb) {
|
|
40
|
+
const command = new GetContactInformationCommand_1.GetContactInformationCommand(args);
|
|
41
|
+
if (typeof optionsOrCb === "function") {
|
|
42
|
+
this.send(command, optionsOrCb);
|
|
43
|
+
}
|
|
44
|
+
else if (typeof cb === "function") {
|
|
45
|
+
if (typeof optionsOrCb !== "object")
|
|
46
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
47
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
return this.send(command, optionsOrCb);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
37
53
|
putAlternateContact(args, optionsOrCb, cb) {
|
|
38
54
|
const command = new PutAlternateContactCommand_1.PutAlternateContactCommand(args);
|
|
39
55
|
if (typeof optionsOrCb === "function") {
|
|
@@ -48,5 +64,19 @@ class Account extends AccountClient_1.AccountClient {
|
|
|
48
64
|
return this.send(command, optionsOrCb);
|
|
49
65
|
}
|
|
50
66
|
}
|
|
67
|
+
putContactInformation(args, optionsOrCb, cb) {
|
|
68
|
+
const command = new PutContactInformationCommand_1.PutContactInformationCommand(args);
|
|
69
|
+
if (typeof optionsOrCb === "function") {
|
|
70
|
+
this.send(command, optionsOrCb);
|
|
71
|
+
}
|
|
72
|
+
else if (typeof cb === "function") {
|
|
73
|
+
if (typeof optionsOrCb !== "object")
|
|
74
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
75
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
return this.send(command, optionsOrCb);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
51
81
|
}
|
|
52
82
|
exports.Account = Account;
|
|
@@ -20,7 +20,7 @@ class DeleteAlternateContactCommand extends smithy_client_1.Command {
|
|
|
20
20
|
logger,
|
|
21
21
|
clientName,
|
|
22
22
|
commandName,
|
|
23
|
-
inputFilterSensitiveLog: models_0_1.
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.DeleteAlternateContactRequestFilterSensitiveLog,
|
|
24
24
|
outputFilterSensitiveLog: (output) => output,
|
|
25
25
|
};
|
|
26
26
|
const { requestHandler } = configuration;
|
|
@@ -20,8 +20,8 @@ class GetAlternateContactCommand extends smithy_client_1.Command {
|
|
|
20
20
|
logger,
|
|
21
21
|
clientName,
|
|
22
22
|
commandName,
|
|
23
|
-
inputFilterSensitiveLog: models_0_1.
|
|
24
|
-
outputFilterSensitiveLog: models_0_1.
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.GetAlternateContactRequestFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.GetAlternateContactResponseFilterSensitiveLog,
|
|
25
25
|
};
|
|
26
26
|
const { requestHandler } = configuration;
|
|
27
27
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetContactInformationCommand = void 0;
|
|
4
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
5
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const models_0_1 = require("../models/models_0");
|
|
7
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
8
|
+
class GetContactInformationCommand extends smithy_client_1.Command {
|
|
9
|
+
constructor(input) {
|
|
10
|
+
super();
|
|
11
|
+
this.input = input;
|
|
12
|
+
}
|
|
13
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
15
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
const { logger } = configuration;
|
|
17
|
+
const clientName = "AccountClient";
|
|
18
|
+
const commandName = "GetContactInformationCommand";
|
|
19
|
+
const handlerExecutionContext = {
|
|
20
|
+
logger,
|
|
21
|
+
clientName,
|
|
22
|
+
commandName,
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.GetContactInformationRequestFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.GetContactInformationResponseFilterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
const { requestHandler } = configuration;
|
|
27
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
28
|
+
}
|
|
29
|
+
serialize(input, context) {
|
|
30
|
+
return (0, Aws_restJson1_1.serializeAws_restJson1GetContactInformationCommand)(input, context);
|
|
31
|
+
}
|
|
32
|
+
deserialize(output, context) {
|
|
33
|
+
return (0, Aws_restJson1_1.deserializeAws_restJson1GetContactInformationCommand)(output, context);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.GetContactInformationCommand = GetContactInformationCommand;
|
|
@@ -20,7 +20,7 @@ class PutAlternateContactCommand extends smithy_client_1.Command {
|
|
|
20
20
|
logger,
|
|
21
21
|
clientName,
|
|
22
22
|
commandName,
|
|
23
|
-
inputFilterSensitiveLog: models_0_1.
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.PutAlternateContactRequestFilterSensitiveLog,
|
|
24
24
|
outputFilterSensitiveLog: (output) => output,
|
|
25
25
|
};
|
|
26
26
|
const { requestHandler } = configuration;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PutContactInformationCommand = void 0;
|
|
4
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
5
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const models_0_1 = require("../models/models_0");
|
|
7
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
8
|
+
class PutContactInformationCommand extends smithy_client_1.Command {
|
|
9
|
+
constructor(input) {
|
|
10
|
+
super();
|
|
11
|
+
this.input = input;
|
|
12
|
+
}
|
|
13
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
15
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
const { logger } = configuration;
|
|
17
|
+
const clientName = "AccountClient";
|
|
18
|
+
const commandName = "PutContactInformationCommand";
|
|
19
|
+
const handlerExecutionContext = {
|
|
20
|
+
logger,
|
|
21
|
+
clientName,
|
|
22
|
+
commandName,
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.PutContactInformationRequestFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: (output) => output,
|
|
25
|
+
};
|
|
26
|
+
const { requestHandler } = configuration;
|
|
27
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
28
|
+
}
|
|
29
|
+
serialize(input, context) {
|
|
30
|
+
return (0, Aws_restJson1_1.serializeAws_restJson1PutContactInformationCommand)(input, context);
|
|
31
|
+
}
|
|
32
|
+
deserialize(output, context) {
|
|
33
|
+
return (0, Aws_restJson1_1.deserializeAws_restJson1PutContactInformationCommand)(output, context);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.PutContactInformationCommand = PutContactInformationCommand;
|
|
@@ -3,4 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./DeleteAlternateContactCommand"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./GetAlternateContactCommand"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./GetContactInformationCommand"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./PutAlternateContactCommand"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./PutContactInformationCommand"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.PutContactInformationRequestFilterSensitiveLog = exports.GetContactInformationResponseFilterSensitiveLog = exports.ContactInformationFilterSensitiveLog = exports.GetContactInformationRequestFilterSensitiveLog = exports.PutAlternateContactRequestFilterSensitiveLog = exports.GetAlternateContactResponseFilterSensitiveLog = exports.AlternateContactFilterSensitiveLog = exports.GetAlternateContactRequestFilterSensitiveLog = exports.DeleteAlternateContactRequestFilterSensitiveLog = exports.ValidationException = exports.TooManyRequestsException = exports.ResourceNotFoundException = exports.InternalServerException = exports.AlternateContactType = exports.AccessDeniedException = void 0;
|
|
4
4
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
5
5
|
const AccountServiceException_1 = require("./AccountServiceException");
|
|
6
6
|
class AccessDeniedException extends AccountServiceException_1.AccountServiceException {
|
|
@@ -22,12 +22,6 @@ var AlternateContactType;
|
|
|
22
22
|
AlternateContactType["OPERATIONS"] = "OPERATIONS";
|
|
23
23
|
AlternateContactType["SECURITY"] = "SECURITY";
|
|
24
24
|
})(AlternateContactType = exports.AlternateContactType || (exports.AlternateContactType = {}));
|
|
25
|
-
var DeleteAlternateContactRequest;
|
|
26
|
-
(function (DeleteAlternateContactRequest) {
|
|
27
|
-
DeleteAlternateContactRequest.filterSensitiveLog = (obj) => ({
|
|
28
|
-
...obj,
|
|
29
|
-
});
|
|
30
|
-
})(DeleteAlternateContactRequest = exports.DeleteAlternateContactRequest || (exports.DeleteAlternateContactRequest = {}));
|
|
31
25
|
class InternalServerException extends AccountServiceException_1.AccountServiceException {
|
|
32
26
|
constructor(opts) {
|
|
33
27
|
super({
|
|
@@ -84,36 +78,62 @@ class ValidationException extends AccountServiceException_1.AccountServiceExcept
|
|
|
84
78
|
}
|
|
85
79
|
}
|
|
86
80
|
exports.ValidationException = ValidationException;
|
|
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
|
-
|
|
81
|
+
const DeleteAlternateContactRequestFilterSensitiveLog = (obj) => ({
|
|
82
|
+
...obj,
|
|
83
|
+
});
|
|
84
|
+
exports.DeleteAlternateContactRequestFilterSensitiveLog = DeleteAlternateContactRequestFilterSensitiveLog;
|
|
85
|
+
const GetAlternateContactRequestFilterSensitiveLog = (obj) => ({
|
|
86
|
+
...obj,
|
|
87
|
+
});
|
|
88
|
+
exports.GetAlternateContactRequestFilterSensitiveLog = GetAlternateContactRequestFilterSensitiveLog;
|
|
89
|
+
const AlternateContactFilterSensitiveLog = (obj) => ({
|
|
90
|
+
...obj,
|
|
91
|
+
...(obj.Name && { Name: smithy_client_1.SENSITIVE_STRING }),
|
|
92
|
+
...(obj.Title && { Title: smithy_client_1.SENSITIVE_STRING }),
|
|
93
|
+
...(obj.EmailAddress && { EmailAddress: smithy_client_1.SENSITIVE_STRING }),
|
|
94
|
+
...(obj.PhoneNumber && { PhoneNumber: smithy_client_1.SENSITIVE_STRING }),
|
|
95
|
+
});
|
|
96
|
+
exports.AlternateContactFilterSensitiveLog = AlternateContactFilterSensitiveLog;
|
|
97
|
+
const GetAlternateContactResponseFilterSensitiveLog = (obj) => ({
|
|
98
|
+
...obj,
|
|
99
|
+
...(obj.AlternateContact && { AlternateContact: (0, exports.AlternateContactFilterSensitiveLog)(obj.AlternateContact) }),
|
|
100
|
+
});
|
|
101
|
+
exports.GetAlternateContactResponseFilterSensitiveLog = GetAlternateContactResponseFilterSensitiveLog;
|
|
102
|
+
const PutAlternateContactRequestFilterSensitiveLog = (obj) => ({
|
|
103
|
+
...obj,
|
|
104
|
+
...(obj.Name && { Name: smithy_client_1.SENSITIVE_STRING }),
|
|
105
|
+
...(obj.Title && { Title: smithy_client_1.SENSITIVE_STRING }),
|
|
106
|
+
...(obj.EmailAddress && { EmailAddress: smithy_client_1.SENSITIVE_STRING }),
|
|
107
|
+
...(obj.PhoneNumber && { PhoneNumber: smithy_client_1.SENSITIVE_STRING }),
|
|
108
|
+
});
|
|
109
|
+
exports.PutAlternateContactRequestFilterSensitiveLog = PutAlternateContactRequestFilterSensitiveLog;
|
|
110
|
+
const GetContactInformationRequestFilterSensitiveLog = (obj) => ({
|
|
111
|
+
...obj,
|
|
112
|
+
});
|
|
113
|
+
exports.GetContactInformationRequestFilterSensitiveLog = GetContactInformationRequestFilterSensitiveLog;
|
|
114
|
+
const ContactInformationFilterSensitiveLog = (obj) => ({
|
|
115
|
+
...obj,
|
|
116
|
+
...(obj.FullName && { FullName: smithy_client_1.SENSITIVE_STRING }),
|
|
117
|
+
...(obj.AddressLine1 && { AddressLine1: smithy_client_1.SENSITIVE_STRING }),
|
|
118
|
+
...(obj.AddressLine2 && { AddressLine2: smithy_client_1.SENSITIVE_STRING }),
|
|
119
|
+
...(obj.AddressLine3 && { AddressLine3: smithy_client_1.SENSITIVE_STRING }),
|
|
120
|
+
...(obj.City && { City: smithy_client_1.SENSITIVE_STRING }),
|
|
121
|
+
...(obj.StateOrRegion && { StateOrRegion: smithy_client_1.SENSITIVE_STRING }),
|
|
122
|
+
...(obj.DistrictOrCounty && { DistrictOrCounty: smithy_client_1.SENSITIVE_STRING }),
|
|
123
|
+
...(obj.PostalCode && { PostalCode: smithy_client_1.SENSITIVE_STRING }),
|
|
124
|
+
...(obj.CountryCode && { CountryCode: smithy_client_1.SENSITIVE_STRING }),
|
|
125
|
+
...(obj.PhoneNumber && { PhoneNumber: smithy_client_1.SENSITIVE_STRING }),
|
|
126
|
+
...(obj.CompanyName && { CompanyName: smithy_client_1.SENSITIVE_STRING }),
|
|
127
|
+
...(obj.WebsiteUrl && { WebsiteUrl: smithy_client_1.SENSITIVE_STRING }),
|
|
128
|
+
});
|
|
129
|
+
exports.ContactInformationFilterSensitiveLog = ContactInformationFilterSensitiveLog;
|
|
130
|
+
const GetContactInformationResponseFilterSensitiveLog = (obj) => ({
|
|
131
|
+
...obj,
|
|
132
|
+
...(obj.ContactInformation && { ContactInformation: (0, exports.ContactInformationFilterSensitiveLog)(obj.ContactInformation) }),
|
|
133
|
+
});
|
|
134
|
+
exports.GetContactInformationResponseFilterSensitiveLog = GetContactInformationResponseFilterSensitiveLog;
|
|
135
|
+
const PutContactInformationRequestFilterSensitiveLog = (obj) => ({
|
|
136
|
+
...obj,
|
|
137
|
+
...(obj.ContactInformation && { ContactInformation: (0, exports.ContactInformationFilterSensitiveLog)(obj.ContactInformation) }),
|
|
138
|
+
});
|
|
139
|
+
exports.PutContactInformationRequestFilterSensitiveLog = PutContactInformationRequestFilterSensitiveLog;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deserializeAws_restJson1PutAlternateContactCommand = exports.deserializeAws_restJson1GetAlternateContactCommand = exports.deserializeAws_restJson1DeleteAlternateContactCommand = exports.serializeAws_restJson1PutAlternateContactCommand = exports.serializeAws_restJson1GetAlternateContactCommand = exports.serializeAws_restJson1DeleteAlternateContactCommand = void 0;
|
|
3
|
+
exports.deserializeAws_restJson1PutContactInformationCommand = exports.deserializeAws_restJson1PutAlternateContactCommand = exports.deserializeAws_restJson1GetContactInformationCommand = exports.deserializeAws_restJson1GetAlternateContactCommand = exports.deserializeAws_restJson1DeleteAlternateContactCommand = exports.serializeAws_restJson1PutContactInformationCommand = exports.serializeAws_restJson1PutAlternateContactCommand = exports.serializeAws_restJson1GetContactInformationCommand = exports.serializeAws_restJson1GetAlternateContactCommand = exports.serializeAws_restJson1DeleteAlternateContactCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const AccountServiceException_1 = require("../models/AccountServiceException");
|
|
@@ -49,6 +49,27 @@ const serializeAws_restJson1GetAlternateContactCommand = async (input, context)
|
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
51
|
exports.serializeAws_restJson1GetAlternateContactCommand = serializeAws_restJson1GetAlternateContactCommand;
|
|
52
|
+
const serializeAws_restJson1GetContactInformationCommand = async (input, context) => {
|
|
53
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
54
|
+
const headers = {
|
|
55
|
+
"content-type": "application/json",
|
|
56
|
+
};
|
|
57
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/getContactInformation";
|
|
58
|
+
let body;
|
|
59
|
+
body = JSON.stringify({
|
|
60
|
+
...(input.AccountId != null && { AccountId: input.AccountId }),
|
|
61
|
+
});
|
|
62
|
+
return new protocol_http_1.HttpRequest({
|
|
63
|
+
protocol,
|
|
64
|
+
hostname,
|
|
65
|
+
port,
|
|
66
|
+
method: "POST",
|
|
67
|
+
headers,
|
|
68
|
+
path: resolvedPath,
|
|
69
|
+
body,
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
exports.serializeAws_restJson1GetContactInformationCommand = serializeAws_restJson1GetContactInformationCommand;
|
|
52
73
|
const serializeAws_restJson1PutAlternateContactCommand = async (input, context) => {
|
|
53
74
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
54
75
|
const headers = {
|
|
@@ -75,6 +96,30 @@ const serializeAws_restJson1PutAlternateContactCommand = async (input, context)
|
|
|
75
96
|
});
|
|
76
97
|
};
|
|
77
98
|
exports.serializeAws_restJson1PutAlternateContactCommand = serializeAws_restJson1PutAlternateContactCommand;
|
|
99
|
+
const serializeAws_restJson1PutContactInformationCommand = async (input, context) => {
|
|
100
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
101
|
+
const headers = {
|
|
102
|
+
"content-type": "application/json",
|
|
103
|
+
};
|
|
104
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/putContactInformation";
|
|
105
|
+
let body;
|
|
106
|
+
body = JSON.stringify({
|
|
107
|
+
...(input.AccountId != null && { AccountId: input.AccountId }),
|
|
108
|
+
...(input.ContactInformation != null && {
|
|
109
|
+
ContactInformation: serializeAws_restJson1ContactInformation(input.ContactInformation, context),
|
|
110
|
+
}),
|
|
111
|
+
});
|
|
112
|
+
return new protocol_http_1.HttpRequest({
|
|
113
|
+
protocol,
|
|
114
|
+
hostname,
|
|
115
|
+
port,
|
|
116
|
+
method: "POST",
|
|
117
|
+
headers,
|
|
118
|
+
path: resolvedPath,
|
|
119
|
+
body,
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
exports.serializeAws_restJson1PutContactInformationCommand = serializeAws_restJson1PutContactInformationCommand;
|
|
78
123
|
const deserializeAws_restJson1DeleteAlternateContactCommand = async (output, context) => {
|
|
79
124
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
80
125
|
return deserializeAws_restJson1DeleteAlternateContactCommandError(output, context);
|
|
@@ -171,6 +216,56 @@ const deserializeAws_restJson1GetAlternateContactCommandError = async (output, c
|
|
|
171
216
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
172
217
|
}
|
|
173
218
|
};
|
|
219
|
+
const deserializeAws_restJson1GetContactInformationCommand = async (output, context) => {
|
|
220
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
221
|
+
return deserializeAws_restJson1GetContactInformationCommandError(output, context);
|
|
222
|
+
}
|
|
223
|
+
const contents = {
|
|
224
|
+
$metadata: deserializeMetadata(output),
|
|
225
|
+
ContactInformation: undefined,
|
|
226
|
+
};
|
|
227
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
228
|
+
if (data.ContactInformation !== undefined && data.ContactInformation !== null) {
|
|
229
|
+
contents.ContactInformation = deserializeAws_restJson1ContactInformation(data.ContactInformation, context);
|
|
230
|
+
}
|
|
231
|
+
return Promise.resolve(contents);
|
|
232
|
+
};
|
|
233
|
+
exports.deserializeAws_restJson1GetContactInformationCommand = deserializeAws_restJson1GetContactInformationCommand;
|
|
234
|
+
const deserializeAws_restJson1GetContactInformationCommandError = async (output, context) => {
|
|
235
|
+
const parsedOutput = {
|
|
236
|
+
...output,
|
|
237
|
+
body: await parseBody(output.body, context),
|
|
238
|
+
};
|
|
239
|
+
let response;
|
|
240
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
241
|
+
switch (errorCode) {
|
|
242
|
+
case "AccessDeniedException":
|
|
243
|
+
case "com.amazonaws.account#AccessDeniedException":
|
|
244
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
245
|
+
case "InternalServerException":
|
|
246
|
+
case "com.amazonaws.account#InternalServerException":
|
|
247
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
248
|
+
case "ResourceNotFoundException":
|
|
249
|
+
case "com.amazonaws.account#ResourceNotFoundException":
|
|
250
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
251
|
+
case "TooManyRequestsException":
|
|
252
|
+
case "com.amazonaws.account#TooManyRequestsException":
|
|
253
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
254
|
+
case "ValidationException":
|
|
255
|
+
case "com.amazonaws.account#ValidationException":
|
|
256
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
257
|
+
default:
|
|
258
|
+
const parsedBody = parsedOutput.body;
|
|
259
|
+
const $metadata = deserializeMetadata(output);
|
|
260
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
261
|
+
response = new AccountServiceException_1.AccountServiceException({
|
|
262
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
263
|
+
$fault: "client",
|
|
264
|
+
$metadata,
|
|
265
|
+
});
|
|
266
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
267
|
+
}
|
|
268
|
+
};
|
|
174
269
|
const deserializeAws_restJson1PutAlternateContactCommand = async (output, context) => {
|
|
175
270
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
176
271
|
return deserializeAws_restJson1PutAlternateContactCommandError(output, context);
|
|
@@ -214,6 +309,49 @@ const deserializeAws_restJson1PutAlternateContactCommandError = async (output, c
|
|
|
214
309
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
215
310
|
}
|
|
216
311
|
};
|
|
312
|
+
const deserializeAws_restJson1PutContactInformationCommand = async (output, context) => {
|
|
313
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
314
|
+
return deserializeAws_restJson1PutContactInformationCommandError(output, context);
|
|
315
|
+
}
|
|
316
|
+
const contents = {
|
|
317
|
+
$metadata: deserializeMetadata(output),
|
|
318
|
+
};
|
|
319
|
+
await collectBody(output.body, context);
|
|
320
|
+
return Promise.resolve(contents);
|
|
321
|
+
};
|
|
322
|
+
exports.deserializeAws_restJson1PutContactInformationCommand = deserializeAws_restJson1PutContactInformationCommand;
|
|
323
|
+
const deserializeAws_restJson1PutContactInformationCommandError = async (output, context) => {
|
|
324
|
+
const parsedOutput = {
|
|
325
|
+
...output,
|
|
326
|
+
body: await parseBody(output.body, context),
|
|
327
|
+
};
|
|
328
|
+
let response;
|
|
329
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
330
|
+
switch (errorCode) {
|
|
331
|
+
case "AccessDeniedException":
|
|
332
|
+
case "com.amazonaws.account#AccessDeniedException":
|
|
333
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
334
|
+
case "InternalServerException":
|
|
335
|
+
case "com.amazonaws.account#InternalServerException":
|
|
336
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
337
|
+
case "TooManyRequestsException":
|
|
338
|
+
case "com.amazonaws.account#TooManyRequestsException":
|
|
339
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
340
|
+
case "ValidationException":
|
|
341
|
+
case "com.amazonaws.account#ValidationException":
|
|
342
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
343
|
+
default:
|
|
344
|
+
const parsedBody = parsedOutput.body;
|
|
345
|
+
const $metadata = deserializeMetadata(output);
|
|
346
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
347
|
+
response = new AccountServiceException_1.AccountServiceException({
|
|
348
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
349
|
+
$fault: "client",
|
|
350
|
+
$metadata,
|
|
351
|
+
});
|
|
352
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
353
|
+
}
|
|
354
|
+
};
|
|
217
355
|
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
218
356
|
const contents = {};
|
|
219
357
|
const data = parsedOutput.body;
|
|
@@ -274,6 +412,22 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
|
|
|
274
412
|
});
|
|
275
413
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
276
414
|
};
|
|
415
|
+
const serializeAws_restJson1ContactInformation = (input, context) => {
|
|
416
|
+
return {
|
|
417
|
+
...(input.AddressLine1 != null && { AddressLine1: input.AddressLine1 }),
|
|
418
|
+
...(input.AddressLine2 != null && { AddressLine2: input.AddressLine2 }),
|
|
419
|
+
...(input.AddressLine3 != null && { AddressLine3: input.AddressLine3 }),
|
|
420
|
+
...(input.City != null && { City: input.City }),
|
|
421
|
+
...(input.CompanyName != null && { CompanyName: input.CompanyName }),
|
|
422
|
+
...(input.CountryCode != null && { CountryCode: input.CountryCode }),
|
|
423
|
+
...(input.DistrictOrCounty != null && { DistrictOrCounty: input.DistrictOrCounty }),
|
|
424
|
+
...(input.FullName != null && { FullName: input.FullName }),
|
|
425
|
+
...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }),
|
|
426
|
+
...(input.PostalCode != null && { PostalCode: input.PostalCode }),
|
|
427
|
+
...(input.StateOrRegion != null && { StateOrRegion: input.StateOrRegion }),
|
|
428
|
+
...(input.WebsiteUrl != null && { WebsiteUrl: input.WebsiteUrl }),
|
|
429
|
+
};
|
|
430
|
+
};
|
|
277
431
|
const deserializeAws_restJson1AlternateContact = (output, context) => {
|
|
278
432
|
return {
|
|
279
433
|
AlternateContactType: (0, smithy_client_1.expectString)(output.AlternateContactType),
|
|
@@ -283,6 +437,22 @@ const deserializeAws_restJson1AlternateContact = (output, context) => {
|
|
|
283
437
|
Title: (0, smithy_client_1.expectString)(output.Title),
|
|
284
438
|
};
|
|
285
439
|
};
|
|
440
|
+
const deserializeAws_restJson1ContactInformation = (output, context) => {
|
|
441
|
+
return {
|
|
442
|
+
AddressLine1: (0, smithy_client_1.expectString)(output.AddressLine1),
|
|
443
|
+
AddressLine2: (0, smithy_client_1.expectString)(output.AddressLine2),
|
|
444
|
+
AddressLine3: (0, smithy_client_1.expectString)(output.AddressLine3),
|
|
445
|
+
City: (0, smithy_client_1.expectString)(output.City),
|
|
446
|
+
CompanyName: (0, smithy_client_1.expectString)(output.CompanyName),
|
|
447
|
+
CountryCode: (0, smithy_client_1.expectString)(output.CountryCode),
|
|
448
|
+
DistrictOrCounty: (0, smithy_client_1.expectString)(output.DistrictOrCounty),
|
|
449
|
+
FullName: (0, smithy_client_1.expectString)(output.FullName),
|
|
450
|
+
PhoneNumber: (0, smithy_client_1.expectString)(output.PhoneNumber),
|
|
451
|
+
PostalCode: (0, smithy_client_1.expectString)(output.PostalCode),
|
|
452
|
+
StateOrRegion: (0, smithy_client_1.expectString)(output.StateOrRegion),
|
|
453
|
+
WebsiteUrl: (0, smithy_client_1.expectString)(output.WebsiteUrl),
|
|
454
|
+
};
|
|
455
|
+
};
|
|
286
456
|
const deserializeMetadata = (output) => {
|
|
287
457
|
var _a;
|
|
288
458
|
return ({
|
package/dist-es/Account.js
CHANGED
|
@@ -2,7 +2,9 @@ import { __extends } from "tslib";
|
|
|
2
2
|
import { AccountClient } from "./AccountClient";
|
|
3
3
|
import { DeleteAlternateContactCommand, } from "./commands/DeleteAlternateContactCommand";
|
|
4
4
|
import { GetAlternateContactCommand, } from "./commands/GetAlternateContactCommand";
|
|
5
|
+
import { GetContactInformationCommand, } from "./commands/GetContactInformationCommand";
|
|
5
6
|
import { PutAlternateContactCommand, } from "./commands/PutAlternateContactCommand";
|
|
7
|
+
import { PutContactInformationCommand, } from "./commands/PutContactInformationCommand";
|
|
6
8
|
var Account = (function (_super) {
|
|
7
9
|
__extends(Account, _super);
|
|
8
10
|
function Account() {
|
|
@@ -36,6 +38,20 @@ var Account = (function (_super) {
|
|
|
36
38
|
return this.send(command, optionsOrCb);
|
|
37
39
|
}
|
|
38
40
|
};
|
|
41
|
+
Account.prototype.getContactInformation = function (args, optionsOrCb, cb) {
|
|
42
|
+
var command = new GetContactInformationCommand(args);
|
|
43
|
+
if (typeof optionsOrCb === "function") {
|
|
44
|
+
this.send(command, optionsOrCb);
|
|
45
|
+
}
|
|
46
|
+
else if (typeof cb === "function") {
|
|
47
|
+
if (typeof optionsOrCb !== "object")
|
|
48
|
+
throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
|
|
49
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
return this.send(command, optionsOrCb);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
39
55
|
Account.prototype.putAlternateContact = function (args, optionsOrCb, cb) {
|
|
40
56
|
var command = new PutAlternateContactCommand(args);
|
|
41
57
|
if (typeof optionsOrCb === "function") {
|
|
@@ -50,6 +66,20 @@ var Account = (function (_super) {
|
|
|
50
66
|
return this.send(command, optionsOrCb);
|
|
51
67
|
}
|
|
52
68
|
};
|
|
69
|
+
Account.prototype.putContactInformation = function (args, optionsOrCb, cb) {
|
|
70
|
+
var command = new PutContactInformationCommand(args);
|
|
71
|
+
if (typeof optionsOrCb === "function") {
|
|
72
|
+
this.send(command, optionsOrCb);
|
|
73
|
+
}
|
|
74
|
+
else if (typeof cb === "function") {
|
|
75
|
+
if (typeof optionsOrCb !== "object")
|
|
76
|
+
throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
|
|
77
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
return this.send(command, optionsOrCb);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
53
83
|
return Account;
|
|
54
84
|
}(AccountClient));
|
|
55
85
|
export { Account };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __extends } from "tslib";
|
|
2
2
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
3
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
-
import {
|
|
4
|
+
import { DeleteAlternateContactRequestFilterSensitiveLog } from "../models/models_0";
|
|
5
5
|
import { deserializeAws_restJson1DeleteAlternateContactCommand, serializeAws_restJson1DeleteAlternateContactCommand, } from "../protocols/Aws_restJson1";
|
|
6
6
|
var DeleteAlternateContactCommand = (function (_super) {
|
|
7
7
|
__extends(DeleteAlternateContactCommand, _super);
|
|
@@ -20,7 +20,7 @@ var DeleteAlternateContactCommand = (function (_super) {
|
|
|
20
20
|
logger: logger,
|
|
21
21
|
clientName: clientName,
|
|
22
22
|
commandName: commandName,
|
|
23
|
-
inputFilterSensitiveLog:
|
|
23
|
+
inputFilterSensitiveLog: DeleteAlternateContactRequestFilterSensitiveLog,
|
|
24
24
|
outputFilterSensitiveLog: function (output) { return output; },
|
|
25
25
|
};
|
|
26
26
|
var requestHandler = configuration.requestHandler;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __extends } from "tslib";
|
|
2
2
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
3
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
-
import {
|
|
4
|
+
import { GetAlternateContactRequestFilterSensitiveLog, GetAlternateContactResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
5
|
import { deserializeAws_restJson1GetAlternateContactCommand, serializeAws_restJson1GetAlternateContactCommand, } from "../protocols/Aws_restJson1";
|
|
6
6
|
var GetAlternateContactCommand = (function (_super) {
|
|
7
7
|
__extends(GetAlternateContactCommand, _super);
|
|
@@ -20,8 +20,8 @@ var GetAlternateContactCommand = (function (_super) {
|
|
|
20
20
|
logger: logger,
|
|
21
21
|
clientName: clientName,
|
|
22
22
|
commandName: commandName,
|
|
23
|
-
inputFilterSensitiveLog:
|
|
24
|
-
outputFilterSensitiveLog:
|
|
23
|
+
inputFilterSensitiveLog: GetAlternateContactRequestFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: GetAlternateContactResponseFilterSensitiveLog,
|
|
25
25
|
};
|
|
26
26
|
var requestHandler = configuration.requestHandler;
|
|
27
27
|
return stack.resolve(function (request) {
|