@aws-sdk/client-pricing 3.281.0 → 3.282.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/README.md +16 -0
- package/dist-cjs/Pricing.js +30 -0
- package/dist-cjs/commands/GetPriceListFileUrlCommand.js +46 -0
- package/dist-cjs/commands/ListPriceListsCommand.js +46 -0
- package/dist-cjs/commands/index.js +2 -0
- package/dist-cjs/endpoint/ruleset.js +3 -3
- package/dist-cjs/models/models_0.js +35 -1
- package/dist-cjs/pagination/ListPriceListsPaginator.js +36 -0
- package/dist-cjs/pagination/index.js +1 -0
- package/dist-cjs/protocols/Aws_json1_1.js +184 -1
- package/dist-es/Pricing.js +30 -0
- package/dist-es/commands/GetPriceListFileUrlCommand.js +42 -0
- package/dist-es/commands/ListPriceListsCommand.js +42 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/endpoint/ruleset.js +3 -3
- package/dist-es/models/models_0.js +28 -0
- package/dist-es/pagination/ListPriceListsPaginator.js +32 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_json1_1.js +180 -1
- package/dist-types/Pricing.d.ts +34 -0
- package/dist-types/PricingClient.d.ts +4 -2
- package/dist-types/commands/GetPriceListFileUrlCommand.d.ts +51 -0
- package/dist-types/commands/ListPriceListsCommand.d.ts +55 -0
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +146 -5
- package/dist-types/pagination/ListPriceListsPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_json1_1.d.ts +6 -0
- package/dist-types/ts3.4/Pricing.d.ts +34 -0
- package/dist-types/ts3.4/PricingClient.d.ts +14 -2
- package/dist-types/ts3.4/commands/GetPriceListFileUrlCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListPriceListsCommand.d.ts +37 -0
- package/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/dist-types/ts3.4/models/models_0.d.ts +46 -0
- package/dist-types/ts3.4/pagination/ListPriceListsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +24 -0
- package/package.json +17 -17
package/README.md
CHANGED
|
@@ -244,6 +244,14 @@ GetAttributeValues
|
|
|
244
244
|
|
|
245
245
|
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pricing/classes/getattributevaluescommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pricing/interfaces/getattributevaluescommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pricing/interfaces/getattributevaluescommandoutput.html)
|
|
246
246
|
|
|
247
|
+
</details>
|
|
248
|
+
<details>
|
|
249
|
+
<summary>
|
|
250
|
+
GetPriceListFileUrl
|
|
251
|
+
</summary>
|
|
252
|
+
|
|
253
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pricing/classes/getpricelistfileurlcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pricing/interfaces/getpricelistfileurlcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pricing/interfaces/getpricelistfileurlcommandoutput.html)
|
|
254
|
+
|
|
247
255
|
</details>
|
|
248
256
|
<details>
|
|
249
257
|
<summary>
|
|
@@ -253,3 +261,11 @@ GetProducts
|
|
|
253
261
|
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pricing/classes/getproductscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pricing/interfaces/getproductscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pricing/interfaces/getproductscommandoutput.html)
|
|
254
262
|
|
|
255
263
|
</details>
|
|
264
|
+
<details>
|
|
265
|
+
<summary>
|
|
266
|
+
ListPriceLists
|
|
267
|
+
</summary>
|
|
268
|
+
|
|
269
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pricing/classes/listpricelistscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pricing/interfaces/listpricelistscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pricing/interfaces/listpricelistscommandoutput.html)
|
|
270
|
+
|
|
271
|
+
</details>
|
package/dist-cjs/Pricing.js
CHANGED
|
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Pricing = void 0;
|
|
4
4
|
const DescribeServicesCommand_1 = require("./commands/DescribeServicesCommand");
|
|
5
5
|
const GetAttributeValuesCommand_1 = require("./commands/GetAttributeValuesCommand");
|
|
6
|
+
const GetPriceListFileUrlCommand_1 = require("./commands/GetPriceListFileUrlCommand");
|
|
6
7
|
const GetProductsCommand_1 = require("./commands/GetProductsCommand");
|
|
8
|
+
const ListPriceListsCommand_1 = require("./commands/ListPriceListsCommand");
|
|
7
9
|
const PricingClient_1 = require("./PricingClient");
|
|
8
10
|
class Pricing extends PricingClient_1.PricingClient {
|
|
9
11
|
describeServices(args, optionsOrCb, cb) {
|
|
@@ -34,6 +36,20 @@ class Pricing extends PricingClient_1.PricingClient {
|
|
|
34
36
|
return this.send(command, optionsOrCb);
|
|
35
37
|
}
|
|
36
38
|
}
|
|
39
|
+
getPriceListFileUrl(args, optionsOrCb, cb) {
|
|
40
|
+
const command = new GetPriceListFileUrlCommand_1.GetPriceListFileUrlCommand(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
|
getProducts(args, optionsOrCb, cb) {
|
|
38
54
|
const command = new GetProductsCommand_1.GetProductsCommand(args);
|
|
39
55
|
if (typeof optionsOrCb === "function") {
|
|
@@ -48,5 +64,19 @@ class Pricing extends PricingClient_1.PricingClient {
|
|
|
48
64
|
return this.send(command, optionsOrCb);
|
|
49
65
|
}
|
|
50
66
|
}
|
|
67
|
+
listPriceLists(args, optionsOrCb, cb) {
|
|
68
|
+
const command = new ListPriceListsCommand_1.ListPriceListsCommand(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.Pricing = Pricing;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetPriceListFileUrlCommand = void 0;
|
|
4
|
+
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
8
|
+
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
9
|
+
class GetPriceListFileUrlCommand extends smithy_client_1.Command {
|
|
10
|
+
constructor(input) {
|
|
11
|
+
super();
|
|
12
|
+
this.input = input;
|
|
13
|
+
}
|
|
14
|
+
static getEndpointParameterInstructions() {
|
|
15
|
+
return {
|
|
16
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
17
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
18
|
+
Region: { type: "builtInParams", name: "region" },
|
|
19
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
23
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
24
|
+
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetPriceListFileUrlCommand.getEndpointParameterInstructions()));
|
|
25
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
26
|
+
const { logger } = configuration;
|
|
27
|
+
const clientName = "PricingClient";
|
|
28
|
+
const commandName = "GetPriceListFileUrlCommand";
|
|
29
|
+
const handlerExecutionContext = {
|
|
30
|
+
logger,
|
|
31
|
+
clientName,
|
|
32
|
+
commandName,
|
|
33
|
+
inputFilterSensitiveLog: models_0_1.GetPriceListFileUrlRequestFilterSensitiveLog,
|
|
34
|
+
outputFilterSensitiveLog: models_0_1.GetPriceListFileUrlResponseFilterSensitiveLog,
|
|
35
|
+
};
|
|
36
|
+
const { requestHandler } = configuration;
|
|
37
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
38
|
+
}
|
|
39
|
+
serialize(input, context) {
|
|
40
|
+
return (0, Aws_json1_1_1.serializeAws_json1_1GetPriceListFileUrlCommand)(input, context);
|
|
41
|
+
}
|
|
42
|
+
deserialize(output, context) {
|
|
43
|
+
return (0, Aws_json1_1_1.deserializeAws_json1_1GetPriceListFileUrlCommand)(output, context);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.GetPriceListFileUrlCommand = GetPriceListFileUrlCommand;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListPriceListsCommand = void 0;
|
|
4
|
+
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
8
|
+
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
9
|
+
class ListPriceListsCommand extends smithy_client_1.Command {
|
|
10
|
+
constructor(input) {
|
|
11
|
+
super();
|
|
12
|
+
this.input = input;
|
|
13
|
+
}
|
|
14
|
+
static getEndpointParameterInstructions() {
|
|
15
|
+
return {
|
|
16
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
17
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
18
|
+
Region: { type: "builtInParams", name: "region" },
|
|
19
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
23
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
24
|
+
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListPriceListsCommand.getEndpointParameterInstructions()));
|
|
25
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
26
|
+
const { logger } = configuration;
|
|
27
|
+
const clientName = "PricingClient";
|
|
28
|
+
const commandName = "ListPriceListsCommand";
|
|
29
|
+
const handlerExecutionContext = {
|
|
30
|
+
logger,
|
|
31
|
+
clientName,
|
|
32
|
+
commandName,
|
|
33
|
+
inputFilterSensitiveLog: models_0_1.ListPriceListsRequestFilterSensitiveLog,
|
|
34
|
+
outputFilterSensitiveLog: models_0_1.ListPriceListsResponseFilterSensitiveLog,
|
|
35
|
+
};
|
|
36
|
+
const { requestHandler } = configuration;
|
|
37
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
38
|
+
}
|
|
39
|
+
serialize(input, context) {
|
|
40
|
+
return (0, Aws_json1_1_1.serializeAws_json1_1ListPriceListsCommand)(input, context);
|
|
41
|
+
}
|
|
42
|
+
deserialize(output, context) {
|
|
43
|
+
return (0, Aws_json1_1_1.deserializeAws_json1_1ListPriceListsCommand)(output, context);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.ListPriceListsCommand = ListPriceListsCommand;
|
|
@@ -3,4 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./DescribeServicesCommand"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./GetAttributeValuesCommand"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./GetPriceListFileUrlCommand"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./GetProductsCommand"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./ListPriceListsCommand"), exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ruleSet = void 0;
|
|
4
|
-
const
|
|
5
|
-
const a = "
|
|
6
|
-
const _data = { version: "1.0", parameters: { Region:
|
|
4
|
+
const s = "required", t = "fn", u = "argv", v = "ref";
|
|
5
|
+
const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = "getAttr", g = { [s]: false, "type": "String" }, h = { [s]: true, "default": false, "type": "Boolean" }, i = { [v]: "Endpoint" }, j = { [t]: "booleanEquals", [u]: [{ [v]: "UseFIPS" }, true] }, k = { [t]: "booleanEquals", [u]: [{ [v]: "UseDualStack" }, true] }, l = {}, m = { [t]: "booleanEquals", [u]: [true, { [t]: f, [u]: [{ [v]: e }, "supportsFIPS"] }] }, n = { [v]: e }, o = { [t]: "booleanEquals", [u]: [true, { [t]: f, [u]: [n, "supportsDualStack"] }] }, p = [j], q = [k], r = [{ [v]: "Region" }];
|
|
6
|
+
const _data = { version: "1.0", parameters: { Region: g, UseDualStack: h, UseFIPS: h, Endpoint: g }, rules: [{ conditions: [{ [t]: a, [u]: [i] }], type: b, rules: [{ conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: i, properties: l, headers: l }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [t]: a, [u]: r }], type: b, rules: [{ conditions: [{ [t]: "aws.partition", [u]: r, assign: e }], type: b, rules: [{ conditions: [j, k], type: b, rules: [{ conditions: [m, o], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://api.pricing-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: l, headers: l }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: p, type: b, rules: [{ conditions: [m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://api.pricing-fips.{Region}.{PartitionResult#dnsSuffix}", properties: l, headers: l }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: q, type: b, rules: [{ conditions: [o], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://api.pricing.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: l, headers: l }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ conditions: [{ [t]: "stringEquals", [u]: ["aws", { [t]: f, [u]: [n, "name"] }] }], endpoint: { url: "https://api.pricing.{Region}.amazonaws.com", properties: l, headers: l }, type: d }, { endpoint: { url: "https://api.pricing.{Region}.{PartitionResult#dnsSuffix}", properties: l, headers: l }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
|
|
7
7
|
exports.ruleSet = _data;
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetProductsResponseFilterSensitiveLog = exports.GetProductsRequestFilterSensitiveLog = exports.FilterFilterSensitiveLog = exports.GetAttributeValuesResponseFilterSensitiveLog = exports.GetAttributeValuesRequestFilterSensitiveLog = exports.DescribeServicesResponseFilterSensitiveLog = exports.ServiceFilterSensitiveLog = exports.DescribeServicesRequestFilterSensitiveLog = exports.AttributeValueFilterSensitiveLog = exports.FilterType = exports.NotFoundException = exports.InvalidParameterException = exports.InvalidNextTokenException = exports.InternalErrorException = exports.ExpiredNextTokenException = void 0;
|
|
3
|
+
exports.ListPriceListsResponseFilterSensitiveLog = exports.PriceListFilterSensitiveLog = exports.ListPriceListsRequestFilterSensitiveLog = exports.GetProductsResponseFilterSensitiveLog = exports.GetProductsRequestFilterSensitiveLog = exports.FilterFilterSensitiveLog = exports.GetPriceListFileUrlResponseFilterSensitiveLog = exports.GetPriceListFileUrlRequestFilterSensitiveLog = exports.GetAttributeValuesResponseFilterSensitiveLog = exports.GetAttributeValuesRequestFilterSensitiveLog = exports.DescribeServicesResponseFilterSensitiveLog = exports.ServiceFilterSensitiveLog = exports.DescribeServicesRequestFilterSensitiveLog = exports.AttributeValueFilterSensitiveLog = exports.FilterType = exports.NotFoundException = exports.InvalidParameterException = exports.InvalidNextTokenException = exports.InternalErrorException = exports.ExpiredNextTokenException = exports.AccessDeniedException = void 0;
|
|
4
4
|
const PricingServiceException_1 = require("./PricingServiceException");
|
|
5
|
+
class AccessDeniedException extends PricingServiceException_1.PricingServiceException {
|
|
6
|
+
constructor(opts) {
|
|
7
|
+
super({
|
|
8
|
+
name: "AccessDeniedException",
|
|
9
|
+
$fault: "client",
|
|
10
|
+
...opts,
|
|
11
|
+
});
|
|
12
|
+
this.name = "AccessDeniedException";
|
|
13
|
+
this.$fault = "client";
|
|
14
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
15
|
+
this.Message = opts.Message;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.AccessDeniedException = AccessDeniedException;
|
|
5
19
|
class ExpiredNextTokenException extends PricingServiceException_1.PricingServiceException {
|
|
6
20
|
constructor(opts) {
|
|
7
21
|
super({
|
|
@@ -100,6 +114,14 @@ const GetAttributeValuesResponseFilterSensitiveLog = (obj) => ({
|
|
|
100
114
|
...obj,
|
|
101
115
|
});
|
|
102
116
|
exports.GetAttributeValuesResponseFilterSensitiveLog = GetAttributeValuesResponseFilterSensitiveLog;
|
|
117
|
+
const GetPriceListFileUrlRequestFilterSensitiveLog = (obj) => ({
|
|
118
|
+
...obj,
|
|
119
|
+
});
|
|
120
|
+
exports.GetPriceListFileUrlRequestFilterSensitiveLog = GetPriceListFileUrlRequestFilterSensitiveLog;
|
|
121
|
+
const GetPriceListFileUrlResponseFilterSensitiveLog = (obj) => ({
|
|
122
|
+
...obj,
|
|
123
|
+
});
|
|
124
|
+
exports.GetPriceListFileUrlResponseFilterSensitiveLog = GetPriceListFileUrlResponseFilterSensitiveLog;
|
|
103
125
|
const FilterFilterSensitiveLog = (obj) => ({
|
|
104
126
|
...obj,
|
|
105
127
|
});
|
|
@@ -112,3 +134,15 @@ const GetProductsResponseFilterSensitiveLog = (obj) => ({
|
|
|
112
134
|
...obj,
|
|
113
135
|
});
|
|
114
136
|
exports.GetProductsResponseFilterSensitiveLog = GetProductsResponseFilterSensitiveLog;
|
|
137
|
+
const ListPriceListsRequestFilterSensitiveLog = (obj) => ({
|
|
138
|
+
...obj,
|
|
139
|
+
});
|
|
140
|
+
exports.ListPriceListsRequestFilterSensitiveLog = ListPriceListsRequestFilterSensitiveLog;
|
|
141
|
+
const PriceListFilterSensitiveLog = (obj) => ({
|
|
142
|
+
...obj,
|
|
143
|
+
});
|
|
144
|
+
exports.PriceListFilterSensitiveLog = PriceListFilterSensitiveLog;
|
|
145
|
+
const ListPriceListsResponseFilterSensitiveLog = (obj) => ({
|
|
146
|
+
...obj,
|
|
147
|
+
});
|
|
148
|
+
exports.ListPriceListsResponseFilterSensitiveLog = ListPriceListsResponseFilterSensitiveLog;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.paginateListPriceLists = void 0;
|
|
4
|
+
const ListPriceListsCommand_1 = require("../commands/ListPriceListsCommand");
|
|
5
|
+
const Pricing_1 = require("../Pricing");
|
|
6
|
+
const PricingClient_1 = require("../PricingClient");
|
|
7
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.send(new ListPriceListsCommand_1.ListPriceListsCommand(input), ...args);
|
|
9
|
+
};
|
|
10
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
11
|
+
return await client.listPriceLists(input, ...args);
|
|
12
|
+
};
|
|
13
|
+
async function* paginateListPriceLists(config, input, ...additionalArguments) {
|
|
14
|
+
let token = config.startingToken || undefined;
|
|
15
|
+
let hasNext = true;
|
|
16
|
+
let page;
|
|
17
|
+
while (hasNext) {
|
|
18
|
+
input.NextToken = token;
|
|
19
|
+
input["MaxResults"] = config.pageSize;
|
|
20
|
+
if (config.client instanceof Pricing_1.Pricing) {
|
|
21
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else if (config.client instanceof PricingClient_1.PricingClient) {
|
|
24
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
throw new Error("Invalid client, expected Pricing | PricingClient");
|
|
28
|
+
}
|
|
29
|
+
yield page;
|
|
30
|
+
const prevToken = token;
|
|
31
|
+
token = page.NextToken;
|
|
32
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
33
|
+
}
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
exports.paginateListPriceLists = paginateListPriceLists;
|
|
@@ -5,3 +5,4 @@ tslib_1.__exportStar(require("./DescribeServicesPaginator"), exports);
|
|
|
5
5
|
tslib_1.__exportStar(require("./GetAttributeValuesPaginator"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./GetProductsPaginator"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./Interfaces"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./ListPriceListsPaginator"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deserializeAws_json1_1GetProductsCommand = exports.deserializeAws_json1_1GetAttributeValuesCommand = exports.deserializeAws_json1_1DescribeServicesCommand = exports.serializeAws_json1_1GetProductsCommand = exports.serializeAws_json1_1GetAttributeValuesCommand = exports.serializeAws_json1_1DescribeServicesCommand = void 0;
|
|
3
|
+
exports.deserializeAws_json1_1ListPriceListsCommand = exports.deserializeAws_json1_1GetProductsCommand = exports.deserializeAws_json1_1GetPriceListFileUrlCommand = exports.deserializeAws_json1_1GetAttributeValuesCommand = exports.deserializeAws_json1_1DescribeServicesCommand = exports.serializeAws_json1_1ListPriceListsCommand = exports.serializeAws_json1_1GetProductsCommand = exports.serializeAws_json1_1GetPriceListFileUrlCommand = exports.serializeAws_json1_1GetAttributeValuesCommand = exports.serializeAws_json1_1DescribeServicesCommand = 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 models_0_1 = require("../models/models_0");
|
|
@@ -25,6 +25,16 @@ const serializeAws_json1_1GetAttributeValuesCommand = async (input, context) =>
|
|
|
25
25
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
26
26
|
};
|
|
27
27
|
exports.serializeAws_json1_1GetAttributeValuesCommand = serializeAws_json1_1GetAttributeValuesCommand;
|
|
28
|
+
const serializeAws_json1_1GetPriceListFileUrlCommand = async (input, context) => {
|
|
29
|
+
const headers = {
|
|
30
|
+
"content-type": "application/x-amz-json-1.1",
|
|
31
|
+
"x-amz-target": "AWSPriceListService.GetPriceListFileUrl",
|
|
32
|
+
};
|
|
33
|
+
let body;
|
|
34
|
+
body = JSON.stringify(serializeAws_json1_1GetPriceListFileUrlRequest(input, context));
|
|
35
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
36
|
+
};
|
|
37
|
+
exports.serializeAws_json1_1GetPriceListFileUrlCommand = serializeAws_json1_1GetPriceListFileUrlCommand;
|
|
28
38
|
const serializeAws_json1_1GetProductsCommand = async (input, context) => {
|
|
29
39
|
const headers = {
|
|
30
40
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -35,6 +45,16 @@ const serializeAws_json1_1GetProductsCommand = async (input, context) => {
|
|
|
35
45
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
36
46
|
};
|
|
37
47
|
exports.serializeAws_json1_1GetProductsCommand = serializeAws_json1_1GetProductsCommand;
|
|
48
|
+
const serializeAws_json1_1ListPriceListsCommand = async (input, context) => {
|
|
49
|
+
const headers = {
|
|
50
|
+
"content-type": "application/x-amz-json-1.1",
|
|
51
|
+
"x-amz-target": "AWSPriceListService.ListPriceLists",
|
|
52
|
+
};
|
|
53
|
+
let body;
|
|
54
|
+
body = JSON.stringify(serializeAws_json1_1ListPriceListsRequest(input, context));
|
|
55
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
56
|
+
};
|
|
57
|
+
exports.serializeAws_json1_1ListPriceListsCommand = serializeAws_json1_1ListPriceListsCommand;
|
|
38
58
|
const deserializeAws_json1_1DescribeServicesCommand = async (output, context) => {
|
|
39
59
|
if (output.statusCode >= 300) {
|
|
40
60
|
return deserializeAws_json1_1DescribeServicesCommandError(output, context);
|
|
@@ -127,6 +147,49 @@ const deserializeAws_json1_1GetAttributeValuesCommandError = async (output, cont
|
|
|
127
147
|
});
|
|
128
148
|
}
|
|
129
149
|
};
|
|
150
|
+
const deserializeAws_json1_1GetPriceListFileUrlCommand = async (output, context) => {
|
|
151
|
+
if (output.statusCode >= 300) {
|
|
152
|
+
return deserializeAws_json1_1GetPriceListFileUrlCommandError(output, context);
|
|
153
|
+
}
|
|
154
|
+
const data = await parseBody(output.body, context);
|
|
155
|
+
let contents = {};
|
|
156
|
+
contents = deserializeAws_json1_1GetPriceListFileUrlResponse(data, context);
|
|
157
|
+
const response = {
|
|
158
|
+
$metadata: deserializeMetadata(output),
|
|
159
|
+
...contents,
|
|
160
|
+
};
|
|
161
|
+
return Promise.resolve(response);
|
|
162
|
+
};
|
|
163
|
+
exports.deserializeAws_json1_1GetPriceListFileUrlCommand = deserializeAws_json1_1GetPriceListFileUrlCommand;
|
|
164
|
+
const deserializeAws_json1_1GetPriceListFileUrlCommandError = async (output, context) => {
|
|
165
|
+
const parsedOutput = {
|
|
166
|
+
...output,
|
|
167
|
+
body: await parseErrorBody(output.body, context),
|
|
168
|
+
};
|
|
169
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
170
|
+
switch (errorCode) {
|
|
171
|
+
case "AccessDeniedException":
|
|
172
|
+
case "com.amazonaws.pricing#AccessDeniedException":
|
|
173
|
+
throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
174
|
+
case "InternalErrorException":
|
|
175
|
+
case "com.amazonaws.pricing#InternalErrorException":
|
|
176
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
177
|
+
case "InvalidParameterException":
|
|
178
|
+
case "com.amazonaws.pricing#InvalidParameterException":
|
|
179
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
180
|
+
case "NotFoundException":
|
|
181
|
+
case "com.amazonaws.pricing#NotFoundException":
|
|
182
|
+
throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
|
|
183
|
+
default:
|
|
184
|
+
const parsedBody = parsedOutput.body;
|
|
185
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
186
|
+
output,
|
|
187
|
+
parsedBody,
|
|
188
|
+
exceptionCtor: PricingServiceException_1.PricingServiceException,
|
|
189
|
+
errorCode,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
};
|
|
130
193
|
const deserializeAws_json1_1GetProductsCommand = async (output, context) => {
|
|
131
194
|
if (output.statusCode >= 300) {
|
|
132
195
|
return deserializeAws_json1_1GetProductsCommandError(output, context);
|
|
@@ -173,6 +236,64 @@ const deserializeAws_json1_1GetProductsCommandError = async (output, context) =>
|
|
|
173
236
|
});
|
|
174
237
|
}
|
|
175
238
|
};
|
|
239
|
+
const deserializeAws_json1_1ListPriceListsCommand = async (output, context) => {
|
|
240
|
+
if (output.statusCode >= 300) {
|
|
241
|
+
return deserializeAws_json1_1ListPriceListsCommandError(output, context);
|
|
242
|
+
}
|
|
243
|
+
const data = await parseBody(output.body, context);
|
|
244
|
+
let contents = {};
|
|
245
|
+
contents = deserializeAws_json1_1ListPriceListsResponse(data, context);
|
|
246
|
+
const response = {
|
|
247
|
+
$metadata: deserializeMetadata(output),
|
|
248
|
+
...contents,
|
|
249
|
+
};
|
|
250
|
+
return Promise.resolve(response);
|
|
251
|
+
};
|
|
252
|
+
exports.deserializeAws_json1_1ListPriceListsCommand = deserializeAws_json1_1ListPriceListsCommand;
|
|
253
|
+
const deserializeAws_json1_1ListPriceListsCommandError = async (output, context) => {
|
|
254
|
+
const parsedOutput = {
|
|
255
|
+
...output,
|
|
256
|
+
body: await parseErrorBody(output.body, context),
|
|
257
|
+
};
|
|
258
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
259
|
+
switch (errorCode) {
|
|
260
|
+
case "AccessDeniedException":
|
|
261
|
+
case "com.amazonaws.pricing#AccessDeniedException":
|
|
262
|
+
throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
263
|
+
case "ExpiredNextTokenException":
|
|
264
|
+
case "com.amazonaws.pricing#ExpiredNextTokenException":
|
|
265
|
+
throw await deserializeAws_json1_1ExpiredNextTokenExceptionResponse(parsedOutput, context);
|
|
266
|
+
case "InternalErrorException":
|
|
267
|
+
case "com.amazonaws.pricing#InternalErrorException":
|
|
268
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
269
|
+
case "InvalidNextTokenException":
|
|
270
|
+
case "com.amazonaws.pricing#InvalidNextTokenException":
|
|
271
|
+
throw await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context);
|
|
272
|
+
case "InvalidParameterException":
|
|
273
|
+
case "com.amazonaws.pricing#InvalidParameterException":
|
|
274
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
275
|
+
case "NotFoundException":
|
|
276
|
+
case "com.amazonaws.pricing#NotFoundException":
|
|
277
|
+
throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
|
|
278
|
+
default:
|
|
279
|
+
const parsedBody = parsedOutput.body;
|
|
280
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
281
|
+
output,
|
|
282
|
+
parsedBody,
|
|
283
|
+
exceptionCtor: PricingServiceException_1.PricingServiceException,
|
|
284
|
+
errorCode,
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
const deserializeAws_json1_1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
289
|
+
const body = parsedOutput.body;
|
|
290
|
+
const deserialized = deserializeAws_json1_1AccessDeniedException(body, context);
|
|
291
|
+
const exception = new models_0_1.AccessDeniedException({
|
|
292
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
293
|
+
...deserialized,
|
|
294
|
+
});
|
|
295
|
+
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
296
|
+
};
|
|
176
297
|
const deserializeAws_json1_1ExpiredNextTokenExceptionResponse = async (parsedOutput, context) => {
|
|
177
298
|
const body = parsedOutput.body;
|
|
178
299
|
const deserialized = deserializeAws_json1_1ExpiredNextTokenException(body, context);
|
|
@@ -248,6 +369,12 @@ const serializeAws_json1_1GetAttributeValuesRequest = (input, context) => {
|
|
|
248
369
|
...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }),
|
|
249
370
|
};
|
|
250
371
|
};
|
|
372
|
+
const serializeAws_json1_1GetPriceListFileUrlRequest = (input, context) => {
|
|
373
|
+
return {
|
|
374
|
+
...(input.FileFormat != null && { FileFormat: input.FileFormat }),
|
|
375
|
+
...(input.PriceListArn != null && { PriceListArn: input.PriceListArn }),
|
|
376
|
+
};
|
|
377
|
+
};
|
|
251
378
|
const serializeAws_json1_1GetProductsRequest = (input, context) => {
|
|
252
379
|
return {
|
|
253
380
|
...(input.Filters != null && { Filters: serializeAws_json1_1Filters(input.Filters, context) }),
|
|
@@ -257,6 +384,21 @@ const serializeAws_json1_1GetProductsRequest = (input, context) => {
|
|
|
257
384
|
...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }),
|
|
258
385
|
};
|
|
259
386
|
};
|
|
387
|
+
const serializeAws_json1_1ListPriceListsRequest = (input, context) => {
|
|
388
|
+
return {
|
|
389
|
+
...(input.CurrencyCode != null && { CurrencyCode: input.CurrencyCode }),
|
|
390
|
+
...(input.EffectiveDate != null && { EffectiveDate: Math.round(input.EffectiveDate.getTime() / 1000) }),
|
|
391
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
392
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
393
|
+
...(input.RegionCode != null && { RegionCode: input.RegionCode }),
|
|
394
|
+
...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }),
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
const deserializeAws_json1_1AccessDeniedException = (output, context) => {
|
|
398
|
+
return {
|
|
399
|
+
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
400
|
+
};
|
|
401
|
+
};
|
|
260
402
|
const deserializeAws_json1_1AttributeNameList = (output, context) => {
|
|
261
403
|
const retVal = (output || [])
|
|
262
404
|
.filter((e) => e != null)
|
|
@@ -296,6 +438,17 @@ const deserializeAws_json1_1ExpiredNextTokenException = (output, context) => {
|
|
|
296
438
|
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
297
439
|
};
|
|
298
440
|
};
|
|
441
|
+
const deserializeAws_json1_1FileFormats = (output, context) => {
|
|
442
|
+
const retVal = (output || [])
|
|
443
|
+
.filter((e) => e != null)
|
|
444
|
+
.map((entry) => {
|
|
445
|
+
if (entry === null) {
|
|
446
|
+
return null;
|
|
447
|
+
}
|
|
448
|
+
return (0, smithy_client_1.expectString)(entry);
|
|
449
|
+
});
|
|
450
|
+
return retVal;
|
|
451
|
+
};
|
|
299
452
|
const deserializeAws_json1_1GetAttributeValuesResponse = (output, context) => {
|
|
300
453
|
return {
|
|
301
454
|
AttributeValues: output.AttributeValues != null
|
|
@@ -304,6 +457,11 @@ const deserializeAws_json1_1GetAttributeValuesResponse = (output, context) => {
|
|
|
304
457
|
NextToken: (0, smithy_client_1.expectString)(output.NextToken),
|
|
305
458
|
};
|
|
306
459
|
};
|
|
460
|
+
const deserializeAws_json1_1GetPriceListFileUrlResponse = (output, context) => {
|
|
461
|
+
return {
|
|
462
|
+
Url: (0, smithy_client_1.expectString)(output.Url),
|
|
463
|
+
};
|
|
464
|
+
};
|
|
307
465
|
const deserializeAws_json1_1GetProductsResponse = (output, context) => {
|
|
308
466
|
return {
|
|
309
467
|
FormatVersion: (0, smithy_client_1.expectString)(output.FormatVersion),
|
|
@@ -326,11 +484,25 @@ const deserializeAws_json1_1InvalidParameterException = (output, context) => {
|
|
|
326
484
|
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
327
485
|
};
|
|
328
486
|
};
|
|
487
|
+
const deserializeAws_json1_1ListPriceListsResponse = (output, context) => {
|
|
488
|
+
return {
|
|
489
|
+
NextToken: (0, smithy_client_1.expectString)(output.NextToken),
|
|
490
|
+
PriceLists: output.PriceLists != null ? deserializeAws_json1_1PriceLists(output.PriceLists, context) : undefined,
|
|
491
|
+
};
|
|
492
|
+
};
|
|
329
493
|
const deserializeAws_json1_1NotFoundException = (output, context) => {
|
|
330
494
|
return {
|
|
331
495
|
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
332
496
|
};
|
|
333
497
|
};
|
|
498
|
+
const deserializeAws_json1_1PriceList = (output, context) => {
|
|
499
|
+
return {
|
|
500
|
+
CurrencyCode: (0, smithy_client_1.expectString)(output.CurrencyCode),
|
|
501
|
+
FileFormats: output.FileFormats != null ? deserializeAws_json1_1FileFormats(output.FileFormats, context) : undefined,
|
|
502
|
+
PriceListArn: (0, smithy_client_1.expectString)(output.PriceListArn),
|
|
503
|
+
RegionCode: (0, smithy_client_1.expectString)(output.RegionCode),
|
|
504
|
+
};
|
|
505
|
+
};
|
|
334
506
|
const deserializeAws_json1_1PriceListJsonItems = (output, context) => {
|
|
335
507
|
const retVal = (output || [])
|
|
336
508
|
.filter((e) => e != null)
|
|
@@ -342,6 +514,17 @@ const deserializeAws_json1_1PriceListJsonItems = (output, context) => {
|
|
|
342
514
|
});
|
|
343
515
|
return retVal;
|
|
344
516
|
};
|
|
517
|
+
const deserializeAws_json1_1PriceLists = (output, context) => {
|
|
518
|
+
const retVal = (output || [])
|
|
519
|
+
.filter((e) => e != null)
|
|
520
|
+
.map((entry) => {
|
|
521
|
+
if (entry === null) {
|
|
522
|
+
return null;
|
|
523
|
+
}
|
|
524
|
+
return deserializeAws_json1_1PriceList(entry, context);
|
|
525
|
+
});
|
|
526
|
+
return retVal;
|
|
527
|
+
};
|
|
345
528
|
const deserializeAws_json1_1Service = (output, context) => {
|
|
346
529
|
return {
|
|
347
530
|
AttributeNames: output.AttributeNames != null
|
package/dist-es/Pricing.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { DescribeServicesCommand, } from "./commands/DescribeServicesCommand";
|
|
2
2
|
import { GetAttributeValuesCommand, } from "./commands/GetAttributeValuesCommand";
|
|
3
|
+
import { GetPriceListFileUrlCommand, } from "./commands/GetPriceListFileUrlCommand";
|
|
3
4
|
import { GetProductsCommand } from "./commands/GetProductsCommand";
|
|
5
|
+
import { ListPriceListsCommand, } from "./commands/ListPriceListsCommand";
|
|
4
6
|
import { PricingClient } from "./PricingClient";
|
|
5
7
|
export class Pricing extends PricingClient {
|
|
6
8
|
describeServices(args, optionsOrCb, cb) {
|
|
@@ -31,6 +33,20 @@ export class Pricing extends PricingClient {
|
|
|
31
33
|
return this.send(command, optionsOrCb);
|
|
32
34
|
}
|
|
33
35
|
}
|
|
36
|
+
getPriceListFileUrl(args, optionsOrCb, cb) {
|
|
37
|
+
const command = new GetPriceListFileUrlCommand(args);
|
|
38
|
+
if (typeof optionsOrCb === "function") {
|
|
39
|
+
this.send(command, optionsOrCb);
|
|
40
|
+
}
|
|
41
|
+
else if (typeof cb === "function") {
|
|
42
|
+
if (typeof optionsOrCb !== "object")
|
|
43
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
44
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
return this.send(command, optionsOrCb);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
34
50
|
getProducts(args, optionsOrCb, cb) {
|
|
35
51
|
const command = new GetProductsCommand(args);
|
|
36
52
|
if (typeof optionsOrCb === "function") {
|
|
@@ -45,4 +61,18 @@ export class Pricing extends PricingClient {
|
|
|
45
61
|
return this.send(command, optionsOrCb);
|
|
46
62
|
}
|
|
47
63
|
}
|
|
64
|
+
listPriceLists(args, optionsOrCb, cb) {
|
|
65
|
+
const command = new ListPriceListsCommand(args);
|
|
66
|
+
if (typeof optionsOrCb === "function") {
|
|
67
|
+
this.send(command, optionsOrCb);
|
|
68
|
+
}
|
|
69
|
+
else if (typeof cb === "function") {
|
|
70
|
+
if (typeof optionsOrCb !== "object")
|
|
71
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
72
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
return this.send(command, optionsOrCb);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
48
78
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { GetPriceListFileUrlRequestFilterSensitiveLog, GetPriceListFileUrlResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_json1_1GetPriceListFileUrlCommand, serializeAws_json1_1GetPriceListFileUrlCommand, } from "../protocols/Aws_json1_1";
|
|
6
|
+
export class GetPriceListFileUrlCommand extends $Command {
|
|
7
|
+
constructor(input) {
|
|
8
|
+
super();
|
|
9
|
+
this.input = input;
|
|
10
|
+
}
|
|
11
|
+
static getEndpointParameterInstructions() {
|
|
12
|
+
return {
|
|
13
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
14
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
15
|
+
Region: { type: "builtInParams", name: "region" },
|
|
16
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
20
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
21
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, GetPriceListFileUrlCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "PricingClient";
|
|
25
|
+
const commandName = "GetPriceListFileUrlCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: GetPriceListFileUrlRequestFilterSensitiveLog,
|
|
31
|
+
outputFilterSensitiveLog: GetPriceListFileUrlResponseFilterSensitiveLog,
|
|
32
|
+
};
|
|
33
|
+
const { requestHandler } = configuration;
|
|
34
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
35
|
+
}
|
|
36
|
+
serialize(input, context) {
|
|
37
|
+
return serializeAws_json1_1GetPriceListFileUrlCommand(input, context);
|
|
38
|
+
}
|
|
39
|
+
deserialize(output, context) {
|
|
40
|
+
return deserializeAws_json1_1GetPriceListFileUrlCommand(output, context);
|
|
41
|
+
}
|
|
42
|
+
}
|