@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
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "{}"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2018-2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,216 @@
1
+ <!-- generated file, do not edit directly -->
2
+
3
+ # @aws-sdk/client-bcm-recommended-actions
4
+
5
+ ## Description
6
+
7
+ AWS SDK for JavaScript BCMRecommendedActions Client for Node.js, Browser and React Native.
8
+
9
+ <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>
10
+
11
+ ## Installing
12
+
13
+ To install this package, simply type add or install @aws-sdk/client-bcm-recommended-actions
14
+ using your favorite package manager:
15
+
16
+ - `npm install @aws-sdk/client-bcm-recommended-actions`
17
+ - `yarn add @aws-sdk/client-bcm-recommended-actions`
18
+ - `pnpm add @aws-sdk/client-bcm-recommended-actions`
19
+
20
+ ## Getting Started
21
+
22
+ ### Import
23
+
24
+ The AWS SDK is modulized by clients and commands.
25
+ To send a request, you only need to import the `BCMRecommendedActionsClient` and
26
+ the commands you need, for example `ListRecommendedActionsCommand`:
27
+
28
+ ```js
29
+ // ES5 example
30
+ const {
31
+ BCMRecommendedActionsClient,
32
+ ListRecommendedActionsCommand,
33
+ } = require("@aws-sdk/client-bcm-recommended-actions");
34
+ ```
35
+
36
+ ```ts
37
+ // ES6+ example
38
+ import { BCMRecommendedActionsClient, ListRecommendedActionsCommand } from "@aws-sdk/client-bcm-recommended-actions";
39
+ ```
40
+
41
+ ### Usage
42
+
43
+ To send a request, you:
44
+
45
+ - Initiate client with configuration (e.g. credentials, region).
46
+ - Initiate command with input parameters.
47
+ - Call `send` operation on client with command object as input.
48
+ - If you are using a custom http handler, you may call `destroy()` to close open connections.
49
+
50
+ ```js
51
+ // a client can be shared by different commands.
52
+ const client = new BCMRecommendedActionsClient({ region: "REGION" });
53
+
54
+ const params = {
55
+ /** input parameters */
56
+ };
57
+ const command = new ListRecommendedActionsCommand(params);
58
+ ```
59
+
60
+ #### Async/await
61
+
62
+ We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
63
+ operator to wait for the promise returned by send operation as follows:
64
+
65
+ ```js
66
+ // async/await.
67
+ try {
68
+ const data = await client.send(command);
69
+ // process data.
70
+ } catch (error) {
71
+ // error handling.
72
+ } finally {
73
+ // finally.
74
+ }
75
+ ```
76
+
77
+ Async-await is clean, concise, intuitive, easy to debug and has better error handling
78
+ as compared to using Promise chains or callbacks.
79
+
80
+ #### Promises
81
+
82
+ You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining)
83
+ to execute send operation.
84
+
85
+ ```js
86
+ client.send(command).then(
87
+ (data) => {
88
+ // process data.
89
+ },
90
+ (error) => {
91
+ // error handling.
92
+ }
93
+ );
94
+ ```
95
+
96
+ Promises can also be called using `.catch()` and `.finally()` as follows:
97
+
98
+ ```js
99
+ client
100
+ .send(command)
101
+ .then((data) => {
102
+ // process data.
103
+ })
104
+ .catch((error) => {
105
+ // error handling.
106
+ })
107
+ .finally(() => {
108
+ // finally.
109
+ });
110
+ ```
111
+
112
+ #### Callbacks
113
+
114
+ We do not recommend using callbacks because of [callback hell](http://callbackhell.com/),
115
+ but they are supported by the send operation.
116
+
117
+ ```js
118
+ // callbacks.
119
+ client.send(command, (err, data) => {
120
+ // process err and data.
121
+ });
122
+ ```
123
+
124
+ #### v2 compatible style
125
+
126
+ The client can also send requests using v2 compatible style.
127
+ However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post
128
+ on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/)
129
+
130
+ ```ts
131
+ import * as AWS from "@aws-sdk/client-bcm-recommended-actions";
132
+ const client = new AWS.BCMRecommendedActions({ region: "REGION" });
133
+
134
+ // async/await.
135
+ try {
136
+ const data = await client.listRecommendedActions(params);
137
+ // process data.
138
+ } catch (error) {
139
+ // error handling.
140
+ }
141
+
142
+ // Promises.
143
+ client
144
+ .listRecommendedActions(params)
145
+ .then((data) => {
146
+ // process data.
147
+ })
148
+ .catch((error) => {
149
+ // error handling.
150
+ });
151
+
152
+ // callbacks.
153
+ client.listRecommendedActions(params, (err, data) => {
154
+ // process err and data.
155
+ });
156
+ ```
157
+
158
+ ### Troubleshooting
159
+
160
+ When the service returns an exception, the error will include the exception information,
161
+ as well as response metadata (e.g. request id).
162
+
163
+ ```js
164
+ try {
165
+ const data = await client.send(command);
166
+ // process data.
167
+ } catch (error) {
168
+ const { requestId, cfId, extendedRequestId } = error.$metadata;
169
+ console.log({ requestId, cfId, extendedRequestId });
170
+ /**
171
+ * The keys within exceptions are also parsed.
172
+ * You can access them by specifying exception names:
173
+ * if (error.name === 'SomeServiceException') {
174
+ * const value = error.specialKeyInException;
175
+ * }
176
+ */
177
+ }
178
+ ```
179
+
180
+ ## Getting Help
181
+
182
+ Please use these community resources for getting help.
183
+ We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
184
+
185
+ - Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html)
186
+ or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html).
187
+ - Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/)
188
+ on AWS Developer Blog.
189
+ - Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`.
190
+ - Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3).
191
+ - If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose).
192
+
193
+ To test your universal JavaScript code in Node.js, browser and react-native environments,
194
+ visit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests).
195
+
196
+ ## Contributing
197
+
198
+ This client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-bcm-recommended-actions` package is updated.
199
+ To contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients).
200
+
201
+ ## License
202
+
203
+ This SDK is distributed under the
204
+ [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0),
205
+ see LICENSE for more information.
206
+
207
+ ## Client Commands (Operations List)
208
+
209
+ <details>
210
+ <summary>
211
+ ListRecommendedActions
212
+ </summary>
213
+
214
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bcm-recommended-actions/command/ListRecommendedActionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-recommended-actions/Interface/ListRecommendedActionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bcm-recommended-actions/Interface/ListRecommendedActionsCommandOutput/)
215
+
216
+ </details>
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BCMRecommendedActions = void 0;
4
+ const smithy_client_1 = require("@smithy/smithy-client");
5
+ const BCMRecommendedActionsClient_1 = require("./BCMRecommendedActionsClient");
6
+ const ListRecommendedActionsCommand_1 = require("./commands/ListRecommendedActionsCommand");
7
+ const commands = {
8
+ ListRecommendedActionsCommand: ListRecommendedActionsCommand_1.ListRecommendedActionsCommand,
9
+ };
10
+ class BCMRecommendedActions extends BCMRecommendedActionsClient_1.BCMRecommendedActionsClient {
11
+ }
12
+ exports.BCMRecommendedActions = BCMRecommendedActions;
13
+ (0, smithy_client_1.createAggregatedClient)(commands, BCMRecommendedActions);
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BCMRecommendedActionsClient = exports.__Client = void 0;
4
+ const middleware_host_header_1 = require("@aws-sdk/middleware-host-header");
5
+ const middleware_logger_1 = require("@aws-sdk/middleware-logger");
6
+ const middleware_recursion_detection_1 = require("@aws-sdk/middleware-recursion-detection");
7
+ const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
8
+ const config_resolver_1 = require("@smithy/config-resolver");
9
+ const core_1 = require("@smithy/core");
10
+ const middleware_content_length_1 = require("@smithy/middleware-content-length");
11
+ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
12
+ const middleware_retry_1 = require("@smithy/middleware-retry");
13
+ const smithy_client_1 = require("@smithy/smithy-client");
14
+ Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
15
+ const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
16
+ const EndpointParameters_1 = require("./endpoint/EndpointParameters");
17
+ const runtimeConfig_1 = require("./runtimeConfig");
18
+ const runtimeExtensions_1 = require("./runtimeExtensions");
19
+ class BCMRecommendedActionsClient extends smithy_client_1.Client {
20
+ config;
21
+ constructor(...[configuration]) {
22
+ const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
23
+ super(_config_0);
24
+ this.initConfig = _config_0;
25
+ const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);
26
+ const _config_2 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_1);
27
+ const _config_3 = (0, middleware_retry_1.resolveRetryConfig)(_config_2);
28
+ const _config_4 = (0, config_resolver_1.resolveRegionConfig)(_config_3);
29
+ const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);
30
+ const _config_6 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_5);
31
+ const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6);
32
+ const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);
33
+ this.config = _config_8;
34
+ this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
35
+ this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
36
+ this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
37
+ this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
38
+ this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
39
+ this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
40
+ this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
41
+ httpAuthSchemeParametersProvider: httpAuthSchemeProvider_1.defaultBCMRecommendedActionsHttpAuthSchemeParametersProvider,
42
+ identityProviderConfigProvider: async (config) => new core_1.DefaultIdentityProviderConfig({
43
+ "aws.auth#sigv4": config.credentials,
44
+ }),
45
+ }));
46
+ this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config));
47
+ }
48
+ destroy() {
49
+ super.destroy();
50
+ }
51
+ }
52
+ exports.BCMRecommendedActionsClient = BCMRecommendedActionsClient;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveHttpAuthRuntimeConfig = exports.getHttpAuthExtensionConfiguration = void 0;
4
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
5
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
6
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
7
+ let _credentials = runtimeConfig.credentials;
8
+ return {
9
+ setHttpAuthScheme(httpAuthScheme) {
10
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
11
+ if (index === -1) {
12
+ _httpAuthSchemes.push(httpAuthScheme);
13
+ }
14
+ else {
15
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
16
+ }
17
+ },
18
+ httpAuthSchemes() {
19
+ return _httpAuthSchemes;
20
+ },
21
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
22
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
23
+ },
24
+ httpAuthSchemeProvider() {
25
+ return _httpAuthSchemeProvider;
26
+ },
27
+ setCredentials(credentials) {
28
+ _credentials = credentials;
29
+ },
30
+ credentials() {
31
+ return _credentials;
32
+ },
33
+ };
34
+ };
35
+ exports.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration;
36
+ const resolveHttpAuthRuntimeConfig = (config) => {
37
+ return {
38
+ httpAuthSchemes: config.httpAuthSchemes(),
39
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
40
+ credentials: config.credentials(),
41
+ };
42
+ };
43
+ exports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveHttpAuthSchemeConfig = exports.defaultBCMRecommendedActionsHttpAuthSchemeProvider = exports.defaultBCMRecommendedActionsHttpAuthSchemeParametersProvider = void 0;
4
+ const core_1 = require("@aws-sdk/core");
5
+ const util_middleware_1 = require("@smithy/util-middleware");
6
+ const defaultBCMRecommendedActionsHttpAuthSchemeParametersProvider = async (config, context, input) => {
7
+ return {
8
+ operation: (0, util_middleware_1.getSmithyContext)(context).operation,
9
+ region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||
10
+ (() => {
11
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
12
+ })(),
13
+ };
14
+ };
15
+ exports.defaultBCMRecommendedActionsHttpAuthSchemeParametersProvider = defaultBCMRecommendedActionsHttpAuthSchemeParametersProvider;
16
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
17
+ return {
18
+ schemeId: "aws.auth#sigv4",
19
+ signingProperties: {
20
+ name: "bcm-recommended-actions",
21
+ region: authParameters.region,
22
+ },
23
+ propertiesExtractor: (config, context) => ({
24
+ signingProperties: {
25
+ config,
26
+ context,
27
+ },
28
+ }),
29
+ };
30
+ }
31
+ const defaultBCMRecommendedActionsHttpAuthSchemeProvider = (authParameters) => {
32
+ const options = [];
33
+ switch (authParameters.operation) {
34
+ default: {
35
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
36
+ }
37
+ }
38
+ return options;
39
+ };
40
+ exports.defaultBCMRecommendedActionsHttpAuthSchemeProvider = defaultBCMRecommendedActionsHttpAuthSchemeProvider;
41
+ const resolveHttpAuthSchemeConfig = (config) => {
42
+ const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
43
+ return Object.assign(config_0, {
44
+ authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),
45
+ });
46
+ };
47
+ exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListRecommendedActionsCommand = exports.$Command = void 0;
4
+ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
9
+ const Aws_json1_0_1 = require("../protocols/Aws_json1_0");
10
+ class ListRecommendedActionsCommand extends smithy_client_1.Command
11
+ .classBuilder()
12
+ .ep(EndpointParameters_1.commonParams)
13
+ .m(function (Command, cs, config, o) {
14
+ return [
15
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
16
+ (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
17
+ ];
18
+ })
19
+ .s("AWSBillingAndCostManagementRecommendedActions", "ListRecommendedActions", {})
20
+ .n("BCMRecommendedActionsClient", "ListRecommendedActionsCommand")
21
+ .f(void 0, void 0)
22
+ .ser(Aws_json1_0_1.se_ListRecommendedActionsCommand)
23
+ .de(Aws_json1_0_1.de_ListRecommendedActionsCommand)
24
+ .build() {
25
+ }
26
+ exports.ListRecommendedActionsCommand = ListRecommendedActionsCommand;
@@ -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("./ListRecommendedActionsCommand"), exports);
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.commonParams = exports.resolveClientEndpointParameters = void 0;
4
+ const resolveClientEndpointParameters = (options) => {
5
+ return Object.assign(options, {
6
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
7
+ defaultSigningName: "bcm-recommended-actions",
8
+ });
9
+ };
10
+ exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
11
+ exports.commonParams = {
12
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
13
+ Endpoint: { type: "builtInParams", name: "endpoint" },
14
+ Region: { type: "builtInParams", name: "region" },
15
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultEndpointResolver = void 0;
4
+ const util_endpoints_1 = require("@aws-sdk/util-endpoints");
5
+ const util_endpoints_2 = require("@smithy/util-endpoints");
6
+ const ruleset_1 = require("./ruleset");
7
+ const cache = new util_endpoints_2.EndpointCache({
8
+ size: 50,
9
+ params: ["Endpoint", "Region", "UseFIPS"],
10
+ });
11
+ const defaultEndpointResolver = (endpointParams, context = {}) => {
12
+ return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
13
+ endpointParams: endpointParams,
14
+ logger: context.logger,
15
+ }));
16
+ };
17
+ exports.defaultEndpointResolver = defaultEndpointResolver;
18
+ util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ruleSet = void 0;
4
+ const l = "ref";
5
+ 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" }];
6
+ 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 }] };
7
+ exports.ruleSet = _data;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });