@aws-sdk/client-pricing 3.1074.0 → 3.1076.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/dist-cjs/index.js CHANGED
@@ -1,21 +1,57 @@
1
- var __exportStar = (m, e) => { Object.assign(e, m); };
2
- const { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require("@aws-sdk/core/client");
1
+ const { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require("@aws-sdk/core/client");
3
2
  const { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin, createPaginator } = require("@smithy/core");
4
- const { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, Command, createAggregatedClient } = require("@smithy/core/client");
3
+ const { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, Command, createAggregatedClient } = require("@smithy/core/client");
5
4
  exports.$Command = Command;
6
5
  exports.__Client = Client;
7
- const { resolveRegionConfig } = require("@smithy/core/config");
8
- const { resolveEndpointConfig, getEndpointPlugin } = require("@smithy/core/endpoints");
9
- const { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require("@smithy/core/protocols");
10
- const { resolveRetryConfig, getRetryPlugin } = require("@smithy/core/retry");
11
- const { getSchemaSerdePlugin } = require("@smithy/core/schema");
12
- const { resolveHttpAuthSchemeConfig, defaultPricingHttpAuthSchemeParametersProvider } = require("./auth/httpAuthSchemeProvider");
13
- const { getRuntimeConfig } = require("./runtimeConfig");
14
- const { DescribeServices$, GetAttributeValues$, GetPriceListFileUrl$, GetProducts$, ListPriceLists$ } = require("./schemas/schemas_0");
15
- __exportStar(require("./schemas/schemas_0"), exports);
16
- __exportStar(require("./models/errors"), exports);
17
- const { PricingServiceException } = require("./models/PricingServiceException");
18
- exports.PricingServiceException = PricingServiceException;
6
+ const { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require("@smithy/core/config");
7
+ const { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveEndpointConfig, getEndpointPlugin } = require("@smithy/core/endpoints");
8
+ const { parseUrl, getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require("@smithy/core/protocols");
9
+ const { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, getRetryPlugin } = require("@smithy/core/retry");
10
+ const { TypeRegistry, getSchemaSerdePlugin } = require("@smithy/core/schema");
11
+ const { resolveAwsSdkSigV4Config, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
12
+ const { defaultProvider } = require("@aws-sdk/credential-provider-node");
13
+ const { toUtf8, fromUtf8, toBase64, fromBase64, Hash, calculateBodyLength } = require("@smithy/core/serde");
14
+ const { streamCollector, NodeHttpHandler } = require("@smithy/node-http-handler");
15
+ const { AwsJson1_1Protocol } = require("@aws-sdk/core/protocols");
16
+
17
+ const defaultPricingHttpAuthSchemeParametersProvider = async (config, context, input) => {
18
+ return {
19
+ operation: getSmithyContext(context).operation,
20
+ region: await normalizeProvider(config.region)() || (() => {
21
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
22
+ })(),
23
+ };
24
+ };
25
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
26
+ return {
27
+ schemeId: "aws.auth#sigv4",
28
+ signingProperties: {
29
+ name: "pricing",
30
+ region: authParameters.region,
31
+ },
32
+ propertiesExtractor: (config, context) => ({
33
+ signingProperties: {
34
+ config,
35
+ context,
36
+ },
37
+ }),
38
+ };
39
+ }
40
+ const defaultPricingHttpAuthSchemeProvider = (authParameters) => {
41
+ const options = [];
42
+ switch (authParameters.operation) {
43
+ default: {
44
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
45
+ }
46
+ }
47
+ return options;
48
+ };
49
+ const resolveHttpAuthSchemeConfig = (config) => {
50
+ const config_0 = resolveAwsSdkSigV4Config(config);
51
+ return Object.assign(config_0, {
52
+ authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
53
+ });
54
+ };
19
55
 
20
56
  const resolveClientEndpointParameters = (options) => {
21
57
  return Object.assign(options, {
@@ -31,6 +67,480 @@ const commonParams = {
31
67
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
32
68
  };
33
69
 
70
+ var version = "3.1075.0";
71
+ var packageInfo = {
72
+ version: version};
73
+
74
+ const k = "ref";
75
+ const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = { [k]: "Endpoint" }, h = { [k]: d }, i = {}, j = [{ [k]: "Region" }];
76
+ const _data = {
77
+ conditions: [
78
+ [c, [g]],
79
+ [c, j],
80
+ ["aws.partition", j, d],
81
+ [e, [{ [k]: "UseFIPS" }, b]],
82
+ [e, [{ [k]: "UseDualStack" }, b]],
83
+ [e, [{ fn: f, argv: [h, "supportsDualStack"] }, b]],
84
+ [e, [{ fn: f, argv: [h, "supportsFIPS"] }, b]],
85
+ ["stringEquals", [{ fn: f, argv: [h, "name"] }, "aws"]]
86
+ ],
87
+ results: [
88
+ [a],
89
+ [a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
90
+ [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
91
+ [g, i],
92
+ ["https://api.pricing-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
93
+ [a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
94
+ ["https://api.pricing-fips.{Region}.{PartitionResult#dnsSuffix}", i],
95
+ [a, "FIPS is enabled but this partition does not support FIPS"],
96
+ ["https://api.pricing.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
97
+ [a, "DualStack is enabled but this partition does not support DualStack"],
98
+ ["https://api.pricing.{Region}.amazonaws.com", i],
99
+ ["https://api.pricing.{Region}.{PartitionResult#dnsSuffix}", i],
100
+ [a, "Invalid Configuration: Missing Region"]
101
+ ]
102
+ };
103
+ const root = 2;
104
+ const r = 100_000_000;
105
+ const nodes = new Int32Array([
106
+ -1, 1, -1,
107
+ 0, 13, 3,
108
+ 1, 4, r + 12,
109
+ 2, 5, r + 12,
110
+ 3, 9, 6,
111
+ 4, 8, 7,
112
+ 7, r + 10, r + 11,
113
+ 5, r + 8, r + 9,
114
+ 4, 11, 10,
115
+ 6, r + 6, r + 7,
116
+ 5, 12, r + 5,
117
+ 6, r + 4, r + 5,
118
+ 3, r + 1, 14,
119
+ 4, r + 2, r + 3,
120
+ ]);
121
+ const bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
122
+
123
+ const cache = new EndpointCache({
124
+ size: 50,
125
+ params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
126
+ });
127
+ const defaultEndpointResolver = (endpointParams, context = {}) => {
128
+ return cache.get(endpointParams, () => decideEndpoint(bdd, {
129
+ endpointParams: endpointParams,
130
+ logger: context.logger,
131
+ }));
132
+ };
133
+ customEndpointFunctions.aws = awsEndpointFunctions;
134
+
135
+ class PricingServiceException extends ServiceException {
136
+ constructor(options) {
137
+ super(options);
138
+ Object.setPrototypeOf(this, PricingServiceException.prototype);
139
+ }
140
+ }
141
+
142
+ class AccessDeniedException extends PricingServiceException {
143
+ name = "AccessDeniedException";
144
+ $fault = "client";
145
+ Message;
146
+ constructor(opts) {
147
+ super({
148
+ name: "AccessDeniedException",
149
+ $fault: "client",
150
+ ...opts,
151
+ });
152
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
153
+ this.Message = opts.Message;
154
+ }
155
+ }
156
+ class ExpiredNextTokenException extends PricingServiceException {
157
+ name = "ExpiredNextTokenException";
158
+ $fault = "client";
159
+ Message;
160
+ constructor(opts) {
161
+ super({
162
+ name: "ExpiredNextTokenException",
163
+ $fault: "client",
164
+ ...opts,
165
+ });
166
+ Object.setPrototypeOf(this, ExpiredNextTokenException.prototype);
167
+ this.Message = opts.Message;
168
+ }
169
+ }
170
+ class InternalErrorException extends PricingServiceException {
171
+ name = "InternalErrorException";
172
+ $fault = "server";
173
+ $retryable = {};
174
+ Message;
175
+ constructor(opts) {
176
+ super({
177
+ name: "InternalErrorException",
178
+ $fault: "server",
179
+ ...opts,
180
+ });
181
+ Object.setPrototypeOf(this, InternalErrorException.prototype);
182
+ this.Message = opts.Message;
183
+ }
184
+ }
185
+ class InvalidNextTokenException extends PricingServiceException {
186
+ name = "InvalidNextTokenException";
187
+ $fault = "client";
188
+ Message;
189
+ constructor(opts) {
190
+ super({
191
+ name: "InvalidNextTokenException",
192
+ $fault: "client",
193
+ ...opts,
194
+ });
195
+ Object.setPrototypeOf(this, InvalidNextTokenException.prototype);
196
+ this.Message = opts.Message;
197
+ }
198
+ }
199
+ class InvalidParameterException extends PricingServiceException {
200
+ name = "InvalidParameterException";
201
+ $fault = "client";
202
+ Message;
203
+ constructor(opts) {
204
+ super({
205
+ name: "InvalidParameterException",
206
+ $fault: "client",
207
+ ...opts,
208
+ });
209
+ Object.setPrototypeOf(this, InvalidParameterException.prototype);
210
+ this.Message = opts.Message;
211
+ }
212
+ }
213
+ class NotFoundException extends PricingServiceException {
214
+ name = "NotFoundException";
215
+ $fault = "client";
216
+ Message;
217
+ constructor(opts) {
218
+ super({
219
+ name: "NotFoundException",
220
+ $fault: "client",
221
+ ...opts,
222
+ });
223
+ Object.setPrototypeOf(this, NotFoundException.prototype);
224
+ this.Message = opts.Message;
225
+ }
226
+ }
227
+ class ThrottlingException extends PricingServiceException {
228
+ name = "ThrottlingException";
229
+ $fault = "client";
230
+ $retryable = {
231
+ throttling: true,
232
+ };
233
+ Message;
234
+ constructor(opts) {
235
+ super({
236
+ name: "ThrottlingException",
237
+ $fault: "client",
238
+ ...opts,
239
+ });
240
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
241
+ this.Message = opts.Message;
242
+ }
243
+ }
244
+ class ResourceNotFoundException extends PricingServiceException {
245
+ name = "ResourceNotFoundException";
246
+ $fault = "client";
247
+ Message;
248
+ constructor(opts) {
249
+ super({
250
+ name: "ResourceNotFoundException",
251
+ $fault: "client",
252
+ ...opts,
253
+ });
254
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
255
+ this.Message = opts.Message;
256
+ }
257
+ }
258
+
259
+ const _ADE = "AccessDeniedException";
260
+ const _AN = "AttributeName";
261
+ const _ANt = "AttributeNames";
262
+ const _AV = "AttributeValue";
263
+ const _AVL = "AttributeValueList";
264
+ const _AVt = "AttributeValues";
265
+ const _CC = "CurrencyCode";
266
+ const _DS = "DescribeServices";
267
+ const _DSR = "DescribeServicesRequest";
268
+ const _DSRe = "DescribeServicesResponse";
269
+ const _ED = "EffectiveDate";
270
+ const _ENTE = "ExpiredNextTokenException";
271
+ const _F = "Filter";
272
+ const _FF = "FileFormat";
273
+ const _FFi = "FileFormats";
274
+ const _FV = "FormatVersion";
275
+ const _Fi = "Field";
276
+ const _Fil = "Filters";
277
+ const _GAV = "GetAttributeValues";
278
+ const _GAVR = "GetAttributeValuesRequest";
279
+ const _GAVRe = "GetAttributeValuesResponse";
280
+ const _GP = "GetProducts";
281
+ const _GPLFU = "GetPriceListFileUrl";
282
+ const _GPLFUR = "GetPriceListFileUrlRequest";
283
+ const _GPLFURe = "GetPriceListFileUrlResponse";
284
+ const _GPR = "GetProductsRequest";
285
+ const _GPRe = "GetProductsResponse";
286
+ const _IEE = "InternalErrorException";
287
+ const _INTE = "InvalidNextTokenException";
288
+ const _IPE = "InvalidParameterException";
289
+ const _LPL = "ListPriceLists";
290
+ const _LPLR = "ListPriceListsRequest";
291
+ const _LPLRi = "ListPriceListsResponse";
292
+ const _M = "Message";
293
+ const _MR = "MaxResults";
294
+ const _NFE = "NotFoundException";
295
+ const _NT = "NextToken";
296
+ const _PL = "PriceList";
297
+ const _PLA = "PriceListArn";
298
+ const _PLJI = "PriceListJsonItems";
299
+ const _PLr = "PriceLists";
300
+ const _RC = "RegionCode";
301
+ const _RNFE = "ResourceNotFoundException";
302
+ const _S = "Services";
303
+ const _SC = "ServiceCode";
304
+ const _SJPLJI = "SynthesizedJsonPriceListJsonItem";
305
+ const _SL = "ServiceList";
306
+ const _Se = "Service";
307
+ const _T = "Type";
308
+ const _TE = "ThrottlingException";
309
+ const _U = "Url";
310
+ const _V = "Value";
311
+ const _a = "application/json";
312
+ const _c = "client";
313
+ const _e = "error";
314
+ const _hE = "httpError";
315
+ const _mT = "mediaType";
316
+ const _s = "smithy.ts.sdk.synthetic.com.amazonaws.pricing";
317
+ const _se = "server";
318
+ const n0 = "com.amazonaws.pricing";
319
+ const _s_registry = TypeRegistry.for(_s);
320
+ var PricingServiceException$ = [-3, _s, "PricingServiceException", 0, [], []];
321
+ _s_registry.registerError(PricingServiceException$, PricingServiceException);
322
+ const n0_registry = TypeRegistry.for(n0);
323
+ var AccessDeniedException$ = [-3, n0, _ADE,
324
+ { [_e]: _c, [_hE]: 401 },
325
+ [_M],
326
+ [0]
327
+ ];
328
+ n0_registry.registerError(AccessDeniedException$, AccessDeniedException);
329
+ var ExpiredNextTokenException$ = [-3, n0, _ENTE,
330
+ { [_e]: _c, [_hE]: 400 },
331
+ [_M],
332
+ [0]
333
+ ];
334
+ n0_registry.registerError(ExpiredNextTokenException$, ExpiredNextTokenException);
335
+ var InternalErrorException$ = [-3, n0, _IEE,
336
+ { [_e]: _se, [_hE]: 500 },
337
+ [_M],
338
+ [0]
339
+ ];
340
+ n0_registry.registerError(InternalErrorException$, InternalErrorException);
341
+ var InvalidNextTokenException$ = [-3, n0, _INTE,
342
+ { [_e]: _c, [_hE]: 400 },
343
+ [_M],
344
+ [0]
345
+ ];
346
+ n0_registry.registerError(InvalidNextTokenException$, InvalidNextTokenException);
347
+ var InvalidParameterException$ = [-3, n0, _IPE,
348
+ { [_e]: _c, [_hE]: 400 },
349
+ [_M],
350
+ [0]
351
+ ];
352
+ n0_registry.registerError(InvalidParameterException$, InvalidParameterException);
353
+ var NotFoundException$ = [-3, n0, _NFE,
354
+ { [_e]: _c, [_hE]: 400 },
355
+ [_M],
356
+ [0]
357
+ ];
358
+ n0_registry.registerError(NotFoundException$, NotFoundException);
359
+ var ResourceNotFoundException$ = [-3, n0, _RNFE,
360
+ { [_e]: _c, [_hE]: 404 },
361
+ [_M],
362
+ [0]
363
+ ];
364
+ n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);
365
+ var ThrottlingException$ = [-3, n0, _TE,
366
+ { [_e]: _c, [_hE]: 429 },
367
+ [_M],
368
+ [0]
369
+ ];
370
+ n0_registry.registerError(ThrottlingException$, ThrottlingException);
371
+ const errorTypeRegistries = [
372
+ _s_registry,
373
+ n0_registry,
374
+ ];
375
+ var SynthesizedJsonPriceListJsonItem = [0, n0, _SJPLJI, { [_mT]: _a }, 0];
376
+ var AttributeValue$ = [3, n0, _AV,
377
+ 0,
378
+ [_V],
379
+ [0]
380
+ ];
381
+ var DescribeServicesRequest$ = [3, n0, _DSR,
382
+ 0,
383
+ [_SC, _FV, _NT, _MR],
384
+ [0, 0, 0, 1]
385
+ ];
386
+ var DescribeServicesResponse$ = [3, n0, _DSRe,
387
+ 0,
388
+ [_S, _FV, _NT],
389
+ [() => ServiceList, 0, 0]
390
+ ];
391
+ var Filter$ = [3, n0, _F,
392
+ 0,
393
+ [_T, _Fi, _V],
394
+ [0, 0, 0], 3
395
+ ];
396
+ var GetAttributeValuesRequest$ = [3, n0, _GAVR,
397
+ 0,
398
+ [_SC, _AN, _NT, _MR],
399
+ [0, 0, 0, 1], 2
400
+ ];
401
+ var GetAttributeValuesResponse$ = [3, n0, _GAVRe,
402
+ 0,
403
+ [_AVt, _NT],
404
+ [() => AttributeValueList, 0]
405
+ ];
406
+ var GetPriceListFileUrlRequest$ = [3, n0, _GPLFUR,
407
+ 0,
408
+ [_PLA, _FF],
409
+ [0, 0], 2
410
+ ];
411
+ var GetPriceListFileUrlResponse$ = [3, n0, _GPLFURe,
412
+ 0,
413
+ [_U],
414
+ [0]
415
+ ];
416
+ var GetProductsRequest$ = [3, n0, _GPR,
417
+ 0,
418
+ [_SC, _Fil, _FV, _NT, _MR],
419
+ [0, () => Filters, 0, 0, 1], 1
420
+ ];
421
+ var GetProductsResponse$ = [3, n0, _GPRe,
422
+ 0,
423
+ [_FV, _PL, _NT],
424
+ [0, [() => PriceListJsonItems, 0], 0]
425
+ ];
426
+ var ListPriceListsRequest$ = [3, n0, _LPLR,
427
+ 0,
428
+ [_SC, _ED, _CC, _RC, _NT, _MR],
429
+ [0, 4, 0, 0, 0, 1], 3
430
+ ];
431
+ var ListPriceListsResponse$ = [3, n0, _LPLRi,
432
+ 0,
433
+ [_PLr, _NT],
434
+ [() => PriceLists, 0]
435
+ ];
436
+ var PriceList$ = [3, n0, _PL,
437
+ 0,
438
+ [_PLA, _RC, _CC, _FFi],
439
+ [0, 0, 0, 64 | 0]
440
+ ];
441
+ var Service$ = [3, n0, _Se,
442
+ 0,
443
+ [_SC, _ANt],
444
+ [0, 64 | 0], 1
445
+ ];
446
+ var AttributeValueList = [1, n0, _AVL,
447
+ 0, () => AttributeValue$
448
+ ];
449
+ var Filters = [1, n0, _Fil,
450
+ 0, () => Filter$
451
+ ];
452
+ var PriceListJsonItems = [1, n0, _PLJI,
453
+ 0, [() => SynthesizedJsonPriceListJsonItem,
454
+ 0]
455
+ ];
456
+ var PriceLists = [1, n0, _PLr,
457
+ 0, () => PriceList$
458
+ ];
459
+ var ServiceList = [1, n0, _SL,
460
+ 0, () => Service$
461
+ ];
462
+ var DescribeServices$ = [9, n0, _DS,
463
+ 0, () => DescribeServicesRequest$, () => DescribeServicesResponse$
464
+ ];
465
+ var GetAttributeValues$ = [9, n0, _GAV,
466
+ 0, () => GetAttributeValuesRequest$, () => GetAttributeValuesResponse$
467
+ ];
468
+ var GetPriceListFileUrl$ = [9, n0, _GPLFU,
469
+ 0, () => GetPriceListFileUrlRequest$, () => GetPriceListFileUrlResponse$
470
+ ];
471
+ var GetProducts$ = [9, n0, _GP,
472
+ 0, () => GetProductsRequest$, () => GetProductsResponse$
473
+ ];
474
+ var ListPriceLists$ = [9, n0, _LPL,
475
+ 0, () => ListPriceListsRequest$, () => ListPriceListsResponse$
476
+ ];
477
+
478
+ const getRuntimeConfig$1 = (config) => {
479
+ return {
480
+ apiVersion: "2017-10-15",
481
+ base64Decoder: config?.base64Decoder ?? fromBase64,
482
+ base64Encoder: config?.base64Encoder ?? toBase64,
483
+ disableHostPrefix: config?.disableHostPrefix ?? false,
484
+ endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
485
+ extensions: config?.extensions ?? [],
486
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultPricingHttpAuthSchemeProvider,
487
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
488
+ {
489
+ schemeId: "aws.auth#sigv4",
490
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
491
+ signer: new AwsSdkSigV4Signer(),
492
+ },
493
+ ],
494
+ logger: config?.logger ?? new NoOpLogger(),
495
+ protocol: config?.protocol ?? AwsJson1_1Protocol,
496
+ protocolSettings: config?.protocolSettings ?? {
497
+ defaultNamespace: "com.amazonaws.pricing",
498
+ errorTypeRegistries,
499
+ version: "2017-10-15",
500
+ serviceTarget: "AWSPriceListService",
501
+ },
502
+ serviceId: config?.serviceId ?? "Pricing",
503
+ urlParser: config?.urlParser ?? parseUrl,
504
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
505
+ utf8Encoder: config?.utf8Encoder ?? toUtf8,
506
+ };
507
+ };
508
+
509
+ const getRuntimeConfig = (config) => {
510
+ emitWarningIfUnsupportedVersion(process.version);
511
+ const defaultsMode = resolveDefaultsModeConfig(config);
512
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
513
+ const clientSharedValues = getRuntimeConfig$1(config);
514
+ emitWarningIfUnsupportedVersion$1(process.version);
515
+ const loaderConfig = {
516
+ profile: config?.profile,
517
+ logger: clientSharedValues.logger,
518
+ };
519
+ return {
520
+ ...clientSharedValues,
521
+ ...config,
522
+ runtime: "node",
523
+ defaultsMode,
524
+ authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
525
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
526
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? defaultProvider,
527
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
528
+ maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
529
+ region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
530
+ requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
531
+ retryMode: config?.retryMode ??
532
+ loadConfig({
533
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
534
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
535
+ }, config),
536
+ sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
537
+ streamCollector: config?.streamCollector ?? streamCollector,
538
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
539
+ useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
540
+ userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
541
+ };
542
+ };
543
+
34
544
  const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
35
545
  const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
36
546
  let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
@@ -204,14 +714,52 @@ const FilterType = {
204
714
  TERM_MATCH: "TERM_MATCH",
205
715
  };
206
716
 
717
+ exports.AccessDeniedException = AccessDeniedException;
718
+ exports.AccessDeniedException$ = AccessDeniedException$;
719
+ exports.AttributeValue$ = AttributeValue$;
720
+ exports.DescribeServices$ = DescribeServices$;
207
721
  exports.DescribeServicesCommand = DescribeServicesCommand;
722
+ exports.DescribeServicesRequest$ = DescribeServicesRequest$;
723
+ exports.DescribeServicesResponse$ = DescribeServicesResponse$;
724
+ exports.ExpiredNextTokenException = ExpiredNextTokenException;
725
+ exports.ExpiredNextTokenException$ = ExpiredNextTokenException$;
726
+ exports.Filter$ = Filter$;
208
727
  exports.FilterType = FilterType;
728
+ exports.GetAttributeValues$ = GetAttributeValues$;
209
729
  exports.GetAttributeValuesCommand = GetAttributeValuesCommand;
730
+ exports.GetAttributeValuesRequest$ = GetAttributeValuesRequest$;
731
+ exports.GetAttributeValuesResponse$ = GetAttributeValuesResponse$;
732
+ exports.GetPriceListFileUrl$ = GetPriceListFileUrl$;
210
733
  exports.GetPriceListFileUrlCommand = GetPriceListFileUrlCommand;
734
+ exports.GetPriceListFileUrlRequest$ = GetPriceListFileUrlRequest$;
735
+ exports.GetPriceListFileUrlResponse$ = GetPriceListFileUrlResponse$;
736
+ exports.GetProducts$ = GetProducts$;
211
737
  exports.GetProductsCommand = GetProductsCommand;
738
+ exports.GetProductsRequest$ = GetProductsRequest$;
739
+ exports.GetProductsResponse$ = GetProductsResponse$;
740
+ exports.InternalErrorException = InternalErrorException;
741
+ exports.InternalErrorException$ = InternalErrorException$;
742
+ exports.InvalidNextTokenException = InvalidNextTokenException;
743
+ exports.InvalidNextTokenException$ = InvalidNextTokenException$;
744
+ exports.InvalidParameterException = InvalidParameterException;
745
+ exports.InvalidParameterException$ = InvalidParameterException$;
746
+ exports.ListPriceLists$ = ListPriceLists$;
212
747
  exports.ListPriceListsCommand = ListPriceListsCommand;
748
+ exports.ListPriceListsRequest$ = ListPriceListsRequest$;
749
+ exports.ListPriceListsResponse$ = ListPriceListsResponse$;
750
+ exports.NotFoundException = NotFoundException;
751
+ exports.NotFoundException$ = NotFoundException$;
752
+ exports.PriceList$ = PriceList$;
213
753
  exports.Pricing = Pricing;
214
754
  exports.PricingClient = PricingClient;
755
+ exports.PricingServiceException = PricingServiceException;
756
+ exports.PricingServiceException$ = PricingServiceException$;
757
+ exports.ResourceNotFoundException = ResourceNotFoundException;
758
+ exports.ResourceNotFoundException$ = ResourceNotFoundException$;
759
+ exports.Service$ = Service$;
760
+ exports.ThrottlingException = ThrottlingException;
761
+ exports.ThrottlingException$ = ThrottlingException$;
762
+ exports.errorTypeRegistries = errorTypeRegistries;
215
763
  exports.paginateDescribeServices = paginateDescribeServices;
216
764
  exports.paginateGetAttributeValues = paginateGetAttributeValues;
217
765
  exports.paginateGetProducts = paginateGetProducts;
@@ -14,7 +14,7 @@ export declare const getRuntimeConfig: (config: PricingClientConfig) => {
14
14
  requestHandler: import("@smithy/core/protocols").HttpHandler<any> | RequestHandler;
15
15
  retryMode: string | import("@smithy/types").Provider<string>;
16
16
  sha256: import("@smithy/types").HashConstructor;
17
- streamCollector: import("@smithy/types").StreamCollector;
17
+ streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
18
18
  useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
19
19
  useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
20
20
  cacheMiddleware?: boolean | undefined;
@@ -15,7 +15,7 @@ export declare const getRuntimeConfig: (config: PricingClientConfig) => {
15
15
  requestHandler: RequestHandler | import("@smithy/core/protocols").HttpHandler<any>;
16
16
  retryMode: string | import("@smithy/types").Provider<string>;
17
17
  sha256: import("@smithy/types").HashConstructor;
18
- streamCollector: import("@smithy/types").StreamCollector;
18
+ streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
19
19
  useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
20
20
  useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
21
21
  userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
@@ -15,7 +15,7 @@ export declare const getRuntimeConfig: (config: PricingClientConfig) => {
15
15
  apiVersion: string;
16
16
  urlParser: import("@smithy/types").UrlParser;
17
17
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
18
- streamCollector: import("@smithy/types").StreamCollector;
18
+ streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
19
19
  base64Decoder: import("@smithy/types").Decoder;
20
20
  base64Encoder: (_input: Uint8Array | string) => string;
21
21
  utf8Decoder: import("@smithy/types").Decoder;
@@ -21,7 +21,13 @@ export declare const getRuntimeConfig: (config: PricingClientConfig) => {
21
21
  | RequestHandler;
22
22
  retryMode: string | import("@smithy/types").Provider<string>;
23
23
  sha256: import("@smithy/types").HashConstructor;
24
- streamCollector: import("@smithy/types").StreamCollector;
24
+ streamCollector: (
25
+ stream:
26
+ | import("stream").Readable
27
+ | import("stream/web").ReadableStream
28
+ | ReadableStream
29
+ | Blob
30
+ ) => Promise<Uint8Array>;
25
31
  useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
26
32
  (boolean | import("@smithy/types").Provider<boolean | undefined>);
27
33
  useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
@@ -22,7 +22,13 @@ export declare const getRuntimeConfig: (config: PricingClientConfig) => {
22
22
  | import("@smithy/core/protocols").HttpHandler<any>;
23
23
  retryMode: string | import("@smithy/types").Provider<string>;
24
24
  sha256: import("@smithy/types").HashConstructor;
25
- streamCollector: import("@smithy/types").StreamCollector;
25
+ streamCollector: (
26
+ stream:
27
+ | import("stream").Readable
28
+ | import("stream/web").ReadableStream
29
+ | ReadableStream
30
+ | Blob
31
+ ) => Promise<Uint8Array>;
26
32
  useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
27
33
  useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
28
34
  userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
@@ -20,7 +20,13 @@ export declare const getRuntimeConfig: (config: PricingClientConfig) => {
20
20
  apiVersion: string;
21
21
  urlParser: import("@smithy/types").UrlParser;
22
22
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
23
- streamCollector: import("@smithy/types").StreamCollector;
23
+ streamCollector: (
24
+ stream:
25
+ | import("stream").Readable
26
+ | import("stream/web").ReadableStream
27
+ | ReadableStream
28
+ | Blob
29
+ ) => Promise<Uint8Array>;
24
30
  base64Decoder: import("@smithy/types").Decoder;
25
31
  base64Encoder: (_input: Uint8Array | string) => string;
26
32
  utf8Decoder: import("@smithy/types").Decoder;
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.1074.0",
4
+ "version": "3.1076.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
7
7
  "build:cjs": "node ../../scripts/compilation/inline",
@@ -21,13 +21,13 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "5.2.0",
23
23
  "@aws-crypto/sha256-js": "5.2.0",
24
- "@aws-sdk/core": "^3.974.23",
25
- "@aws-sdk/credential-provider-node": "^3.972.58",
26
- "@aws-sdk/types": "^3.973.13",
27
- "@smithy/core": "^3.24.6",
28
- "@smithy/fetch-http-handler": "^5.4.6",
29
- "@smithy/node-http-handler": "^4.7.6",
30
- "@smithy/types": "^4.14.3",
24
+ "@aws-sdk/core": "^3.974.24",
25
+ "@aws-sdk/credential-provider-node": "^3.972.59",
26
+ "@aws-sdk/types": "^3.973.14",
27
+ "@smithy/core": "^3.27.0",
28
+ "@smithy/fetch-http-handler": "^5.6.0",
29
+ "@smithy/node-http-handler": "^4.9.0",
30
+ "@smithy/types": "^4.15.0",
31
31
  "tslib": "^2.6.2"
32
32
  },
33
33
  "devDependencies": {
@@ -1,40 +0,0 @@
1
- const { resolveAwsSdkSigV4Config } = require("@aws-sdk/core/httpAuthSchemes");
2
- const { getSmithyContext, normalizeProvider } = require("@smithy/core/client");
3
- exports.defaultPricingHttpAuthSchemeParametersProvider = async (config, context, input) => {
4
- return {
5
- operation: getSmithyContext(context).operation,
6
- region: await normalizeProvider(config.region)() || (() => {
7
- throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
8
- })(),
9
- };
10
- };
11
- function createAwsAuthSigv4HttpAuthOption(authParameters) {
12
- return {
13
- schemeId: "aws.auth#sigv4",
14
- signingProperties: {
15
- name: "pricing",
16
- region: authParameters.region,
17
- },
18
- propertiesExtractor: (config, context) => ({
19
- signingProperties: {
20
- config,
21
- context,
22
- },
23
- }),
24
- };
25
- }
26
- exports.defaultPricingHttpAuthSchemeProvider = (authParameters) => {
27
- const options = [];
28
- switch (authParameters.operation) {
29
- default: {
30
- options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
31
- }
32
- }
33
- return options;
34
- };
35
- exports.resolveHttpAuthSchemeConfig = (config) => {
36
- const config_0 = resolveAwsSdkSigV4Config(config);
37
- return Object.assign(config_0, {
38
- authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
39
- });
40
- };
@@ -1,49 +0,0 @@
1
- const { BinaryDecisionDiagram } = require("@smithy/core/endpoints");
2
- const k = "ref";
3
- const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = { [k]: "Endpoint" }, h = { [k]: d }, i = {}, j = [{ [k]: "Region" }];
4
- const _data = {
5
- conditions: [
6
- [c, [g]],
7
- [c, j],
8
- ["aws.partition", j, d],
9
- [e, [{ [k]: "UseFIPS" }, b]],
10
- [e, [{ [k]: "UseDualStack" }, b]],
11
- [e, [{ fn: f, argv: [h, "supportsDualStack"] }, b]],
12
- [e, [{ fn: f, argv: [h, "supportsFIPS"] }, b]],
13
- ["stringEquals", [{ fn: f, argv: [h, "name"] }, "aws"]]
14
- ],
15
- results: [
16
- [a],
17
- [a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
18
- [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
19
- [g, i],
20
- ["https://api.pricing-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
21
- [a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
22
- ["https://api.pricing-fips.{Region}.{PartitionResult#dnsSuffix}", i],
23
- [a, "FIPS is enabled but this partition does not support FIPS"],
24
- ["https://api.pricing.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
25
- [a, "DualStack is enabled but this partition does not support DualStack"],
26
- ["https://api.pricing.{Region}.amazonaws.com", i],
27
- ["https://api.pricing.{Region}.{PartitionResult#dnsSuffix}", i],
28
- [a, "Invalid Configuration: Missing Region"]
29
- ]
30
- };
31
- const root = 2;
32
- const r = 100_000_000;
33
- const nodes = new Int32Array([
34
- -1, 1, -1,
35
- 0, 13, 3,
36
- 1, 4, r + 12,
37
- 2, 5, r + 12,
38
- 3, 9, 6,
39
- 4, 8, 7,
40
- 7, r + 10, r + 11,
41
- 5, r + 8, r + 9,
42
- 4, 11, 10,
43
- 6, r + 6, r + 7,
44
- 5, 12, r + 5,
45
- 6, r + 4, r + 5,
46
- 3, r + 1, 14,
47
- 4, r + 2, r + 3,
48
- ]);
49
- exports.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
@@ -1,14 +0,0 @@
1
- const { awsEndpointFunctions } = require("@aws-sdk/core/client");
2
- const { customEndpointFunctions, decideEndpoint, EndpointCache } = require("@smithy/core/endpoints");
3
- const { bdd } = require("./bdd");
4
- const cache = new EndpointCache({
5
- size: 50,
6
- params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
7
- });
8
- exports.defaultEndpointResolver = (endpointParams, context = {}) => {
9
- return cache.get(endpointParams, () => decideEndpoint(bdd, {
10
- endpointParams: endpointParams,
11
- logger: context.logger,
12
- }));
13
- };
14
- customEndpointFunctions.aws = awsEndpointFunctions;
@@ -1,8 +0,0 @@
1
- const { ServiceException: __ServiceException } = require("@smithy/core/client");
2
- exports.__ServiceException = __ServiceException;
3
- exports.PricingServiceException = class PricingServiceException extends __ServiceException {
4
- constructor(options) {
5
- super(options);
6
- Object.setPrototypeOf(this, PricingServiceException.prototype);
7
- }
8
- };
@@ -1,117 +0,0 @@
1
- const { PricingServiceException: __BaseException } = require("./PricingServiceException");
2
- exports.AccessDeniedException = class AccessDeniedException extends __BaseException {
3
- name = "AccessDeniedException";
4
- $fault = "client";
5
- Message;
6
- constructor(opts) {
7
- super({
8
- name: "AccessDeniedException",
9
- $fault: "client",
10
- ...opts,
11
- });
12
- Object.setPrototypeOf(this, AccessDeniedException.prototype);
13
- this.Message = opts.Message;
14
- }
15
- };
16
- exports.ExpiredNextTokenException = class ExpiredNextTokenException extends __BaseException {
17
- name = "ExpiredNextTokenException";
18
- $fault = "client";
19
- Message;
20
- constructor(opts) {
21
- super({
22
- name: "ExpiredNextTokenException",
23
- $fault: "client",
24
- ...opts,
25
- });
26
- Object.setPrototypeOf(this, ExpiredNextTokenException.prototype);
27
- this.Message = opts.Message;
28
- }
29
- };
30
- exports.InternalErrorException = class InternalErrorException extends __BaseException {
31
- name = "InternalErrorException";
32
- $fault = "server";
33
- $retryable = {};
34
- Message;
35
- constructor(opts) {
36
- super({
37
- name: "InternalErrorException",
38
- $fault: "server",
39
- ...opts,
40
- });
41
- Object.setPrototypeOf(this, InternalErrorException.prototype);
42
- this.Message = opts.Message;
43
- }
44
- };
45
- exports.InvalidNextTokenException = class InvalidNextTokenException extends __BaseException {
46
- name = "InvalidNextTokenException";
47
- $fault = "client";
48
- Message;
49
- constructor(opts) {
50
- super({
51
- name: "InvalidNextTokenException",
52
- $fault: "client",
53
- ...opts,
54
- });
55
- Object.setPrototypeOf(this, InvalidNextTokenException.prototype);
56
- this.Message = opts.Message;
57
- }
58
- };
59
- exports.InvalidParameterException = class InvalidParameterException extends __BaseException {
60
- name = "InvalidParameterException";
61
- $fault = "client";
62
- Message;
63
- constructor(opts) {
64
- super({
65
- name: "InvalidParameterException",
66
- $fault: "client",
67
- ...opts,
68
- });
69
- Object.setPrototypeOf(this, InvalidParameterException.prototype);
70
- this.Message = opts.Message;
71
- }
72
- };
73
- exports.NotFoundException = class NotFoundException extends __BaseException {
74
- name = "NotFoundException";
75
- $fault = "client";
76
- Message;
77
- constructor(opts) {
78
- super({
79
- name: "NotFoundException",
80
- $fault: "client",
81
- ...opts,
82
- });
83
- Object.setPrototypeOf(this, NotFoundException.prototype);
84
- this.Message = opts.Message;
85
- }
86
- };
87
- exports.ThrottlingException = class ThrottlingException extends __BaseException {
88
- name = "ThrottlingException";
89
- $fault = "client";
90
- $retryable = {
91
- throttling: true,
92
- };
93
- Message;
94
- constructor(opts) {
95
- super({
96
- name: "ThrottlingException",
97
- $fault: "client",
98
- ...opts,
99
- });
100
- Object.setPrototypeOf(this, ThrottlingException.prototype);
101
- this.Message = opts.Message;
102
- }
103
- };
104
- exports.ResourceNotFoundException = class ResourceNotFoundException extends __BaseException {
105
- name = "ResourceNotFoundException";
106
- $fault = "client";
107
- Message;
108
- constructor(opts) {
109
- super({
110
- name: "ResourceNotFoundException",
111
- $fault: "client",
112
- ...opts,
113
- });
114
- Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
115
- this.Message = opts.Message;
116
- }
117
- };
@@ -1,32 +0,0 @@
1
- const packageInfo = require("../package.json");
2
- const { Sha256 } = require("@aws-crypto/sha256-browser");
3
- const { createDefaultUserAgentProvider } = require("@aws-sdk/core/client");
4
- const { invalidProvider, loadConfigsForDefaultMode } = require("@smithy/core/client");
5
- const { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig } = require("@smithy/core/config");
6
- const { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } = require("@smithy/core/retry");
7
- const { calculateBodyLength } = require("@smithy/core/serde");
8
- const { FetchHttpHandler: RequestHandler, streamCollector } = require("@smithy/fetch-http-handler");
9
- const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
10
- const getRuntimeConfig = (config) => {
11
- const defaultsMode = resolveDefaultsModeConfig(config);
12
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
13
- const clientSharedValues = getSharedRuntimeConfig(config);
14
- return {
15
- ...clientSharedValues,
16
- ...config,
17
- runtime: "browser",
18
- defaultsMode,
19
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
20
- credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
21
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
22
- maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
23
- region: config?.region ?? invalidProvider("Region is missing"),
24
- requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
25
- retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
26
- sha256: config?.sha256 ?? Sha256,
27
- streamCollector: config?.streamCollector ?? streamCollector,
28
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
29
- useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
30
- };
31
- };
32
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,45 +0,0 @@
1
- const packageInfo = require("../package.json");
2
- const { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require("@aws-sdk/core/client");
3
- const { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
4
- const { defaultProvider: credentialDefaultProvider } = require("@aws-sdk/credential-provider-node");
5
- const { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require("@smithy/core/client");
6
- const { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require("@smithy/core/config");
7
- const { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require("@smithy/core/retry");
8
- const { calculateBodyLength, Hash } = require("@smithy/core/serde");
9
- const { NodeHttpHandler: RequestHandler, streamCollector } = require("@smithy/node-http-handler");
10
- const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
11
- const getRuntimeConfig = (config) => {
12
- emitWarningIfUnsupportedVersion(process.version);
13
- const defaultsMode = resolveDefaultsModeConfig(config);
14
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
15
- const clientSharedValues = getSharedRuntimeConfig(config);
16
- awsCheckVersion(process.version);
17
- const loaderConfig = {
18
- profile: config?.profile,
19
- logger: clientSharedValues.logger,
20
- };
21
- return {
22
- ...clientSharedValues,
23
- ...config,
24
- runtime: "node",
25
- defaultsMode,
26
- authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
27
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
28
- credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
29
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
30
- maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
31
- region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
32
- requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
33
- retryMode: config?.retryMode ??
34
- loadNodeConfig({
35
- ...NODE_RETRY_MODE_CONFIG_OPTIONS,
36
- default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
37
- }, config),
38
- sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
39
- streamCollector: config?.streamCollector ?? streamCollector,
40
- useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
41
- useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
42
- userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
43
- };
44
- };
45
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,12 +0,0 @@
1
- const { Sha256 } = require("@aws-crypto/sha256-js");
2
- const { getRuntimeConfig: getBrowserRuntimeConfig } = require("./runtimeConfig.browser");
3
- const getRuntimeConfig = (config) => {
4
- const browserDefaults = getBrowserRuntimeConfig(config);
5
- return {
6
- ...browserDefaults,
7
- ...config,
8
- runtime: "react-native",
9
- sha256: config?.sha256 ?? Sha256,
10
- };
11
- };
12
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,38 +0,0 @@
1
- const { AwsSdkSigV4Signer } = require("@aws-sdk/core/httpAuthSchemes");
2
- const { AwsJson1_1Protocol } = require("@aws-sdk/core/protocols");
3
- const { NoOpLogger } = require("@smithy/core/client");
4
- const { parseUrl } = require("@smithy/core/protocols");
5
- const { fromBase64, fromUtf8, toBase64, toUtf8 } = require("@smithy/core/serde");
6
- const { defaultPricingHttpAuthSchemeProvider } = require("./auth/httpAuthSchemeProvider");
7
- const { defaultEndpointResolver } = require("./endpoint/endpointResolver");
8
- const { errorTypeRegistries } = require("./schemas/schemas_0");
9
- exports.getRuntimeConfig = (config) => {
10
- return {
11
- apiVersion: "2017-10-15",
12
- base64Decoder: config?.base64Decoder ?? fromBase64,
13
- base64Encoder: config?.base64Encoder ?? toBase64,
14
- disableHostPrefix: config?.disableHostPrefix ?? false,
15
- endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
16
- extensions: config?.extensions ?? [],
17
- httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultPricingHttpAuthSchemeProvider,
18
- httpAuthSchemes: config?.httpAuthSchemes ?? [
19
- {
20
- schemeId: "aws.auth#sigv4",
21
- identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
22
- signer: new AwsSdkSigV4Signer(),
23
- },
24
- ],
25
- logger: config?.logger ?? new NoOpLogger(),
26
- protocol: config?.protocol ?? AwsJson1_1Protocol,
27
- protocolSettings: config?.protocolSettings ?? {
28
- defaultNamespace: "com.amazonaws.pricing",
29
- errorTypeRegistries,
30
- version: "2017-10-15",
31
- serviceTarget: "AWSPriceListService",
32
- },
33
- serviceId: config?.serviceId ?? "Pricing",
34
- urlParser: config?.urlParser ?? parseUrl,
35
- utf8Decoder: config?.utf8Decoder ?? fromUtf8,
36
- utf8Encoder: config?.utf8Encoder ?? toUtf8,
37
- };
38
- };
@@ -1,246 +0,0 @@
1
- const _ADE = "AccessDeniedException";
2
- const _AN = "AttributeName";
3
- const _ANt = "AttributeNames";
4
- const _AV = "AttributeValue";
5
- const _AVL = "AttributeValueList";
6
- const _AVt = "AttributeValues";
7
- const _CC = "CurrencyCode";
8
- const _DS = "DescribeServices";
9
- const _DSR = "DescribeServicesRequest";
10
- const _DSRe = "DescribeServicesResponse";
11
- const _ED = "EffectiveDate";
12
- const _ENTE = "ExpiredNextTokenException";
13
- const _F = "Filter";
14
- const _FF = "FileFormat";
15
- const _FFi = "FileFormats";
16
- const _FV = "FormatVersion";
17
- const _Fi = "Field";
18
- const _Fil = "Filters";
19
- const _GAV = "GetAttributeValues";
20
- const _GAVR = "GetAttributeValuesRequest";
21
- const _GAVRe = "GetAttributeValuesResponse";
22
- const _GP = "GetProducts";
23
- const _GPLFU = "GetPriceListFileUrl";
24
- const _GPLFUR = "GetPriceListFileUrlRequest";
25
- const _GPLFURe = "GetPriceListFileUrlResponse";
26
- const _GPR = "GetProductsRequest";
27
- const _GPRe = "GetProductsResponse";
28
- const _IEE = "InternalErrorException";
29
- const _INTE = "InvalidNextTokenException";
30
- const _IPE = "InvalidParameterException";
31
- const _LPL = "ListPriceLists";
32
- const _LPLR = "ListPriceListsRequest";
33
- const _LPLRi = "ListPriceListsResponse";
34
- const _M = "Message";
35
- const _MR = "MaxResults";
36
- const _NFE = "NotFoundException";
37
- const _NT = "NextToken";
38
- const _PL = "PriceList";
39
- const _PLA = "PriceListArn";
40
- const _PLJI = "PriceListJsonItems";
41
- const _PLr = "PriceLists";
42
- const _RC = "RegionCode";
43
- const _RNFE = "ResourceNotFoundException";
44
- const _S = "Services";
45
- const _SC = "ServiceCode";
46
- const _SJPLJI = "SynthesizedJsonPriceListJsonItem";
47
- const _SL = "ServiceList";
48
- const _Se = "Service";
49
- const _T = "Type";
50
- const _TE = "ThrottlingException";
51
- const _U = "Url";
52
- const _V = "Value";
53
- const _a = "application/json";
54
- const _c = "client";
55
- const _e = "error";
56
- const _hE = "httpError";
57
- const _mT = "mediaType";
58
- const _s = "smithy.ts.sdk.synthetic.com.amazonaws.pricing";
59
- const _se = "server";
60
- const n0 = "com.amazonaws.pricing";
61
- const { TypeRegistry } = require("@smithy/core/schema");
62
- const { AccessDeniedException, ExpiredNextTokenException, InternalErrorException, InvalidNextTokenException, InvalidParameterException, NotFoundException, ResourceNotFoundException, ThrottlingException } = require("../models/errors");
63
- const { PricingServiceException } = require("../models/PricingServiceException");
64
- const _s_registry = TypeRegistry.for(_s);
65
- const PricingServiceException$ = [-3, _s, "PricingServiceException", 0, [], []];
66
- exports.PricingServiceException$ = PricingServiceException$;
67
- _s_registry.registerError(PricingServiceException$, PricingServiceException);
68
- const n0_registry = TypeRegistry.for(n0);
69
- const AccessDeniedException$ = [-3, n0, _ADE,
70
- { [_e]: _c, [_hE]: 401 },
71
- [_M],
72
- [0]
73
- ];
74
- exports.AccessDeniedException$ = AccessDeniedException$;
75
- n0_registry.registerError(AccessDeniedException$, AccessDeniedException);
76
- const ExpiredNextTokenException$ = [-3, n0, _ENTE,
77
- { [_e]: _c, [_hE]: 400 },
78
- [_M],
79
- [0]
80
- ];
81
- exports.ExpiredNextTokenException$ = ExpiredNextTokenException$;
82
- n0_registry.registerError(ExpiredNextTokenException$, ExpiredNextTokenException);
83
- const InternalErrorException$ = [-3, n0, _IEE,
84
- { [_e]: _se, [_hE]: 500 },
85
- [_M],
86
- [0]
87
- ];
88
- exports.InternalErrorException$ = InternalErrorException$;
89
- n0_registry.registerError(InternalErrorException$, InternalErrorException);
90
- const InvalidNextTokenException$ = [-3, n0, _INTE,
91
- { [_e]: _c, [_hE]: 400 },
92
- [_M],
93
- [0]
94
- ];
95
- exports.InvalidNextTokenException$ = InvalidNextTokenException$;
96
- n0_registry.registerError(InvalidNextTokenException$, InvalidNextTokenException);
97
- const InvalidParameterException$ = [-3, n0, _IPE,
98
- { [_e]: _c, [_hE]: 400 },
99
- [_M],
100
- [0]
101
- ];
102
- exports.InvalidParameterException$ = InvalidParameterException$;
103
- n0_registry.registerError(InvalidParameterException$, InvalidParameterException);
104
- const NotFoundException$ = [-3, n0, _NFE,
105
- { [_e]: _c, [_hE]: 400 },
106
- [_M],
107
- [0]
108
- ];
109
- exports.NotFoundException$ = NotFoundException$;
110
- n0_registry.registerError(NotFoundException$, NotFoundException);
111
- const ResourceNotFoundException$ = [-3, n0, _RNFE,
112
- { [_e]: _c, [_hE]: 404 },
113
- [_M],
114
- [0]
115
- ];
116
- exports.ResourceNotFoundException$ = ResourceNotFoundException$;
117
- n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);
118
- const ThrottlingException$ = [-3, n0, _TE,
119
- { [_e]: _c, [_hE]: 429 },
120
- [_M],
121
- [0]
122
- ];
123
- exports.ThrottlingException$ = ThrottlingException$;
124
- n0_registry.registerError(ThrottlingException$, ThrottlingException);
125
- exports.errorTypeRegistries = [
126
- _s_registry,
127
- n0_registry,
128
- ];
129
- var SynthesizedJsonPriceListJsonItem = [0, n0, _SJPLJI, { [_mT]: _a }, 0];
130
- const AttributeValue$ = [3, n0, _AV,
131
- 0,
132
- [_V],
133
- [0]
134
- ];
135
- exports.AttributeValue$ = AttributeValue$;
136
- const DescribeServicesRequest$ = [3, n0, _DSR,
137
- 0,
138
- [_SC, _FV, _NT, _MR],
139
- [0, 0, 0, 1]
140
- ];
141
- exports.DescribeServicesRequest$ = DescribeServicesRequest$;
142
- const DescribeServicesResponse$ = [3, n0, _DSRe,
143
- 0,
144
- [_S, _FV, _NT],
145
- [() => ServiceList, 0, 0]
146
- ];
147
- exports.DescribeServicesResponse$ = DescribeServicesResponse$;
148
- const Filter$ = [3, n0, _F,
149
- 0,
150
- [_T, _Fi, _V],
151
- [0, 0, 0], 3
152
- ];
153
- exports.Filter$ = Filter$;
154
- const GetAttributeValuesRequest$ = [3, n0, _GAVR,
155
- 0,
156
- [_SC, _AN, _NT, _MR],
157
- [0, 0, 0, 1], 2
158
- ];
159
- exports.GetAttributeValuesRequest$ = GetAttributeValuesRequest$;
160
- const GetAttributeValuesResponse$ = [3, n0, _GAVRe,
161
- 0,
162
- [_AVt, _NT],
163
- [() => AttributeValueList, 0]
164
- ];
165
- exports.GetAttributeValuesResponse$ = GetAttributeValuesResponse$;
166
- const GetPriceListFileUrlRequest$ = [3, n0, _GPLFUR,
167
- 0,
168
- [_PLA, _FF],
169
- [0, 0], 2
170
- ];
171
- exports.GetPriceListFileUrlRequest$ = GetPriceListFileUrlRequest$;
172
- const GetPriceListFileUrlResponse$ = [3, n0, _GPLFURe,
173
- 0,
174
- [_U],
175
- [0]
176
- ];
177
- exports.GetPriceListFileUrlResponse$ = GetPriceListFileUrlResponse$;
178
- const GetProductsRequest$ = [3, n0, _GPR,
179
- 0,
180
- [_SC, _Fil, _FV, _NT, _MR],
181
- [0, () => Filters, 0, 0, 1], 1
182
- ];
183
- exports.GetProductsRequest$ = GetProductsRequest$;
184
- const GetProductsResponse$ = [3, n0, _GPRe,
185
- 0,
186
- [_FV, _PL, _NT],
187
- [0, [() => PriceListJsonItems, 0], 0]
188
- ];
189
- exports.GetProductsResponse$ = GetProductsResponse$;
190
- const ListPriceListsRequest$ = [3, n0, _LPLR,
191
- 0,
192
- [_SC, _ED, _CC, _RC, _NT, _MR],
193
- [0, 4, 0, 0, 0, 1], 3
194
- ];
195
- exports.ListPriceListsRequest$ = ListPriceListsRequest$;
196
- const ListPriceListsResponse$ = [3, n0, _LPLRi,
197
- 0,
198
- [_PLr, _NT],
199
- [() => PriceLists, 0]
200
- ];
201
- exports.ListPriceListsResponse$ = ListPriceListsResponse$;
202
- const PriceList$ = [3, n0, _PL,
203
- 0,
204
- [_PLA, _RC, _CC, _FFi],
205
- [0, 0, 0, 64 | 0]
206
- ];
207
- exports.PriceList$ = PriceList$;
208
- const Service$ = [3, n0, _Se,
209
- 0,
210
- [_SC, _ANt],
211
- [0, 64 | 0], 1
212
- ];
213
- exports.Service$ = Service$;
214
- var AttributeNameList = 64 | 0;
215
- var AttributeValueList = [1, n0, _AVL,
216
- 0, () => AttributeValue$
217
- ];
218
- var FileFormats = 64 | 0;
219
- var Filters = [1, n0, _Fil,
220
- 0, () => Filter$
221
- ];
222
- var PriceListJsonItems = [1, n0, _PLJI,
223
- 0, [() => SynthesizedJsonPriceListJsonItem,
224
- 0]
225
- ];
226
- var PriceLists = [1, n0, _PLr,
227
- 0, () => PriceList$
228
- ];
229
- var ServiceList = [1, n0, _SL,
230
- 0, () => Service$
231
- ];
232
- exports.DescribeServices$ = [9, n0, _DS,
233
- 0, () => DescribeServicesRequest$, () => DescribeServicesResponse$
234
- ];
235
- exports.GetAttributeValues$ = [9, n0, _GAV,
236
- 0, () => GetAttributeValuesRequest$, () => GetAttributeValuesResponse$
237
- ];
238
- exports.GetPriceListFileUrl$ = [9, n0, _GPLFU,
239
- 0, () => GetPriceListFileUrlRequest$, () => GetPriceListFileUrlResponse$
240
- ];
241
- exports.GetProducts$ = [9, n0, _GP,
242
- 0, () => GetProductsRequest$, () => GetProductsResponse$
243
- ];
244
- exports.ListPriceLists$ = [9, n0, _LPL,
245
- 0, () => ListPriceListsRequest$, () => ListPriceListsResponse$
246
- ];