@aws-sdk/client-cost-optimization-hub 3.458.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/LICENSE +201 -0
- package/README.md +268 -0
- package/dist-cjs/CostOptimizationHub.js +25 -0
- package/dist-cjs/CostOptimizationHubClient.js +43 -0
- package/dist-cjs/commands/GetPreferencesCommand.js +51 -0
- package/dist-cjs/commands/GetRecommendationCommand.js +51 -0
- package/dist-cjs/commands/ListEnrollmentStatusesCommand.js +51 -0
- package/dist-cjs/commands/ListRecommendationSummariesCommand.js +51 -0
- package/dist-cjs/commands/ListRecommendationsCommand.js +51 -0
- package/dist-cjs/commands/UpdateEnrollmentStatusCommand.js +51 -0
- package/dist-cjs/commands/UpdatePreferencesCommand.js +51 -0
- package/dist-cjs/commands/index.js +10 -0
- package/dist-cjs/endpoint/EndpointParameters.js +12 -0
- package/dist-cjs/endpoint/endpointResolver.js +12 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/extensionConfiguration.js +2 -0
- package/dist-cjs/index.js +12 -0
- package/dist-cjs/models/CostOptimizationHubServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +158 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListEnrollmentStatusesPaginator.js +29 -0
- package/dist-cjs/pagination/ListRecommendationSummariesPaginator.js +29 -0
- package/dist-cjs/pagination/ListRecommendationsPaginator.js +29 -0
- package/dist-cjs/pagination/index.js +7 -0
- package/dist-cjs/protocols/Aws_json1_0.js +830 -0
- package/dist-cjs/runtimeConfig.browser.js +39 -0
- package/dist-cjs/runtimeConfig.js +50 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +24 -0
- package/dist-cjs/runtimeExtensions.js +22 -0
- package/dist-es/CostOptimizationHub.js +21 -0
- package/dist-es/CostOptimizationHubClient.js +39 -0
- package/dist-es/commands/GetPreferencesCommand.js +47 -0
- package/dist-es/commands/GetRecommendationCommand.js +47 -0
- package/dist-es/commands/ListEnrollmentStatusesCommand.js +47 -0
- package/dist-es/commands/ListRecommendationSummariesCommand.js +47 -0
- package/dist-es/commands/ListRecommendationsCommand.js +47 -0
- package/dist-es/commands/UpdateEnrollmentStatusCommand.js +47 -0
- package/dist-es/commands/UpdatePreferencesCommand.js +47 -0
- package/dist-es/commands/index.js +7 -0
- package/dist-es/endpoint/EndpointParameters.js +8 -0
- package/dist-es/endpoint/endpointResolver.js +8 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +7 -0
- package/dist-es/models/CostOptimizationHubServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +150 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListEnrollmentStatusesPaginator.js +25 -0
- package/dist-es/pagination/ListRecommendationSummariesPaginator.js +25 -0
- package/dist-es/pagination/ListRecommendationsPaginator.js +25 -0
- package/dist-es/pagination/index.js +4 -0
- package/dist-es/protocols/Aws_json1_0.js +813 -0
- package/dist-es/runtimeConfig.browser.js +34 -0
- package/dist-es/runtimeConfig.js +45 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +20 -0
- package/dist-es/runtimeExtensions.js +18 -0
- package/dist-types/CostOptimizationHub.d.ts +66 -0
- package/dist-types/CostOptimizationHubClient.d.ts +183 -0
- package/dist-types/commands/GetPreferencesCommand.d.ts +89 -0
- package/dist-types/commands/GetRecommendationCommand.d.ts +647 -0
- package/dist-types/commands/ListEnrollmentStatusesCommand.d.ts +99 -0
- package/dist-types/commands/ListRecommendationSummariesCommand.d.ts +138 -0
- package/dist-types/commands/ListRecommendationsCommand.d.ts +157 -0
- package/dist-types/commands/UpdateEnrollmentStatusCommand.d.ts +94 -0
- package/dist-types/commands/UpdatePreferencesCommand.d.ts +91 -0
- package/dist-types/commands/index.d.ts +7 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +22 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +8 -0
- package/dist-types/index.d.ts +22 -0
- package/dist-types/models/CostOptimizationHubServiceException.d.ts +13 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +2141 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListEnrollmentStatusesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListRecommendationSummariesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListRecommendationsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +4 -0
- package/dist-types/protocols/Aws_json1_0.d.ts +65 -0
- package/dist-types/runtimeConfig.browser.d.ts +46 -0
- package/dist-types/runtimeConfig.d.ts +46 -0
- package/dist-types/runtimeConfig.native.d.ts +45 -0
- package/dist-types/runtimeConfig.shared.d.ts +19 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/ts3.4/CostOptimizationHub.d.ts +126 -0
- package/dist-types/ts3.4/CostOptimizationHubClient.d.ts +163 -0
- package/dist-types/ts3.4/commands/GetPreferencesCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetRecommendationCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListEnrollmentStatusesCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListRecommendationSummariesCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListRecommendationsCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/UpdateEnrollmentStatusCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/UpdatePreferencesCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/index.d.ts +7 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +33 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +7 -0
- package/dist-types/ts3.4/index.d.ts +10 -0
- package/dist-types/ts3.4/models/CostOptimizationHubServiceException.d.ts +8 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +734 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListEnrollmentStatusesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListRecommendationSummariesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListRecommendationsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +4 -0
- package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +89 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +99 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +99 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +90 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +21 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +13 -0
- package/package.json +102 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
3
|
+
import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
|
|
4
|
+
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver";
|
|
5
|
+
import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
|
|
6
|
+
import { invalidProvider } from "@smithy/invalid-dependency";
|
|
7
|
+
import { calculateBodyLength } from "@smithy/util-body-length-browser";
|
|
8
|
+
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry";
|
|
9
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
10
|
+
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
11
|
+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
|
|
12
|
+
export const getRuntimeConfig = (config) => {
|
|
13
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
14
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
15
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
16
|
+
return {
|
|
17
|
+
...clientSharedValues,
|
|
18
|
+
...config,
|
|
19
|
+
runtime: "browser",
|
|
20
|
+
defaultsMode,
|
|
21
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
22
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
23
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
24
|
+
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
25
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
26
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
27
|
+
requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
|
|
28
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
29
|
+
sha256: config?.sha256 ?? Sha256,
|
|
30
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
31
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
32
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
|
|
3
|
+
import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core";
|
|
4
|
+
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
5
|
+
import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
|
|
6
|
+
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver";
|
|
7
|
+
import { Hash } from "@smithy/hash-node";
|
|
8
|
+
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
|
|
9
|
+
import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
|
|
10
|
+
import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
|
|
11
|
+
import { calculateBodyLength } from "@smithy/util-body-length-node";
|
|
12
|
+
import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
|
|
13
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
14
|
+
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
15
|
+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
|
|
16
|
+
import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client";
|
|
17
|
+
export const getRuntimeConfig = (config) => {
|
|
18
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
19
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
20
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
21
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
22
|
+
awsCheckVersion(process.version);
|
|
23
|
+
return {
|
|
24
|
+
...clientSharedValues,
|
|
25
|
+
...config,
|
|
26
|
+
runtime: "node",
|
|
27
|
+
defaultsMode,
|
|
28
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
29
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
|
|
30
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
31
|
+
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
32
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
33
|
+
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
34
|
+
requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
|
|
35
|
+
retryMode: config?.retryMode ??
|
|
36
|
+
loadNodeConfig({
|
|
37
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
38
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
39
|
+
}),
|
|
40
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
41
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
42
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
|
|
43
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
2
|
+
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
|
|
3
|
+
export 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
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { NoOpLogger } from "@smithy/smithy-client";
|
|
2
|
+
import { parseUrl } from "@smithy/url-parser";
|
|
3
|
+
import { fromBase64, toBase64 } from "@smithy/util-base64";
|
|
4
|
+
import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
|
|
5
|
+
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
6
|
+
export const getRuntimeConfig = (config) => {
|
|
7
|
+
return {
|
|
8
|
+
apiVersion: "2022-07-26",
|
|
9
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
10
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
11
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
12
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
13
|
+
extensions: config?.extensions ?? [],
|
|
14
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
15
|
+
serviceId: config?.serviceId ?? "Cost Optimization Hub",
|
|
16
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
17
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
18
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver";
|
|
2
|
+
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http";
|
|
3
|
+
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client";
|
|
4
|
+
const asPartial = (t) => t;
|
|
5
|
+
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
6
|
+
const extensionConfiguration = {
|
|
7
|
+
...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)),
|
|
8
|
+
...asPartial(getDefaultExtensionConfiguration(runtimeConfig)),
|
|
9
|
+
...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)),
|
|
10
|
+
};
|
|
11
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
12
|
+
return {
|
|
13
|
+
...runtimeConfig,
|
|
14
|
+
...resolveAwsRegionExtensionConfiguration(extensionConfiguration),
|
|
15
|
+
...resolveDefaultRuntimeConfig(extensionConfiguration),
|
|
16
|
+
...resolveHttpHandlerRuntimeConfig(extensionConfiguration),
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
2
|
+
import { GetPreferencesCommandInput, GetPreferencesCommandOutput } from "./commands/GetPreferencesCommand";
|
|
3
|
+
import { GetRecommendationCommandInput, GetRecommendationCommandOutput } from "./commands/GetRecommendationCommand";
|
|
4
|
+
import { ListEnrollmentStatusesCommandInput, ListEnrollmentStatusesCommandOutput } from "./commands/ListEnrollmentStatusesCommand";
|
|
5
|
+
import { ListRecommendationsCommandInput, ListRecommendationsCommandOutput } from "./commands/ListRecommendationsCommand";
|
|
6
|
+
import { ListRecommendationSummariesCommandInput, ListRecommendationSummariesCommandOutput } from "./commands/ListRecommendationSummariesCommand";
|
|
7
|
+
import { UpdateEnrollmentStatusCommandInput, UpdateEnrollmentStatusCommandOutput } from "./commands/UpdateEnrollmentStatusCommand";
|
|
8
|
+
import { UpdatePreferencesCommandInput, UpdatePreferencesCommandOutput } from "./commands/UpdatePreferencesCommand";
|
|
9
|
+
import { CostOptimizationHubClient } from "./CostOptimizationHubClient";
|
|
10
|
+
export interface CostOptimizationHub {
|
|
11
|
+
/**
|
|
12
|
+
* @see {@link GetPreferencesCommand}
|
|
13
|
+
*/
|
|
14
|
+
getPreferences(args: GetPreferencesCommandInput, options?: __HttpHandlerOptions): Promise<GetPreferencesCommandOutput>;
|
|
15
|
+
getPreferences(args: GetPreferencesCommandInput, cb: (err: any, data?: GetPreferencesCommandOutput) => void): void;
|
|
16
|
+
getPreferences(args: GetPreferencesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPreferencesCommandOutput) => void): void;
|
|
17
|
+
/**
|
|
18
|
+
* @see {@link GetRecommendationCommand}
|
|
19
|
+
*/
|
|
20
|
+
getRecommendation(args: GetRecommendationCommandInput, options?: __HttpHandlerOptions): Promise<GetRecommendationCommandOutput>;
|
|
21
|
+
getRecommendation(args: GetRecommendationCommandInput, cb: (err: any, data?: GetRecommendationCommandOutput) => void): void;
|
|
22
|
+
getRecommendation(args: GetRecommendationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetRecommendationCommandOutput) => void): void;
|
|
23
|
+
/**
|
|
24
|
+
* @see {@link ListEnrollmentStatusesCommand}
|
|
25
|
+
*/
|
|
26
|
+
listEnrollmentStatuses(args: ListEnrollmentStatusesCommandInput, options?: __HttpHandlerOptions): Promise<ListEnrollmentStatusesCommandOutput>;
|
|
27
|
+
listEnrollmentStatuses(args: ListEnrollmentStatusesCommandInput, cb: (err: any, data?: ListEnrollmentStatusesCommandOutput) => void): void;
|
|
28
|
+
listEnrollmentStatuses(args: ListEnrollmentStatusesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListEnrollmentStatusesCommandOutput) => void): void;
|
|
29
|
+
/**
|
|
30
|
+
* @see {@link ListRecommendationsCommand}
|
|
31
|
+
*/
|
|
32
|
+
listRecommendations(args: ListRecommendationsCommandInput, options?: __HttpHandlerOptions): Promise<ListRecommendationsCommandOutput>;
|
|
33
|
+
listRecommendations(args: ListRecommendationsCommandInput, cb: (err: any, data?: ListRecommendationsCommandOutput) => void): void;
|
|
34
|
+
listRecommendations(args: ListRecommendationsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListRecommendationsCommandOutput) => void): void;
|
|
35
|
+
/**
|
|
36
|
+
* @see {@link ListRecommendationSummariesCommand}
|
|
37
|
+
*/
|
|
38
|
+
listRecommendationSummaries(args: ListRecommendationSummariesCommandInput, options?: __HttpHandlerOptions): Promise<ListRecommendationSummariesCommandOutput>;
|
|
39
|
+
listRecommendationSummaries(args: ListRecommendationSummariesCommandInput, cb: (err: any, data?: ListRecommendationSummariesCommandOutput) => void): void;
|
|
40
|
+
listRecommendationSummaries(args: ListRecommendationSummariesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListRecommendationSummariesCommandOutput) => void): void;
|
|
41
|
+
/**
|
|
42
|
+
* @see {@link UpdateEnrollmentStatusCommand}
|
|
43
|
+
*/
|
|
44
|
+
updateEnrollmentStatus(args: UpdateEnrollmentStatusCommandInput, options?: __HttpHandlerOptions): Promise<UpdateEnrollmentStatusCommandOutput>;
|
|
45
|
+
updateEnrollmentStatus(args: UpdateEnrollmentStatusCommandInput, cb: (err: any, data?: UpdateEnrollmentStatusCommandOutput) => void): void;
|
|
46
|
+
updateEnrollmentStatus(args: UpdateEnrollmentStatusCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateEnrollmentStatusCommandOutput) => void): void;
|
|
47
|
+
/**
|
|
48
|
+
* @see {@link UpdatePreferencesCommand}
|
|
49
|
+
*/
|
|
50
|
+
updatePreferences(args: UpdatePreferencesCommandInput, options?: __HttpHandlerOptions): Promise<UpdatePreferencesCommandOutput>;
|
|
51
|
+
updatePreferences(args: UpdatePreferencesCommandInput, cb: (err: any, data?: UpdatePreferencesCommandOutput) => void): void;
|
|
52
|
+
updatePreferences(args: UpdatePreferencesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdatePreferencesCommandOutput) => void): void;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @public
|
|
56
|
+
* <p>You can use the Cost Optimization Hub API to programmatically identify, filter, aggregate,
|
|
57
|
+
* and quantify savings for your cost optimization recommendations across multiple Amazon Web Services Regions and Amazon Web Services accounts in your organization.</p>
|
|
58
|
+
* <p>The Cost Optimization Hub API provides the following endpoint:</p>
|
|
59
|
+
* <ul>
|
|
60
|
+
* <li>
|
|
61
|
+
* <p> https://cost-optimization-hub.us-east-1.amazonaws.com </p>
|
|
62
|
+
* </li>
|
|
63
|
+
* </ul>
|
|
64
|
+
*/
|
|
65
|
+
export declare class CostOptimizationHub extends CostOptimizationHubClient implements CostOptimizationHub {
|
|
66
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
|
|
2
|
+
import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-signing";
|
|
3
|
+
import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
4
|
+
import { Credentials as __Credentials } from "@aws-sdk/types";
|
|
5
|
+
import { RegionInputConfig, RegionResolvedConfig } from "@smithy/config-resolver";
|
|
6
|
+
import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-endpoint";
|
|
7
|
+
import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
|
|
8
|
+
import { HttpHandler as __HttpHandler } from "@smithy/protocol-http";
|
|
9
|
+
import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
|
|
10
|
+
import { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
11
|
+
import { GetPreferencesCommandInput, GetPreferencesCommandOutput } from "./commands/GetPreferencesCommand";
|
|
12
|
+
import { GetRecommendationCommandInput, GetRecommendationCommandOutput } from "./commands/GetRecommendationCommand";
|
|
13
|
+
import { ListEnrollmentStatusesCommandInput, ListEnrollmentStatusesCommandOutput } from "./commands/ListEnrollmentStatusesCommand";
|
|
14
|
+
import { ListRecommendationsCommandInput, ListRecommendationsCommandOutput } from "./commands/ListRecommendationsCommand";
|
|
15
|
+
import { ListRecommendationSummariesCommandInput, ListRecommendationSummariesCommandOutput } from "./commands/ListRecommendationSummariesCommand";
|
|
16
|
+
import { UpdateEnrollmentStatusCommandInput, UpdateEnrollmentStatusCommandOutput } from "./commands/UpdateEnrollmentStatusCommand";
|
|
17
|
+
import { UpdatePreferencesCommandInput, UpdatePreferencesCommandOutput } from "./commands/UpdatePreferencesCommand";
|
|
18
|
+
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
|
|
19
|
+
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
20
|
+
export { __Client };
|
|
21
|
+
/**
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
export type ServiceInputTypes = GetPreferencesCommandInput | GetRecommendationCommandInput | ListEnrollmentStatusesCommandInput | ListRecommendationSummariesCommandInput | ListRecommendationsCommandInput | UpdateEnrollmentStatusCommandInput | UpdatePreferencesCommandInput;
|
|
25
|
+
/**
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
export type ServiceOutputTypes = GetPreferencesCommandOutput | GetRecommendationCommandOutput | ListEnrollmentStatusesCommandOutput | ListRecommendationSummariesCommandOutput | ListRecommendationsCommandOutput | UpdateEnrollmentStatusCommandOutput | UpdatePreferencesCommandOutput;
|
|
29
|
+
/**
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
32
|
+
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
|
|
33
|
+
/**
|
|
34
|
+
* The HTTP handler to use. Fetch in browser and Https in Nodejs.
|
|
35
|
+
*/
|
|
36
|
+
requestHandler?: __HttpHandler;
|
|
37
|
+
/**
|
|
38
|
+
* A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface
|
|
39
|
+
* that computes the SHA-256 HMAC or checksum of a string or binary buffer.
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
sha256?: __ChecksumConstructor | __HashConstructor;
|
|
43
|
+
/**
|
|
44
|
+
* The function that will be used to convert strings into HTTP endpoints.
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
urlParser?: __UrlParser;
|
|
48
|
+
/**
|
|
49
|
+
* A function that can calculate the length of a request body.
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
bodyLengthChecker?: __BodyLengthCalculator;
|
|
53
|
+
/**
|
|
54
|
+
* A function that converts a stream into an array of bytes.
|
|
55
|
+
* @internal
|
|
56
|
+
*/
|
|
57
|
+
streamCollector?: __StreamCollector;
|
|
58
|
+
/**
|
|
59
|
+
* The function that will be used to convert a base64-encoded string to a byte array.
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
base64Decoder?: __Decoder;
|
|
63
|
+
/**
|
|
64
|
+
* The function that will be used to convert binary data to a base64-encoded string.
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
base64Encoder?: __Encoder;
|
|
68
|
+
/**
|
|
69
|
+
* The function that will be used to convert a UTF8-encoded string to a byte array.
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
utf8Decoder?: __Decoder;
|
|
73
|
+
/**
|
|
74
|
+
* The function that will be used to convert binary data to a UTF-8 encoded string.
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
utf8Encoder?: __Encoder;
|
|
78
|
+
/**
|
|
79
|
+
* The runtime environment.
|
|
80
|
+
* @internal
|
|
81
|
+
*/
|
|
82
|
+
runtime?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Disable dynamically changing the endpoint of the client based on the hostPrefix
|
|
85
|
+
* trait of an operation.
|
|
86
|
+
*/
|
|
87
|
+
disableHostPrefix?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Unique service identifier.
|
|
90
|
+
* @internal
|
|
91
|
+
*/
|
|
92
|
+
serviceId?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Enables IPv6/IPv4 dualstack endpoint.
|
|
95
|
+
*/
|
|
96
|
+
useDualstackEndpoint?: boolean | __Provider<boolean>;
|
|
97
|
+
/**
|
|
98
|
+
* Enables FIPS compatible endpoints.
|
|
99
|
+
*/
|
|
100
|
+
useFipsEndpoint?: boolean | __Provider<boolean>;
|
|
101
|
+
/**
|
|
102
|
+
* The AWS region to which this client will send requests
|
|
103
|
+
*/
|
|
104
|
+
region?: string | __Provider<string>;
|
|
105
|
+
/**
|
|
106
|
+
* Default credentials provider; Not available in browser runtime.
|
|
107
|
+
* @internal
|
|
108
|
+
*/
|
|
109
|
+
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
|
|
110
|
+
/**
|
|
111
|
+
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
|
|
112
|
+
* @internal
|
|
113
|
+
*/
|
|
114
|
+
defaultUserAgentProvider?: Provider<__UserAgent>;
|
|
115
|
+
/**
|
|
116
|
+
* Value for how many times a request will be made at most in case of retry.
|
|
117
|
+
*/
|
|
118
|
+
maxAttempts?: number | __Provider<number>;
|
|
119
|
+
/**
|
|
120
|
+
* Specifies which retry algorithm to use.
|
|
121
|
+
* @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/
|
|
122
|
+
*
|
|
123
|
+
*/
|
|
124
|
+
retryMode?: string | __Provider<string>;
|
|
125
|
+
/**
|
|
126
|
+
* Optional logger for logging debug/info/warn/error.
|
|
127
|
+
*/
|
|
128
|
+
logger?: __Logger;
|
|
129
|
+
/**
|
|
130
|
+
* Optional extensions
|
|
131
|
+
*/
|
|
132
|
+
extensions?: RuntimeExtension[];
|
|
133
|
+
/**
|
|
134
|
+
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
135
|
+
*/
|
|
136
|
+
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* @public
|
|
140
|
+
*/
|
|
141
|
+
export type CostOptimizationHubClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointInputConfig<EndpointParameters> & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig & ClientInputEndpointParameters;
|
|
142
|
+
/**
|
|
143
|
+
* @public
|
|
144
|
+
*
|
|
145
|
+
* The configuration interface of CostOptimizationHubClient class constructor that set the region, credentials and other options.
|
|
146
|
+
*/
|
|
147
|
+
export interface CostOptimizationHubClientConfig extends CostOptimizationHubClientConfigType {
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* @public
|
|
151
|
+
*/
|
|
152
|
+
export type CostOptimizationHubClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & RetryResolvedConfig & HostHeaderResolvedConfig & AwsAuthResolvedConfig & UserAgentResolvedConfig & ClientResolvedEndpointParameters;
|
|
153
|
+
/**
|
|
154
|
+
* @public
|
|
155
|
+
*
|
|
156
|
+
* The resolved configuration interface of CostOptimizationHubClient class. This is resolved and normalized from the {@link CostOptimizationHubClientConfig | constructor configuration interface}.
|
|
157
|
+
*/
|
|
158
|
+
export interface CostOptimizationHubClientResolvedConfig extends CostOptimizationHubClientResolvedConfigType {
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* @public
|
|
162
|
+
* <p>You can use the Cost Optimization Hub API to programmatically identify, filter, aggregate,
|
|
163
|
+
* and quantify savings for your cost optimization recommendations across multiple Amazon Web Services Regions and Amazon Web Services accounts in your organization.</p>
|
|
164
|
+
* <p>The Cost Optimization Hub API provides the following endpoint:</p>
|
|
165
|
+
* <ul>
|
|
166
|
+
* <li>
|
|
167
|
+
* <p> https://cost-optimization-hub.us-east-1.amazonaws.com </p>
|
|
168
|
+
* </li>
|
|
169
|
+
* </ul>
|
|
170
|
+
*/
|
|
171
|
+
export declare class CostOptimizationHubClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, CostOptimizationHubClientResolvedConfig> {
|
|
172
|
+
/**
|
|
173
|
+
* The resolved configuration of CostOptimizationHubClient class. This is resolved and normalized from the {@link CostOptimizationHubClientConfig | constructor configuration interface}.
|
|
174
|
+
*/
|
|
175
|
+
readonly config: CostOptimizationHubClientResolvedConfig;
|
|
176
|
+
constructor(...[configuration]: __CheckOptionalClientConfig<CostOptimizationHubClientConfig>);
|
|
177
|
+
/**
|
|
178
|
+
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
179
|
+
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
180
|
+
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
181
|
+
*/
|
|
182
|
+
destroy(): void;
|
|
183
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
3
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
|
|
4
|
+
import { CostOptimizationHubClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CostOptimizationHubClient";
|
|
5
|
+
import { GetPreferencesRequest, GetPreferencesResponse } from "../models/models_0";
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export { __MetadataBearer, $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link GetPreferencesCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface GetPreferencesCommandInput extends GetPreferencesRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link GetPreferencesCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface GetPreferencesCommandOutput extends GetPreferencesResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
* <p>Returns a set of preferences for an account in order to add account-specific preferences
|
|
27
|
+
* into the service. These preferences impact how the savings associated with recommendations are
|
|
28
|
+
* presented—estimated savings after discounts or estimated savings before discounts, for
|
|
29
|
+
* example.</p>
|
|
30
|
+
* @example
|
|
31
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
32
|
+
* ```javascript
|
|
33
|
+
* import { CostOptimizationHubClient, GetPreferencesCommand } from "@aws-sdk/client-cost-optimization-hub"; // ES Modules import
|
|
34
|
+
* // const { CostOptimizationHubClient, GetPreferencesCommand } = require("@aws-sdk/client-cost-optimization-hub"); // CommonJS import
|
|
35
|
+
* const client = new CostOptimizationHubClient(config);
|
|
36
|
+
* const input = {};
|
|
37
|
+
* const command = new GetPreferencesCommand(input);
|
|
38
|
+
* const response = await client.send(command);
|
|
39
|
+
* // { // GetPreferencesResponse
|
|
40
|
+
* // savingsEstimationMode: "BeforeDiscounts" || "AfterDiscounts",
|
|
41
|
+
* // memberAccountDiscountVisibility: "All" || "None",
|
|
42
|
+
* // };
|
|
43
|
+
*
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @param GetPreferencesCommandInput - {@link GetPreferencesCommandInput}
|
|
47
|
+
* @returns {@link GetPreferencesCommandOutput}
|
|
48
|
+
* @see {@link GetPreferencesCommandInput} for command's `input` shape.
|
|
49
|
+
* @see {@link GetPreferencesCommandOutput} for command's `response` shape.
|
|
50
|
+
* @see {@link CostOptimizationHubClientResolvedConfig | config} for CostOptimizationHubClient's `config` shape.
|
|
51
|
+
*
|
|
52
|
+
* @throws {@link AccessDeniedException} (client fault)
|
|
53
|
+
* <p>You are not authorized to use this operation with the given parameters.</p>
|
|
54
|
+
*
|
|
55
|
+
* @throws {@link InternalServerException} (server fault)
|
|
56
|
+
* <p>An error on the server occurred during the processing of your request. Try again
|
|
57
|
+
* later.</p>
|
|
58
|
+
*
|
|
59
|
+
* @throws {@link ThrottlingException} (client fault)
|
|
60
|
+
* <p>The request was denied due to request throttling.</p>
|
|
61
|
+
*
|
|
62
|
+
* @throws {@link ValidationException} (client fault)
|
|
63
|
+
* <p>The input fails to satisfy the constraints specified by an Amazon Web Services
|
|
64
|
+
* service.</p>
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link CostOptimizationHubServiceException}
|
|
67
|
+
* <p>Base exception class for all service exceptions from CostOptimizationHub service.</p>
|
|
68
|
+
*
|
|
69
|
+
*/
|
|
70
|
+
export declare class GetPreferencesCommand extends $Command<GetPreferencesCommandInput, GetPreferencesCommandOutput, CostOptimizationHubClientResolvedConfig> {
|
|
71
|
+
readonly input: GetPreferencesCommandInput;
|
|
72
|
+
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
73
|
+
/**
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
constructor(input: GetPreferencesCommandInput);
|
|
77
|
+
/**
|
|
78
|
+
* @internal
|
|
79
|
+
*/
|
|
80
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CostOptimizationHubClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetPreferencesCommandInput, GetPreferencesCommandOutput>;
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
private serialize;
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
private deserialize;
|
|
89
|
+
}
|