@aws-sdk/client-pricing 3.35.0 → 3.38.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/CHANGELOG.md +47 -0
- package/dist-cjs/Pricing.js +0 -27
- package/dist-cjs/PricingClient.js +0 -32
- package/dist-cjs/commands/DescribeServicesCommand.js +0 -31
- package/dist-cjs/commands/GetAttributeValuesCommand.js +0 -28
- package/dist-cjs/commands/GetProductsCommand.js +0 -25
- package/dist-cjs/commands/index.js +6 -0
- package/dist-cjs/endpoints.js +1 -2
- package/dist-cjs/index.js +4 -10
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -43
- package/dist-cjs/pagination/DescribeServicesPaginator.js +0 -11
- package/dist-cjs/pagination/GetAttributeValuesPaginator.js +0 -11
- package/dist-cjs/pagination/GetProductsPaginator.js +0 -11
- package/dist-cjs/pagination/Interfaces.js +0 -1
- package/dist-cjs/pagination/index.js +7 -0
- package/dist-cjs/protocols/Aws_json1_1.js +0 -6
- package/dist-cjs/runtimeConfig.browser.js +1 -6
- package/dist-cjs/runtimeConfig.js +2 -7
- package/dist-cjs/runtimeConfig.native.js +0 -4
- package/dist-cjs/runtimeConfig.shared.js +0 -4
- package/dist-es/Pricing.js +0 -1
- package/dist-es/PricingClient.js +0 -1
- package/dist-es/commands/DescribeServicesCommand.js +0 -1
- package/dist-es/commands/GetAttributeValuesCommand.js +0 -1
- package/dist-es/commands/GetProductsCommand.js +0 -1
- package/dist-es/commands/index.js +3 -0
- package/dist-es/endpoints.js +1 -2
- package/dist-es/index.js +4 -10
- package/dist-es/models/index.js +0 -1
- package/dist-es/models/models_0.js +0 -1
- package/dist-es/pagination/DescribeServicesPaginator.js +0 -1
- package/dist-es/pagination/GetAttributeValuesPaginator.js +0 -1
- package/dist-es/pagination/GetProductsPaginator.js +0 -1
- package/dist-es/pagination/Interfaces.js +0 -1
- package/dist-es/pagination/index.js +4 -0
- package/dist-es/protocols/Aws_json1_1.js +0 -1
- package/dist-es/runtimeConfig.browser.js +1 -2
- package/dist-es/runtimeConfig.js +2 -3
- package/dist-es/runtimeConfig.native.js +0 -1
- package/dist-es/runtimeConfig.shared.js +0 -1
- package/dist-types/commands/index.d.ts +3 -0
- package/dist-types/index.d.ts +4 -9
- package/dist-types/pagination/index.d.ts +4 -0
- package/dist-types/ts3.4/Pricing.d.ts +4 -44
- package/dist-types/ts3.4/PricingClient.d.ts +24 -112
- package/dist-types/ts3.4/commands/DescribeServicesCommand.d.ts +2 -26
- package/dist-types/ts3.4/commands/GetAttributeValuesCommand.d.ts +2 -23
- package/dist-types/ts3.4/commands/GetProductsCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/index.d.ts +3 -0
- package/dist-types/ts3.4/index.d.ts +4 -9
- package/dist-types/ts3.4/models/models_0.d.ts +49 -173
- package/dist-types/ts3.4/pagination/index.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/package.json +33 -30
- package/dist-cjs/Pricing.js.map +0 -1
- package/dist-cjs/PricingClient.js.map +0 -1
- package/dist-cjs/commands/DescribeServicesCommand.js.map +0 -1
- package/dist-cjs/commands/GetAttributeValuesCommand.js.map +0 -1
- package/dist-cjs/commands/GetProductsCommand.js.map +0 -1
- package/dist-cjs/endpoints.js.map +0 -1
- package/dist-cjs/index.js.map +0 -1
- package/dist-cjs/models/index.js.map +0 -1
- package/dist-cjs/models/models_0.js.map +0 -1
- package/dist-cjs/pagination/DescribeServicesPaginator.js.map +0 -1
- package/dist-cjs/pagination/GetAttributeValuesPaginator.js.map +0 -1
- package/dist-cjs/pagination/GetProductsPaginator.js.map +0 -1
- package/dist-cjs/pagination/Interfaces.js.map +0 -1
- package/dist-cjs/protocols/Aws_json1_1.js.map +0 -1
- package/dist-cjs/runtimeConfig.browser.js.map +0 -1
- package/dist-cjs/runtimeConfig.js.map +0 -1
- package/dist-cjs/runtimeConfig.native.js.map +0 -1
- package/dist-cjs/runtimeConfig.shared.js.map +0 -1
- package/dist-es/Pricing.js.map +0 -1
- package/dist-es/PricingClient.js.map +0 -1
- package/dist-es/commands/DescribeServicesCommand.js.map +0 -1
- package/dist-es/commands/GetAttributeValuesCommand.js.map +0 -1
- package/dist-es/commands/GetProductsCommand.js.map +0 -1
- package/dist-es/endpoints.js.map +0 -1
- package/dist-es/index.js.map +0 -1
- package/dist-es/models/index.js.map +0 -1
- package/dist-es/models/models_0.js.map +0 -1
- package/dist-es/pagination/DescribeServicesPaginator.js.map +0 -1
- package/dist-es/pagination/GetAttributeValuesPaginator.js.map +0 -1
- package/dist-es/pagination/GetProductsPaginator.js.map +0 -1
- package/dist-es/pagination/Interfaces.js.map +0 -1
- package/dist-es/protocols/Aws_json1_1.js.map +0 -1
- package/dist-es/runtimeConfig.browser.js.map +0 -1
- package/dist-es/runtimeConfig.js.map +0 -1
- package/dist-es/runtimeConfig.native.js.map +0 -1
- package/dist-es/runtimeConfig.shared.js.map +0 -1
- package/jest.config.js +0 -4
- package/src/Pricing.ts +0 -141
- package/src/PricingClient.ts +0 -265
- package/src/commands/DescribeServicesCommand.ts +0 -101
- package/src/commands/GetAttributeValuesCommand.ts +0 -98
- package/src/commands/GetProductsCommand.ts +0 -95
- package/src/endpoints.ts +0 -57
- package/src/index.ts +0 -10
- package/src/models/index.ts +0 -1
- package/src/models/models_0.ts +0 -365
- package/src/pagination/DescribeServicesPaginator.ts +0 -59
- package/src/pagination/GetAttributeValuesPaginator.ts +0 -59
- package/src/pagination/GetProductsPaginator.ts +0 -55
- package/src/pagination/Interfaces.ts +0 -8
- package/src/protocols/Aws_json1_1.ts +0 -675
- package/src/runtimeConfig.browser.ts +0 -41
- package/src/runtimeConfig.native.ts +0 -17
- package/src/runtimeConfig.shared.ts +0 -17
- package/src/runtimeConfig.ts +0 -46
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -33
- package/tsconfig.types.json +0 -9
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
GetAttributeValuesCommand,
|
|
5
|
-
GetAttributeValuesCommandInput,
|
|
6
|
-
GetAttributeValuesCommandOutput,
|
|
7
|
-
} from "../commands/GetAttributeValuesCommand";
|
|
8
|
-
import { Pricing } from "../Pricing";
|
|
9
|
-
import { PricingClient } from "../PricingClient";
|
|
10
|
-
import { PricingPaginationConfiguration } from "./Interfaces";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
const makePagedClientRequest = async (
|
|
16
|
-
client: PricingClient,
|
|
17
|
-
input: GetAttributeValuesCommandInput,
|
|
18
|
-
...args: any
|
|
19
|
-
): Promise<GetAttributeValuesCommandOutput> => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
return await client.send(new GetAttributeValuesCommand(input), ...args);
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
const makePagedRequest = async (
|
|
27
|
-
client: Pricing,
|
|
28
|
-
input: GetAttributeValuesCommandInput,
|
|
29
|
-
...args: any
|
|
30
|
-
): Promise<GetAttributeValuesCommandOutput> => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return await client.getAttributeValues(input, ...args);
|
|
33
|
-
};
|
|
34
|
-
export async function* paginateGetAttributeValues(
|
|
35
|
-
config: PricingPaginationConfiguration,
|
|
36
|
-
input: GetAttributeValuesCommandInput,
|
|
37
|
-
...additionalArguments: any
|
|
38
|
-
): Paginator<GetAttributeValuesCommandOutput> {
|
|
39
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
40
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
41
|
-
let hasNext = true;
|
|
42
|
-
let page: GetAttributeValuesCommandOutput;
|
|
43
|
-
while (hasNext) {
|
|
44
|
-
input.NextToken = token;
|
|
45
|
-
input["MaxResults"] = config.pageSize;
|
|
46
|
-
if (config.client instanceof Pricing) {
|
|
47
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else if (config.client instanceof PricingClient) {
|
|
49
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Invalid client, expected Pricing | PricingClient");
|
|
52
|
-
}
|
|
53
|
-
yield page;
|
|
54
|
-
token = page.NextToken;
|
|
55
|
-
hasNext = !!token;
|
|
56
|
-
}
|
|
57
|
-
// @ts-ignore
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import { GetProductsCommand, GetProductsCommandInput, GetProductsCommandOutput } from "../commands/GetProductsCommand";
|
|
4
|
-
import { Pricing } from "../Pricing";
|
|
5
|
-
import { PricingClient } from "../PricingClient";
|
|
6
|
-
import { PricingPaginationConfiguration } from "./Interfaces";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @private
|
|
10
|
-
*/
|
|
11
|
-
const makePagedClientRequest = async (
|
|
12
|
-
client: PricingClient,
|
|
13
|
-
input: GetProductsCommandInput,
|
|
14
|
-
...args: any
|
|
15
|
-
): Promise<GetProductsCommandOutput> => {
|
|
16
|
-
// @ts-ignore
|
|
17
|
-
return await client.send(new GetProductsCommand(input), ...args);
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* @private
|
|
21
|
-
*/
|
|
22
|
-
const makePagedRequest = async (
|
|
23
|
-
client: Pricing,
|
|
24
|
-
input: GetProductsCommandInput,
|
|
25
|
-
...args: any
|
|
26
|
-
): Promise<GetProductsCommandOutput> => {
|
|
27
|
-
// @ts-ignore
|
|
28
|
-
return await client.getProducts(input, ...args);
|
|
29
|
-
};
|
|
30
|
-
export async function* paginateGetProducts(
|
|
31
|
-
config: PricingPaginationConfiguration,
|
|
32
|
-
input: GetProductsCommandInput,
|
|
33
|
-
...additionalArguments: any
|
|
34
|
-
): Paginator<GetProductsCommandOutput> {
|
|
35
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
36
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
37
|
-
let hasNext = true;
|
|
38
|
-
let page: GetProductsCommandOutput;
|
|
39
|
-
while (hasNext) {
|
|
40
|
-
input.NextToken = token;
|
|
41
|
-
input["MaxResults"] = config.pageSize;
|
|
42
|
-
if (config.client instanceof Pricing) {
|
|
43
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
44
|
-
} else if (config.client instanceof PricingClient) {
|
|
45
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
46
|
-
} else {
|
|
47
|
-
throw new Error("Invalid client, expected Pricing | PricingClient");
|
|
48
|
-
}
|
|
49
|
-
yield page;
|
|
50
|
-
token = page.NextToken;
|
|
51
|
-
hasNext = !!token;
|
|
52
|
-
}
|
|
53
|
-
// @ts-ignore
|
|
54
|
-
return undefined;
|
|
55
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PaginationConfiguration } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import { Pricing } from "../Pricing";
|
|
4
|
-
import { PricingClient } from "../PricingClient";
|
|
5
|
-
|
|
6
|
-
export interface PricingPaginationConfiguration extends PaginationConfiguration {
|
|
7
|
-
client: Pricing | PricingClient;
|
|
8
|
-
}
|