@aws-sdk/client-pricing 3.927.0 → 3.929.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.
@@ -0,0 +1,44 @@
1
+ import {
2
+ StaticErrorSchema,
3
+ StaticListSchema,
4
+ StaticOperationSchema,
5
+ StaticSimpleSchema,
6
+ StaticStructureSchema,
7
+ } from "@smithy/types";
8
+ export declare var SynthesizedJsonPriceListJsonItem: StaticSimpleSchema;
9
+ export declare var AccessDeniedException: StaticErrorSchema;
10
+ export declare var AttributeValue: StaticStructureSchema;
11
+ export declare var DescribeServicesRequest: StaticStructureSchema;
12
+ export declare var DescribeServicesResponse: StaticStructureSchema;
13
+ export declare var ExpiredNextTokenException: StaticErrorSchema;
14
+ export declare var Filter: StaticStructureSchema;
15
+ export declare var GetAttributeValuesRequest: StaticStructureSchema;
16
+ export declare var GetAttributeValuesResponse: StaticStructureSchema;
17
+ export declare var GetPriceListFileUrlRequest: StaticStructureSchema;
18
+ export declare var GetPriceListFileUrlResponse: StaticStructureSchema;
19
+ export declare var GetProductsRequest: StaticStructureSchema;
20
+ export declare var GetProductsResponse: StaticStructureSchema;
21
+ export declare var InternalErrorException: StaticErrorSchema;
22
+ export declare var InvalidNextTokenException: StaticErrorSchema;
23
+ export declare var InvalidParameterException: StaticErrorSchema;
24
+ export declare var ListPriceListsRequest: StaticStructureSchema;
25
+ export declare var ListPriceListsResponse: StaticStructureSchema;
26
+ export declare var NotFoundException: StaticErrorSchema;
27
+ export declare var PriceList: StaticStructureSchema;
28
+ export declare var ResourceNotFoundException: StaticErrorSchema;
29
+ export declare var Service: StaticStructureSchema;
30
+ export declare var ThrottlingException: StaticErrorSchema;
31
+ export declare var __Unit: "unit";
32
+ export declare var PricingServiceException: StaticErrorSchema;
33
+ export declare var AttributeNameList: number;
34
+ export declare var AttributeValueList: StaticListSchema;
35
+ export declare var FileFormats: number;
36
+ export declare var Filters: StaticListSchema;
37
+ export declare var PriceListJsonItems: StaticListSchema;
38
+ export declare var PriceLists: StaticListSchema;
39
+ export declare var ServiceList: StaticListSchema;
40
+ export declare var DescribeServices: StaticOperationSchema;
41
+ export declare var GetAttributeValues: StaticOperationSchema;
42
+ export declare var GetPriceListFileUrl: StaticOperationSchema;
43
+ export declare var GetProducts: StaticOperationSchema;
44
+ export declare var ListPriceLists: StaticOperationSchema;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-pricing",
3
3
  "description": "AWS SDK for JavaScript Pricing Client for Node.js, Browser and React Native",
4
- "version": "3.927.0",
4
+ "version": "3.929.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-pricing",
@@ -20,17 +20,17 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "5.2.0",
22
22
  "@aws-crypto/sha256-js": "5.2.0",
23
- "@aws-sdk/core": "3.927.0",
24
- "@aws-sdk/credential-provider-node": "3.927.0",
23
+ "@aws-sdk/core": "3.928.0",
24
+ "@aws-sdk/credential-provider-node": "3.929.0",
25
25
  "@aws-sdk/middleware-host-header": "3.922.0",
26
26
  "@aws-sdk/middleware-logger": "3.922.0",
27
27
  "@aws-sdk/middleware-recursion-detection": "3.922.0",
28
- "@aws-sdk/middleware-user-agent": "3.927.0",
28
+ "@aws-sdk/middleware-user-agent": "3.928.0",
29
29
  "@aws-sdk/region-config-resolver": "3.925.0",
30
30
  "@aws-sdk/types": "3.922.0",
31
31
  "@aws-sdk/util-endpoints": "3.922.0",
32
32
  "@aws-sdk/util-user-agent-browser": "3.922.0",
33
- "@aws-sdk/util-user-agent-node": "3.927.0",
33
+ "@aws-sdk/util-user-agent-node": "3.928.0",
34
34
  "@smithy/config-resolver": "^4.4.2",
35
35
  "@smithy/core": "^3.17.2",
36
36
  "@smithy/fetch-http-handler": "^5.3.5",
@@ -1,269 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectString as __expectString, LazyJsonString as __LazyJsonString, take, withBaseException, } from "@smithy/smithy-client";
4
- import { AccessDeniedException, ExpiredNextTokenException, InternalErrorException, InvalidNextTokenException, InvalidParameterException, NotFoundException, ResourceNotFoundException, ThrottlingException, } from "../models/models_0";
5
- import { PricingServiceException as __BaseException } from "../models/PricingServiceException";
6
- export const se_DescribeServicesCommand = async (input, context) => {
7
- const headers = sharedHeaders("DescribeServices");
8
- let body;
9
- body = JSON.stringify(_json(input));
10
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
11
- };
12
- export const se_GetAttributeValuesCommand = async (input, context) => {
13
- const headers = sharedHeaders("GetAttributeValues");
14
- let body;
15
- body = JSON.stringify(_json(input));
16
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
- };
18
- export const se_GetPriceListFileUrlCommand = async (input, context) => {
19
- const headers = sharedHeaders("GetPriceListFileUrl");
20
- let body;
21
- body = JSON.stringify(_json(input));
22
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
- };
24
- export const se_GetProductsCommand = async (input, context) => {
25
- const headers = sharedHeaders("GetProducts");
26
- let body;
27
- body = JSON.stringify(_json(input));
28
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
- };
30
- export const se_ListPriceListsCommand = async (input, context) => {
31
- const headers = sharedHeaders("ListPriceLists");
32
- let body;
33
- body = JSON.stringify(se_ListPriceListsRequest(input, context));
34
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
- };
36
- export const de_DescribeServicesCommand = async (output, context) => {
37
- if (output.statusCode >= 300) {
38
- return de_CommandError(output, context);
39
- }
40
- const data = await parseBody(output.body, context);
41
- let contents = {};
42
- contents = _json(data);
43
- const response = {
44
- $metadata: deserializeMetadata(output),
45
- ...contents,
46
- };
47
- return response;
48
- };
49
- export const de_GetAttributeValuesCommand = async (output, context) => {
50
- if (output.statusCode >= 300) {
51
- return de_CommandError(output, context);
52
- }
53
- const data = await parseBody(output.body, context);
54
- let contents = {};
55
- contents = _json(data);
56
- const response = {
57
- $metadata: deserializeMetadata(output),
58
- ...contents,
59
- };
60
- return response;
61
- };
62
- export const de_GetPriceListFileUrlCommand = async (output, context) => {
63
- if (output.statusCode >= 300) {
64
- return de_CommandError(output, context);
65
- }
66
- const data = await parseBody(output.body, context);
67
- let contents = {};
68
- contents = _json(data);
69
- const response = {
70
- $metadata: deserializeMetadata(output),
71
- ...contents,
72
- };
73
- return response;
74
- };
75
- export const de_GetProductsCommand = async (output, context) => {
76
- if (output.statusCode >= 300) {
77
- return de_CommandError(output, context);
78
- }
79
- const data = await parseBody(output.body, context);
80
- let contents = {};
81
- contents = de_GetProductsResponse(data, context);
82
- const response = {
83
- $metadata: deserializeMetadata(output),
84
- ...contents,
85
- };
86
- return response;
87
- };
88
- export const de_ListPriceListsCommand = async (output, context) => {
89
- if (output.statusCode >= 300) {
90
- return de_CommandError(output, context);
91
- }
92
- const data = await parseBody(output.body, context);
93
- let contents = {};
94
- contents = _json(data);
95
- const response = {
96
- $metadata: deserializeMetadata(output),
97
- ...contents,
98
- };
99
- return response;
100
- };
101
- const de_CommandError = async (output, context) => {
102
- const parsedOutput = {
103
- ...output,
104
- body: await parseErrorBody(output.body, context),
105
- };
106
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
107
- switch (errorCode) {
108
- case "ExpiredNextTokenException":
109
- case "com.amazonaws.pricing#ExpiredNextTokenException":
110
- throw await de_ExpiredNextTokenExceptionRes(parsedOutput, context);
111
- case "InternalErrorException":
112
- case "com.amazonaws.pricing#InternalErrorException":
113
- throw await de_InternalErrorExceptionRes(parsedOutput, context);
114
- case "InvalidNextTokenException":
115
- case "com.amazonaws.pricing#InvalidNextTokenException":
116
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
117
- case "InvalidParameterException":
118
- case "com.amazonaws.pricing#InvalidParameterException":
119
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
120
- case "NotFoundException":
121
- case "com.amazonaws.pricing#NotFoundException":
122
- throw await de_NotFoundExceptionRes(parsedOutput, context);
123
- case "ThrottlingException":
124
- case "com.amazonaws.pricing#ThrottlingException":
125
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
126
- case "AccessDeniedException":
127
- case "com.amazonaws.pricing#AccessDeniedException":
128
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
129
- case "ResourceNotFoundException":
130
- case "com.amazonaws.pricing#ResourceNotFoundException":
131
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
132
- default:
133
- const parsedBody = parsedOutput.body;
134
- return throwDefaultError({
135
- output,
136
- parsedBody,
137
- errorCode,
138
- });
139
- }
140
- };
141
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
142
- const body = parsedOutput.body;
143
- const deserialized = _json(body);
144
- const exception = new AccessDeniedException({
145
- $metadata: deserializeMetadata(parsedOutput),
146
- ...deserialized,
147
- });
148
- return __decorateServiceException(exception, body);
149
- };
150
- const de_ExpiredNextTokenExceptionRes = async (parsedOutput, context) => {
151
- const body = parsedOutput.body;
152
- const deserialized = _json(body);
153
- const exception = new ExpiredNextTokenException({
154
- $metadata: deserializeMetadata(parsedOutput),
155
- ...deserialized,
156
- });
157
- return __decorateServiceException(exception, body);
158
- };
159
- const de_InternalErrorExceptionRes = async (parsedOutput, context) => {
160
- const body = parsedOutput.body;
161
- const deserialized = _json(body);
162
- const exception = new InternalErrorException({
163
- $metadata: deserializeMetadata(parsedOutput),
164
- ...deserialized,
165
- });
166
- return __decorateServiceException(exception, body);
167
- };
168
- const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
169
- const body = parsedOutput.body;
170
- const deserialized = _json(body);
171
- const exception = new InvalidNextTokenException({
172
- $metadata: deserializeMetadata(parsedOutput),
173
- ...deserialized,
174
- });
175
- return __decorateServiceException(exception, body);
176
- };
177
- const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
178
- const body = parsedOutput.body;
179
- const deserialized = _json(body);
180
- const exception = new InvalidParameterException({
181
- $metadata: deserializeMetadata(parsedOutput),
182
- ...deserialized,
183
- });
184
- return __decorateServiceException(exception, body);
185
- };
186
- const de_NotFoundExceptionRes = async (parsedOutput, context) => {
187
- const body = parsedOutput.body;
188
- const deserialized = _json(body);
189
- const exception = new NotFoundException({
190
- $metadata: deserializeMetadata(parsedOutput),
191
- ...deserialized,
192
- });
193
- return __decorateServiceException(exception, body);
194
- };
195
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
196
- const body = parsedOutput.body;
197
- const deserialized = _json(body);
198
- const exception = new ResourceNotFoundException({
199
- $metadata: deserializeMetadata(parsedOutput),
200
- ...deserialized,
201
- });
202
- return __decorateServiceException(exception, body);
203
- };
204
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
205
- const body = parsedOutput.body;
206
- const deserialized = _json(body);
207
- const exception = new ThrottlingException({
208
- $metadata: deserializeMetadata(parsedOutput),
209
- ...deserialized,
210
- });
211
- return __decorateServiceException(exception, body);
212
- };
213
- const se_ListPriceListsRequest = (input, context) => {
214
- return take(input, {
215
- CurrencyCode: [],
216
- EffectiveDate: (_) => _.getTime() / 1_000,
217
- MaxResults: [],
218
- NextToken: [],
219
- RegionCode: [],
220
- ServiceCode: [],
221
- });
222
- };
223
- const de_GetProductsResponse = (output, context) => {
224
- return take(output, {
225
- FormatVersion: __expectString,
226
- NextToken: __expectString,
227
- PriceList: (_) => de_PriceListJsonItems(_, context),
228
- });
229
- };
230
- const de_PriceListJsonItems = (output, context) => {
231
- const retVal = (output || [])
232
- .filter((e) => e != null)
233
- .map((entry) => {
234
- return __LazyJsonString.from(entry);
235
- });
236
- return retVal;
237
- };
238
- const deserializeMetadata = (output) => ({
239
- httpStatusCode: output.statusCode,
240
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
241
- extendedRequestId: output.headers["x-amz-id-2"],
242
- cfId: output.headers["x-amz-cf-id"],
243
- });
244
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
245
- const throwDefaultError = withBaseException(__BaseException);
246
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
247
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
248
- const contents = {
249
- protocol,
250
- hostname,
251
- port,
252
- method: "POST",
253
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
254
- headers,
255
- };
256
- if (resolvedHostname !== undefined) {
257
- contents.hostname = resolvedHostname;
258
- }
259
- if (body !== undefined) {
260
- contents.body = body;
261
- }
262
- return new __HttpRequest(contents);
263
- };
264
- function sharedHeaders(operation) {
265
- return {
266
- "content-type": "application/x-amz-json-1.1",
267
- "x-amz-target": `AWSPriceListService.${operation}`,
268
- };
269
- }
@@ -1,47 +0,0 @@
1
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
2
- import { SerdeContext as __SerdeContext } from "@smithy/types";
3
- import { DescribeServicesCommandInput, DescribeServicesCommandOutput } from "../commands/DescribeServicesCommand";
4
- import { GetAttributeValuesCommandInput, GetAttributeValuesCommandOutput } from "../commands/GetAttributeValuesCommand";
5
- import { GetPriceListFileUrlCommandInput, GetPriceListFileUrlCommandOutput } from "../commands/GetPriceListFileUrlCommand";
6
- import { GetProductsCommandInput, GetProductsCommandOutput } from "../commands/GetProductsCommand";
7
- import { ListPriceListsCommandInput, ListPriceListsCommandOutput } from "../commands/ListPriceListsCommand";
8
- /**
9
- * serializeAws_json1_1DescribeServicesCommand
10
- */
11
- export declare const se_DescribeServicesCommand: (input: DescribeServicesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
12
- /**
13
- * serializeAws_json1_1GetAttributeValuesCommand
14
- */
15
- export declare const se_GetAttributeValuesCommand: (input: GetAttributeValuesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
16
- /**
17
- * serializeAws_json1_1GetPriceListFileUrlCommand
18
- */
19
- export declare const se_GetPriceListFileUrlCommand: (input: GetPriceListFileUrlCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
20
- /**
21
- * serializeAws_json1_1GetProductsCommand
22
- */
23
- export declare const se_GetProductsCommand: (input: GetProductsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
24
- /**
25
- * serializeAws_json1_1ListPriceListsCommand
26
- */
27
- export declare const se_ListPriceListsCommand: (input: ListPriceListsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
28
- /**
29
- * deserializeAws_json1_1DescribeServicesCommand
30
- */
31
- export declare const de_DescribeServicesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DescribeServicesCommandOutput>;
32
- /**
33
- * deserializeAws_json1_1GetAttributeValuesCommand
34
- */
35
- export declare const de_GetAttributeValuesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetAttributeValuesCommandOutput>;
36
- /**
37
- * deserializeAws_json1_1GetPriceListFileUrlCommand
38
- */
39
- export declare const de_GetPriceListFileUrlCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetPriceListFileUrlCommandOutput>;
40
- /**
41
- * deserializeAws_json1_1GetProductsCommand
42
- */
43
- export declare const de_GetProductsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetProductsCommandOutput>;
44
- /**
45
- * deserializeAws_json1_1ListPriceListsCommand
46
- */
47
- export declare const de_ListPriceListsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListPriceListsCommandOutput>;
@@ -1,65 +0,0 @@
1
- import {
2
- HttpRequest as __HttpRequest,
3
- HttpResponse as __HttpResponse,
4
- } from "@smithy/protocol-http";
5
- import { SerdeContext as __SerdeContext } from "@smithy/types";
6
- import {
7
- DescribeServicesCommandInput,
8
- DescribeServicesCommandOutput,
9
- } from "../commands/DescribeServicesCommand";
10
- import {
11
- GetAttributeValuesCommandInput,
12
- GetAttributeValuesCommandOutput,
13
- } from "../commands/GetAttributeValuesCommand";
14
- import {
15
- GetPriceListFileUrlCommandInput,
16
- GetPriceListFileUrlCommandOutput,
17
- } from "../commands/GetPriceListFileUrlCommand";
18
- import {
19
- GetProductsCommandInput,
20
- GetProductsCommandOutput,
21
- } from "../commands/GetProductsCommand";
22
- import {
23
- ListPriceListsCommandInput,
24
- ListPriceListsCommandOutput,
25
- } from "../commands/ListPriceListsCommand";
26
- export declare const se_DescribeServicesCommand: (
27
- input: DescribeServicesCommandInput,
28
- context: __SerdeContext
29
- ) => Promise<__HttpRequest>;
30
- export declare const se_GetAttributeValuesCommand: (
31
- input: GetAttributeValuesCommandInput,
32
- context: __SerdeContext
33
- ) => Promise<__HttpRequest>;
34
- export declare const se_GetPriceListFileUrlCommand: (
35
- input: GetPriceListFileUrlCommandInput,
36
- context: __SerdeContext
37
- ) => Promise<__HttpRequest>;
38
- export declare const se_GetProductsCommand: (
39
- input: GetProductsCommandInput,
40
- context: __SerdeContext
41
- ) => Promise<__HttpRequest>;
42
- export declare const se_ListPriceListsCommand: (
43
- input: ListPriceListsCommandInput,
44
- context: __SerdeContext
45
- ) => Promise<__HttpRequest>;
46
- export declare const de_DescribeServicesCommand: (
47
- output: __HttpResponse,
48
- context: __SerdeContext
49
- ) => Promise<DescribeServicesCommandOutput>;
50
- export declare const de_GetAttributeValuesCommand: (
51
- output: __HttpResponse,
52
- context: __SerdeContext
53
- ) => Promise<GetAttributeValuesCommandOutput>;
54
- export declare const de_GetPriceListFileUrlCommand: (
55
- output: __HttpResponse,
56
- context: __SerdeContext
57
- ) => Promise<GetPriceListFileUrlCommandOutput>;
58
- export declare const de_GetProductsCommand: (
59
- output: __HttpResponse,
60
- context: __SerdeContext
61
- ) => Promise<GetProductsCommandOutput>;
62
- export declare const de_ListPriceListsCommand: (
63
- output: __HttpResponse,
64
- context: __SerdeContext
65
- ) => Promise<ListPriceListsCommandOutput>;