@aws-sdk/client-bcm-recommended-actions 3.868.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 +216 -0
- package/dist-cjs/BCMRecommendedActions.js +13 -0
- package/dist-cjs/BCMRecommendedActionsClient.js +52 -0
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
- package/dist-cjs/commands/ListRecommendedActionsCommand.js +26 -0
- package/dist-cjs/commands/index.js +4 -0
- package/dist-cjs/endpoint/EndpointParameters.js +15 -0
- package/dist-cjs/endpoint/endpointResolver.js +18 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/extensionConfiguration.js +2 -0
- package/dist-cjs/index.js +11 -0
- package/dist-cjs/models/BCMRecommendedActionsServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +112 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListRecommendedActionsPaginator.js +7 -0
- package/dist-cjs/pagination/index.js +5 -0
- package/dist-cjs/protocols/Aws_json1_0.js +125 -0
- package/dist-cjs/runtimeConfig.browser.js +39 -0
- package/dist-cjs/runtimeConfig.js +56 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +34 -0
- package/dist-cjs/runtimeExtensions.js +13 -0
- package/dist-es/BCMRecommendedActions.js +9 -0
- package/dist-es/BCMRecommendedActionsClient.js +48 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
- package/dist-es/commands/ListRecommendedActionsCommand.js +22 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/endpoint/EndpointParameters.js +11 -0
- package/dist-es/endpoint/endpointResolver.js +14 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +6 -0
- package/dist-es/models/BCMRecommendedActionsServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +105 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListRecommendedActionsPaginator.js +4 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_json1_0.js +120 -0
- package/dist-es/runtimeConfig.browser.js +34 -0
- package/dist-es/runtimeConfig.js +51 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +30 -0
- package/dist-es/runtimeExtensions.js +9 -0
- package/dist-types/BCMRecommendedActions.d.ts +18 -0
- package/dist-types/BCMRecommendedActionsClient.d.ts +188 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
- package/dist-types/commands/ListRecommendedActionsCommand.d.ts +112 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +32 -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 +9 -0
- package/dist-types/index.d.ts +14 -0
- package/dist-types/models/BCMRecommendedActionsServiceException.d.ts +14 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +289 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListRecommendedActionsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/protocols/Aws_json1_0.d.ts +11 -0
- package/dist-types/runtimeConfig.browser.d.ts +50 -0
- package/dist-types/runtimeConfig.d.ts +50 -0
- package/dist-types/runtimeConfig.native.d.ts +49 -0
- package/dist-types/runtimeConfig.shared.d.ts +21 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/ts3.4/BCMRecommendedActions.d.ts +25 -0
- package/dist-types/ts3.4/BCMRecommendedActionsClient.d.ts +126 -0
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +47 -0
- package/dist-types/ts3.4/commands/ListRecommendedActionsCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +45 -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 +9 -0
- package/dist-types/ts3.4/index.d.ts +9 -0
- package/dist-types/ts3.4/models/BCMRecommendedActionsServiceException.d.ts +9 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +122 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListRecommendedActionsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +17 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +93 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +91 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +97 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +23 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +13 -0
- package/package.json +99 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const l = "ref";
|
|
2
|
+
const a = true, b = false, c = "isSet", d = "error", e = "endpoint", f = "tree", g = { "required": false, "type": "String" }, h = { [l]: "Endpoint" }, i = { "authSchemes": [{ "name": "sigv4", "signingRegion": "{PartitionResult#implicitGlobalRegion}" }] }, j = [{ "fn": "booleanEquals", "argv": [{ [l]: "UseFIPS" }, true] }], k = [{ [l]: "Region" }];
|
|
3
|
+
const _data = { version: "1.0", parameters: { UseFIPS: { required: a, default: b, type: "Boolean" }, Endpoint: g, Region: g }, rules: [{ conditions: [{ fn: c, argv: [h] }], rules: [{ conditions: j, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { endpoint: { url: h, properties: {}, headers: {} }, type: e }], type: f }, { rules: [{ conditions: [{ fn: c, argv: k }], rules: [{ conditions: [{ fn: "aws.partition", argv: k, assign: "PartitionResult" }], rules: [{ conditions: j, endpoint: { url: "https://bcm-recommended-actions-fips.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dualStackDnsSuffix}", properties: i, headers: {} }, type: e }, { endpoint: { url: "https://bcm-recommended-actions.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dualStackDnsSuffix}", properties: i, headers: {} }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }], type: f }] };
|
|
4
|
+
export const ruleSet = _data;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist-es/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from "./BCMRecommendedActionsClient";
|
|
2
|
+
export * from "./BCMRecommendedActions";
|
|
3
|
+
export * from "./commands";
|
|
4
|
+
export * from "./pagination";
|
|
5
|
+
export * from "./models";
|
|
6
|
+
export { BCMRecommendedActionsServiceException } from "./models/BCMRecommendedActionsServiceException";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ServiceException as __ServiceException, } from "@smithy/smithy-client";
|
|
2
|
+
export { __ServiceException };
|
|
3
|
+
export class BCMRecommendedActionsServiceException extends __ServiceException {
|
|
4
|
+
constructor(options) {
|
|
5
|
+
super(options);
|
|
6
|
+
Object.setPrototypeOf(this, BCMRecommendedActionsServiceException.prototype);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./models_0";
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { BCMRecommendedActionsServiceException as __BaseException } from "./BCMRecommendedActionsServiceException";
|
|
2
|
+
export class AccessDeniedException extends __BaseException {
|
|
3
|
+
name = "AccessDeniedException";
|
|
4
|
+
$fault = "client";
|
|
5
|
+
constructor(opts) {
|
|
6
|
+
super({
|
|
7
|
+
name: "AccessDeniedException",
|
|
8
|
+
$fault: "client",
|
|
9
|
+
...opts,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export const FilterName = {
|
|
15
|
+
FEATURE: "FEATURE",
|
|
16
|
+
SEVERITY: "SEVERITY",
|
|
17
|
+
TYPE: "TYPE",
|
|
18
|
+
};
|
|
19
|
+
export const MatchOption = {
|
|
20
|
+
EQUALS: "EQUALS",
|
|
21
|
+
NOT_EQUALS: "NOT_EQUALS",
|
|
22
|
+
};
|
|
23
|
+
export const ActionType = {
|
|
24
|
+
ADD_ALTERNATE_BILLING_CONTACT: "ADD_ALTERNATE_BILLING_CONTACT",
|
|
25
|
+
CREATE_ANOMALY_MONITOR: "CREATE_ANOMALY_MONITOR",
|
|
26
|
+
CREATE_BUDGET: "CREATE_BUDGET",
|
|
27
|
+
ENABLE_COST_OPTIMIZATION_HUB: "ENABLE_COST_OPTIMIZATION_HUB",
|
|
28
|
+
MIGRATE_TO_GRANULAR_PERMISSIONS: "MIGRATE_TO_GRANULAR_PERMISSIONS",
|
|
29
|
+
PAYMENTS_DUE: "PAYMENTS_DUE",
|
|
30
|
+
PAYMENTS_PAST_DUE: "PAYMENTS_PAST_DUE",
|
|
31
|
+
REVIEW_ANOMALIES: "REVIEW_ANOMALIES",
|
|
32
|
+
REVIEW_BUDGETS_EXCEEDED: "REVIEW_BUDGETS_EXCEEDED",
|
|
33
|
+
REVIEW_BUDGET_ALERTS: "REVIEW_BUDGET_ALERTS",
|
|
34
|
+
REVIEW_EXPIRING_RI: "REVIEW_EXPIRING_RI",
|
|
35
|
+
REVIEW_EXPIRING_SP: "REVIEW_EXPIRING_SP",
|
|
36
|
+
REVIEW_FREETIER_USAGE_ALERTS: "REVIEW_FREETIER_USAGE_ALERTS",
|
|
37
|
+
REVIEW_SAVINGS_OPPORTUNITY_RECOMMENDATIONS: "REVIEW_SAVINGS_OPPORTUNITY_RECOMMENDATIONS",
|
|
38
|
+
UPDATE_EXPIRED_PAYMENT_METHOD: "UPDATE_EXPIRED_PAYMENT_METHOD",
|
|
39
|
+
UPDATE_INVALID_PAYMENT_METHOD: "UPDATE_INVALID_PAYMENT_METHOD",
|
|
40
|
+
UPDATE_TAX_EXEMPTION_CERTIFICATE: "UPDATE_TAX_EXEMPTION_CERTIFICATE",
|
|
41
|
+
UPDATE_TAX_REGISTRATION_NUMBER: "UPDATE_TAX_REGISTRATION_NUMBER",
|
|
42
|
+
};
|
|
43
|
+
export class InternalServerException extends __BaseException {
|
|
44
|
+
name = "InternalServerException";
|
|
45
|
+
$fault = "server";
|
|
46
|
+
constructor(opts) {
|
|
47
|
+
super({
|
|
48
|
+
name: "InternalServerException",
|
|
49
|
+
$fault: "server",
|
|
50
|
+
...opts,
|
|
51
|
+
});
|
|
52
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export const Feature = {
|
|
56
|
+
ACCOUNT: "ACCOUNT",
|
|
57
|
+
BUDGETS: "BUDGETS",
|
|
58
|
+
COST_ANOMALY_DETECTION: "COST_ANOMALY_DETECTION",
|
|
59
|
+
COST_OPTIMIZATION_HUB: "COST_OPTIMIZATION_HUB",
|
|
60
|
+
FREE_TIER: "FREE_TIER",
|
|
61
|
+
IAM: "IAM",
|
|
62
|
+
PAYMENTS: "PAYMENTS",
|
|
63
|
+
RESERVATIONS: "RESERVATIONS",
|
|
64
|
+
SAVINGS_PLANS: "SAVINGS_PLANS",
|
|
65
|
+
TAX_SETTINGS: "TAX_SETTINGS",
|
|
66
|
+
};
|
|
67
|
+
export const Severity = {
|
|
68
|
+
CRITICAL: "CRITICAL",
|
|
69
|
+
INFO: "INFO",
|
|
70
|
+
WARNING: "WARNING",
|
|
71
|
+
};
|
|
72
|
+
export class ThrottlingException extends __BaseException {
|
|
73
|
+
name = "ThrottlingException";
|
|
74
|
+
$fault = "client";
|
|
75
|
+
constructor(opts) {
|
|
76
|
+
super({
|
|
77
|
+
name: "ThrottlingException",
|
|
78
|
+
$fault: "client",
|
|
79
|
+
...opts,
|
|
80
|
+
});
|
|
81
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
export const ValidationExceptionReason = {
|
|
85
|
+
CANNOT_PARSE: "cannotParse",
|
|
86
|
+
FIELD_VALIDATION_FAILED: "fieldValidationFailed",
|
|
87
|
+
OTHER: "other",
|
|
88
|
+
UNKNOWN_OPERATION: "unknownOperation",
|
|
89
|
+
};
|
|
90
|
+
export class ValidationException extends __BaseException {
|
|
91
|
+
name = "ValidationException";
|
|
92
|
+
$fault = "client";
|
|
93
|
+
reason;
|
|
94
|
+
fieldList;
|
|
95
|
+
constructor(opts) {
|
|
96
|
+
super({
|
|
97
|
+
name: "ValidationException",
|
|
98
|
+
$fault: "client",
|
|
99
|
+
...opts,
|
|
100
|
+
});
|
|
101
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
102
|
+
this.reason = opts.reason;
|
|
103
|
+
this.fieldList = opts.fieldList;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { BCMRecommendedActionsClient } from "../BCMRecommendedActionsClient";
|
|
3
|
+
import { ListRecommendedActionsCommand, } from "../commands/ListRecommendedActionsCommand";
|
|
4
|
+
export const paginateListRecommendedActions = createPaginator(BCMRecommendedActionsClient, ListRecommendedActionsCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
2
|
+
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
3
|
+
import { _json, collectBody, decorateServiceException as __decorateServiceException, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
+
import { BCMRecommendedActionsServiceException as __BaseException } from "../models/BCMRecommendedActionsServiceException";
|
|
5
|
+
import { AccessDeniedException, InternalServerException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
6
|
+
export const se_ListRecommendedActionsCommand = async (input, context) => {
|
|
7
|
+
const headers = sharedHeaders("ListRecommendedActions");
|
|
8
|
+
let body;
|
|
9
|
+
body = JSON.stringify(_json(input));
|
|
10
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
11
|
+
};
|
|
12
|
+
export const de_ListRecommendedActionsCommand = async (output, context) => {
|
|
13
|
+
if (output.statusCode >= 300) {
|
|
14
|
+
return de_CommandError(output, context);
|
|
15
|
+
}
|
|
16
|
+
const data = await parseBody(output.body, context);
|
|
17
|
+
let contents = {};
|
|
18
|
+
contents = _json(data);
|
|
19
|
+
const response = {
|
|
20
|
+
$metadata: deserializeMetadata(output),
|
|
21
|
+
...contents,
|
|
22
|
+
};
|
|
23
|
+
return response;
|
|
24
|
+
};
|
|
25
|
+
const de_CommandError = async (output, context) => {
|
|
26
|
+
const parsedOutput = {
|
|
27
|
+
...output,
|
|
28
|
+
body: await parseErrorBody(output.body, context),
|
|
29
|
+
};
|
|
30
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
31
|
+
switch (errorCode) {
|
|
32
|
+
case "AccessDeniedException":
|
|
33
|
+
case "com.amazonaws.bcmrecommendedactions#AccessDeniedException":
|
|
34
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
35
|
+
case "InternalServerException":
|
|
36
|
+
case "com.amazonaws.bcmrecommendedactions#InternalServerException":
|
|
37
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
38
|
+
case "ThrottlingException":
|
|
39
|
+
case "com.amazonaws.bcmrecommendedactions#ThrottlingException":
|
|
40
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
41
|
+
case "ValidationException":
|
|
42
|
+
case "com.amazonaws.bcmrecommendedactions#ValidationException":
|
|
43
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
44
|
+
default:
|
|
45
|
+
const parsedBody = parsedOutput.body;
|
|
46
|
+
return throwDefaultError({
|
|
47
|
+
output,
|
|
48
|
+
parsedBody,
|
|
49
|
+
errorCode,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
54
|
+
const body = parsedOutput.body;
|
|
55
|
+
const deserialized = _json(body);
|
|
56
|
+
const exception = new AccessDeniedException({
|
|
57
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
58
|
+
...deserialized,
|
|
59
|
+
});
|
|
60
|
+
return __decorateServiceException(exception, body);
|
|
61
|
+
};
|
|
62
|
+
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
63
|
+
const body = parsedOutput.body;
|
|
64
|
+
const deserialized = _json(body);
|
|
65
|
+
const exception = new InternalServerException({
|
|
66
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
67
|
+
...deserialized,
|
|
68
|
+
});
|
|
69
|
+
return __decorateServiceException(exception, body);
|
|
70
|
+
};
|
|
71
|
+
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
72
|
+
const body = parsedOutput.body;
|
|
73
|
+
const deserialized = _json(body);
|
|
74
|
+
const exception = new ThrottlingException({
|
|
75
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
76
|
+
...deserialized,
|
|
77
|
+
});
|
|
78
|
+
return __decorateServiceException(exception, body);
|
|
79
|
+
};
|
|
80
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
81
|
+
const body = parsedOutput.body;
|
|
82
|
+
const deserialized = _json(body);
|
|
83
|
+
const exception = new ValidationException({
|
|
84
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
85
|
+
...deserialized,
|
|
86
|
+
});
|
|
87
|
+
return __decorateServiceException(exception, body);
|
|
88
|
+
};
|
|
89
|
+
const deserializeMetadata = (output) => ({
|
|
90
|
+
httpStatusCode: output.statusCode,
|
|
91
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
92
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
93
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
94
|
+
});
|
|
95
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
96
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
97
|
+
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
98
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
99
|
+
const contents = {
|
|
100
|
+
protocol,
|
|
101
|
+
hostname,
|
|
102
|
+
port,
|
|
103
|
+
method: "POST",
|
|
104
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
105
|
+
headers,
|
|
106
|
+
};
|
|
107
|
+
if (resolvedHostname !== undefined) {
|
|
108
|
+
contents.hostname = resolvedHostname;
|
|
109
|
+
}
|
|
110
|
+
if (body !== undefined) {
|
|
111
|
+
contents.body = body;
|
|
112
|
+
}
|
|
113
|
+
return new __HttpRequest(contents);
|
|
114
|
+
};
|
|
115
|
+
function sharedHeaders(operation) {
|
|
116
|
+
return {
|
|
117
|
+
"content-type": "application/x-amz-json-1.0",
|
|
118
|
+
"x-amz-target": `AWSBillingAndCostManagementRecommendedActions.${operation}`,
|
|
119
|
+
};
|
|
120
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
3
|
+
import { createDefaultUserAgentProvider } 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
|
+
createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
25
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
26
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
27
|
+
requestHandler: RequestHandler.create(config?.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,51 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core";
|
|
3
|
+
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
4
|
+
import { NODE_APP_ID_CONFIG_OPTIONS, createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-node";
|
|
5
|
+
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";
|
|
6
|
+
import { Hash } from "@smithy/hash-node";
|
|
7
|
+
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
|
|
8
|
+
import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
|
|
9
|
+
import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
|
|
10
|
+
import { calculateBodyLength } from "@smithy/util-body-length-node";
|
|
11
|
+
import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
|
|
12
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
13
|
+
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
14
|
+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
|
|
15
|
+
import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client";
|
|
16
|
+
export const getRuntimeConfig = (config) => {
|
|
17
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
18
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
19
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
20
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
21
|
+
awsCheckVersion(process.version);
|
|
22
|
+
const loaderConfig = {
|
|
23
|
+
profile: config?.profile,
|
|
24
|
+
logger: clientSharedValues.logger,
|
|
25
|
+
};
|
|
26
|
+
return {
|
|
27
|
+
...clientSharedValues,
|
|
28
|
+
...config,
|
|
29
|
+
runtime: "node",
|
|
30
|
+
defaultsMode,
|
|
31
|
+
authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
32
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
33
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
|
|
34
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
35
|
+
createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
36
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
37
|
+
region: config?.region ??
|
|
38
|
+
loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
39
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
40
|
+
retryMode: config?.retryMode ??
|
|
41
|
+
loadNodeConfig({
|
|
42
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
43
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
44
|
+
}, config),
|
|
45
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
46
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
47
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
48
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
49
|
+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
50
|
+
};
|
|
51
|
+
};
|
|
@@ -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,30 @@
|
|
|
1
|
+
import { AwsSdkSigV4Signer } from "@aws-sdk/core";
|
|
2
|
+
import { NoOpLogger } from "@smithy/smithy-client";
|
|
3
|
+
import { parseUrl } from "@smithy/url-parser";
|
|
4
|
+
import { fromBase64, toBase64 } from "@smithy/util-base64";
|
|
5
|
+
import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
|
|
6
|
+
import { defaultBCMRecommendedActionsHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
|
|
7
|
+
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
8
|
+
export const getRuntimeConfig = (config) => {
|
|
9
|
+
return {
|
|
10
|
+
apiVersion: "2024-11-14",
|
|
11
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
12
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
13
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
14
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
15
|
+
extensions: config?.extensions ?? [],
|
|
16
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultBCMRecommendedActionsHttpAuthSchemeProvider,
|
|
17
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
18
|
+
{
|
|
19
|
+
schemeId: "aws.auth#sigv4",
|
|
20
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
21
|
+
signer: new AwsSdkSigV4Signer(),
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
25
|
+
serviceId: config?.serviceId ?? "BCM Recommended Actions",
|
|
26
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
27
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
28
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
|
|
5
|
+
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
6
|
+
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
7
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
8
|
+
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
9
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
2
|
+
import { BCMRecommendedActionsClient } from "./BCMRecommendedActionsClient";
|
|
3
|
+
import { ListRecommendedActionsCommandInput, ListRecommendedActionsCommandOutput } from "./commands/ListRecommendedActionsCommand";
|
|
4
|
+
export interface BCMRecommendedActions {
|
|
5
|
+
/**
|
|
6
|
+
* @see {@link ListRecommendedActionsCommand}
|
|
7
|
+
*/
|
|
8
|
+
listRecommendedActions(): Promise<ListRecommendedActionsCommandOutput>;
|
|
9
|
+
listRecommendedActions(args: ListRecommendedActionsCommandInput, options?: __HttpHandlerOptions): Promise<ListRecommendedActionsCommandOutput>;
|
|
10
|
+
listRecommendedActions(args: ListRecommendedActionsCommandInput, cb: (err: any, data?: ListRecommendedActionsCommandOutput) => void): void;
|
|
11
|
+
listRecommendedActions(args: ListRecommendedActionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListRecommendedActionsCommandOutput) => void): void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* <p>You can use the Billing and Cost Management Recommended Actions API to programmatically query your best practices and recommendations to optimize your costs.</p> <p>The Billing and Cost Management Recommended Actions API provides the following endpoint:</p> <ul> <li> <p> https://bcm-recommended-actions.us-east-1.api.aws</p> </li> </ul>
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export declare class BCMRecommendedActions extends BCMRecommendedActionsClient implements BCMRecommendedActions {
|
|
18
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
|
|
2
|
+
import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
3
|
+
import { RegionInputConfig, RegionResolvedConfig } from "@smithy/config-resolver";
|
|
4
|
+
import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-endpoint";
|
|
5
|
+
import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
|
|
6
|
+
import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
|
|
7
|
+
import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
|
|
8
|
+
import { AwsCredentialIdentityProvider, 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";
|
|
9
|
+
import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
|
|
10
|
+
import { ListRecommendedActionsCommandInput, ListRecommendedActionsCommandOutput } from "./commands/ListRecommendedActionsCommand";
|
|
11
|
+
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
|
|
12
|
+
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
13
|
+
export { __Client };
|
|
14
|
+
/**
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export type ServiceInputTypes = ListRecommendedActionsCommandInput;
|
|
18
|
+
/**
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export type ServiceOutputTypes = ListRecommendedActionsCommandOutput;
|
|
22
|
+
/**
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> {
|
|
26
|
+
/**
|
|
27
|
+
* The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.
|
|
28
|
+
*/
|
|
29
|
+
requestHandler?: __HttpHandlerUserInput;
|
|
30
|
+
/**
|
|
31
|
+
* A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface
|
|
32
|
+
* that computes the SHA-256 HMAC or checksum of a string or binary buffer.
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
sha256?: __ChecksumConstructor | __HashConstructor;
|
|
36
|
+
/**
|
|
37
|
+
* The function that will be used to convert strings into HTTP endpoints.
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
urlParser?: __UrlParser;
|
|
41
|
+
/**
|
|
42
|
+
* A function that can calculate the length of a request body.
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
bodyLengthChecker?: __BodyLengthCalculator;
|
|
46
|
+
/**
|
|
47
|
+
* A function that converts a stream into an array of bytes.
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
streamCollector?: __StreamCollector;
|
|
51
|
+
/**
|
|
52
|
+
* The function that will be used to convert a base64-encoded string to a byte array.
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
base64Decoder?: __Decoder;
|
|
56
|
+
/**
|
|
57
|
+
* The function that will be used to convert binary data to a base64-encoded string.
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
base64Encoder?: __Encoder;
|
|
61
|
+
/**
|
|
62
|
+
* The function that will be used to convert a UTF8-encoded string to a byte array.
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
utf8Decoder?: __Decoder;
|
|
66
|
+
/**
|
|
67
|
+
* The function that will be used to convert binary data to a UTF-8 encoded string.
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
70
|
+
utf8Encoder?: __Encoder;
|
|
71
|
+
/**
|
|
72
|
+
* The runtime environment.
|
|
73
|
+
* @internal
|
|
74
|
+
*/
|
|
75
|
+
runtime?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Disable dynamically changing the endpoint of the client based on the hostPrefix
|
|
78
|
+
* trait of an operation.
|
|
79
|
+
*/
|
|
80
|
+
disableHostPrefix?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Unique service identifier.
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
serviceId?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Enables IPv6/IPv4 dualstack endpoint.
|
|
88
|
+
*/
|
|
89
|
+
useDualstackEndpoint?: boolean | __Provider<boolean>;
|
|
90
|
+
/**
|
|
91
|
+
* Enables FIPS compatible endpoints.
|
|
92
|
+
*/
|
|
93
|
+
useFipsEndpoint?: boolean | __Provider<boolean>;
|
|
94
|
+
/**
|
|
95
|
+
* The AWS region to which this client will send requests
|
|
96
|
+
*/
|
|
97
|
+
region?: string | __Provider<string>;
|
|
98
|
+
/**
|
|
99
|
+
* Setting a client profile is similar to setting a value for the
|
|
100
|
+
* AWS_PROFILE environment variable. Setting a profile on a client
|
|
101
|
+
* in code only affects the single client instance, unlike AWS_PROFILE.
|
|
102
|
+
*
|
|
103
|
+
* When set, and only for environments where an AWS configuration
|
|
104
|
+
* file exists, fields configurable by this file will be retrieved
|
|
105
|
+
* from the specified profile within that file.
|
|
106
|
+
* Conflicting code configuration and environment variables will
|
|
107
|
+
* still have higher priority.
|
|
108
|
+
*
|
|
109
|
+
* For client credential resolution that involves checking the AWS
|
|
110
|
+
* configuration file, the client's profile (this value) will be
|
|
111
|
+
* used unless a different profile is set in the credential
|
|
112
|
+
* provider options.
|
|
113
|
+
*
|
|
114
|
+
*/
|
|
115
|
+
profile?: string;
|
|
116
|
+
/**
|
|
117
|
+
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
|
|
118
|
+
* @internal
|
|
119
|
+
*/
|
|
120
|
+
defaultUserAgentProvider?: Provider<__UserAgent>;
|
|
121
|
+
/**
|
|
122
|
+
* Default credentials provider; Not available in browser runtime.
|
|
123
|
+
* @deprecated
|
|
124
|
+
* @internal
|
|
125
|
+
*/
|
|
126
|
+
credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider;
|
|
127
|
+
/**
|
|
128
|
+
* Value for how many times a request will be made at most in case of retry.
|
|
129
|
+
*/
|
|
130
|
+
maxAttempts?: number | __Provider<number>;
|
|
131
|
+
/**
|
|
132
|
+
* Specifies which retry algorithm to use.
|
|
133
|
+
* @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/
|
|
134
|
+
*
|
|
135
|
+
*/
|
|
136
|
+
retryMode?: string | __Provider<string>;
|
|
137
|
+
/**
|
|
138
|
+
* Optional logger for logging debug/info/warn/error.
|
|
139
|
+
*/
|
|
140
|
+
logger?: __Logger;
|
|
141
|
+
/**
|
|
142
|
+
* Optional extensions
|
|
143
|
+
*/
|
|
144
|
+
extensions?: RuntimeExtension[];
|
|
145
|
+
/**
|
|
146
|
+
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
147
|
+
*/
|
|
148
|
+
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* @public
|
|
152
|
+
*/
|
|
153
|
+
export type BCMRecommendedActionsClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & UserAgentInputConfig & RetryInputConfig & RegionInputConfig & HostHeaderInputConfig & EndpointInputConfig<EndpointParameters> & HttpAuthSchemeInputConfig & ClientInputEndpointParameters;
|
|
154
|
+
/**
|
|
155
|
+
* @public
|
|
156
|
+
*
|
|
157
|
+
* The configuration interface of BCMRecommendedActionsClient class constructor that set the region, credentials and other options.
|
|
158
|
+
*/
|
|
159
|
+
export interface BCMRecommendedActionsClientConfig extends BCMRecommendedActionsClientConfigType {
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* @public
|
|
163
|
+
*/
|
|
164
|
+
export type BCMRecommendedActionsClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & UserAgentResolvedConfig & RetryResolvedConfig & RegionResolvedConfig & HostHeaderResolvedConfig & EndpointResolvedConfig<EndpointParameters> & HttpAuthSchemeResolvedConfig & ClientResolvedEndpointParameters;
|
|
165
|
+
/**
|
|
166
|
+
* @public
|
|
167
|
+
*
|
|
168
|
+
* The resolved configuration interface of BCMRecommendedActionsClient class. This is resolved and normalized from the {@link BCMRecommendedActionsClientConfig | constructor configuration interface}.
|
|
169
|
+
*/
|
|
170
|
+
export interface BCMRecommendedActionsClientResolvedConfig extends BCMRecommendedActionsClientResolvedConfigType {
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* <p>You can use the Billing and Cost Management Recommended Actions API to programmatically query your best practices and recommendations to optimize your costs.</p> <p>The Billing and Cost Management Recommended Actions API provides the following endpoint:</p> <ul> <li> <p> https://bcm-recommended-actions.us-east-1.api.aws</p> </li> </ul>
|
|
174
|
+
* @public
|
|
175
|
+
*/
|
|
176
|
+
export declare class BCMRecommendedActionsClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, BCMRecommendedActionsClientResolvedConfig> {
|
|
177
|
+
/**
|
|
178
|
+
* The resolved configuration of BCMRecommendedActionsClient class. This is resolved and normalized from the {@link BCMRecommendedActionsClientConfig | constructor configuration interface}.
|
|
179
|
+
*/
|
|
180
|
+
readonly config: BCMRecommendedActionsClientResolvedConfig;
|
|
181
|
+
constructor(...[configuration]: __CheckOptionalClientConfig<BCMRecommendedActionsClientConfig>);
|
|
182
|
+
/**
|
|
183
|
+
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
184
|
+
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
185
|
+
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
186
|
+
*/
|
|
187
|
+
destroy(): void;
|
|
188
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpAuthScheme } from "@smithy/types";
|
|
2
|
+
import { BCMRecommendedActionsHttpAuthSchemeProvider } from "./httpAuthSchemeProvider";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export interface HttpAuthExtensionConfiguration {
|
|
7
|
+
setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void;
|
|
8
|
+
httpAuthSchemes(): HttpAuthScheme[];
|
|
9
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider: BCMRecommendedActionsHttpAuthSchemeProvider): void;
|
|
10
|
+
httpAuthSchemeProvider(): BCMRecommendedActionsHttpAuthSchemeProvider;
|
|
11
|
+
setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void;
|
|
12
|
+
credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export type HttpAuthRuntimeConfig = Partial<{
|
|
18
|
+
httpAuthSchemes: HttpAuthScheme[];
|
|
19
|
+
httpAuthSchemeProvider: BCMRecommendedActionsHttpAuthSchemeProvider;
|
|
20
|
+
credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider;
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare const getHttpAuthExtensionConfiguration: (runtimeConfig: HttpAuthRuntimeConfig) => HttpAuthExtensionConfiguration;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export declare const resolveHttpAuthRuntimeConfig: (config: HttpAuthExtensionConfiguration) => HttpAuthRuntimeConfig;
|