@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.
Files changed (95) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +216 -0
  3. package/dist-cjs/BCMRecommendedActions.js +13 -0
  4. package/dist-cjs/BCMRecommendedActionsClient.js +52 -0
  5. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
  6. package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
  7. package/dist-cjs/commands/ListRecommendedActionsCommand.js +26 -0
  8. package/dist-cjs/commands/index.js +4 -0
  9. package/dist-cjs/endpoint/EndpointParameters.js +15 -0
  10. package/dist-cjs/endpoint/endpointResolver.js +18 -0
  11. package/dist-cjs/endpoint/ruleset.js +7 -0
  12. package/dist-cjs/extensionConfiguration.js +2 -0
  13. package/dist-cjs/index.js +11 -0
  14. package/dist-cjs/models/BCMRecommendedActionsServiceException.js +12 -0
  15. package/dist-cjs/models/index.js +4 -0
  16. package/dist-cjs/models/models_0.js +112 -0
  17. package/dist-cjs/pagination/Interfaces.js +2 -0
  18. package/dist-cjs/pagination/ListRecommendedActionsPaginator.js +7 -0
  19. package/dist-cjs/pagination/index.js +5 -0
  20. package/dist-cjs/protocols/Aws_json1_0.js +125 -0
  21. package/dist-cjs/runtimeConfig.browser.js +39 -0
  22. package/dist-cjs/runtimeConfig.js +56 -0
  23. package/dist-cjs/runtimeConfig.native.js +15 -0
  24. package/dist-cjs/runtimeConfig.shared.js +34 -0
  25. package/dist-cjs/runtimeExtensions.js +13 -0
  26. package/dist-es/BCMRecommendedActions.js +9 -0
  27. package/dist-es/BCMRecommendedActionsClient.js +48 -0
  28. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  29. package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
  30. package/dist-es/commands/ListRecommendedActionsCommand.js +22 -0
  31. package/dist-es/commands/index.js +1 -0
  32. package/dist-es/endpoint/EndpointParameters.js +11 -0
  33. package/dist-es/endpoint/endpointResolver.js +14 -0
  34. package/dist-es/endpoint/ruleset.js +4 -0
  35. package/dist-es/extensionConfiguration.js +1 -0
  36. package/dist-es/index.js +6 -0
  37. package/dist-es/models/BCMRecommendedActionsServiceException.js +8 -0
  38. package/dist-es/models/index.js +1 -0
  39. package/dist-es/models/models_0.js +105 -0
  40. package/dist-es/pagination/Interfaces.js +1 -0
  41. package/dist-es/pagination/ListRecommendedActionsPaginator.js +4 -0
  42. package/dist-es/pagination/index.js +2 -0
  43. package/dist-es/protocols/Aws_json1_0.js +120 -0
  44. package/dist-es/runtimeConfig.browser.js +34 -0
  45. package/dist-es/runtimeConfig.js +51 -0
  46. package/dist-es/runtimeConfig.native.js +11 -0
  47. package/dist-es/runtimeConfig.shared.js +30 -0
  48. package/dist-es/runtimeExtensions.js +9 -0
  49. package/dist-types/BCMRecommendedActions.d.ts +18 -0
  50. package/dist-types/BCMRecommendedActionsClient.d.ts +188 -0
  51. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  52. package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
  53. package/dist-types/commands/ListRecommendedActionsCommand.d.ts +112 -0
  54. package/dist-types/commands/index.d.ts +1 -0
  55. package/dist-types/endpoint/EndpointParameters.d.ts +32 -0
  56. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  57. package/dist-types/endpoint/ruleset.d.ts +2 -0
  58. package/dist-types/extensionConfiguration.d.ts +9 -0
  59. package/dist-types/index.d.ts +14 -0
  60. package/dist-types/models/BCMRecommendedActionsServiceException.d.ts +14 -0
  61. package/dist-types/models/index.d.ts +1 -0
  62. package/dist-types/models/models_0.d.ts +289 -0
  63. package/dist-types/pagination/Interfaces.d.ts +8 -0
  64. package/dist-types/pagination/ListRecommendedActionsPaginator.d.ts +7 -0
  65. package/dist-types/pagination/index.d.ts +2 -0
  66. package/dist-types/protocols/Aws_json1_0.d.ts +11 -0
  67. package/dist-types/runtimeConfig.browser.d.ts +50 -0
  68. package/dist-types/runtimeConfig.d.ts +50 -0
  69. package/dist-types/runtimeConfig.native.d.ts +49 -0
  70. package/dist-types/runtimeConfig.shared.d.ts +21 -0
  71. package/dist-types/runtimeExtensions.d.ts +17 -0
  72. package/dist-types/ts3.4/BCMRecommendedActions.d.ts +25 -0
  73. package/dist-types/ts3.4/BCMRecommendedActionsClient.d.ts +126 -0
  74. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  75. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +47 -0
  76. package/dist-types/ts3.4/commands/ListRecommendedActionsCommand.d.ts +47 -0
  77. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  78. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +45 -0
  79. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  80. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  81. package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
  82. package/dist-types/ts3.4/index.d.ts +9 -0
  83. package/dist-types/ts3.4/models/BCMRecommendedActionsServiceException.d.ts +9 -0
  84. package/dist-types/ts3.4/models/index.d.ts +1 -0
  85. package/dist-types/ts3.4/models/models_0.d.ts +122 -0
  86. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  87. package/dist-types/ts3.4/pagination/ListRecommendedActionsPaginator.d.ts +11 -0
  88. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  89. package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +17 -0
  90. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +93 -0
  91. package/dist-types/ts3.4/runtimeConfig.d.ts +91 -0
  92. package/dist-types/ts3.4/runtimeConfig.native.d.ts +97 -0
  93. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +23 -0
  94. package/dist-types/ts3.4/runtimeExtensions.d.ts +13 -0
  95. package/package.json +99 -0
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BCMRecommendedActionsServiceException = void 0;
4
+ const tslib_1 = require("tslib");
5
+ tslib_1.__exportStar(require("./BCMRecommendedActionsClient"), exports);
6
+ tslib_1.__exportStar(require("./BCMRecommendedActions"), exports);
7
+ tslib_1.__exportStar(require("./commands"), exports);
8
+ tslib_1.__exportStar(require("./pagination"), exports);
9
+ tslib_1.__exportStar(require("./models"), exports);
10
+ var BCMRecommendedActionsServiceException_1 = require("./models/BCMRecommendedActionsServiceException");
11
+ Object.defineProperty(exports, "BCMRecommendedActionsServiceException", { enumerable: true, get: function () { return BCMRecommendedActionsServiceException_1.BCMRecommendedActionsServiceException; } });
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BCMRecommendedActionsServiceException = exports.__ServiceException = void 0;
4
+ const smithy_client_1 = require("@smithy/smithy-client");
5
+ Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
6
+ class BCMRecommendedActionsServiceException extends smithy_client_1.ServiceException {
7
+ constructor(options) {
8
+ super(options);
9
+ Object.setPrototypeOf(this, BCMRecommendedActionsServiceException.prototype);
10
+ }
11
+ }
12
+ exports.BCMRecommendedActionsServiceException = BCMRecommendedActionsServiceException;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./models_0"), exports);
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ValidationException = exports.ValidationExceptionReason = exports.ThrottlingException = exports.Severity = exports.Feature = exports.InternalServerException = exports.ActionType = exports.MatchOption = exports.FilterName = exports.AccessDeniedException = void 0;
4
+ const BCMRecommendedActionsServiceException_1 = require("./BCMRecommendedActionsServiceException");
5
+ class AccessDeniedException extends BCMRecommendedActionsServiceException_1.BCMRecommendedActionsServiceException {
6
+ name = "AccessDeniedException";
7
+ $fault = "client";
8
+ constructor(opts) {
9
+ super({
10
+ name: "AccessDeniedException",
11
+ $fault: "client",
12
+ ...opts,
13
+ });
14
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
15
+ }
16
+ }
17
+ exports.AccessDeniedException = AccessDeniedException;
18
+ exports.FilterName = {
19
+ FEATURE: "FEATURE",
20
+ SEVERITY: "SEVERITY",
21
+ TYPE: "TYPE",
22
+ };
23
+ exports.MatchOption = {
24
+ EQUALS: "EQUALS",
25
+ NOT_EQUALS: "NOT_EQUALS",
26
+ };
27
+ exports.ActionType = {
28
+ ADD_ALTERNATE_BILLING_CONTACT: "ADD_ALTERNATE_BILLING_CONTACT",
29
+ CREATE_ANOMALY_MONITOR: "CREATE_ANOMALY_MONITOR",
30
+ CREATE_BUDGET: "CREATE_BUDGET",
31
+ ENABLE_COST_OPTIMIZATION_HUB: "ENABLE_COST_OPTIMIZATION_HUB",
32
+ MIGRATE_TO_GRANULAR_PERMISSIONS: "MIGRATE_TO_GRANULAR_PERMISSIONS",
33
+ PAYMENTS_DUE: "PAYMENTS_DUE",
34
+ PAYMENTS_PAST_DUE: "PAYMENTS_PAST_DUE",
35
+ REVIEW_ANOMALIES: "REVIEW_ANOMALIES",
36
+ REVIEW_BUDGETS_EXCEEDED: "REVIEW_BUDGETS_EXCEEDED",
37
+ REVIEW_BUDGET_ALERTS: "REVIEW_BUDGET_ALERTS",
38
+ REVIEW_EXPIRING_RI: "REVIEW_EXPIRING_RI",
39
+ REVIEW_EXPIRING_SP: "REVIEW_EXPIRING_SP",
40
+ REVIEW_FREETIER_USAGE_ALERTS: "REVIEW_FREETIER_USAGE_ALERTS",
41
+ REVIEW_SAVINGS_OPPORTUNITY_RECOMMENDATIONS: "REVIEW_SAVINGS_OPPORTUNITY_RECOMMENDATIONS",
42
+ UPDATE_EXPIRED_PAYMENT_METHOD: "UPDATE_EXPIRED_PAYMENT_METHOD",
43
+ UPDATE_INVALID_PAYMENT_METHOD: "UPDATE_INVALID_PAYMENT_METHOD",
44
+ UPDATE_TAX_EXEMPTION_CERTIFICATE: "UPDATE_TAX_EXEMPTION_CERTIFICATE",
45
+ UPDATE_TAX_REGISTRATION_NUMBER: "UPDATE_TAX_REGISTRATION_NUMBER",
46
+ };
47
+ class InternalServerException extends BCMRecommendedActionsServiceException_1.BCMRecommendedActionsServiceException {
48
+ name = "InternalServerException";
49
+ $fault = "server";
50
+ constructor(opts) {
51
+ super({
52
+ name: "InternalServerException",
53
+ $fault: "server",
54
+ ...opts,
55
+ });
56
+ Object.setPrototypeOf(this, InternalServerException.prototype);
57
+ }
58
+ }
59
+ exports.InternalServerException = InternalServerException;
60
+ exports.Feature = {
61
+ ACCOUNT: "ACCOUNT",
62
+ BUDGETS: "BUDGETS",
63
+ COST_ANOMALY_DETECTION: "COST_ANOMALY_DETECTION",
64
+ COST_OPTIMIZATION_HUB: "COST_OPTIMIZATION_HUB",
65
+ FREE_TIER: "FREE_TIER",
66
+ IAM: "IAM",
67
+ PAYMENTS: "PAYMENTS",
68
+ RESERVATIONS: "RESERVATIONS",
69
+ SAVINGS_PLANS: "SAVINGS_PLANS",
70
+ TAX_SETTINGS: "TAX_SETTINGS",
71
+ };
72
+ exports.Severity = {
73
+ CRITICAL: "CRITICAL",
74
+ INFO: "INFO",
75
+ WARNING: "WARNING",
76
+ };
77
+ class ThrottlingException extends BCMRecommendedActionsServiceException_1.BCMRecommendedActionsServiceException {
78
+ name = "ThrottlingException";
79
+ $fault = "client";
80
+ constructor(opts) {
81
+ super({
82
+ name: "ThrottlingException",
83
+ $fault: "client",
84
+ ...opts,
85
+ });
86
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
87
+ }
88
+ }
89
+ exports.ThrottlingException = ThrottlingException;
90
+ exports.ValidationExceptionReason = {
91
+ CANNOT_PARSE: "cannotParse",
92
+ FIELD_VALIDATION_FAILED: "fieldValidationFailed",
93
+ OTHER: "other",
94
+ UNKNOWN_OPERATION: "unknownOperation",
95
+ };
96
+ class ValidationException extends BCMRecommendedActionsServiceException_1.BCMRecommendedActionsServiceException {
97
+ name = "ValidationException";
98
+ $fault = "client";
99
+ reason;
100
+ fieldList;
101
+ constructor(opts) {
102
+ super({
103
+ name: "ValidationException",
104
+ $fault: "client",
105
+ ...opts,
106
+ });
107
+ Object.setPrototypeOf(this, ValidationException.prototype);
108
+ this.reason = opts.reason;
109
+ this.fieldList = opts.fieldList;
110
+ }
111
+ }
112
+ exports.ValidationException = ValidationException;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.paginateListRecommendedActions = void 0;
4
+ const core_1 = require("@smithy/core");
5
+ const BCMRecommendedActionsClient_1 = require("../BCMRecommendedActionsClient");
6
+ const ListRecommendedActionsCommand_1 = require("../commands/ListRecommendedActionsCommand");
7
+ exports.paginateListRecommendedActions = (0, core_1.createPaginator)(BCMRecommendedActionsClient_1.BCMRecommendedActionsClient, ListRecommendedActionsCommand_1.ListRecommendedActionsCommand, "nextToken", "nextToken", "maxResults");
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./Interfaces"), exports);
5
+ tslib_1.__exportStar(require("./ListRecommendedActionsPaginator"), exports);
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.de_ListRecommendedActionsCommand = exports.se_ListRecommendedActionsCommand = void 0;
4
+ const core_1 = require("@aws-sdk/core");
5
+ const protocol_http_1 = require("@smithy/protocol-http");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ const BCMRecommendedActionsServiceException_1 = require("../models/BCMRecommendedActionsServiceException");
8
+ const models_0_1 = require("../models/models_0");
9
+ const se_ListRecommendedActionsCommand = async (input, context) => {
10
+ const headers = sharedHeaders("ListRecommendedActions");
11
+ let body;
12
+ body = JSON.stringify((0, smithy_client_1._json)(input));
13
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
+ };
15
+ exports.se_ListRecommendedActionsCommand = se_ListRecommendedActionsCommand;
16
+ const de_ListRecommendedActionsCommand = async (output, context) => {
17
+ if (output.statusCode >= 300) {
18
+ return de_CommandError(output, context);
19
+ }
20
+ const data = await (0, core_1.parseJsonBody)(output.body, context);
21
+ let contents = {};
22
+ contents = (0, smithy_client_1._json)(data);
23
+ const response = {
24
+ $metadata: deserializeMetadata(output),
25
+ ...contents,
26
+ };
27
+ return response;
28
+ };
29
+ exports.de_ListRecommendedActionsCommand = de_ListRecommendedActionsCommand;
30
+ const de_CommandError = async (output, context) => {
31
+ const parsedOutput = {
32
+ ...output,
33
+ body: await (0, core_1.parseJsonErrorBody)(output.body, context),
34
+ };
35
+ const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
36
+ switch (errorCode) {
37
+ case "AccessDeniedException":
38
+ case "com.amazonaws.bcmrecommendedactions#AccessDeniedException":
39
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
40
+ case "InternalServerException":
41
+ case "com.amazonaws.bcmrecommendedactions#InternalServerException":
42
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
43
+ case "ThrottlingException":
44
+ case "com.amazonaws.bcmrecommendedactions#ThrottlingException":
45
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
46
+ case "ValidationException":
47
+ case "com.amazonaws.bcmrecommendedactions#ValidationException":
48
+ throw await de_ValidationExceptionRes(parsedOutput, context);
49
+ default:
50
+ const parsedBody = parsedOutput.body;
51
+ return throwDefaultError({
52
+ output,
53
+ parsedBody,
54
+ errorCode,
55
+ });
56
+ }
57
+ };
58
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
59
+ const body = parsedOutput.body;
60
+ const deserialized = (0, smithy_client_1._json)(body);
61
+ const exception = new models_0_1.AccessDeniedException({
62
+ $metadata: deserializeMetadata(parsedOutput),
63
+ ...deserialized,
64
+ });
65
+ return (0, smithy_client_1.decorateServiceException)(exception, body);
66
+ };
67
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
68
+ const body = parsedOutput.body;
69
+ const deserialized = (0, smithy_client_1._json)(body);
70
+ const exception = new models_0_1.InternalServerException({
71
+ $metadata: deserializeMetadata(parsedOutput),
72
+ ...deserialized,
73
+ });
74
+ return (0, smithy_client_1.decorateServiceException)(exception, body);
75
+ };
76
+ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
77
+ const body = parsedOutput.body;
78
+ const deserialized = (0, smithy_client_1._json)(body);
79
+ const exception = new models_0_1.ThrottlingException({
80
+ $metadata: deserializeMetadata(parsedOutput),
81
+ ...deserialized,
82
+ });
83
+ return (0, smithy_client_1.decorateServiceException)(exception, body);
84
+ };
85
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
86
+ const body = parsedOutput.body;
87
+ const deserialized = (0, smithy_client_1._json)(body);
88
+ const exception = new models_0_1.ValidationException({
89
+ $metadata: deserializeMetadata(parsedOutput),
90
+ ...deserialized,
91
+ });
92
+ return (0, smithy_client_1.decorateServiceException)(exception, body);
93
+ };
94
+ const deserializeMetadata = (output) => ({
95
+ httpStatusCode: output.statusCode,
96
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
97
+ extendedRequestId: output.headers["x-amz-id-2"],
98
+ cfId: output.headers["x-amz-cf-id"],
99
+ });
100
+ const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
101
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(BCMRecommendedActionsServiceException_1.BCMRecommendedActionsServiceException);
102
+ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
103
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
104
+ const contents = {
105
+ protocol,
106
+ hostname,
107
+ port,
108
+ method: "POST",
109
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
110
+ headers,
111
+ };
112
+ if (resolvedHostname !== undefined) {
113
+ contents.hostname = resolvedHostname;
114
+ }
115
+ if (body !== undefined) {
116
+ contents.body = body;
117
+ }
118
+ return new protocol_http_1.HttpRequest(contents);
119
+ };
120
+ function sharedHeaders(operation) {
121
+ return {
122
+ "content-type": "application/x-amz-json-1.0",
123
+ "x-amz-target": `AWSBillingAndCostManagementRecommendedActions.${operation}`,
124
+ };
125
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const sha256_browser_1 = require("@aws-crypto/sha256-browser");
7
+ const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
8
+ const config_resolver_1 = require("@smithy/config-resolver");
9
+ const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
10
+ const invalid_dependency_1 = require("@smithy/invalid-dependency");
11
+ const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
12
+ const util_retry_1 = require("@smithy/util-retry");
13
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
14
+ const smithy_client_1 = require("@smithy/smithy-client");
15
+ const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser");
16
+ const getRuntimeConfig = (config) => {
17
+ const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
18
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
19
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
20
+ return {
21
+ ...clientSharedValues,
22
+ ...config,
23
+ runtime: "browser",
24
+ defaultsMode,
25
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
26
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
27
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
28
+ (0, util_user_agent_browser_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
29
+ maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
30
+ region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
31
+ requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
32
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
33
+ sha256: config?.sha256 ?? sha256_browser_1.Sha256,
34
+ streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
35
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
36
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
37
+ };
38
+ };
39
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const core_1 = require("@aws-sdk/core");
7
+ const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
8
+ const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
9
+ const config_resolver_1 = require("@smithy/config-resolver");
10
+ const hash_node_1 = require("@smithy/hash-node");
11
+ const middleware_retry_1 = require("@smithy/middleware-retry");
12
+ const node_config_provider_1 = require("@smithy/node-config-provider");
13
+ const node_http_handler_1 = require("@smithy/node-http-handler");
14
+ const util_body_length_node_1 = require("@smithy/util-body-length-node");
15
+ const util_retry_1 = require("@smithy/util-retry");
16
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
17
+ const smithy_client_1 = require("@smithy/smithy-client");
18
+ const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node");
19
+ const smithy_client_2 = require("@smithy/smithy-client");
20
+ const getRuntimeConfig = (config) => {
21
+ (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
22
+ const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
23
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
24
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
25
+ (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
26
+ const loaderConfig = {
27
+ profile: config?.profile,
28
+ logger: clientSharedValues.logger,
29
+ };
30
+ return {
31
+ ...clientSharedValues,
32
+ ...config,
33
+ runtime: "node",
34
+ defaultsMode,
35
+ authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
36
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
37
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
38
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
39
+ (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
40
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
41
+ region: config?.region ??
42
+ (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
43
+ requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
44
+ retryMode: config?.retryMode ??
45
+ (0, node_config_provider_1.loadConfig)({
46
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
47
+ default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
48
+ }, config),
49
+ sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
50
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
51
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
52
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
53
+ userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
54
+ };
55
+ };
56
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const sha256_js_1 = require("@aws-crypto/sha256-js");
5
+ const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
6
+ const getRuntimeConfig = (config) => {
7
+ const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
8
+ return {
9
+ ...browserDefaults,
10
+ ...config,
11
+ runtime: "react-native",
12
+ sha256: config?.sha256 ?? sha256_js_1.Sha256,
13
+ };
14
+ };
15
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const core_1 = require("@aws-sdk/core");
5
+ const smithy_client_1 = require("@smithy/smithy-client");
6
+ const url_parser_1 = require("@smithy/url-parser");
7
+ const util_base64_1 = require("@smithy/util-base64");
8
+ const util_utf8_1 = require("@smithy/util-utf8");
9
+ const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
10
+ const endpointResolver_1 = require("./endpoint/endpointResolver");
11
+ const getRuntimeConfig = (config) => {
12
+ return {
13
+ apiVersion: "2024-11-14",
14
+ base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
15
+ base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
16
+ disableHostPrefix: config?.disableHostPrefix ?? false,
17
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
18
+ extensions: config?.extensions ?? [],
19
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultBCMRecommendedActionsHttpAuthSchemeProvider,
20
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
21
+ {
22
+ schemeId: "aws.auth#sigv4",
23
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
24
+ signer: new core_1.AwsSdkSigV4Signer(),
25
+ },
26
+ ],
27
+ logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
28
+ serviceId: config?.serviceId ?? "BCM Recommended Actions",
29
+ urlParser: config?.urlParser ?? url_parser_1.parseUrl,
30
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
31
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
32
+ };
33
+ };
34
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveRuntimeExtensions = void 0;
4
+ const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
5
+ const protocol_http_1 = require("@smithy/protocol-http");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ const httpAuthExtensionConfiguration_1 = require("./auth/httpAuthExtensionConfiguration");
8
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
9
+ const extensionConfiguration = Object.assign((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig), (0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig));
10
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
11
+ return Object.assign(runtimeConfig, (0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), (0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration));
12
+ };
13
+ exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
@@ -0,0 +1,9 @@
1
+ import { createAggregatedClient } from "@smithy/smithy-client";
2
+ import { BCMRecommendedActionsClient } from "./BCMRecommendedActionsClient";
3
+ import { ListRecommendedActionsCommand, } from "./commands/ListRecommendedActionsCommand";
4
+ const commands = {
5
+ ListRecommendedActionsCommand,
6
+ };
7
+ export class BCMRecommendedActions extends BCMRecommendedActionsClient {
8
+ }
9
+ createAggregatedClient(commands, BCMRecommendedActions);
@@ -0,0 +1,48 @@
1
+ import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
2
+ import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
3
+ import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
4
+ import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
5
+ import { resolveRegionConfig } from "@smithy/config-resolver";
6
+ import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
7
+ import { getContentLengthPlugin } from "@smithy/middleware-content-length";
8
+ import { resolveEndpointConfig } from "@smithy/middleware-endpoint";
9
+ import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
10
+ import { Client as __Client, } from "@smithy/smithy-client";
11
+ import { defaultBCMRecommendedActionsHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider";
12
+ import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
13
+ import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
14
+ import { resolveRuntimeExtensions } from "./runtimeExtensions";
15
+ export { __Client };
16
+ export class BCMRecommendedActionsClient extends __Client {
17
+ config;
18
+ constructor(...[configuration]) {
19
+ const _config_0 = __getRuntimeConfig(configuration || {});
20
+ super(_config_0);
21
+ this.initConfig = _config_0;
22
+ const _config_1 = resolveClientEndpointParameters(_config_0);
23
+ const _config_2 = resolveUserAgentConfig(_config_1);
24
+ const _config_3 = resolveRetryConfig(_config_2);
25
+ const _config_4 = resolveRegionConfig(_config_3);
26
+ const _config_5 = resolveHostHeaderConfig(_config_4);
27
+ const _config_6 = resolveEndpointConfig(_config_5);
28
+ const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
29
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
30
+ this.config = _config_8;
31
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
32
+ this.middlewareStack.use(getRetryPlugin(this.config));
33
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
34
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
35
+ this.middlewareStack.use(getLoggerPlugin(this.config));
36
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
37
+ this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
38
+ httpAuthSchemeParametersProvider: defaultBCMRecommendedActionsHttpAuthSchemeParametersProvider,
39
+ identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
40
+ "aws.auth#sigv4": config.credentials,
41
+ }),
42
+ }));
43
+ this.middlewareStack.use(getHttpSigningPlugin(this.config));
44
+ }
45
+ destroy() {
46
+ super.destroy();
47
+ }
48
+ }
@@ -0,0 +1,38 @@
1
+ export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
2
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
3
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
4
+ let _credentials = runtimeConfig.credentials;
5
+ return {
6
+ setHttpAuthScheme(httpAuthScheme) {
7
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
8
+ if (index === -1) {
9
+ _httpAuthSchemes.push(httpAuthScheme);
10
+ }
11
+ else {
12
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
13
+ }
14
+ },
15
+ httpAuthSchemes() {
16
+ return _httpAuthSchemes;
17
+ },
18
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
19
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
20
+ },
21
+ httpAuthSchemeProvider() {
22
+ return _httpAuthSchemeProvider;
23
+ },
24
+ setCredentials(credentials) {
25
+ _credentials = credentials;
26
+ },
27
+ credentials() {
28
+ return _credentials;
29
+ },
30
+ };
31
+ };
32
+ export const resolveHttpAuthRuntimeConfig = (config) => {
33
+ return {
34
+ httpAuthSchemes: config.httpAuthSchemes(),
35
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
36
+ credentials: config.credentials(),
37
+ };
38
+ };
@@ -0,0 +1,41 @@
1
+ import { resolveAwsSdkSigV4Config, } from "@aws-sdk/core";
2
+ import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
3
+ export const defaultBCMRecommendedActionsHttpAuthSchemeParametersProvider = async (config, context, input) => {
4
+ return {
5
+ operation: getSmithyContext(context).operation,
6
+ region: (await normalizeProvider(config.region)()) ||
7
+ (() => {
8
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
9
+ })(),
10
+ };
11
+ };
12
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
13
+ return {
14
+ schemeId: "aws.auth#sigv4",
15
+ signingProperties: {
16
+ name: "bcm-recommended-actions",
17
+ region: authParameters.region,
18
+ },
19
+ propertiesExtractor: (config, context) => ({
20
+ signingProperties: {
21
+ config,
22
+ context,
23
+ },
24
+ }),
25
+ };
26
+ }
27
+ export const defaultBCMRecommendedActionsHttpAuthSchemeProvider = (authParameters) => {
28
+ const options = [];
29
+ switch (authParameters.operation) {
30
+ default: {
31
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
32
+ }
33
+ }
34
+ return options;
35
+ };
36
+ export const resolveHttpAuthSchemeConfig = (config) => {
37
+ const config_0 = resolveAwsSdkSigV4Config(config);
38
+ return Object.assign(config_0, {
39
+ authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
40
+ });
41
+ };
@@ -0,0 +1,22 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_ListRecommendedActionsCommand, se_ListRecommendedActionsCommand } from "../protocols/Aws_json1_0";
6
+ export { $Command };
7
+ export class ListRecommendedActionsCommand extends $Command
8
+ .classBuilder()
9
+ .ep(commonParams)
10
+ .m(function (Command, cs, config, o) {
11
+ return [
12
+ getSerdePlugin(config, this.serialize, this.deserialize),
13
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
14
+ ];
15
+ })
16
+ .s("AWSBillingAndCostManagementRecommendedActions", "ListRecommendedActions", {})
17
+ .n("BCMRecommendedActionsClient", "ListRecommendedActionsCommand")
18
+ .f(void 0, void 0)
19
+ .ser(se_ListRecommendedActionsCommand)
20
+ .de(de_ListRecommendedActionsCommand)
21
+ .build() {
22
+ }
@@ -0,0 +1 @@
1
+ export * from "./ListRecommendedActionsCommand";
@@ -0,0 +1,11 @@
1
+ export const resolveClientEndpointParameters = (options) => {
2
+ return Object.assign(options, {
3
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
4
+ defaultSigningName: "bcm-recommended-actions",
5
+ });
6
+ };
7
+ export const commonParams = {
8
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
9
+ Endpoint: { type: "builtInParams", name: "endpoint" },
10
+ Region: { type: "builtInParams", name: "region" },
11
+ };
@@ -0,0 +1,14 @@
1
+ import { awsEndpointFunctions } from "@aws-sdk/util-endpoints";
2
+ import { customEndpointFunctions, EndpointCache, resolveEndpoint } from "@smithy/util-endpoints";
3
+ import { ruleSet } from "./ruleset";
4
+ const cache = new EndpointCache({
5
+ size: 50,
6
+ params: ["Endpoint", "Region", "UseFIPS"],
7
+ });
8
+ export const defaultEndpointResolver = (endpointParams, context = {}) => {
9
+ return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {
10
+ endpointParams: endpointParams,
11
+ logger: context.logger,
12
+ }));
13
+ };
14
+ customEndpointFunctions.aws = awsEndpointFunctions;