@aws-sdk/client-compute-optimizer 3.180.0 → 3.183.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist-cjs/protocols/Aws_json1_0.js +24 -18
- package/dist-es/ComputeOptimizer.js +74 -81
- package/dist-es/ComputeOptimizerClient.js +22 -28
- package/dist-es/commands/DeleteRecommendationPreferencesCommand.js +21 -28
- package/dist-es/commands/DescribeRecommendationExportJobsCommand.js +21 -28
- package/dist-es/commands/ExportAutoScalingGroupRecommendationsCommand.js +21 -28
- package/dist-es/commands/ExportEBSVolumeRecommendationsCommand.js +21 -28
- package/dist-es/commands/ExportEC2InstanceRecommendationsCommand.js +21 -28
- package/dist-es/commands/ExportLambdaFunctionRecommendationsCommand.js +21 -28
- package/dist-es/commands/GetAutoScalingGroupRecommendationsCommand.js +21 -28
- package/dist-es/commands/GetEBSVolumeRecommendationsCommand.js +21 -28
- package/dist-es/commands/GetEC2InstanceRecommendationsCommand.js +21 -28
- package/dist-es/commands/GetEC2RecommendationProjectedMetricsCommand.js +21 -28
- package/dist-es/commands/GetEffectiveRecommendationPreferencesCommand.js +21 -28
- package/dist-es/commands/GetEnrollmentStatusCommand.js +21 -28
- package/dist-es/commands/GetEnrollmentStatusesForOrganizationCommand.js +21 -28
- package/dist-es/commands/GetLambdaFunctionRecommendationsCommand.js +21 -28
- package/dist-es/commands/GetRecommendationPreferencesCommand.js +21 -28
- package/dist-es/commands/GetRecommendationSummariesCommand.js +21 -28
- package/dist-es/commands/PutRecommendationPreferencesCommand.js +21 -28
- package/dist-es/commands/UpdateEnrollmentStatusCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/ComputeOptimizerServiceException.js +5 -10
- package/dist-es/models/models_0.js +321 -174
- package/dist-es/protocols/Aws_json1_0.js +1679 -2051
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/client-compute-optimizer
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.181.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.180.0...v3.181.0) (2022-09-29)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **clients:** make parseErrorBody async ([#3999](https://github.com/aws/aws-sdk-js-v3/issues/3999)) ([2558c93](https://github.com/aws/aws-sdk-js-v3/commit/2558c93c050357ac6dc47aa0452b15b12ebfd676))
|
|
20
|
+
* **clients:** populate message field when parsing errors ([#3995](https://github.com/aws/aws-sdk-js-v3/issues/3995)) ([02e47f1](https://github.com/aws/aws-sdk-js-v3/commit/02e47f14397ae0a5d2e2883350d038b307fdcdb4))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
# [3.180.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.179.0...v3.180.0) (2022-09-27)
|
|
7
27
|
|
|
8
28
|
**Note:** Version bump only for package @aws-sdk/client-compute-optimizer
|
|
@@ -202,7 +202,7 @@ exports.deserializeAws_json1_0DeleteRecommendationPreferencesCommand = deseriali
|
|
|
202
202
|
const deserializeAws_json1_0DeleteRecommendationPreferencesCommandError = async (output, context) => {
|
|
203
203
|
const parsedOutput = {
|
|
204
204
|
...output,
|
|
205
|
-
body: await
|
|
205
|
+
body: await parseErrorBody(output.body, context),
|
|
206
206
|
};
|
|
207
207
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
208
208
|
switch (errorCode) {
|
|
@@ -257,7 +257,7 @@ exports.deserializeAws_json1_0DescribeRecommendationExportJobsCommand = deserial
|
|
|
257
257
|
const deserializeAws_json1_0DescribeRecommendationExportJobsCommandError = async (output, context) => {
|
|
258
258
|
const parsedOutput = {
|
|
259
259
|
...output,
|
|
260
|
-
body: await
|
|
260
|
+
body: await parseErrorBody(output.body, context),
|
|
261
261
|
};
|
|
262
262
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
263
263
|
switch (errorCode) {
|
|
@@ -312,7 +312,7 @@ exports.deserializeAws_json1_0ExportAutoScalingGroupRecommendationsCommand = des
|
|
|
312
312
|
const deserializeAws_json1_0ExportAutoScalingGroupRecommendationsCommandError = async (output, context) => {
|
|
313
313
|
const parsedOutput = {
|
|
314
314
|
...output,
|
|
315
|
-
body: await
|
|
315
|
+
body: await parseErrorBody(output.body, context),
|
|
316
316
|
};
|
|
317
317
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
318
318
|
switch (errorCode) {
|
|
@@ -367,7 +367,7 @@ exports.deserializeAws_json1_0ExportEBSVolumeRecommendationsCommand = deserializ
|
|
|
367
367
|
const deserializeAws_json1_0ExportEBSVolumeRecommendationsCommandError = async (output, context) => {
|
|
368
368
|
const parsedOutput = {
|
|
369
369
|
...output,
|
|
370
|
-
body: await
|
|
370
|
+
body: await parseErrorBody(output.body, context),
|
|
371
371
|
};
|
|
372
372
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
373
373
|
switch (errorCode) {
|
|
@@ -422,7 +422,7 @@ exports.deserializeAws_json1_0ExportEC2InstanceRecommendationsCommand = deserial
|
|
|
422
422
|
const deserializeAws_json1_0ExportEC2InstanceRecommendationsCommandError = async (output, context) => {
|
|
423
423
|
const parsedOutput = {
|
|
424
424
|
...output,
|
|
425
|
-
body: await
|
|
425
|
+
body: await parseErrorBody(output.body, context),
|
|
426
426
|
};
|
|
427
427
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
428
428
|
switch (errorCode) {
|
|
@@ -477,7 +477,7 @@ exports.deserializeAws_json1_0ExportLambdaFunctionRecommendationsCommand = deser
|
|
|
477
477
|
const deserializeAws_json1_0ExportLambdaFunctionRecommendationsCommandError = async (output, context) => {
|
|
478
478
|
const parsedOutput = {
|
|
479
479
|
...output,
|
|
480
|
-
body: await
|
|
480
|
+
body: await parseErrorBody(output.body, context),
|
|
481
481
|
};
|
|
482
482
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
483
483
|
switch (errorCode) {
|
|
@@ -532,7 +532,7 @@ exports.deserializeAws_json1_0GetAutoScalingGroupRecommendationsCommand = deseri
|
|
|
532
532
|
const deserializeAws_json1_0GetAutoScalingGroupRecommendationsCommandError = async (output, context) => {
|
|
533
533
|
const parsedOutput = {
|
|
534
534
|
...output,
|
|
535
|
-
body: await
|
|
535
|
+
body: await parseErrorBody(output.body, context),
|
|
536
536
|
};
|
|
537
537
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
538
538
|
switch (errorCode) {
|
|
@@ -587,7 +587,7 @@ exports.deserializeAws_json1_0GetEBSVolumeRecommendationsCommand = deserializeAw
|
|
|
587
587
|
const deserializeAws_json1_0GetEBSVolumeRecommendationsCommandError = async (output, context) => {
|
|
588
588
|
const parsedOutput = {
|
|
589
589
|
...output,
|
|
590
|
-
body: await
|
|
590
|
+
body: await parseErrorBody(output.body, context),
|
|
591
591
|
};
|
|
592
592
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
593
593
|
switch (errorCode) {
|
|
@@ -642,7 +642,7 @@ exports.deserializeAws_json1_0GetEC2InstanceRecommendationsCommand = deserialize
|
|
|
642
642
|
const deserializeAws_json1_0GetEC2InstanceRecommendationsCommandError = async (output, context) => {
|
|
643
643
|
const parsedOutput = {
|
|
644
644
|
...output,
|
|
645
|
-
body: await
|
|
645
|
+
body: await parseErrorBody(output.body, context),
|
|
646
646
|
};
|
|
647
647
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
648
648
|
switch (errorCode) {
|
|
@@ -697,7 +697,7 @@ exports.deserializeAws_json1_0GetEC2RecommendationProjectedMetricsCommand = dese
|
|
|
697
697
|
const deserializeAws_json1_0GetEC2RecommendationProjectedMetricsCommandError = async (output, context) => {
|
|
698
698
|
const parsedOutput = {
|
|
699
699
|
...output,
|
|
700
|
-
body: await
|
|
700
|
+
body: await parseErrorBody(output.body, context),
|
|
701
701
|
};
|
|
702
702
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
703
703
|
switch (errorCode) {
|
|
@@ -752,7 +752,7 @@ exports.deserializeAws_json1_0GetEffectiveRecommendationPreferencesCommand = des
|
|
|
752
752
|
const deserializeAws_json1_0GetEffectiveRecommendationPreferencesCommandError = async (output, context) => {
|
|
753
753
|
const parsedOutput = {
|
|
754
754
|
...output,
|
|
755
|
-
body: await
|
|
755
|
+
body: await parseErrorBody(output.body, context),
|
|
756
756
|
};
|
|
757
757
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
758
758
|
switch (errorCode) {
|
|
@@ -807,7 +807,7 @@ exports.deserializeAws_json1_0GetEnrollmentStatusCommand = deserializeAws_json1_
|
|
|
807
807
|
const deserializeAws_json1_0GetEnrollmentStatusCommandError = async (output, context) => {
|
|
808
808
|
const parsedOutput = {
|
|
809
809
|
...output,
|
|
810
|
-
body: await
|
|
810
|
+
body: await parseErrorBody(output.body, context),
|
|
811
811
|
};
|
|
812
812
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
813
813
|
switch (errorCode) {
|
|
@@ -856,7 +856,7 @@ exports.deserializeAws_json1_0GetEnrollmentStatusesForOrganizationCommand = dese
|
|
|
856
856
|
const deserializeAws_json1_0GetEnrollmentStatusesForOrganizationCommandError = async (output, context) => {
|
|
857
857
|
const parsedOutput = {
|
|
858
858
|
...output,
|
|
859
|
-
body: await
|
|
859
|
+
body: await parseErrorBody(output.body, context),
|
|
860
860
|
};
|
|
861
861
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
862
862
|
switch (errorCode) {
|
|
@@ -905,7 +905,7 @@ exports.deserializeAws_json1_0GetLambdaFunctionRecommendationsCommand = deserial
|
|
|
905
905
|
const deserializeAws_json1_0GetLambdaFunctionRecommendationsCommandError = async (output, context) => {
|
|
906
906
|
const parsedOutput = {
|
|
907
907
|
...output,
|
|
908
|
-
body: await
|
|
908
|
+
body: await parseErrorBody(output.body, context),
|
|
909
909
|
};
|
|
910
910
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
911
911
|
switch (errorCode) {
|
|
@@ -960,7 +960,7 @@ exports.deserializeAws_json1_0GetRecommendationPreferencesCommand = deserializeA
|
|
|
960
960
|
const deserializeAws_json1_0GetRecommendationPreferencesCommandError = async (output, context) => {
|
|
961
961
|
const parsedOutput = {
|
|
962
962
|
...output,
|
|
963
|
-
body: await
|
|
963
|
+
body: await parseErrorBody(output.body, context),
|
|
964
964
|
};
|
|
965
965
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
966
966
|
switch (errorCode) {
|
|
@@ -1015,7 +1015,7 @@ exports.deserializeAws_json1_0GetRecommendationSummariesCommand = deserializeAws
|
|
|
1015
1015
|
const deserializeAws_json1_0GetRecommendationSummariesCommandError = async (output, context) => {
|
|
1016
1016
|
const parsedOutput = {
|
|
1017
1017
|
...output,
|
|
1018
|
-
body: await
|
|
1018
|
+
body: await parseErrorBody(output.body, context),
|
|
1019
1019
|
};
|
|
1020
1020
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1021
1021
|
switch (errorCode) {
|
|
@@ -1067,7 +1067,7 @@ exports.deserializeAws_json1_0PutRecommendationPreferencesCommand = deserializeA
|
|
|
1067
1067
|
const deserializeAws_json1_0PutRecommendationPreferencesCommandError = async (output, context) => {
|
|
1068
1068
|
const parsedOutput = {
|
|
1069
1069
|
...output,
|
|
1070
|
-
body: await
|
|
1070
|
+
body: await parseErrorBody(output.body, context),
|
|
1071
1071
|
};
|
|
1072
1072
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1073
1073
|
switch (errorCode) {
|
|
@@ -1122,7 +1122,7 @@ exports.deserializeAws_json1_0UpdateEnrollmentStatusCommand = deserializeAws_jso
|
|
|
1122
1122
|
const deserializeAws_json1_0UpdateEnrollmentStatusCommandError = async (output, context) => {
|
|
1123
1123
|
const parsedOutput = {
|
|
1124
1124
|
...output,
|
|
1125
|
-
body: await
|
|
1125
|
+
body: await parseErrorBody(output.body, context),
|
|
1126
1126
|
};
|
|
1127
1127
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1128
1128
|
switch (errorCode) {
|
|
@@ -2483,6 +2483,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
|
|
|
2483
2483
|
}
|
|
2484
2484
|
return {};
|
|
2485
2485
|
});
|
|
2486
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
2487
|
+
var _a;
|
|
2488
|
+
const value = await parseBody(errorBody, context);
|
|
2489
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
2490
|
+
return value;
|
|
2491
|
+
};
|
|
2486
2492
|
const loadRestJsonErrorCode = (output, data) => {
|
|
2487
2493
|
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
2488
2494
|
const sanitizeErrorCode = (rawValue) => {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { DeleteRecommendationPreferencesCommand, } from "./commands/DeleteRecommendationPreferencesCommand";
|
|
3
2
|
import { DescribeRecommendationExportJobsCommand, } from "./commands/DescribeRecommendationExportJobsCommand";
|
|
4
3
|
import { ExportAutoScalingGroupRecommendationsCommand, } from "./commands/ExportAutoScalingGroupRecommendationsCommand";
|
|
@@ -18,263 +17,257 @@ import { GetRecommendationSummariesCommand, } from "./commands/GetRecommendation
|
|
|
18
17
|
import { PutRecommendationPreferencesCommand, } from "./commands/PutRecommendationPreferencesCommand";
|
|
19
18
|
import { UpdateEnrollmentStatusCommand, } from "./commands/UpdateEnrollmentStatusCommand";
|
|
20
19
|
import { ComputeOptimizerClient } from "./ComputeOptimizerClient";
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
25
|
-
}
|
|
26
|
-
ComputeOptimizer.prototype.deleteRecommendationPreferences = function (args, optionsOrCb, cb) {
|
|
27
|
-
var command = new DeleteRecommendationPreferencesCommand(args);
|
|
20
|
+
export class ComputeOptimizer extends ComputeOptimizerClient {
|
|
21
|
+
deleteRecommendationPreferences(args, optionsOrCb, cb) {
|
|
22
|
+
const command = new DeleteRecommendationPreferencesCommand(args);
|
|
28
23
|
if (typeof optionsOrCb === "function") {
|
|
29
24
|
this.send(command, optionsOrCb);
|
|
30
25
|
}
|
|
31
26
|
else if (typeof cb === "function") {
|
|
32
27
|
if (typeof optionsOrCb !== "object")
|
|
33
|
-
throw new Error(
|
|
28
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
34
29
|
this.send(command, optionsOrCb || {}, cb);
|
|
35
30
|
}
|
|
36
31
|
else {
|
|
37
32
|
return this.send(command, optionsOrCb);
|
|
38
33
|
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
}
|
|
35
|
+
describeRecommendationExportJobs(args, optionsOrCb, cb) {
|
|
36
|
+
const command = new DescribeRecommendationExportJobsCommand(args);
|
|
42
37
|
if (typeof optionsOrCb === "function") {
|
|
43
38
|
this.send(command, optionsOrCb);
|
|
44
39
|
}
|
|
45
40
|
else if (typeof cb === "function") {
|
|
46
41
|
if (typeof optionsOrCb !== "object")
|
|
47
|
-
throw new Error(
|
|
42
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
48
43
|
this.send(command, optionsOrCb || {}, cb);
|
|
49
44
|
}
|
|
50
45
|
else {
|
|
51
46
|
return this.send(command, optionsOrCb);
|
|
52
47
|
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
}
|
|
49
|
+
exportAutoScalingGroupRecommendations(args, optionsOrCb, cb) {
|
|
50
|
+
const command = new ExportAutoScalingGroupRecommendationsCommand(args);
|
|
56
51
|
if (typeof optionsOrCb === "function") {
|
|
57
52
|
this.send(command, optionsOrCb);
|
|
58
53
|
}
|
|
59
54
|
else if (typeof cb === "function") {
|
|
60
55
|
if (typeof optionsOrCb !== "object")
|
|
61
|
-
throw new Error(
|
|
56
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
62
57
|
this.send(command, optionsOrCb || {}, cb);
|
|
63
58
|
}
|
|
64
59
|
else {
|
|
65
60
|
return this.send(command, optionsOrCb);
|
|
66
61
|
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
62
|
+
}
|
|
63
|
+
exportEBSVolumeRecommendations(args, optionsOrCb, cb) {
|
|
64
|
+
const command = new ExportEBSVolumeRecommendationsCommand(args);
|
|
70
65
|
if (typeof optionsOrCb === "function") {
|
|
71
66
|
this.send(command, optionsOrCb);
|
|
72
67
|
}
|
|
73
68
|
else if (typeof cb === "function") {
|
|
74
69
|
if (typeof optionsOrCb !== "object")
|
|
75
|
-
throw new Error(
|
|
70
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
76
71
|
this.send(command, optionsOrCb || {}, cb);
|
|
77
72
|
}
|
|
78
73
|
else {
|
|
79
74
|
return this.send(command, optionsOrCb);
|
|
80
75
|
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
76
|
+
}
|
|
77
|
+
exportEC2InstanceRecommendations(args, optionsOrCb, cb) {
|
|
78
|
+
const command = new ExportEC2InstanceRecommendationsCommand(args);
|
|
84
79
|
if (typeof optionsOrCb === "function") {
|
|
85
80
|
this.send(command, optionsOrCb);
|
|
86
81
|
}
|
|
87
82
|
else if (typeof cb === "function") {
|
|
88
83
|
if (typeof optionsOrCb !== "object")
|
|
89
|
-
throw new Error(
|
|
84
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
90
85
|
this.send(command, optionsOrCb || {}, cb);
|
|
91
86
|
}
|
|
92
87
|
else {
|
|
93
88
|
return this.send(command, optionsOrCb);
|
|
94
89
|
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
90
|
+
}
|
|
91
|
+
exportLambdaFunctionRecommendations(args, optionsOrCb, cb) {
|
|
92
|
+
const command = new ExportLambdaFunctionRecommendationsCommand(args);
|
|
98
93
|
if (typeof optionsOrCb === "function") {
|
|
99
94
|
this.send(command, optionsOrCb);
|
|
100
95
|
}
|
|
101
96
|
else if (typeof cb === "function") {
|
|
102
97
|
if (typeof optionsOrCb !== "object")
|
|
103
|
-
throw new Error(
|
|
98
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
104
99
|
this.send(command, optionsOrCb || {}, cb);
|
|
105
100
|
}
|
|
106
101
|
else {
|
|
107
102
|
return this.send(command, optionsOrCb);
|
|
108
103
|
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
104
|
+
}
|
|
105
|
+
getAutoScalingGroupRecommendations(args, optionsOrCb, cb) {
|
|
106
|
+
const command = new GetAutoScalingGroupRecommendationsCommand(args);
|
|
112
107
|
if (typeof optionsOrCb === "function") {
|
|
113
108
|
this.send(command, optionsOrCb);
|
|
114
109
|
}
|
|
115
110
|
else if (typeof cb === "function") {
|
|
116
111
|
if (typeof optionsOrCb !== "object")
|
|
117
|
-
throw new Error(
|
|
112
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
118
113
|
this.send(command, optionsOrCb || {}, cb);
|
|
119
114
|
}
|
|
120
115
|
else {
|
|
121
116
|
return this.send(command, optionsOrCb);
|
|
122
117
|
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
118
|
+
}
|
|
119
|
+
getEBSVolumeRecommendations(args, optionsOrCb, cb) {
|
|
120
|
+
const command = new GetEBSVolumeRecommendationsCommand(args);
|
|
126
121
|
if (typeof optionsOrCb === "function") {
|
|
127
122
|
this.send(command, optionsOrCb);
|
|
128
123
|
}
|
|
129
124
|
else if (typeof cb === "function") {
|
|
130
125
|
if (typeof optionsOrCb !== "object")
|
|
131
|
-
throw new Error(
|
|
126
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
132
127
|
this.send(command, optionsOrCb || {}, cb);
|
|
133
128
|
}
|
|
134
129
|
else {
|
|
135
130
|
return this.send(command, optionsOrCb);
|
|
136
131
|
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
|
|
132
|
+
}
|
|
133
|
+
getEC2InstanceRecommendations(args, optionsOrCb, cb) {
|
|
134
|
+
const command = new GetEC2InstanceRecommendationsCommand(args);
|
|
140
135
|
if (typeof optionsOrCb === "function") {
|
|
141
136
|
this.send(command, optionsOrCb);
|
|
142
137
|
}
|
|
143
138
|
else if (typeof cb === "function") {
|
|
144
139
|
if (typeof optionsOrCb !== "object")
|
|
145
|
-
throw new Error(
|
|
140
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
146
141
|
this.send(command, optionsOrCb || {}, cb);
|
|
147
142
|
}
|
|
148
143
|
else {
|
|
149
144
|
return this.send(command, optionsOrCb);
|
|
150
145
|
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
|
|
146
|
+
}
|
|
147
|
+
getEC2RecommendationProjectedMetrics(args, optionsOrCb, cb) {
|
|
148
|
+
const command = new GetEC2RecommendationProjectedMetricsCommand(args);
|
|
154
149
|
if (typeof optionsOrCb === "function") {
|
|
155
150
|
this.send(command, optionsOrCb);
|
|
156
151
|
}
|
|
157
152
|
else if (typeof cb === "function") {
|
|
158
153
|
if (typeof optionsOrCb !== "object")
|
|
159
|
-
throw new Error(
|
|
154
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
160
155
|
this.send(command, optionsOrCb || {}, cb);
|
|
161
156
|
}
|
|
162
157
|
else {
|
|
163
158
|
return this.send(command, optionsOrCb);
|
|
164
159
|
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
160
|
+
}
|
|
161
|
+
getEffectiveRecommendationPreferences(args, optionsOrCb, cb) {
|
|
162
|
+
const command = new GetEffectiveRecommendationPreferencesCommand(args);
|
|
168
163
|
if (typeof optionsOrCb === "function") {
|
|
169
164
|
this.send(command, optionsOrCb);
|
|
170
165
|
}
|
|
171
166
|
else if (typeof cb === "function") {
|
|
172
167
|
if (typeof optionsOrCb !== "object")
|
|
173
|
-
throw new Error(
|
|
168
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
174
169
|
this.send(command, optionsOrCb || {}, cb);
|
|
175
170
|
}
|
|
176
171
|
else {
|
|
177
172
|
return this.send(command, optionsOrCb);
|
|
178
173
|
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
|
|
174
|
+
}
|
|
175
|
+
getEnrollmentStatus(args, optionsOrCb, cb) {
|
|
176
|
+
const command = new GetEnrollmentStatusCommand(args);
|
|
182
177
|
if (typeof optionsOrCb === "function") {
|
|
183
178
|
this.send(command, optionsOrCb);
|
|
184
179
|
}
|
|
185
180
|
else if (typeof cb === "function") {
|
|
186
181
|
if (typeof optionsOrCb !== "object")
|
|
187
|
-
throw new Error(
|
|
182
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
188
183
|
this.send(command, optionsOrCb || {}, cb);
|
|
189
184
|
}
|
|
190
185
|
else {
|
|
191
186
|
return this.send(command, optionsOrCb);
|
|
192
187
|
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
|
|
188
|
+
}
|
|
189
|
+
getEnrollmentStatusesForOrganization(args, optionsOrCb, cb) {
|
|
190
|
+
const command = new GetEnrollmentStatusesForOrganizationCommand(args);
|
|
196
191
|
if (typeof optionsOrCb === "function") {
|
|
197
192
|
this.send(command, optionsOrCb);
|
|
198
193
|
}
|
|
199
194
|
else if (typeof cb === "function") {
|
|
200
195
|
if (typeof optionsOrCb !== "object")
|
|
201
|
-
throw new Error(
|
|
196
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
202
197
|
this.send(command, optionsOrCb || {}, cb);
|
|
203
198
|
}
|
|
204
199
|
else {
|
|
205
200
|
return this.send(command, optionsOrCb);
|
|
206
201
|
}
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
|
|
202
|
+
}
|
|
203
|
+
getLambdaFunctionRecommendations(args, optionsOrCb, cb) {
|
|
204
|
+
const command = new GetLambdaFunctionRecommendationsCommand(args);
|
|
210
205
|
if (typeof optionsOrCb === "function") {
|
|
211
206
|
this.send(command, optionsOrCb);
|
|
212
207
|
}
|
|
213
208
|
else if (typeof cb === "function") {
|
|
214
209
|
if (typeof optionsOrCb !== "object")
|
|
215
|
-
throw new Error(
|
|
210
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
216
211
|
this.send(command, optionsOrCb || {}, cb);
|
|
217
212
|
}
|
|
218
213
|
else {
|
|
219
214
|
return this.send(command, optionsOrCb);
|
|
220
215
|
}
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
|
|
216
|
+
}
|
|
217
|
+
getRecommendationPreferences(args, optionsOrCb, cb) {
|
|
218
|
+
const command = new GetRecommendationPreferencesCommand(args);
|
|
224
219
|
if (typeof optionsOrCb === "function") {
|
|
225
220
|
this.send(command, optionsOrCb);
|
|
226
221
|
}
|
|
227
222
|
else if (typeof cb === "function") {
|
|
228
223
|
if (typeof optionsOrCb !== "object")
|
|
229
|
-
throw new Error(
|
|
224
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
230
225
|
this.send(command, optionsOrCb || {}, cb);
|
|
231
226
|
}
|
|
232
227
|
else {
|
|
233
228
|
return this.send(command, optionsOrCb);
|
|
234
229
|
}
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
|
|
230
|
+
}
|
|
231
|
+
getRecommendationSummaries(args, optionsOrCb, cb) {
|
|
232
|
+
const command = new GetRecommendationSummariesCommand(args);
|
|
238
233
|
if (typeof optionsOrCb === "function") {
|
|
239
234
|
this.send(command, optionsOrCb);
|
|
240
235
|
}
|
|
241
236
|
else if (typeof cb === "function") {
|
|
242
237
|
if (typeof optionsOrCb !== "object")
|
|
243
|
-
throw new Error(
|
|
238
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
244
239
|
this.send(command, optionsOrCb || {}, cb);
|
|
245
240
|
}
|
|
246
241
|
else {
|
|
247
242
|
return this.send(command, optionsOrCb);
|
|
248
243
|
}
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
|
|
244
|
+
}
|
|
245
|
+
putRecommendationPreferences(args, optionsOrCb, cb) {
|
|
246
|
+
const command = new PutRecommendationPreferencesCommand(args);
|
|
252
247
|
if (typeof optionsOrCb === "function") {
|
|
253
248
|
this.send(command, optionsOrCb);
|
|
254
249
|
}
|
|
255
250
|
else if (typeof cb === "function") {
|
|
256
251
|
if (typeof optionsOrCb !== "object")
|
|
257
|
-
throw new Error(
|
|
252
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
258
253
|
this.send(command, optionsOrCb || {}, cb);
|
|
259
254
|
}
|
|
260
255
|
else {
|
|
261
256
|
return this.send(command, optionsOrCb);
|
|
262
257
|
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
|
|
258
|
+
}
|
|
259
|
+
updateEnrollmentStatus(args, optionsOrCb, cb) {
|
|
260
|
+
const command = new UpdateEnrollmentStatusCommand(args);
|
|
266
261
|
if (typeof optionsOrCb === "function") {
|
|
267
262
|
this.send(command, optionsOrCb);
|
|
268
263
|
}
|
|
269
264
|
else if (typeof cb === "function") {
|
|
270
265
|
if (typeof optionsOrCb !== "object")
|
|
271
|
-
throw new Error(
|
|
266
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
272
267
|
this.send(command, optionsOrCb || {}, cb);
|
|
273
268
|
}
|
|
274
269
|
else {
|
|
275
270
|
return this.send(command, optionsOrCb);
|
|
276
271
|
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
}(ComputeOptimizerClient));
|
|
280
|
-
export { ComputeOptimizer };
|
|
272
|
+
}
|
|
273
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-resolver";
|
|
3
2
|
import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
|
|
4
3
|
import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
|
|
@@ -9,31 +8,26 @@ import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-sig
|
|
|
9
8
|
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
|
10
9
|
import { Client as __Client, } from "@aws-sdk/smithy-client";
|
|
11
10
|
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
_this.middlewareStack.use(getAwsAuthPlugin(_this.config));
|
|
31
|
-
_this.middlewareStack.use(getUserAgentPlugin(_this.config));
|
|
32
|
-
return _this;
|
|
11
|
+
export class ComputeOptimizerClient extends __Client {
|
|
12
|
+
constructor(configuration) {
|
|
13
|
+
const _config_0 = __getRuntimeConfig(configuration);
|
|
14
|
+
const _config_1 = resolveRegionConfig(_config_0);
|
|
15
|
+
const _config_2 = resolveEndpointsConfig(_config_1);
|
|
16
|
+
const _config_3 = resolveRetryConfig(_config_2);
|
|
17
|
+
const _config_4 = resolveHostHeaderConfig(_config_3);
|
|
18
|
+
const _config_5 = resolveAwsAuthConfig(_config_4);
|
|
19
|
+
const _config_6 = resolveUserAgentConfig(_config_5);
|
|
20
|
+
super(_config_6);
|
|
21
|
+
this.config = _config_6;
|
|
22
|
+
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
23
|
+
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
24
|
+
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
25
|
+
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
26
|
+
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
27
|
+
this.middlewareStack.use(getAwsAuthPlugin(this.config));
|
|
28
|
+
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
33
29
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}(__Client));
|
|
39
|
-
export { ComputeOptimizerClient };
|
|
30
|
+
destroy() {
|
|
31
|
+
super.destroy();
|
|
32
|
+
}
|
|
33
|
+
}
|