@aws-sdk/client-pricing 3.315.0 → 3.316.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.
@@ -1,82 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Pricing = void 0;
4
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
4
5
  const DescribeServicesCommand_1 = require("./commands/DescribeServicesCommand");
5
6
  const GetAttributeValuesCommand_1 = require("./commands/GetAttributeValuesCommand");
6
7
  const GetPriceListFileUrlCommand_1 = require("./commands/GetPriceListFileUrlCommand");
7
8
  const GetProductsCommand_1 = require("./commands/GetProductsCommand");
8
9
  const ListPriceListsCommand_1 = require("./commands/ListPriceListsCommand");
9
10
  const PricingClient_1 = require("./PricingClient");
11
+ const commands = {
12
+ DescribeServicesCommand: DescribeServicesCommand_1.DescribeServicesCommand,
13
+ GetAttributeValuesCommand: GetAttributeValuesCommand_1.GetAttributeValuesCommand,
14
+ GetPriceListFileUrlCommand: GetPriceListFileUrlCommand_1.GetPriceListFileUrlCommand,
15
+ GetProductsCommand: GetProductsCommand_1.GetProductsCommand,
16
+ ListPriceListsCommand: ListPriceListsCommand_1.ListPriceListsCommand,
17
+ };
10
18
  class Pricing extends PricingClient_1.PricingClient {
11
- describeServices(args, optionsOrCb, cb) {
12
- const command = new DescribeServicesCommand_1.DescribeServicesCommand(args);
13
- if (typeof optionsOrCb === "function") {
14
- this.send(command, optionsOrCb);
15
- }
16
- else if (typeof cb === "function") {
17
- if (typeof optionsOrCb !== "object")
18
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
19
- this.send(command, optionsOrCb || {}, cb);
20
- }
21
- else {
22
- return this.send(command, optionsOrCb);
23
- }
24
- }
25
- getAttributeValues(args, optionsOrCb, cb) {
26
- const command = new GetAttributeValuesCommand_1.GetAttributeValuesCommand(args);
27
- if (typeof optionsOrCb === "function") {
28
- this.send(command, optionsOrCb);
29
- }
30
- else if (typeof cb === "function") {
31
- if (typeof optionsOrCb !== "object")
32
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
33
- this.send(command, optionsOrCb || {}, cb);
34
- }
35
- else {
36
- return this.send(command, optionsOrCb);
37
- }
38
- }
39
- getPriceListFileUrl(args, optionsOrCb, cb) {
40
- const command = new GetPriceListFileUrlCommand_1.GetPriceListFileUrlCommand(args);
41
- if (typeof optionsOrCb === "function") {
42
- this.send(command, optionsOrCb);
43
- }
44
- else if (typeof cb === "function") {
45
- if (typeof optionsOrCb !== "object")
46
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
47
- this.send(command, optionsOrCb || {}, cb);
48
- }
49
- else {
50
- return this.send(command, optionsOrCb);
51
- }
52
- }
53
- getProducts(args, optionsOrCb, cb) {
54
- const command = new GetProductsCommand_1.GetProductsCommand(args);
55
- if (typeof optionsOrCb === "function") {
56
- this.send(command, optionsOrCb);
57
- }
58
- else if (typeof cb === "function") {
59
- if (typeof optionsOrCb !== "object")
60
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
61
- this.send(command, optionsOrCb || {}, cb);
62
- }
63
- else {
64
- return this.send(command, optionsOrCb);
65
- }
66
- }
67
- listPriceLists(args, optionsOrCb, cb) {
68
- const command = new ListPriceListsCommand_1.ListPriceListsCommand(args);
69
- if (typeof optionsOrCb === "function") {
70
- this.send(command, optionsOrCb);
71
- }
72
- else if (typeof cb === "function") {
73
- if (typeof optionsOrCb !== "object")
74
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
75
- this.send(command, optionsOrCb || {}, cb);
76
- }
77
- else {
78
- return this.send(command, optionsOrCb);
79
- }
80
- }
81
19
  }
82
20
  exports.Pricing = Pricing;
21
+ (0, smithy_client_1.createAggregatedClient)(commands, Pricing);
@@ -1,78 +1,17 @@
1
+ import { createAggregatedClient } from "@aws-sdk/smithy-client";
1
2
  import { DescribeServicesCommand, } from "./commands/DescribeServicesCommand";
2
3
  import { GetAttributeValuesCommand, } from "./commands/GetAttributeValuesCommand";
3
4
  import { GetPriceListFileUrlCommand, } from "./commands/GetPriceListFileUrlCommand";
4
5
  import { GetProductsCommand } from "./commands/GetProductsCommand";
5
6
  import { ListPriceListsCommand, } from "./commands/ListPriceListsCommand";
6
7
  import { PricingClient } from "./PricingClient";
8
+ const commands = {
9
+ DescribeServicesCommand,
10
+ GetAttributeValuesCommand,
11
+ GetPriceListFileUrlCommand,
12
+ GetProductsCommand,
13
+ ListPriceListsCommand,
14
+ };
7
15
  export class Pricing extends PricingClient {
8
- describeServices(args, optionsOrCb, cb) {
9
- const command = new DescribeServicesCommand(args);
10
- if (typeof optionsOrCb === "function") {
11
- this.send(command, optionsOrCb);
12
- }
13
- else if (typeof cb === "function") {
14
- if (typeof optionsOrCb !== "object")
15
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
16
- this.send(command, optionsOrCb || {}, cb);
17
- }
18
- else {
19
- return this.send(command, optionsOrCb);
20
- }
21
- }
22
- getAttributeValues(args, optionsOrCb, cb) {
23
- const command = new GetAttributeValuesCommand(args);
24
- if (typeof optionsOrCb === "function") {
25
- this.send(command, optionsOrCb);
26
- }
27
- else if (typeof cb === "function") {
28
- if (typeof optionsOrCb !== "object")
29
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
30
- this.send(command, optionsOrCb || {}, cb);
31
- }
32
- else {
33
- return this.send(command, optionsOrCb);
34
- }
35
- }
36
- getPriceListFileUrl(args, optionsOrCb, cb) {
37
- const command = new GetPriceListFileUrlCommand(args);
38
- if (typeof optionsOrCb === "function") {
39
- this.send(command, optionsOrCb);
40
- }
41
- else if (typeof cb === "function") {
42
- if (typeof optionsOrCb !== "object")
43
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
44
- this.send(command, optionsOrCb || {}, cb);
45
- }
46
- else {
47
- return this.send(command, optionsOrCb);
48
- }
49
- }
50
- getProducts(args, optionsOrCb, cb) {
51
- const command = new GetProductsCommand(args);
52
- if (typeof optionsOrCb === "function") {
53
- this.send(command, optionsOrCb);
54
- }
55
- else if (typeof cb === "function") {
56
- if (typeof optionsOrCb !== "object")
57
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
58
- this.send(command, optionsOrCb || {}, cb);
59
- }
60
- else {
61
- return this.send(command, optionsOrCb);
62
- }
63
- }
64
- listPriceLists(args, optionsOrCb, cb) {
65
- const command = new ListPriceListsCommand(args);
66
- if (typeof optionsOrCb === "function") {
67
- this.send(command, optionsOrCb);
68
- }
69
- else if (typeof cb === "function") {
70
- if (typeof optionsOrCb !== "object")
71
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
72
- this.send(command, optionsOrCb || {}, cb);
73
- }
74
- else {
75
- return this.send(command, optionsOrCb);
76
- }
77
- }
78
16
  }
17
+ createAggregatedClient(commands, Pricing);
@@ -5,6 +5,38 @@ import { GetPriceListFileUrlCommandInput, GetPriceListFileUrlCommandOutput } fro
5
5
  import { GetProductsCommandInput, GetProductsCommandOutput } from "./commands/GetProductsCommand";
6
6
  import { ListPriceListsCommandInput, ListPriceListsCommandOutput } from "./commands/ListPriceListsCommand";
7
7
  import { PricingClient } from "./PricingClient";
8
+ export interface Pricing {
9
+ /**
10
+ * @see {@link DescribeServicesCommand}
11
+ */
12
+ describeServices(args: DescribeServicesCommandInput, options?: __HttpHandlerOptions): Promise<DescribeServicesCommandOutput>;
13
+ describeServices(args: DescribeServicesCommandInput, cb: (err: any, data?: DescribeServicesCommandOutput) => void): void;
14
+ describeServices(args: DescribeServicesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeServicesCommandOutput) => void): void;
15
+ /**
16
+ * @see {@link GetAttributeValuesCommand}
17
+ */
18
+ getAttributeValues(args: GetAttributeValuesCommandInput, options?: __HttpHandlerOptions): Promise<GetAttributeValuesCommandOutput>;
19
+ getAttributeValues(args: GetAttributeValuesCommandInput, cb: (err: any, data?: GetAttributeValuesCommandOutput) => void): void;
20
+ getAttributeValues(args: GetAttributeValuesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetAttributeValuesCommandOutput) => void): void;
21
+ /**
22
+ * @see {@link GetPriceListFileUrlCommand}
23
+ */
24
+ getPriceListFileUrl(args: GetPriceListFileUrlCommandInput, options?: __HttpHandlerOptions): Promise<GetPriceListFileUrlCommandOutput>;
25
+ getPriceListFileUrl(args: GetPriceListFileUrlCommandInput, cb: (err: any, data?: GetPriceListFileUrlCommandOutput) => void): void;
26
+ getPriceListFileUrl(args: GetPriceListFileUrlCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPriceListFileUrlCommandOutput) => void): void;
27
+ /**
28
+ * @see {@link GetProductsCommand}
29
+ */
30
+ getProducts(args: GetProductsCommandInput, options?: __HttpHandlerOptions): Promise<GetProductsCommandOutput>;
31
+ getProducts(args: GetProductsCommandInput, cb: (err: any, data?: GetProductsCommandOutput) => void): void;
32
+ getProducts(args: GetProductsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetProductsCommandOutput) => void): void;
33
+ /**
34
+ * @see {@link ListPriceListsCommand}
35
+ */
36
+ listPriceLists(args: ListPriceListsCommandInput, options?: __HttpHandlerOptions): Promise<ListPriceListsCommandOutput>;
37
+ listPriceLists(args: ListPriceListsCommandInput, cb: (err: any, data?: ListPriceListsCommandOutput) => void): void;
38
+ listPriceLists(args: ListPriceListsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListPriceListsCommandOutput) => void): void;
39
+ }
8
40
  /**
9
41
  * @public
10
42
  * <p>Amazon Web Services Price List API is a centralized and convenient way to
@@ -32,69 +64,5 @@ import { PricingClient } from "./PricingClient";
32
64
  * </li>
33
65
  * </ul>
34
66
  */
35
- export declare class Pricing extends PricingClient {
36
- /**
37
- * @public
38
- * <p>Returns the metadata for one service or a list of the metadata for all services. Use
39
- * this without a service code to get the service codes for all services.
40
- * Use it with a service code, such as <code>AmazonEC2</code>, to get information specific to
41
- * that service, such as the attribute
42
- * names available for that service. For example, some of the attribute names available for EC2 are
43
- * <code>volumeType</code>, <code>maxIopsVolume</code>, <code>operation</code>,
44
- * <code>locationType</code>, and <code>instanceCapacity10xlarge</code>.</p>
45
- */
46
- describeServices(args: DescribeServicesCommandInput, options?: __HttpHandlerOptions): Promise<DescribeServicesCommandOutput>;
47
- describeServices(args: DescribeServicesCommandInput, cb: (err: any, data?: DescribeServicesCommandOutput) => void): void;
48
- describeServices(args: DescribeServicesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeServicesCommandOutput) => void): void;
49
- /**
50
- * @public
51
- * <p>Returns a list of attribute values. Attributes are similar to the details
52
- * in a Price List API offer file. For a list of available attributes, see
53
- * <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/reading-an-offer.html#pps-defs">Offer File Definitions</a>
54
- * in the <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-what-is.html">Billing and Cost Management User Guide</a>.</p>
55
- */
56
- getAttributeValues(args: GetAttributeValuesCommandInput, options?: __HttpHandlerOptions): Promise<GetAttributeValuesCommandOutput>;
57
- getAttributeValues(args: GetAttributeValuesCommandInput, cb: (err: any, data?: GetAttributeValuesCommandOutput) => void): void;
58
- getAttributeValues(args: GetAttributeValuesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetAttributeValuesCommandOutput) => void): void;
59
- /**
60
- * @public
61
- * <p>
62
- * <i>
63
- * <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>
64
- * </i>
65
- * </p>
66
- * <p>This returns the URL that you can retrieve your Price List file from. This URL is based on
67
- * 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">
68
- * <code>ListPriceLists</code>
69
- * </a> response. </p>
70
- */
71
- getPriceListFileUrl(args: GetPriceListFileUrlCommandInput, options?: __HttpHandlerOptions): Promise<GetPriceListFileUrlCommandOutput>;
72
- getPriceListFileUrl(args: GetPriceListFileUrlCommandInput, cb: (err: any, data?: GetPriceListFileUrlCommandOutput) => void): void;
73
- getPriceListFileUrl(args: GetPriceListFileUrlCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPriceListFileUrlCommandOutput) => void): void;
74
- /**
75
- * @public
76
- * <p>Returns a list of all products that match the filter criteria.</p>
77
- */
78
- getProducts(args: GetProductsCommandInput, options?: __HttpHandlerOptions): Promise<GetProductsCommandOutput>;
79
- getProducts(args: GetProductsCommandInput, cb: (err: any, data?: GetProductsCommandOutput) => void): void;
80
- getProducts(args: GetProductsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetProductsCommandOutput) => void): void;
81
- /**
82
- * @public
83
- * <p>
84
- * <i>
85
- * <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>
86
- * </i>
87
- * </p>
88
- * <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>.
89
- * Use without a <code>RegionCode</code> filter to list Price List references from all
90
- * available Amazon Web Services Regions. Use with a <code>RegionCode</code> filter to get the
91
- * Price List reference that's specific to a specific Amazon Web Services Region. You can use
92
- * the <code>PriceListArn</code> from the response to get your preferred Price List files
93
- * through the <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_GetPriceListFileUrl.html">
94
- * <code>GetPriceListFileUrl</code>
95
- * </a> API.</p>
96
- */
97
- listPriceLists(args: ListPriceListsCommandInput, options?: __HttpHandlerOptions): Promise<ListPriceListsCommandOutput>;
98
- listPriceLists(args: ListPriceListsCommandInput, cb: (err: any, data?: ListPriceListsCommandOutput) => void): void;
99
- listPriceLists(args: ListPriceListsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListPriceListsCommandOutput) => void): void;
67
+ export declare class Pricing extends PricingClient implements Pricing {
100
68
  }
@@ -20,7 +20,7 @@ import {
20
20
  ListPriceListsCommandOutput,
21
21
  } from "./commands/ListPriceListsCommand";
22
22
  import { PricingClient } from "./PricingClient";
23
- export declare class Pricing extends PricingClient {
23
+ export interface Pricing {
24
24
  describeServices(
25
25
  args: DescribeServicesCommandInput,
26
26
  options?: __HttpHandlerOptions
@@ -87,3 +87,4 @@ export declare class Pricing extends PricingClient {
87
87
  cb: (err: any, data?: ListPriceListsCommandOutput) => void
88
88
  ): void;
89
89
  }
90
+ export declare class Pricing extends PricingClient implements Pricing {}
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.315.0",
4
+ "version": "3.316.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -21,9 +21,9 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "3.0.0",
23
23
  "@aws-crypto/sha256-js": "3.0.0",
24
- "@aws-sdk/client-sts": "3.315.0",
24
+ "@aws-sdk/client-sts": "3.316.0",
25
25
  "@aws-sdk/config-resolver": "3.310.0",
26
- "@aws-sdk/credential-provider-node": "3.315.0",
26
+ "@aws-sdk/credential-provider-node": "3.316.0",
27
27
  "@aws-sdk/fetch-http-handler": "3.310.0",
28
28
  "@aws-sdk/hash-node": "3.310.0",
29
29
  "@aws-sdk/invalid-dependency": "3.310.0",
@@ -40,14 +40,14 @@
40
40
  "@aws-sdk/node-config-provider": "3.310.0",
41
41
  "@aws-sdk/node-http-handler": "3.310.0",
42
42
  "@aws-sdk/protocol-http": "3.310.0",
43
- "@aws-sdk/smithy-client": "3.315.0",
43
+ "@aws-sdk/smithy-client": "3.316.0",
44
44
  "@aws-sdk/types": "3.310.0",
45
45
  "@aws-sdk/url-parser": "3.310.0",
46
46
  "@aws-sdk/util-base64": "3.310.0",
47
47
  "@aws-sdk/util-body-length-browser": "3.310.0",
48
48
  "@aws-sdk/util-body-length-node": "3.310.0",
49
- "@aws-sdk/util-defaults-mode-browser": "3.315.0",
50
- "@aws-sdk/util-defaults-mode-node": "3.315.0",
49
+ "@aws-sdk/util-defaults-mode-browser": "3.316.0",
50
+ "@aws-sdk/util-defaults-mode-node": "3.316.0",
51
51
  "@aws-sdk/util-endpoints": "3.310.0",
52
52
  "@aws-sdk/util-retry": "3.310.0",
53
53
  "@aws-sdk/util-user-agent-browser": "3.310.0",