@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
|
@@ -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 { ListPriceListsRequestFilterSensitiveLog, ListPriceListsResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_json1_1ListPriceListsCommand, serializeAws_json1_1ListPriceListsCommand, } from "../protocols/Aws_json1_1";
|
|
6
|
+
export class ListPriceListsCommand 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, ListPriceListsCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "PricingClient";
|
|
25
|
+
const commandName = "ListPriceListsCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: ListPriceListsRequestFilterSensitiveLog,
|
|
31
|
+
outputFilterSensitiveLog: ListPriceListsResponseFilterSensitiveLog,
|
|
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_1ListPriceListsCommand(input, context);
|
|
38
|
+
}
|
|
39
|
+
deserialize(output, context) {
|
|
40
|
+
return deserializeAws_json1_1ListPriceListsCommand(output, context);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
const a = "
|
|
3
|
-
const _data = { version: "1.0", parameters: { Region:
|
|
1
|
+
const s = "required", t = "fn", u = "argv", v = "ref";
|
|
2
|
+
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" }];
|
|
3
|
+
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 }] }] };
|
|
4
4
|
export const ruleSet = _data;
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import { PricingServiceException as __BaseException } from "./PricingServiceException";
|
|
2
|
+
export class AccessDeniedException extends __BaseException {
|
|
3
|
+
constructor(opts) {
|
|
4
|
+
super({
|
|
5
|
+
name: "AccessDeniedException",
|
|
6
|
+
$fault: "client",
|
|
7
|
+
...opts,
|
|
8
|
+
});
|
|
9
|
+
this.name = "AccessDeniedException";
|
|
10
|
+
this.$fault = "client";
|
|
11
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
12
|
+
this.Message = opts.Message;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
2
15
|
export class ExpiredNextTokenException extends __BaseException {
|
|
3
16
|
constructor(opts) {
|
|
4
17
|
super({
|
|
@@ -86,6 +99,12 @@ export const GetAttributeValuesRequestFilterSensitiveLog = (obj) => ({
|
|
|
86
99
|
export const GetAttributeValuesResponseFilterSensitiveLog = (obj) => ({
|
|
87
100
|
...obj,
|
|
88
101
|
});
|
|
102
|
+
export const GetPriceListFileUrlRequestFilterSensitiveLog = (obj) => ({
|
|
103
|
+
...obj,
|
|
104
|
+
});
|
|
105
|
+
export const GetPriceListFileUrlResponseFilterSensitiveLog = (obj) => ({
|
|
106
|
+
...obj,
|
|
107
|
+
});
|
|
89
108
|
export const FilterFilterSensitiveLog = (obj) => ({
|
|
90
109
|
...obj,
|
|
91
110
|
});
|
|
@@ -95,3 +114,12 @@ export const GetProductsRequestFilterSensitiveLog = (obj) => ({
|
|
|
95
114
|
export const GetProductsResponseFilterSensitiveLog = (obj) => ({
|
|
96
115
|
...obj,
|
|
97
116
|
});
|
|
117
|
+
export const ListPriceListsRequestFilterSensitiveLog = (obj) => ({
|
|
118
|
+
...obj,
|
|
119
|
+
});
|
|
120
|
+
export const PriceListFilterSensitiveLog = (obj) => ({
|
|
121
|
+
...obj,
|
|
122
|
+
});
|
|
123
|
+
export const ListPriceListsResponseFilterSensitiveLog = (obj) => ({
|
|
124
|
+
...obj,
|
|
125
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ListPriceListsCommand, } from "../commands/ListPriceListsCommand";
|
|
2
|
+
import { Pricing } from "../Pricing";
|
|
3
|
+
import { PricingClient } from "../PricingClient";
|
|
4
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
5
|
+
return await client.send(new ListPriceListsCommand(input), ...args);
|
|
6
|
+
};
|
|
7
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.listPriceLists(input, ...args);
|
|
9
|
+
};
|
|
10
|
+
export async function* paginateListPriceLists(config, input, ...additionalArguments) {
|
|
11
|
+
let token = config.startingToken || undefined;
|
|
12
|
+
let hasNext = true;
|
|
13
|
+
let page;
|
|
14
|
+
while (hasNext) {
|
|
15
|
+
input.NextToken = token;
|
|
16
|
+
input["MaxResults"] = config.pageSize;
|
|
17
|
+
if (config.client instanceof Pricing) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof PricingClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected Pricing | PricingClient");
|
|
25
|
+
}
|
|
26
|
+
yield page;
|
|
27
|
+
const prevToken = token;
|
|
28
|
+
token = page.NextToken;
|
|
29
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
2
|
import { decorateServiceException as __decorateServiceException, expectString as __expectString, LazyJsonString as __LazyJsonString, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
|
-
import { ExpiredNextTokenException, InternalErrorException, InvalidNextTokenException, InvalidParameterException, NotFoundException, } from "../models/models_0";
|
|
3
|
+
import { AccessDeniedException, ExpiredNextTokenException, InternalErrorException, InvalidNextTokenException, InvalidParameterException, NotFoundException, } from "../models/models_0";
|
|
4
4
|
import { PricingServiceException as __BaseException } from "../models/PricingServiceException";
|
|
5
5
|
export const serializeAws_json1_1DescribeServicesCommand = async (input, context) => {
|
|
6
6
|
const headers = {
|
|
@@ -20,6 +20,15 @@ export const serializeAws_json1_1GetAttributeValuesCommand = async (input, conte
|
|
|
20
20
|
body = JSON.stringify(serializeAws_json1_1GetAttributeValuesRequest(input, context));
|
|
21
21
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
22
|
};
|
|
23
|
+
export const serializeAws_json1_1GetPriceListFileUrlCommand = async (input, context) => {
|
|
24
|
+
const headers = {
|
|
25
|
+
"content-type": "application/x-amz-json-1.1",
|
|
26
|
+
"x-amz-target": "AWSPriceListService.GetPriceListFileUrl",
|
|
27
|
+
};
|
|
28
|
+
let body;
|
|
29
|
+
body = JSON.stringify(serializeAws_json1_1GetPriceListFileUrlRequest(input, context));
|
|
30
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
31
|
+
};
|
|
23
32
|
export const serializeAws_json1_1GetProductsCommand = async (input, context) => {
|
|
24
33
|
const headers = {
|
|
25
34
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -29,6 +38,15 @@ export const serializeAws_json1_1GetProductsCommand = async (input, context) =>
|
|
|
29
38
|
body = JSON.stringify(serializeAws_json1_1GetProductsRequest(input, context));
|
|
30
39
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
31
40
|
};
|
|
41
|
+
export const serializeAws_json1_1ListPriceListsCommand = async (input, context) => {
|
|
42
|
+
const headers = {
|
|
43
|
+
"content-type": "application/x-amz-json-1.1",
|
|
44
|
+
"x-amz-target": "AWSPriceListService.ListPriceLists",
|
|
45
|
+
};
|
|
46
|
+
let body;
|
|
47
|
+
body = JSON.stringify(serializeAws_json1_1ListPriceListsRequest(input, context));
|
|
48
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
49
|
+
};
|
|
32
50
|
export const deserializeAws_json1_1DescribeServicesCommand = async (output, context) => {
|
|
33
51
|
if (output.statusCode >= 300) {
|
|
34
52
|
return deserializeAws_json1_1DescribeServicesCommandError(output, context);
|
|
@@ -119,6 +137,48 @@ const deserializeAws_json1_1GetAttributeValuesCommandError = async (output, cont
|
|
|
119
137
|
});
|
|
120
138
|
}
|
|
121
139
|
};
|
|
140
|
+
export const deserializeAws_json1_1GetPriceListFileUrlCommand = async (output, context) => {
|
|
141
|
+
if (output.statusCode >= 300) {
|
|
142
|
+
return deserializeAws_json1_1GetPriceListFileUrlCommandError(output, context);
|
|
143
|
+
}
|
|
144
|
+
const data = await parseBody(output.body, context);
|
|
145
|
+
let contents = {};
|
|
146
|
+
contents = deserializeAws_json1_1GetPriceListFileUrlResponse(data, context);
|
|
147
|
+
const response = {
|
|
148
|
+
$metadata: deserializeMetadata(output),
|
|
149
|
+
...contents,
|
|
150
|
+
};
|
|
151
|
+
return Promise.resolve(response);
|
|
152
|
+
};
|
|
153
|
+
const deserializeAws_json1_1GetPriceListFileUrlCommandError = async (output, context) => {
|
|
154
|
+
const parsedOutput = {
|
|
155
|
+
...output,
|
|
156
|
+
body: await parseErrorBody(output.body, context),
|
|
157
|
+
};
|
|
158
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
159
|
+
switch (errorCode) {
|
|
160
|
+
case "AccessDeniedException":
|
|
161
|
+
case "com.amazonaws.pricing#AccessDeniedException":
|
|
162
|
+
throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
163
|
+
case "InternalErrorException":
|
|
164
|
+
case "com.amazonaws.pricing#InternalErrorException":
|
|
165
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
166
|
+
case "InvalidParameterException":
|
|
167
|
+
case "com.amazonaws.pricing#InvalidParameterException":
|
|
168
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
169
|
+
case "NotFoundException":
|
|
170
|
+
case "com.amazonaws.pricing#NotFoundException":
|
|
171
|
+
throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
|
|
172
|
+
default:
|
|
173
|
+
const parsedBody = parsedOutput.body;
|
|
174
|
+
throwDefaultError({
|
|
175
|
+
output,
|
|
176
|
+
parsedBody,
|
|
177
|
+
exceptionCtor: __BaseException,
|
|
178
|
+
errorCode,
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
};
|
|
122
182
|
export const deserializeAws_json1_1GetProductsCommand = async (output, context) => {
|
|
123
183
|
if (output.statusCode >= 300) {
|
|
124
184
|
return deserializeAws_json1_1GetProductsCommandError(output, context);
|
|
@@ -164,6 +224,63 @@ const deserializeAws_json1_1GetProductsCommandError = async (output, context) =>
|
|
|
164
224
|
});
|
|
165
225
|
}
|
|
166
226
|
};
|
|
227
|
+
export const deserializeAws_json1_1ListPriceListsCommand = async (output, context) => {
|
|
228
|
+
if (output.statusCode >= 300) {
|
|
229
|
+
return deserializeAws_json1_1ListPriceListsCommandError(output, context);
|
|
230
|
+
}
|
|
231
|
+
const data = await parseBody(output.body, context);
|
|
232
|
+
let contents = {};
|
|
233
|
+
contents = deserializeAws_json1_1ListPriceListsResponse(data, context);
|
|
234
|
+
const response = {
|
|
235
|
+
$metadata: deserializeMetadata(output),
|
|
236
|
+
...contents,
|
|
237
|
+
};
|
|
238
|
+
return Promise.resolve(response);
|
|
239
|
+
};
|
|
240
|
+
const deserializeAws_json1_1ListPriceListsCommandError = async (output, context) => {
|
|
241
|
+
const parsedOutput = {
|
|
242
|
+
...output,
|
|
243
|
+
body: await parseErrorBody(output.body, context),
|
|
244
|
+
};
|
|
245
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
246
|
+
switch (errorCode) {
|
|
247
|
+
case "AccessDeniedException":
|
|
248
|
+
case "com.amazonaws.pricing#AccessDeniedException":
|
|
249
|
+
throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
250
|
+
case "ExpiredNextTokenException":
|
|
251
|
+
case "com.amazonaws.pricing#ExpiredNextTokenException":
|
|
252
|
+
throw await deserializeAws_json1_1ExpiredNextTokenExceptionResponse(parsedOutput, context);
|
|
253
|
+
case "InternalErrorException":
|
|
254
|
+
case "com.amazonaws.pricing#InternalErrorException":
|
|
255
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
256
|
+
case "InvalidNextTokenException":
|
|
257
|
+
case "com.amazonaws.pricing#InvalidNextTokenException":
|
|
258
|
+
throw await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context);
|
|
259
|
+
case "InvalidParameterException":
|
|
260
|
+
case "com.amazonaws.pricing#InvalidParameterException":
|
|
261
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
262
|
+
case "NotFoundException":
|
|
263
|
+
case "com.amazonaws.pricing#NotFoundException":
|
|
264
|
+
throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
|
|
265
|
+
default:
|
|
266
|
+
const parsedBody = parsedOutput.body;
|
|
267
|
+
throwDefaultError({
|
|
268
|
+
output,
|
|
269
|
+
parsedBody,
|
|
270
|
+
exceptionCtor: __BaseException,
|
|
271
|
+
errorCode,
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
const deserializeAws_json1_1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
276
|
+
const body = parsedOutput.body;
|
|
277
|
+
const deserialized = deserializeAws_json1_1AccessDeniedException(body, context);
|
|
278
|
+
const exception = new AccessDeniedException({
|
|
279
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
280
|
+
...deserialized,
|
|
281
|
+
});
|
|
282
|
+
return __decorateServiceException(exception, body);
|
|
283
|
+
};
|
|
167
284
|
const deserializeAws_json1_1ExpiredNextTokenExceptionResponse = async (parsedOutput, context) => {
|
|
168
285
|
const body = parsedOutput.body;
|
|
169
286
|
const deserialized = deserializeAws_json1_1ExpiredNextTokenException(body, context);
|
|
@@ -239,6 +356,12 @@ const serializeAws_json1_1GetAttributeValuesRequest = (input, context) => {
|
|
|
239
356
|
...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }),
|
|
240
357
|
};
|
|
241
358
|
};
|
|
359
|
+
const serializeAws_json1_1GetPriceListFileUrlRequest = (input, context) => {
|
|
360
|
+
return {
|
|
361
|
+
...(input.FileFormat != null && { FileFormat: input.FileFormat }),
|
|
362
|
+
...(input.PriceListArn != null && { PriceListArn: input.PriceListArn }),
|
|
363
|
+
};
|
|
364
|
+
};
|
|
242
365
|
const serializeAws_json1_1GetProductsRequest = (input, context) => {
|
|
243
366
|
return {
|
|
244
367
|
...(input.Filters != null && { Filters: serializeAws_json1_1Filters(input.Filters, context) }),
|
|
@@ -248,6 +371,21 @@ const serializeAws_json1_1GetProductsRequest = (input, context) => {
|
|
|
248
371
|
...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }),
|
|
249
372
|
};
|
|
250
373
|
};
|
|
374
|
+
const serializeAws_json1_1ListPriceListsRequest = (input, context) => {
|
|
375
|
+
return {
|
|
376
|
+
...(input.CurrencyCode != null && { CurrencyCode: input.CurrencyCode }),
|
|
377
|
+
...(input.EffectiveDate != null && { EffectiveDate: Math.round(input.EffectiveDate.getTime() / 1000) }),
|
|
378
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
379
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
380
|
+
...(input.RegionCode != null && { RegionCode: input.RegionCode }),
|
|
381
|
+
...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }),
|
|
382
|
+
};
|
|
383
|
+
};
|
|
384
|
+
const deserializeAws_json1_1AccessDeniedException = (output, context) => {
|
|
385
|
+
return {
|
|
386
|
+
Message: __expectString(output.Message),
|
|
387
|
+
};
|
|
388
|
+
};
|
|
251
389
|
const deserializeAws_json1_1AttributeNameList = (output, context) => {
|
|
252
390
|
const retVal = (output || [])
|
|
253
391
|
.filter((e) => e != null)
|
|
@@ -287,6 +425,17 @@ const deserializeAws_json1_1ExpiredNextTokenException = (output, context) => {
|
|
|
287
425
|
Message: __expectString(output.Message),
|
|
288
426
|
};
|
|
289
427
|
};
|
|
428
|
+
const deserializeAws_json1_1FileFormats = (output, context) => {
|
|
429
|
+
const retVal = (output || [])
|
|
430
|
+
.filter((e) => e != null)
|
|
431
|
+
.map((entry) => {
|
|
432
|
+
if (entry === null) {
|
|
433
|
+
return null;
|
|
434
|
+
}
|
|
435
|
+
return __expectString(entry);
|
|
436
|
+
});
|
|
437
|
+
return retVal;
|
|
438
|
+
};
|
|
290
439
|
const deserializeAws_json1_1GetAttributeValuesResponse = (output, context) => {
|
|
291
440
|
return {
|
|
292
441
|
AttributeValues: output.AttributeValues != null
|
|
@@ -295,6 +444,11 @@ const deserializeAws_json1_1GetAttributeValuesResponse = (output, context) => {
|
|
|
295
444
|
NextToken: __expectString(output.NextToken),
|
|
296
445
|
};
|
|
297
446
|
};
|
|
447
|
+
const deserializeAws_json1_1GetPriceListFileUrlResponse = (output, context) => {
|
|
448
|
+
return {
|
|
449
|
+
Url: __expectString(output.Url),
|
|
450
|
+
};
|
|
451
|
+
};
|
|
298
452
|
const deserializeAws_json1_1GetProductsResponse = (output, context) => {
|
|
299
453
|
return {
|
|
300
454
|
FormatVersion: __expectString(output.FormatVersion),
|
|
@@ -317,11 +471,25 @@ const deserializeAws_json1_1InvalidParameterException = (output, context) => {
|
|
|
317
471
|
Message: __expectString(output.Message),
|
|
318
472
|
};
|
|
319
473
|
};
|
|
474
|
+
const deserializeAws_json1_1ListPriceListsResponse = (output, context) => {
|
|
475
|
+
return {
|
|
476
|
+
NextToken: __expectString(output.NextToken),
|
|
477
|
+
PriceLists: output.PriceLists != null ? deserializeAws_json1_1PriceLists(output.PriceLists, context) : undefined,
|
|
478
|
+
};
|
|
479
|
+
};
|
|
320
480
|
const deserializeAws_json1_1NotFoundException = (output, context) => {
|
|
321
481
|
return {
|
|
322
482
|
Message: __expectString(output.Message),
|
|
323
483
|
};
|
|
324
484
|
};
|
|
485
|
+
const deserializeAws_json1_1PriceList = (output, context) => {
|
|
486
|
+
return {
|
|
487
|
+
CurrencyCode: __expectString(output.CurrencyCode),
|
|
488
|
+
FileFormats: output.FileFormats != null ? deserializeAws_json1_1FileFormats(output.FileFormats, context) : undefined,
|
|
489
|
+
PriceListArn: __expectString(output.PriceListArn),
|
|
490
|
+
RegionCode: __expectString(output.RegionCode),
|
|
491
|
+
};
|
|
492
|
+
};
|
|
325
493
|
const deserializeAws_json1_1PriceListJsonItems = (output, context) => {
|
|
326
494
|
const retVal = (output || [])
|
|
327
495
|
.filter((e) => e != null)
|
|
@@ -333,6 +501,17 @@ const deserializeAws_json1_1PriceListJsonItems = (output, context) => {
|
|
|
333
501
|
});
|
|
334
502
|
return retVal;
|
|
335
503
|
};
|
|
504
|
+
const deserializeAws_json1_1PriceLists = (output, context) => {
|
|
505
|
+
const retVal = (output || [])
|
|
506
|
+
.filter((e) => e != null)
|
|
507
|
+
.map((entry) => {
|
|
508
|
+
if (entry === null) {
|
|
509
|
+
return null;
|
|
510
|
+
}
|
|
511
|
+
return deserializeAws_json1_1PriceList(entry, context);
|
|
512
|
+
});
|
|
513
|
+
return retVal;
|
|
514
|
+
};
|
|
336
515
|
const deserializeAws_json1_1Service = (output, context) => {
|
|
337
516
|
return {
|
|
338
517
|
AttributeNames: output.AttributeNames != null
|
package/dist-types/Pricing.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
|
|
2
2
|
import { DescribeServicesCommandInput, DescribeServicesCommandOutput } from "./commands/DescribeServicesCommand";
|
|
3
3
|
import { GetAttributeValuesCommandInput, GetAttributeValuesCommandOutput } from "./commands/GetAttributeValuesCommand";
|
|
4
|
+
import { GetPriceListFileUrlCommandInput, GetPriceListFileUrlCommandOutput } from "./commands/GetPriceListFileUrlCommand";
|
|
4
5
|
import { GetProductsCommandInput, GetProductsCommandOutput } from "./commands/GetProductsCommand";
|
|
6
|
+
import { ListPriceListsCommandInput, ListPriceListsCommandOutput } from "./commands/ListPriceListsCommand";
|
|
5
7
|
import { PricingClient } from "./PricingClient";
|
|
6
8
|
/**
|
|
7
9
|
* <p>Amazon Web Services Price List API is a centralized and convenient way to
|
|
@@ -51,10 +53,42 @@ export declare class Pricing extends PricingClient {
|
|
|
51
53
|
getAttributeValues(args: GetAttributeValuesCommandInput, options?: __HttpHandlerOptions): Promise<GetAttributeValuesCommandOutput>;
|
|
52
54
|
getAttributeValues(args: GetAttributeValuesCommandInput, cb: (err: any, data?: GetAttributeValuesCommandOutput) => void): void;
|
|
53
55
|
getAttributeValues(args: GetAttributeValuesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetAttributeValuesCommandOutput) => void): void;
|
|
56
|
+
/**
|
|
57
|
+
* <p>
|
|
58
|
+
* <i>
|
|
59
|
+
* <b>This feature is in preview release and is subject to change. Your use of Amazon Web Services Price List API is subject to the Beta Service Participation terms of the <a href="https://aws.amazon.com/service-terms/">Amazon Web Services Service Terms</a> (Section 1.10).</b>
|
|
60
|
+
* </i>
|
|
61
|
+
* </p>
|
|
62
|
+
* <p>This returns the URL that you can retrieve your Price List file from. This URL is based on
|
|
63
|
+
* the <code>PriceListArn</code> and <code>FileFormat</code> that you retrieve from the <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_ListPriceLists.html">
|
|
64
|
+
* <code>ListPriceLists</code>
|
|
65
|
+
* </a> response. </p>
|
|
66
|
+
*/
|
|
67
|
+
getPriceListFileUrl(args: GetPriceListFileUrlCommandInput, options?: __HttpHandlerOptions): Promise<GetPriceListFileUrlCommandOutput>;
|
|
68
|
+
getPriceListFileUrl(args: GetPriceListFileUrlCommandInput, cb: (err: any, data?: GetPriceListFileUrlCommandOutput) => void): void;
|
|
69
|
+
getPriceListFileUrl(args: GetPriceListFileUrlCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPriceListFileUrlCommandOutput) => void): void;
|
|
54
70
|
/**
|
|
55
71
|
* <p>Returns a list of all products that match the filter criteria.</p>
|
|
56
72
|
*/
|
|
57
73
|
getProducts(args: GetProductsCommandInput, options?: __HttpHandlerOptions): Promise<GetProductsCommandOutput>;
|
|
58
74
|
getProducts(args: GetProductsCommandInput, cb: (err: any, data?: GetProductsCommandOutput) => void): void;
|
|
59
75
|
getProducts(args: GetProductsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetProductsCommandOutput) => void): void;
|
|
76
|
+
/**
|
|
77
|
+
* <p>
|
|
78
|
+
* <i>
|
|
79
|
+
* <b>This feature is in preview release and is subject to change. Your use of Amazon Web Services Price List API is subject to the Beta Service Participation terms of the <a href="https://aws.amazon.com/service-terms/">Amazon Web Services Service Terms</a> (Section 1.10).</b>
|
|
80
|
+
* </i>
|
|
81
|
+
* </p>
|
|
82
|
+
* <p>This returns a list of Price List references that the requester if authorized to view, given a <code>ServiceCode</code>, <code>CurrencyCode</code>, and an <code>EffectiveDate</code>.
|
|
83
|
+
* Use without a <code>RegionCode</code> filter to list Price List references from all
|
|
84
|
+
* available Amazon Web Services Regions. Use with a <code>RegionCode</code> filter to get the
|
|
85
|
+
* Price List reference that's specific to a specific Amazon Web Services Region. You can use
|
|
86
|
+
* the <code>PriceListArn</code> from the response to get your preferred Price List files
|
|
87
|
+
* through the <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_GetPriceListFileUrl.html">
|
|
88
|
+
* <code>GetPriceListFileUrl</code>
|
|
89
|
+
* </a> API.</p>
|
|
90
|
+
*/
|
|
91
|
+
listPriceLists(args: ListPriceListsCommandInput, options?: __HttpHandlerOptions): Promise<ListPriceListsCommandOutput>;
|
|
92
|
+
listPriceLists(args: ListPriceListsCommandInput, cb: (err: any, data?: ListPriceListsCommandOutput) => void): void;
|
|
93
|
+
listPriceLists(args: ListPriceListsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListPriceListsCommandOutput) => void): void;
|
|
60
94
|
}
|
|
@@ -9,10 +9,12 @@ import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration
|
|
|
9
9
|
import { BodyLengthCalculator as __BodyLengthCalculator, ChecksumConstructor as __ChecksumConstructor, Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
|
|
10
10
|
import { DescribeServicesCommandInput, DescribeServicesCommandOutput } from "./commands/DescribeServicesCommand";
|
|
11
11
|
import { GetAttributeValuesCommandInput, GetAttributeValuesCommandOutput } from "./commands/GetAttributeValuesCommand";
|
|
12
|
+
import { GetPriceListFileUrlCommandInput, GetPriceListFileUrlCommandOutput } from "./commands/GetPriceListFileUrlCommand";
|
|
12
13
|
import { GetProductsCommandInput, GetProductsCommandOutput } from "./commands/GetProductsCommand";
|
|
14
|
+
import { ListPriceListsCommandInput, ListPriceListsCommandOutput } from "./commands/ListPriceListsCommand";
|
|
13
15
|
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
|
|
14
|
-
export declare type ServiceInputTypes = DescribeServicesCommandInput | GetAttributeValuesCommandInput | GetProductsCommandInput;
|
|
15
|
-
export declare type ServiceOutputTypes = DescribeServicesCommandOutput | GetAttributeValuesCommandOutput | GetProductsCommandOutput;
|
|
16
|
+
export declare type ServiceInputTypes = DescribeServicesCommandInput | GetAttributeValuesCommandInput | GetPriceListFileUrlCommandInput | GetProductsCommandInput | ListPriceListsCommandInput;
|
|
17
|
+
export declare type ServiceOutputTypes = DescribeServicesCommandOutput | GetAttributeValuesCommandOutput | GetPriceListFileUrlCommandOutput | GetProductsCommandOutput | ListPriceListsCommandOutput;
|
|
16
18
|
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
|
|
17
19
|
/**
|
|
18
20
|
* The HTTP handler to use. Fetch in browser and Https in Nodejs.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
3
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
|
|
4
|
+
import { GetPriceListFileUrlRequest, GetPriceListFileUrlResponse } from "../models/models_0";
|
|
5
|
+
import { PricingClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PricingClient";
|
|
6
|
+
/**
|
|
7
|
+
* The input for {@link GetPriceListFileUrlCommand}.
|
|
8
|
+
*/
|
|
9
|
+
export interface GetPriceListFileUrlCommandInput extends GetPriceListFileUrlRequest {
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The output of {@link GetPriceListFileUrlCommand}.
|
|
13
|
+
*/
|
|
14
|
+
export interface GetPriceListFileUrlCommandOutput extends GetPriceListFileUrlResponse, __MetadataBearer {
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* <p>
|
|
18
|
+
* <i>
|
|
19
|
+
* <b>This feature is in preview release and is subject to change. Your use of Amazon Web Services Price List API is subject to the Beta Service Participation terms of the <a href="https://aws.amazon.com/service-terms/">Amazon Web Services Service Terms</a> (Section 1.10).</b>
|
|
20
|
+
* </i>
|
|
21
|
+
* </p>
|
|
22
|
+
* <p>This returns the URL that you can retrieve your Price List file from. This URL is based on
|
|
23
|
+
* the <code>PriceListArn</code> and <code>FileFormat</code> that you retrieve from the <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_ListPriceLists.html">
|
|
24
|
+
* <code>ListPriceLists</code>
|
|
25
|
+
* </a> response. </p>
|
|
26
|
+
* @example
|
|
27
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
28
|
+
* ```javascript
|
|
29
|
+
* import { PricingClient, GetPriceListFileUrlCommand } from "@aws-sdk/client-pricing"; // ES Modules import
|
|
30
|
+
* // const { PricingClient, GetPriceListFileUrlCommand } = require("@aws-sdk/client-pricing"); // CommonJS import
|
|
31
|
+
* const client = new PricingClient(config);
|
|
32
|
+
* const command = new GetPriceListFileUrlCommand(input);
|
|
33
|
+
* const response = await client.send(command);
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @see {@link GetPriceListFileUrlCommandInput} for command's `input` shape.
|
|
37
|
+
* @see {@link GetPriceListFileUrlCommandOutput} for command's `response` shape.
|
|
38
|
+
* @see {@link PricingClientResolvedConfig | config} for PricingClient's `config` shape.
|
|
39
|
+
*
|
|
40
|
+
*/
|
|
41
|
+
export declare class GetPriceListFileUrlCommand extends $Command<GetPriceListFileUrlCommandInput, GetPriceListFileUrlCommandOutput, PricingClientResolvedConfig> {
|
|
42
|
+
readonly input: GetPriceListFileUrlCommandInput;
|
|
43
|
+
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
44
|
+
constructor(input: GetPriceListFileUrlCommandInput);
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: PricingClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetPriceListFileUrlCommandInput, GetPriceListFileUrlCommandOutput>;
|
|
49
|
+
private serialize;
|
|
50
|
+
private deserialize;
|
|
51
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
3
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
|
|
4
|
+
import { ListPriceListsRequest, ListPriceListsResponse } from "../models/models_0";
|
|
5
|
+
import { PricingClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PricingClient";
|
|
6
|
+
/**
|
|
7
|
+
* The input for {@link ListPriceListsCommand}.
|
|
8
|
+
*/
|
|
9
|
+
export interface ListPriceListsCommandInput extends ListPriceListsRequest {
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The output of {@link ListPriceListsCommand}.
|
|
13
|
+
*/
|
|
14
|
+
export interface ListPriceListsCommandOutput extends ListPriceListsResponse, __MetadataBearer {
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* <p>
|
|
18
|
+
* <i>
|
|
19
|
+
* <b>This feature is in preview release and is subject to change. Your use of Amazon Web Services Price List API is subject to the Beta Service Participation terms of the <a href="https://aws.amazon.com/service-terms/">Amazon Web Services Service Terms</a> (Section 1.10).</b>
|
|
20
|
+
* </i>
|
|
21
|
+
* </p>
|
|
22
|
+
* <p>This returns a list of Price List references that the requester if authorized to view, given a <code>ServiceCode</code>, <code>CurrencyCode</code>, and an <code>EffectiveDate</code>.
|
|
23
|
+
* Use without a <code>RegionCode</code> filter to list Price List references from all
|
|
24
|
+
* available Amazon Web Services Regions. Use with a <code>RegionCode</code> filter to get the
|
|
25
|
+
* Price List reference that's specific to a specific Amazon Web Services Region. You can use
|
|
26
|
+
* the <code>PriceListArn</code> from the response to get your preferred Price List files
|
|
27
|
+
* through the <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_GetPriceListFileUrl.html">
|
|
28
|
+
* <code>GetPriceListFileUrl</code>
|
|
29
|
+
* </a> API.</p>
|
|
30
|
+
* @example
|
|
31
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
32
|
+
* ```javascript
|
|
33
|
+
* import { PricingClient, ListPriceListsCommand } from "@aws-sdk/client-pricing"; // ES Modules import
|
|
34
|
+
* // const { PricingClient, ListPriceListsCommand } = require("@aws-sdk/client-pricing"); // CommonJS import
|
|
35
|
+
* const client = new PricingClient(config);
|
|
36
|
+
* const command = new ListPriceListsCommand(input);
|
|
37
|
+
* const response = await client.send(command);
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @see {@link ListPriceListsCommandInput} for command's `input` shape.
|
|
41
|
+
* @see {@link ListPriceListsCommandOutput} for command's `response` shape.
|
|
42
|
+
* @see {@link PricingClientResolvedConfig | config} for PricingClient's `config` shape.
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
export declare class ListPriceListsCommand extends $Command<ListPriceListsCommandInput, ListPriceListsCommandOutput, PricingClientResolvedConfig> {
|
|
46
|
+
readonly input: ListPriceListsCommandInput;
|
|
47
|
+
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
48
|
+
constructor(input: ListPriceListsCommandInput);
|
|
49
|
+
/**
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: PricingClientResolvedConfig, options?: __HttpHandlerOptions): Handler<ListPriceListsCommandInput, ListPriceListsCommandOutput>;
|
|
53
|
+
private serialize;
|
|
54
|
+
private deserialize;
|
|
55
|
+
}
|