@aws-sdk/client-application-auto-scaling 3.696.0 → 3.698.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/README.md +8 -0
- package/dist-cjs/index.js +151 -0
- package/dist-es/ApplicationAutoScaling.js +2 -0
- package/dist-es/commands/GetPredictiveScalingForecastCommand.js +22 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +9 -0
- package/dist-es/protocols/Aws_json1_1.js +131 -0
- package/dist-types/ApplicationAutoScaling.d.ts +7 -0
- package/dist-types/ApplicationAutoScalingClient.d.ts +3 -2
- package/dist-types/commands/DescribeScalableTargetsCommand.d.ts +1 -0
- package/dist-types/commands/DescribeScalingPoliciesCommand.d.ts +96 -1
- package/dist-types/commands/GetPredictiveScalingForecastCommand.d.ts +194 -0
- package/dist-types/commands/PutScalingPolicyCommand.d.ts +96 -1
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +537 -1
- package/dist-types/protocols/Aws_json1_1.d.ts +9 -0
- package/dist-types/ts3.4/ApplicationAutoScaling.d.ts +17 -0
- package/dist-types/ts3.4/ApplicationAutoScalingClient.d.ts +6 -0
- package/dist-types/ts3.4/commands/GetPredictiveScalingForecastCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +108 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +12 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -340,6 +340,14 @@ DescribeScheduledActions
|
|
|
340
340
|
|
|
341
341
|
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/application-auto-scaling/command/DescribeScheduledActionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-application-auto-scaling/Interface/DescribeScheduledActionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-application-auto-scaling/Interface/DescribeScheduledActionsCommandOutput/)
|
|
342
342
|
|
|
343
|
+
</details>
|
|
344
|
+
<details>
|
|
345
|
+
<summary>
|
|
346
|
+
GetPredictiveScalingForecast
|
|
347
|
+
</summary>
|
|
348
|
+
|
|
349
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/application-auto-scaling/command/GetPredictiveScalingForecastCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-application-auto-scaling/Interface/GetPredictiveScalingForecastCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-application-auto-scaling/Interface/GetPredictiveScalingForecastCommandOutput/)
|
|
350
|
+
|
|
343
351
|
</details>
|
|
344
352
|
<details>
|
|
345
353
|
<summary>
|
package/dist-cjs/index.js
CHANGED
|
@@ -34,6 +34,7 @@ __export(src_exports, {
|
|
|
34
34
|
DescribeScalingPoliciesCommand: () => DescribeScalingPoliciesCommand,
|
|
35
35
|
DescribeScheduledActionsCommand: () => DescribeScheduledActionsCommand,
|
|
36
36
|
FailedResourceAccessException: () => FailedResourceAccessException,
|
|
37
|
+
GetPredictiveScalingForecastCommand: () => GetPredictiveScalingForecastCommand,
|
|
37
38
|
InternalServiceException: () => InternalServiceException,
|
|
38
39
|
InvalidNextTokenException: () => InvalidNextTokenException,
|
|
39
40
|
LimitExceededException: () => LimitExceededException,
|
|
@@ -43,6 +44,8 @@ __export(src_exports, {
|
|
|
43
44
|
MetricType: () => MetricType,
|
|
44
45
|
ObjectNotFoundException: () => ObjectNotFoundException,
|
|
45
46
|
PolicyType: () => PolicyType,
|
|
47
|
+
PredictiveScalingMaxCapacityBreachBehavior: () => PredictiveScalingMaxCapacityBreachBehavior,
|
|
48
|
+
PredictiveScalingMode: () => PredictiveScalingMode,
|
|
46
49
|
PutScalingPolicyCommand: () => PutScalingPolicyCommand,
|
|
47
50
|
PutScheduledActionCommand: () => PutScheduledActionCommand,
|
|
48
51
|
RegisterScalableTargetCommand: () => RegisterScalableTargetCommand,
|
|
@@ -373,9 +376,18 @@ var ScalingActivityStatusCode = {
|
|
|
373
376
|
Unfulfilled: "Unfulfilled"
|
|
374
377
|
};
|
|
375
378
|
var PolicyType = {
|
|
379
|
+
PredictiveScaling: "PredictiveScaling",
|
|
376
380
|
StepScaling: "StepScaling",
|
|
377
381
|
TargetTrackingScaling: "TargetTrackingScaling"
|
|
378
382
|
};
|
|
383
|
+
var PredictiveScalingMaxCapacityBreachBehavior = {
|
|
384
|
+
HonorMaxCapacity: "HonorMaxCapacity",
|
|
385
|
+
IncreaseMaxCapacity: "IncreaseMaxCapacity"
|
|
386
|
+
};
|
|
387
|
+
var PredictiveScalingMode = {
|
|
388
|
+
ForecastAndScale: "ForecastAndScale",
|
|
389
|
+
ForecastOnly: "ForecastOnly"
|
|
390
|
+
};
|
|
379
391
|
var MetricAggregationType = {
|
|
380
392
|
Average: "Average",
|
|
381
393
|
Maximum: "Maximum",
|
|
@@ -535,6 +547,12 @@ var se_DescribeScheduledActionsCommand = /* @__PURE__ */ __name(async (input, co
|
|
|
535
547
|
body = JSON.stringify((0, import_smithy_client._json)(input));
|
|
536
548
|
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
537
549
|
}, "se_DescribeScheduledActionsCommand");
|
|
550
|
+
var se_GetPredictiveScalingForecastCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
551
|
+
const headers = sharedHeaders("GetPredictiveScalingForecast");
|
|
552
|
+
let body;
|
|
553
|
+
body = JSON.stringify(se_GetPredictiveScalingForecastRequest(input, context));
|
|
554
|
+
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
555
|
+
}, "se_GetPredictiveScalingForecastCommand");
|
|
538
556
|
var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
539
557
|
const headers = sharedHeaders("ListTagsForResource");
|
|
540
558
|
let body;
|
|
@@ -662,6 +680,19 @@ var de_DescribeScheduledActionsCommand = /* @__PURE__ */ __name(async (output, c
|
|
|
662
680
|
};
|
|
663
681
|
return response;
|
|
664
682
|
}, "de_DescribeScheduledActionsCommand");
|
|
683
|
+
var de_GetPredictiveScalingForecastCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
684
|
+
if (output.statusCode >= 300) {
|
|
685
|
+
return de_CommandError(output, context);
|
|
686
|
+
}
|
|
687
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
688
|
+
let contents = {};
|
|
689
|
+
contents = de_GetPredictiveScalingForecastResponse(data, context);
|
|
690
|
+
const response = {
|
|
691
|
+
$metadata: deserializeMetadata(output),
|
|
692
|
+
...contents
|
|
693
|
+
};
|
|
694
|
+
return response;
|
|
695
|
+
}, "de_GetPredictiveScalingForecastCommand");
|
|
665
696
|
var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
666
697
|
if (output.statusCode >= 300) {
|
|
667
698
|
return de_CommandError(output, context);
|
|
@@ -864,10 +895,46 @@ var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, cont
|
|
|
864
895
|
});
|
|
865
896
|
return (0, import_smithy_client.decorateServiceException)(exception, body);
|
|
866
897
|
}, "de_ValidationExceptionRes");
|
|
898
|
+
var se_GetPredictiveScalingForecastRequest = /* @__PURE__ */ __name((input, context) => {
|
|
899
|
+
return (0, import_smithy_client.take)(input, {
|
|
900
|
+
EndTime: (_) => _.getTime() / 1e3,
|
|
901
|
+
PolicyName: [],
|
|
902
|
+
ResourceId: [],
|
|
903
|
+
ScalableDimension: [],
|
|
904
|
+
ServiceNamespace: [],
|
|
905
|
+
StartTime: (_) => _.getTime() / 1e3
|
|
906
|
+
});
|
|
907
|
+
}, "se_GetPredictiveScalingForecastRequest");
|
|
908
|
+
var se_PredictiveScalingMetricSpecification = /* @__PURE__ */ __name((input, context) => {
|
|
909
|
+
return (0, import_smithy_client.take)(input, {
|
|
910
|
+
CustomizedCapacityMetricSpecification: import_smithy_client._json,
|
|
911
|
+
CustomizedLoadMetricSpecification: import_smithy_client._json,
|
|
912
|
+
CustomizedScalingMetricSpecification: import_smithy_client._json,
|
|
913
|
+
PredefinedLoadMetricSpecification: import_smithy_client._json,
|
|
914
|
+
PredefinedMetricPairSpecification: import_smithy_client._json,
|
|
915
|
+
PredefinedScalingMetricSpecification: import_smithy_client._json,
|
|
916
|
+
TargetValue: import_smithy_client.serializeFloat
|
|
917
|
+
});
|
|
918
|
+
}, "se_PredictiveScalingMetricSpecification");
|
|
919
|
+
var se_PredictiveScalingMetricSpecifications = /* @__PURE__ */ __name((input, context) => {
|
|
920
|
+
return input.filter((e) => e != null).map((entry) => {
|
|
921
|
+
return se_PredictiveScalingMetricSpecification(entry, context);
|
|
922
|
+
});
|
|
923
|
+
}, "se_PredictiveScalingMetricSpecifications");
|
|
924
|
+
var se_PredictiveScalingPolicyConfiguration = /* @__PURE__ */ __name((input, context) => {
|
|
925
|
+
return (0, import_smithy_client.take)(input, {
|
|
926
|
+
MaxCapacityBreachBehavior: [],
|
|
927
|
+
MaxCapacityBuffer: [],
|
|
928
|
+
MetricSpecifications: (_) => se_PredictiveScalingMetricSpecifications(_, context),
|
|
929
|
+
Mode: [],
|
|
930
|
+
SchedulingBufferTime: []
|
|
931
|
+
});
|
|
932
|
+
}, "se_PredictiveScalingPolicyConfiguration");
|
|
867
933
|
var se_PutScalingPolicyRequest = /* @__PURE__ */ __name((input, context) => {
|
|
868
934
|
return (0, import_smithy_client.take)(input, {
|
|
869
935
|
PolicyName: [],
|
|
870
936
|
PolicyType: [],
|
|
937
|
+
PredictiveScalingPolicyConfiguration: (_) => se_PredictiveScalingPolicyConfiguration(_, context),
|
|
871
938
|
ResourceId: [],
|
|
872
939
|
ScalableDimension: [],
|
|
873
940
|
ServiceNamespace: [],
|
|
@@ -919,6 +986,12 @@ var se_TargetTrackingScalingPolicyConfiguration = /* @__PURE__ */ __name((input,
|
|
|
919
986
|
TargetValue: import_smithy_client.serializeFloat
|
|
920
987
|
});
|
|
921
988
|
}, "se_TargetTrackingScalingPolicyConfiguration");
|
|
989
|
+
var de_CapacityForecast = /* @__PURE__ */ __name((output, context) => {
|
|
990
|
+
return (0, import_smithy_client.take)(output, {
|
|
991
|
+
Timestamps: (_) => de_PredictiveScalingForecastTimestamps(_, context),
|
|
992
|
+
Values: (_) => de_PredictiveScalingForecastValues(_, context)
|
|
993
|
+
});
|
|
994
|
+
}, "de_CapacityForecast");
|
|
922
995
|
var de_DescribeScalableTargetsResponse = /* @__PURE__ */ __name((output, context) => {
|
|
923
996
|
return (0, import_smithy_client.take)(output, {
|
|
924
997
|
NextToken: import_smithy_client.expectString,
|
|
@@ -943,11 +1016,70 @@ var de_DescribeScheduledActionsResponse = /* @__PURE__ */ __name((output, contex
|
|
|
943
1016
|
ScheduledActions: (_) => de_ScheduledActions(_, context)
|
|
944
1017
|
});
|
|
945
1018
|
}, "de_DescribeScheduledActionsResponse");
|
|
1019
|
+
var de_GetPredictiveScalingForecastResponse = /* @__PURE__ */ __name((output, context) => {
|
|
1020
|
+
return (0, import_smithy_client.take)(output, {
|
|
1021
|
+
CapacityForecast: (_) => de_CapacityForecast(_, context),
|
|
1022
|
+
LoadForecast: (_) => de_LoadForecasts(_, context),
|
|
1023
|
+
UpdateTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_)))
|
|
1024
|
+
});
|
|
1025
|
+
}, "de_GetPredictiveScalingForecastResponse");
|
|
1026
|
+
var de_LoadForecast = /* @__PURE__ */ __name((output, context) => {
|
|
1027
|
+
return (0, import_smithy_client.take)(output, {
|
|
1028
|
+
MetricSpecification: (_) => de_PredictiveScalingMetricSpecification(_, context),
|
|
1029
|
+
Timestamps: (_) => de_PredictiveScalingForecastTimestamps(_, context),
|
|
1030
|
+
Values: (_) => de_PredictiveScalingForecastValues(_, context)
|
|
1031
|
+
});
|
|
1032
|
+
}, "de_LoadForecast");
|
|
1033
|
+
var de_LoadForecasts = /* @__PURE__ */ __name((output, context) => {
|
|
1034
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1035
|
+
return de_LoadForecast(entry, context);
|
|
1036
|
+
});
|
|
1037
|
+
return retVal;
|
|
1038
|
+
}, "de_LoadForecasts");
|
|
1039
|
+
var de_PredictiveScalingForecastTimestamps = /* @__PURE__ */ __name((output, context) => {
|
|
1040
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1041
|
+
return (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(entry)));
|
|
1042
|
+
});
|
|
1043
|
+
return retVal;
|
|
1044
|
+
}, "de_PredictiveScalingForecastTimestamps");
|
|
1045
|
+
var de_PredictiveScalingForecastValues = /* @__PURE__ */ __name((output, context) => {
|
|
1046
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1047
|
+
return (0, import_smithy_client.limitedParseDouble)(entry);
|
|
1048
|
+
});
|
|
1049
|
+
return retVal;
|
|
1050
|
+
}, "de_PredictiveScalingForecastValues");
|
|
1051
|
+
var de_PredictiveScalingMetricSpecification = /* @__PURE__ */ __name((output, context) => {
|
|
1052
|
+
return (0, import_smithy_client.take)(output, {
|
|
1053
|
+
CustomizedCapacityMetricSpecification: import_smithy_client._json,
|
|
1054
|
+
CustomizedLoadMetricSpecification: import_smithy_client._json,
|
|
1055
|
+
CustomizedScalingMetricSpecification: import_smithy_client._json,
|
|
1056
|
+
PredefinedLoadMetricSpecification: import_smithy_client._json,
|
|
1057
|
+
PredefinedMetricPairSpecification: import_smithy_client._json,
|
|
1058
|
+
PredefinedScalingMetricSpecification: import_smithy_client._json,
|
|
1059
|
+
TargetValue: import_smithy_client.limitedParseDouble
|
|
1060
|
+
});
|
|
1061
|
+
}, "de_PredictiveScalingMetricSpecification");
|
|
1062
|
+
var de_PredictiveScalingMetricSpecifications = /* @__PURE__ */ __name((output, context) => {
|
|
1063
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1064
|
+
return de_PredictiveScalingMetricSpecification(entry, context);
|
|
1065
|
+
});
|
|
1066
|
+
return retVal;
|
|
1067
|
+
}, "de_PredictiveScalingMetricSpecifications");
|
|
1068
|
+
var de_PredictiveScalingPolicyConfiguration = /* @__PURE__ */ __name((output, context) => {
|
|
1069
|
+
return (0, import_smithy_client.take)(output, {
|
|
1070
|
+
MaxCapacityBreachBehavior: import_smithy_client.expectString,
|
|
1071
|
+
MaxCapacityBuffer: import_smithy_client.expectInt32,
|
|
1072
|
+
MetricSpecifications: (_) => de_PredictiveScalingMetricSpecifications(_, context),
|
|
1073
|
+
Mode: import_smithy_client.expectString,
|
|
1074
|
+
SchedulingBufferTime: import_smithy_client.expectInt32
|
|
1075
|
+
});
|
|
1076
|
+
}, "de_PredictiveScalingPolicyConfiguration");
|
|
946
1077
|
var de_ScalableTarget = /* @__PURE__ */ __name((output, context) => {
|
|
947
1078
|
return (0, import_smithy_client.take)(output, {
|
|
948
1079
|
CreationTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
|
|
949
1080
|
MaxCapacity: import_smithy_client.expectInt32,
|
|
950
1081
|
MinCapacity: import_smithy_client.expectInt32,
|
|
1082
|
+
PredictedCapacity: import_smithy_client.expectInt32,
|
|
951
1083
|
ResourceId: import_smithy_client.expectString,
|
|
952
1084
|
RoleARN: import_smithy_client.expectString,
|
|
953
1085
|
ScalableDimension: import_smithy_client.expectString,
|
|
@@ -997,6 +1129,7 @@ var de_ScalingPolicy = /* @__PURE__ */ __name((output, context) => {
|
|
|
997
1129
|
PolicyARN: import_smithy_client.expectString,
|
|
998
1130
|
PolicyName: import_smithy_client.expectString,
|
|
999
1131
|
PolicyType: import_smithy_client.expectString,
|
|
1132
|
+
PredictiveScalingPolicyConfiguration: (_) => de_PredictiveScalingPolicyConfiguration(_, context),
|
|
1000
1133
|
ResourceId: import_smithy_client.expectString,
|
|
1001
1134
|
ScalableDimension: import_smithy_client.expectString,
|
|
1002
1135
|
ServiceNamespace: import_smithy_client.expectString,
|
|
@@ -1185,6 +1318,20 @@ var _DescribeScheduledActionsCommand = class _DescribeScheduledActionsCommand ex
|
|
|
1185
1318
|
__name(_DescribeScheduledActionsCommand, "DescribeScheduledActionsCommand");
|
|
1186
1319
|
var DescribeScheduledActionsCommand = _DescribeScheduledActionsCommand;
|
|
1187
1320
|
|
|
1321
|
+
// src/commands/GetPredictiveScalingForecastCommand.ts
|
|
1322
|
+
|
|
1323
|
+
|
|
1324
|
+
|
|
1325
|
+
var _GetPredictiveScalingForecastCommand = class _GetPredictiveScalingForecastCommand extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
|
|
1326
|
+
return [
|
|
1327
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
1328
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
1329
|
+
];
|
|
1330
|
+
}).s("AnyScaleFrontendService", "GetPredictiveScalingForecast", {}).n("ApplicationAutoScalingClient", "GetPredictiveScalingForecastCommand").f(void 0, void 0).ser(se_GetPredictiveScalingForecastCommand).de(de_GetPredictiveScalingForecastCommand).build() {
|
|
1331
|
+
};
|
|
1332
|
+
__name(_GetPredictiveScalingForecastCommand, "GetPredictiveScalingForecastCommand");
|
|
1333
|
+
var GetPredictiveScalingForecastCommand = _GetPredictiveScalingForecastCommand;
|
|
1334
|
+
|
|
1188
1335
|
// src/commands/ListTagsForResourceCommand.ts
|
|
1189
1336
|
|
|
1190
1337
|
|
|
@@ -1278,6 +1425,7 @@ var commands = {
|
|
|
1278
1425
|
DescribeScalingActivitiesCommand,
|
|
1279
1426
|
DescribeScalingPoliciesCommand,
|
|
1280
1427
|
DescribeScheduledActionsCommand,
|
|
1428
|
+
GetPredictiveScalingForecastCommand,
|
|
1281
1429
|
ListTagsForResourceCommand,
|
|
1282
1430
|
PutScalingPolicyCommand,
|
|
1283
1431
|
PutScheduledActionCommand,
|
|
@@ -1321,6 +1469,7 @@ var paginateDescribeScheduledActions = (0, import_core.createPaginator)(Applicat
|
|
|
1321
1469
|
DescribeScalingActivitiesCommand,
|
|
1322
1470
|
DescribeScalingPoliciesCommand,
|
|
1323
1471
|
DescribeScheduledActionsCommand,
|
|
1472
|
+
GetPredictiveScalingForecastCommand,
|
|
1324
1473
|
ListTagsForResourceCommand,
|
|
1325
1474
|
PutScalingPolicyCommand,
|
|
1326
1475
|
PutScheduledActionCommand,
|
|
@@ -1341,6 +1490,8 @@ var paginateDescribeScheduledActions = (0, import_core.createPaginator)(Applicat
|
|
|
1341
1490
|
InvalidNextTokenException,
|
|
1342
1491
|
ScalingActivityStatusCode,
|
|
1343
1492
|
PolicyType,
|
|
1493
|
+
PredictiveScalingMaxCapacityBreachBehavior,
|
|
1494
|
+
PredictiveScalingMode,
|
|
1344
1495
|
MetricAggregationType,
|
|
1345
1496
|
MetricStatistic,
|
|
1346
1497
|
MetricType,
|
|
@@ -7,6 +7,7 @@ import { DescribeScalableTargetsCommand, } from "./commands/DescribeScalableTarg
|
|
|
7
7
|
import { DescribeScalingActivitiesCommand, } from "./commands/DescribeScalingActivitiesCommand";
|
|
8
8
|
import { DescribeScalingPoliciesCommand, } from "./commands/DescribeScalingPoliciesCommand";
|
|
9
9
|
import { DescribeScheduledActionsCommand, } from "./commands/DescribeScheduledActionsCommand";
|
|
10
|
+
import { GetPredictiveScalingForecastCommand, } from "./commands/GetPredictiveScalingForecastCommand";
|
|
10
11
|
import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
|
|
11
12
|
import { PutScalingPolicyCommand, } from "./commands/PutScalingPolicyCommand";
|
|
12
13
|
import { PutScheduledActionCommand, } from "./commands/PutScheduledActionCommand";
|
|
@@ -21,6 +22,7 @@ const commands = {
|
|
|
21
22
|
DescribeScalingActivitiesCommand,
|
|
22
23
|
DescribeScalingPoliciesCommand,
|
|
23
24
|
DescribeScheduledActionsCommand,
|
|
25
|
+
GetPredictiveScalingForecastCommand,
|
|
24
26
|
ListTagsForResourceCommand,
|
|
25
27
|
PutScalingPolicyCommand,
|
|
26
28
|
PutScheduledActionCommand,
|
|
@@ -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_GetPredictiveScalingForecastCommand, se_GetPredictiveScalingForecastCommand, } from "../protocols/Aws_json1_1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class GetPredictiveScalingForecastCommand 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("AnyScaleFrontendService", "GetPredictiveScalingForecast", {})
|
|
17
|
+
.n("ApplicationAutoScalingClient", "GetPredictiveScalingForecastCommand")
|
|
18
|
+
.f(void 0, void 0)
|
|
19
|
+
.ser(se_GetPredictiveScalingForecastCommand)
|
|
20
|
+
.de(de_GetPredictiveScalingForecastCommand)
|
|
21
|
+
.build() {
|
|
22
|
+
}
|
|
@@ -5,6 +5,7 @@ export * from "./DescribeScalableTargetsCommand";
|
|
|
5
5
|
export * from "./DescribeScalingActivitiesCommand";
|
|
6
6
|
export * from "./DescribeScalingPoliciesCommand";
|
|
7
7
|
export * from "./DescribeScheduledActionsCommand";
|
|
8
|
+
export * from "./GetPredictiveScalingForecastCommand";
|
|
8
9
|
export * from "./ListTagsForResourceCommand";
|
|
9
10
|
export * from "./PutScalingPolicyCommand";
|
|
10
11
|
export * from "./PutScheduledActionCommand";
|
|
@@ -120,9 +120,18 @@ export const ScalingActivityStatusCode = {
|
|
|
120
120
|
Unfulfilled: "Unfulfilled",
|
|
121
121
|
};
|
|
122
122
|
export const PolicyType = {
|
|
123
|
+
PredictiveScaling: "PredictiveScaling",
|
|
123
124
|
StepScaling: "StepScaling",
|
|
124
125
|
TargetTrackingScaling: "TargetTrackingScaling",
|
|
125
126
|
};
|
|
127
|
+
export const PredictiveScalingMaxCapacityBreachBehavior = {
|
|
128
|
+
HonorMaxCapacity: "HonorMaxCapacity",
|
|
129
|
+
IncreaseMaxCapacity: "IncreaseMaxCapacity",
|
|
130
|
+
};
|
|
131
|
+
export const PredictiveScalingMode = {
|
|
132
|
+
ForecastAndScale: "ForecastAndScale",
|
|
133
|
+
ForecastOnly: "ForecastOnly",
|
|
134
|
+
};
|
|
126
135
|
export const MetricAggregationType = {
|
|
127
136
|
Average: "Average",
|
|
128
137
|
Maximum: "Maximum",
|
|
@@ -45,6 +45,12 @@ export const se_DescribeScheduledActionsCommand = async (input, context) => {
|
|
|
45
45
|
body = JSON.stringify(_json(input));
|
|
46
46
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
47
47
|
};
|
|
48
|
+
export const se_GetPredictiveScalingForecastCommand = async (input, context) => {
|
|
49
|
+
const headers = sharedHeaders("GetPredictiveScalingForecast");
|
|
50
|
+
let body;
|
|
51
|
+
body = JSON.stringify(se_GetPredictiveScalingForecastRequest(input, context));
|
|
52
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
53
|
+
};
|
|
48
54
|
export const se_ListTagsForResourceCommand = async (input, context) => {
|
|
49
55
|
const headers = sharedHeaders("ListTagsForResource");
|
|
50
56
|
let body;
|
|
@@ -172,6 +178,19 @@ export const de_DescribeScheduledActionsCommand = async (output, context) => {
|
|
|
172
178
|
};
|
|
173
179
|
return response;
|
|
174
180
|
};
|
|
181
|
+
export const de_GetPredictiveScalingForecastCommand = async (output, context) => {
|
|
182
|
+
if (output.statusCode >= 300) {
|
|
183
|
+
return de_CommandError(output, context);
|
|
184
|
+
}
|
|
185
|
+
const data = await parseBody(output.body, context);
|
|
186
|
+
let contents = {};
|
|
187
|
+
contents = de_GetPredictiveScalingForecastResponse(data, context);
|
|
188
|
+
const response = {
|
|
189
|
+
$metadata: deserializeMetadata(output),
|
|
190
|
+
...contents,
|
|
191
|
+
};
|
|
192
|
+
return response;
|
|
193
|
+
};
|
|
175
194
|
export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
176
195
|
if (output.statusCode >= 300) {
|
|
177
196
|
return de_CommandError(output, context);
|
|
@@ -374,10 +393,48 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
374
393
|
});
|
|
375
394
|
return __decorateServiceException(exception, body);
|
|
376
395
|
};
|
|
396
|
+
const se_GetPredictiveScalingForecastRequest = (input, context) => {
|
|
397
|
+
return take(input, {
|
|
398
|
+
EndTime: (_) => _.getTime() / 1000,
|
|
399
|
+
PolicyName: [],
|
|
400
|
+
ResourceId: [],
|
|
401
|
+
ScalableDimension: [],
|
|
402
|
+
ServiceNamespace: [],
|
|
403
|
+
StartTime: (_) => _.getTime() / 1000,
|
|
404
|
+
});
|
|
405
|
+
};
|
|
406
|
+
const se_PredictiveScalingMetricSpecification = (input, context) => {
|
|
407
|
+
return take(input, {
|
|
408
|
+
CustomizedCapacityMetricSpecification: _json,
|
|
409
|
+
CustomizedLoadMetricSpecification: _json,
|
|
410
|
+
CustomizedScalingMetricSpecification: _json,
|
|
411
|
+
PredefinedLoadMetricSpecification: _json,
|
|
412
|
+
PredefinedMetricPairSpecification: _json,
|
|
413
|
+
PredefinedScalingMetricSpecification: _json,
|
|
414
|
+
TargetValue: __serializeFloat,
|
|
415
|
+
});
|
|
416
|
+
};
|
|
417
|
+
const se_PredictiveScalingMetricSpecifications = (input, context) => {
|
|
418
|
+
return input
|
|
419
|
+
.filter((e) => e != null)
|
|
420
|
+
.map((entry) => {
|
|
421
|
+
return se_PredictiveScalingMetricSpecification(entry, context);
|
|
422
|
+
});
|
|
423
|
+
};
|
|
424
|
+
const se_PredictiveScalingPolicyConfiguration = (input, context) => {
|
|
425
|
+
return take(input, {
|
|
426
|
+
MaxCapacityBreachBehavior: [],
|
|
427
|
+
MaxCapacityBuffer: [],
|
|
428
|
+
MetricSpecifications: (_) => se_PredictiveScalingMetricSpecifications(_, context),
|
|
429
|
+
Mode: [],
|
|
430
|
+
SchedulingBufferTime: [],
|
|
431
|
+
});
|
|
432
|
+
};
|
|
377
433
|
const se_PutScalingPolicyRequest = (input, context) => {
|
|
378
434
|
return take(input, {
|
|
379
435
|
PolicyName: [],
|
|
380
436
|
PolicyType: [],
|
|
437
|
+
PredictiveScalingPolicyConfiguration: (_) => se_PredictiveScalingPolicyConfiguration(_, context),
|
|
381
438
|
ResourceId: [],
|
|
382
439
|
ScalableDimension: [],
|
|
383
440
|
ServiceNamespace: [],
|
|
@@ -431,6 +488,12 @@ const se_TargetTrackingScalingPolicyConfiguration = (input, context) => {
|
|
|
431
488
|
TargetValue: __serializeFloat,
|
|
432
489
|
});
|
|
433
490
|
};
|
|
491
|
+
const de_CapacityForecast = (output, context) => {
|
|
492
|
+
return take(output, {
|
|
493
|
+
Timestamps: (_) => de_PredictiveScalingForecastTimestamps(_, context),
|
|
494
|
+
Values: (_) => de_PredictiveScalingForecastValues(_, context),
|
|
495
|
+
});
|
|
496
|
+
};
|
|
434
497
|
const de_DescribeScalableTargetsResponse = (output, context) => {
|
|
435
498
|
return take(output, {
|
|
436
499
|
NextToken: __expectString,
|
|
@@ -455,11 +518,78 @@ const de_DescribeScheduledActionsResponse = (output, context) => {
|
|
|
455
518
|
ScheduledActions: (_) => de_ScheduledActions(_, context),
|
|
456
519
|
});
|
|
457
520
|
};
|
|
521
|
+
const de_GetPredictiveScalingForecastResponse = (output, context) => {
|
|
522
|
+
return take(output, {
|
|
523
|
+
CapacityForecast: (_) => de_CapacityForecast(_, context),
|
|
524
|
+
LoadForecast: (_) => de_LoadForecasts(_, context),
|
|
525
|
+
UpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
526
|
+
});
|
|
527
|
+
};
|
|
528
|
+
const de_LoadForecast = (output, context) => {
|
|
529
|
+
return take(output, {
|
|
530
|
+
MetricSpecification: (_) => de_PredictiveScalingMetricSpecification(_, context),
|
|
531
|
+
Timestamps: (_) => de_PredictiveScalingForecastTimestamps(_, context),
|
|
532
|
+
Values: (_) => de_PredictiveScalingForecastValues(_, context),
|
|
533
|
+
});
|
|
534
|
+
};
|
|
535
|
+
const de_LoadForecasts = (output, context) => {
|
|
536
|
+
const retVal = (output || [])
|
|
537
|
+
.filter((e) => e != null)
|
|
538
|
+
.map((entry) => {
|
|
539
|
+
return de_LoadForecast(entry, context);
|
|
540
|
+
});
|
|
541
|
+
return retVal;
|
|
542
|
+
};
|
|
543
|
+
const de_PredictiveScalingForecastTimestamps = (output, context) => {
|
|
544
|
+
const retVal = (output || [])
|
|
545
|
+
.filter((e) => e != null)
|
|
546
|
+
.map((entry) => {
|
|
547
|
+
return __expectNonNull(__parseEpochTimestamp(__expectNumber(entry)));
|
|
548
|
+
});
|
|
549
|
+
return retVal;
|
|
550
|
+
};
|
|
551
|
+
const de_PredictiveScalingForecastValues = (output, context) => {
|
|
552
|
+
const retVal = (output || [])
|
|
553
|
+
.filter((e) => e != null)
|
|
554
|
+
.map((entry) => {
|
|
555
|
+
return __limitedParseDouble(entry);
|
|
556
|
+
});
|
|
557
|
+
return retVal;
|
|
558
|
+
};
|
|
559
|
+
const de_PredictiveScalingMetricSpecification = (output, context) => {
|
|
560
|
+
return take(output, {
|
|
561
|
+
CustomizedCapacityMetricSpecification: _json,
|
|
562
|
+
CustomizedLoadMetricSpecification: _json,
|
|
563
|
+
CustomizedScalingMetricSpecification: _json,
|
|
564
|
+
PredefinedLoadMetricSpecification: _json,
|
|
565
|
+
PredefinedMetricPairSpecification: _json,
|
|
566
|
+
PredefinedScalingMetricSpecification: _json,
|
|
567
|
+
TargetValue: __limitedParseDouble,
|
|
568
|
+
});
|
|
569
|
+
};
|
|
570
|
+
const de_PredictiveScalingMetricSpecifications = (output, context) => {
|
|
571
|
+
const retVal = (output || [])
|
|
572
|
+
.filter((e) => e != null)
|
|
573
|
+
.map((entry) => {
|
|
574
|
+
return de_PredictiveScalingMetricSpecification(entry, context);
|
|
575
|
+
});
|
|
576
|
+
return retVal;
|
|
577
|
+
};
|
|
578
|
+
const de_PredictiveScalingPolicyConfiguration = (output, context) => {
|
|
579
|
+
return take(output, {
|
|
580
|
+
MaxCapacityBreachBehavior: __expectString,
|
|
581
|
+
MaxCapacityBuffer: __expectInt32,
|
|
582
|
+
MetricSpecifications: (_) => de_PredictiveScalingMetricSpecifications(_, context),
|
|
583
|
+
Mode: __expectString,
|
|
584
|
+
SchedulingBufferTime: __expectInt32,
|
|
585
|
+
});
|
|
586
|
+
};
|
|
458
587
|
const de_ScalableTarget = (output, context) => {
|
|
459
588
|
return take(output, {
|
|
460
589
|
CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
461
590
|
MaxCapacity: __expectInt32,
|
|
462
591
|
MinCapacity: __expectInt32,
|
|
592
|
+
PredictedCapacity: __expectInt32,
|
|
463
593
|
ResourceId: __expectString,
|
|
464
594
|
RoleARN: __expectString,
|
|
465
595
|
ScalableDimension: __expectString,
|
|
@@ -515,6 +645,7 @@ const de_ScalingPolicy = (output, context) => {
|
|
|
515
645
|
PolicyARN: __expectString,
|
|
516
646
|
PolicyName: __expectString,
|
|
517
647
|
PolicyType: __expectString,
|
|
648
|
+
PredictiveScalingPolicyConfiguration: (_) => de_PredictiveScalingPolicyConfiguration(_, context),
|
|
518
649
|
ResourceId: __expectString,
|
|
519
650
|
ScalableDimension: __expectString,
|
|
520
651
|
ServiceNamespace: __expectString,
|
|
@@ -7,6 +7,7 @@ import { DescribeScalableTargetsCommandInput, DescribeScalableTargetsCommandOutp
|
|
|
7
7
|
import { DescribeScalingActivitiesCommandInput, DescribeScalingActivitiesCommandOutput } from "./commands/DescribeScalingActivitiesCommand";
|
|
8
8
|
import { DescribeScalingPoliciesCommandInput, DescribeScalingPoliciesCommandOutput } from "./commands/DescribeScalingPoliciesCommand";
|
|
9
9
|
import { DescribeScheduledActionsCommandInput, DescribeScheduledActionsCommandOutput } from "./commands/DescribeScheduledActionsCommand";
|
|
10
|
+
import { GetPredictiveScalingForecastCommandInput, GetPredictiveScalingForecastCommandOutput } from "./commands/GetPredictiveScalingForecastCommand";
|
|
10
11
|
import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
|
|
11
12
|
import { PutScalingPolicyCommandInput, PutScalingPolicyCommandOutput } from "./commands/PutScalingPolicyCommand";
|
|
12
13
|
import { PutScheduledActionCommandInput, PutScheduledActionCommandOutput } from "./commands/PutScheduledActionCommand";
|
|
@@ -56,6 +57,12 @@ export interface ApplicationAutoScaling {
|
|
|
56
57
|
describeScheduledActions(args: DescribeScheduledActionsCommandInput, options?: __HttpHandlerOptions): Promise<DescribeScheduledActionsCommandOutput>;
|
|
57
58
|
describeScheduledActions(args: DescribeScheduledActionsCommandInput, cb: (err: any, data?: DescribeScheduledActionsCommandOutput) => void): void;
|
|
58
59
|
describeScheduledActions(args: DescribeScheduledActionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeScheduledActionsCommandOutput) => void): void;
|
|
60
|
+
/**
|
|
61
|
+
* @see {@link GetPredictiveScalingForecastCommand}
|
|
62
|
+
*/
|
|
63
|
+
getPredictiveScalingForecast(args: GetPredictiveScalingForecastCommandInput, options?: __HttpHandlerOptions): Promise<GetPredictiveScalingForecastCommandOutput>;
|
|
64
|
+
getPredictiveScalingForecast(args: GetPredictiveScalingForecastCommandInput, cb: (err: any, data?: GetPredictiveScalingForecastCommandOutput) => void): void;
|
|
65
|
+
getPredictiveScalingForecast(args: GetPredictiveScalingForecastCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPredictiveScalingForecastCommandOutput) => void): void;
|
|
59
66
|
/**
|
|
60
67
|
* @see {@link ListTagsForResourceCommand}
|
|
61
68
|
*/
|
|
@@ -14,6 +14,7 @@ import { DescribeScalableTargetsCommandInput, DescribeScalableTargetsCommandOutp
|
|
|
14
14
|
import { DescribeScalingActivitiesCommandInput, DescribeScalingActivitiesCommandOutput } from "./commands/DescribeScalingActivitiesCommand";
|
|
15
15
|
import { DescribeScalingPoliciesCommandInput, DescribeScalingPoliciesCommandOutput } from "./commands/DescribeScalingPoliciesCommand";
|
|
16
16
|
import { DescribeScheduledActionsCommandInput, DescribeScheduledActionsCommandOutput } from "./commands/DescribeScheduledActionsCommand";
|
|
17
|
+
import { GetPredictiveScalingForecastCommandInput, GetPredictiveScalingForecastCommandOutput } from "./commands/GetPredictiveScalingForecastCommand";
|
|
17
18
|
import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
|
|
18
19
|
import { PutScalingPolicyCommandInput, PutScalingPolicyCommandOutput } from "./commands/PutScalingPolicyCommand";
|
|
19
20
|
import { PutScheduledActionCommandInput, PutScheduledActionCommandOutput } from "./commands/PutScheduledActionCommand";
|
|
@@ -26,11 +27,11 @@ export { __Client };
|
|
|
26
27
|
/**
|
|
27
28
|
* @public
|
|
28
29
|
*/
|
|
29
|
-
export type ServiceInputTypes = DeleteScalingPolicyCommandInput | DeleteScheduledActionCommandInput | DeregisterScalableTargetCommandInput | DescribeScalableTargetsCommandInput | DescribeScalingActivitiesCommandInput | DescribeScalingPoliciesCommandInput | DescribeScheduledActionsCommandInput | ListTagsForResourceCommandInput | PutScalingPolicyCommandInput | PutScheduledActionCommandInput | RegisterScalableTargetCommandInput | TagResourceCommandInput | UntagResourceCommandInput;
|
|
30
|
+
export type ServiceInputTypes = DeleteScalingPolicyCommandInput | DeleteScheduledActionCommandInput | DeregisterScalableTargetCommandInput | DescribeScalableTargetsCommandInput | DescribeScalingActivitiesCommandInput | DescribeScalingPoliciesCommandInput | DescribeScheduledActionsCommandInput | GetPredictiveScalingForecastCommandInput | ListTagsForResourceCommandInput | PutScalingPolicyCommandInput | PutScheduledActionCommandInput | RegisterScalableTargetCommandInput | TagResourceCommandInput | UntagResourceCommandInput;
|
|
30
31
|
/**
|
|
31
32
|
* @public
|
|
32
33
|
*/
|
|
33
|
-
export type ServiceOutputTypes = DeleteScalingPolicyCommandOutput | DeleteScheduledActionCommandOutput | DeregisterScalableTargetCommandOutput | DescribeScalableTargetsCommandOutput | DescribeScalingActivitiesCommandOutput | DescribeScalingPoliciesCommandOutput | DescribeScheduledActionsCommandOutput | ListTagsForResourceCommandOutput | PutScalingPolicyCommandOutput | PutScheduledActionCommandOutput | RegisterScalableTargetCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput;
|
|
34
|
+
export type ServiceOutputTypes = DeleteScalingPolicyCommandOutput | DeleteScheduledActionCommandOutput | DeregisterScalableTargetCommandOutput | DescribeScalableTargetsCommandOutput | DescribeScalingActivitiesCommandOutput | DescribeScalingPoliciesCommandOutput | DescribeScheduledActionsCommandOutput | GetPredictiveScalingForecastCommandOutput | ListTagsForResourceCommandOutput | PutScalingPolicyCommandOutput | PutScheduledActionCommandOutput | RegisterScalableTargetCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput;
|
|
34
35
|
/**
|
|
35
36
|
* @public
|
|
36
37
|
*/
|
|
@@ -55,6 +55,7 @@ declare const DescribeScalableTargetsCommand_base: {
|
|
|
55
55
|
* // ScalableDimension: "ecs:service:DesiredCount" || "ec2:spot-fleet-request:TargetCapacity" || "elasticmapreduce:instancegroup:InstanceCount" || "appstream:fleet:DesiredCapacity" || "dynamodb:table:ReadCapacityUnits" || "dynamodb:table:WriteCapacityUnits" || "dynamodb:index:ReadCapacityUnits" || "dynamodb:index:WriteCapacityUnits" || "rds:cluster:ReadReplicaCount" || "sagemaker:variant:DesiredInstanceCount" || "custom-resource:ResourceType:Property" || "comprehend:document-classifier-endpoint:DesiredInferenceUnits" || "comprehend:entity-recognizer-endpoint:DesiredInferenceUnits" || "lambda:function:ProvisionedConcurrency" || "cassandra:table:ReadCapacityUnits" || "cassandra:table:WriteCapacityUnits" || "kafka:broker-storage:VolumeSize" || "elasticache:replication-group:NodeGroups" || "elasticache:replication-group:Replicas" || "neptune:cluster:ReadReplicaCount" || "sagemaker:variant:DesiredProvisionedConcurrency" || "sagemaker:inference-component:DesiredCopyCount" || "workspaces:workspacespool:DesiredUserSessions", // required
|
|
56
56
|
* // MinCapacity: Number("int"), // required
|
|
57
57
|
* // MaxCapacity: Number("int"), // required
|
|
58
|
+
* // PredictedCapacity: Number("int"),
|
|
58
59
|
* // RoleARN: "STRING_VALUE", // required
|
|
59
60
|
* // CreationTime: new Date("TIMESTAMP"), // required
|
|
60
61
|
* // SuspendedState: { // SuspendedState
|