@aws-sdk/client-application-auto-scaling 3.294.0 → 3.296.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 (59) hide show
  1. package/README.md +24 -0
  2. package/dist-cjs/ApplicationAutoScaling.js +45 -0
  3. package/dist-cjs/commands/DeleteScalingPolicyCommand.js +4 -4
  4. package/dist-cjs/commands/DeleteScheduledActionCommand.js +4 -4
  5. package/dist-cjs/commands/DeregisterScalableTargetCommand.js +4 -4
  6. package/dist-cjs/commands/DescribeScalableTargetsCommand.js +4 -4
  7. package/dist-cjs/commands/DescribeScalingActivitiesCommand.js +4 -4
  8. package/dist-cjs/commands/DescribeScalingPoliciesCommand.js +4 -4
  9. package/dist-cjs/commands/DescribeScheduledActionsCommand.js +4 -4
  10. package/dist-cjs/commands/ListTagsForResourceCommand.js +46 -0
  11. package/dist-cjs/commands/PutScalingPolicyCommand.js +4 -4
  12. package/dist-cjs/commands/PutScheduledActionCommand.js +4 -4
  13. package/dist-cjs/commands/RegisterScalableTargetCommand.js +4 -4
  14. package/dist-cjs/commands/TagResourceCommand.js +46 -0
  15. package/dist-cjs/commands/UntagResourceCommand.js +46 -0
  16. package/dist-cjs/commands/index.js +3 -0
  17. package/dist-cjs/models/models_0.js +56 -2
  18. package/dist-cjs/protocols/Aws_json1_1.js +230 -2
  19. package/dist-es/ApplicationAutoScaling.js +45 -0
  20. package/dist-es/commands/DeleteScalingPolicyCommand.js +4 -4
  21. package/dist-es/commands/DeleteScheduledActionCommand.js +4 -4
  22. package/dist-es/commands/DeregisterScalableTargetCommand.js +4 -4
  23. package/dist-es/commands/DescribeScalableTargetsCommand.js +4 -4
  24. package/dist-es/commands/DescribeScalingActivitiesCommand.js +4 -4
  25. package/dist-es/commands/DescribeScalingPoliciesCommand.js +4 -4
  26. package/dist-es/commands/DescribeScheduledActionsCommand.js +4 -4
  27. package/dist-es/commands/ListTagsForResourceCommand.js +42 -0
  28. package/dist-es/commands/PutScalingPolicyCommand.js +4 -4
  29. package/dist-es/commands/PutScheduledActionCommand.js +4 -4
  30. package/dist-es/commands/RegisterScalableTargetCommand.js +4 -4
  31. package/dist-es/commands/TagResourceCommand.js +42 -0
  32. package/dist-es/commands/UntagResourceCommand.js +42 -0
  33. package/dist-es/commands/index.js +3 -0
  34. package/dist-es/models/models_0.js +46 -0
  35. package/dist-es/protocols/Aws_json1_1.js +224 -2
  36. package/dist-types/ApplicationAutoScaling.d.ts +54 -12
  37. package/dist-types/ApplicationAutoScalingClient.d.ts +7 -4
  38. package/dist-types/commands/DeleteScheduledActionCommand.d.ts +14 -0
  39. package/dist-types/commands/DescribeScheduledActionsCommand.d.ts +43 -0
  40. package/dist-types/commands/ListTagsForResourceCommand.d.ts +67 -0
  41. package/dist-types/commands/PutScalingPolicyCommand.d.ts +2 -2
  42. package/dist-types/commands/PutScheduledActionCommand.d.ts +19 -1
  43. package/dist-types/commands/RegisterScalableTargetCommand.d.ts +16 -9
  44. package/dist-types/commands/TagResourceCommand.d.ts +79 -0
  45. package/dist-types/commands/UntagResourceCommand.d.ts +66 -0
  46. package/dist-types/commands/index.d.ts +3 -0
  47. package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
  48. package/dist-types/models/models_0.d.ts +141 -10
  49. package/dist-types/protocols/Aws_json1_1.d.ts +9 -0
  50. package/dist-types/ts3.4/ApplicationAutoScaling.d.ts +51 -0
  51. package/dist-types/ts3.4/ApplicationAutoScalingClient.d.ts +24 -6
  52. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +38 -0
  53. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +34 -0
  54. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +37 -0
  55. package/dist-types/ts3.4/commands/index.d.ts +3 -0
  56. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +3 -4
  57. package/dist-types/ts3.4/models/models_0.d.ts +57 -1
  58. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +36 -0
  59. package/package.json +36 -36
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_json1_1RegisterScalableTargetCommand = exports.deserializeAws_json1_1PutScheduledActionCommand = exports.deserializeAws_json1_1PutScalingPolicyCommand = exports.deserializeAws_json1_1DescribeScheduledActionsCommand = exports.deserializeAws_json1_1DescribeScalingPoliciesCommand = exports.deserializeAws_json1_1DescribeScalingActivitiesCommand = exports.deserializeAws_json1_1DescribeScalableTargetsCommand = exports.deserializeAws_json1_1DeregisterScalableTargetCommand = exports.deserializeAws_json1_1DeleteScheduledActionCommand = exports.deserializeAws_json1_1DeleteScalingPolicyCommand = exports.serializeAws_json1_1RegisterScalableTargetCommand = exports.serializeAws_json1_1PutScheduledActionCommand = exports.serializeAws_json1_1PutScalingPolicyCommand = exports.serializeAws_json1_1DescribeScheduledActionsCommand = exports.serializeAws_json1_1DescribeScalingPoliciesCommand = exports.serializeAws_json1_1DescribeScalingActivitiesCommand = exports.serializeAws_json1_1DescribeScalableTargetsCommand = exports.serializeAws_json1_1DeregisterScalableTargetCommand = exports.serializeAws_json1_1DeleteScheduledActionCommand = exports.serializeAws_json1_1DeleteScalingPolicyCommand = void 0;
3
+ exports.deserializeAws_json1_1UntagResourceCommand = exports.deserializeAws_json1_1TagResourceCommand = exports.deserializeAws_json1_1RegisterScalableTargetCommand = exports.deserializeAws_json1_1PutScheduledActionCommand = exports.deserializeAws_json1_1PutScalingPolicyCommand = exports.deserializeAws_json1_1ListTagsForResourceCommand = exports.deserializeAws_json1_1DescribeScheduledActionsCommand = exports.deserializeAws_json1_1DescribeScalingPoliciesCommand = exports.deserializeAws_json1_1DescribeScalingActivitiesCommand = exports.deserializeAws_json1_1DescribeScalableTargetsCommand = exports.deserializeAws_json1_1DeregisterScalableTargetCommand = exports.deserializeAws_json1_1DeleteScheduledActionCommand = exports.deserializeAws_json1_1DeleteScalingPolicyCommand = exports.serializeAws_json1_1UntagResourceCommand = exports.serializeAws_json1_1TagResourceCommand = exports.serializeAws_json1_1RegisterScalableTargetCommand = exports.serializeAws_json1_1PutScheduledActionCommand = exports.serializeAws_json1_1PutScalingPolicyCommand = exports.serializeAws_json1_1ListTagsForResourceCommand = exports.serializeAws_json1_1DescribeScheduledActionsCommand = exports.serializeAws_json1_1DescribeScalingPoliciesCommand = exports.serializeAws_json1_1DescribeScalingActivitiesCommand = exports.serializeAws_json1_1DescribeScalableTargetsCommand = exports.serializeAws_json1_1DeregisterScalableTargetCommand = exports.serializeAws_json1_1DeleteScheduledActionCommand = exports.serializeAws_json1_1DeleteScalingPolicyCommand = void 0;
4
4
  const protocol_http_1 = require("@aws-sdk/protocol-http");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const ApplicationAutoScalingServiceException_1 = require("../models/ApplicationAutoScalingServiceException");
@@ -75,6 +75,16 @@ const serializeAws_json1_1DescribeScheduledActionsCommand = async (input, contex
75
75
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
76
  };
77
77
  exports.serializeAws_json1_1DescribeScheduledActionsCommand = serializeAws_json1_1DescribeScheduledActionsCommand;
78
+ const serializeAws_json1_1ListTagsForResourceCommand = async (input, context) => {
79
+ const headers = {
80
+ "content-type": "application/x-amz-json-1.1",
81
+ "x-amz-target": "AnyScaleFrontendService.ListTagsForResource",
82
+ };
83
+ let body;
84
+ body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context));
85
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
86
+ };
87
+ exports.serializeAws_json1_1ListTagsForResourceCommand = serializeAws_json1_1ListTagsForResourceCommand;
78
88
  const serializeAws_json1_1PutScalingPolicyCommand = async (input, context) => {
79
89
  const headers = {
80
90
  "content-type": "application/x-amz-json-1.1",
@@ -105,6 +115,26 @@ const serializeAws_json1_1RegisterScalableTargetCommand = async (input, context)
105
115
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
106
116
  };
107
117
  exports.serializeAws_json1_1RegisterScalableTargetCommand = serializeAws_json1_1RegisterScalableTargetCommand;
118
+ const serializeAws_json1_1TagResourceCommand = async (input, context) => {
119
+ const headers = {
120
+ "content-type": "application/x-amz-json-1.1",
121
+ "x-amz-target": "AnyScaleFrontendService.TagResource",
122
+ };
123
+ let body;
124
+ body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context));
125
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
126
+ };
127
+ exports.serializeAws_json1_1TagResourceCommand = serializeAws_json1_1TagResourceCommand;
128
+ const serializeAws_json1_1UntagResourceCommand = async (input, context) => {
129
+ const headers = {
130
+ "content-type": "application/x-amz-json-1.1",
131
+ "x-amz-target": "AnyScaleFrontendService.UntagResource",
132
+ };
133
+ let body;
134
+ body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context));
135
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
136
+ };
137
+ exports.serializeAws_json1_1UntagResourceCommand = serializeAws_json1_1UntagResourceCommand;
108
138
  const deserializeAws_json1_1DeleteScalingPolicyCommand = async (output, context) => {
109
139
  if (output.statusCode >= 300) {
110
140
  return deserializeAws_json1_1DeleteScalingPolicyCommandError(output, context);
@@ -409,6 +439,40 @@ const deserializeAws_json1_1DescribeScheduledActionsCommandError = async (output
409
439
  });
410
440
  }
411
441
  };
442
+ const deserializeAws_json1_1ListTagsForResourceCommand = async (output, context) => {
443
+ if (output.statusCode >= 300) {
444
+ return deserializeAws_json1_1ListTagsForResourceCommandError(output, context);
445
+ }
446
+ const data = await parseBody(output.body, context);
447
+ let contents = {};
448
+ contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context);
449
+ const response = {
450
+ $metadata: deserializeMetadata(output),
451
+ ...contents,
452
+ };
453
+ return Promise.resolve(response);
454
+ };
455
+ exports.deserializeAws_json1_1ListTagsForResourceCommand = deserializeAws_json1_1ListTagsForResourceCommand;
456
+ const deserializeAws_json1_1ListTagsForResourceCommandError = async (output, context) => {
457
+ const parsedOutput = {
458
+ ...output,
459
+ body: await parseErrorBody(output.body, context),
460
+ };
461
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
462
+ switch (errorCode) {
463
+ case "ResourceNotFoundException":
464
+ case "com.amazonaws.applicationautoscaling#ResourceNotFoundException":
465
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
466
+ default:
467
+ const parsedBody = parsedOutput.body;
468
+ (0, smithy_client_1.throwDefaultError)({
469
+ output,
470
+ parsedBody,
471
+ exceptionCtor: ApplicationAutoScalingServiceException_1.ApplicationAutoScalingServiceException,
472
+ errorCode,
473
+ });
474
+ }
475
+ };
412
476
  const deserializeAws_json1_1PutScalingPolicyCommand = async (output, context) => {
413
477
  if (output.statusCode >= 300) {
414
478
  return deserializeAws_json1_1PutScalingPolicyCommandError(output, context);
@@ -547,6 +611,83 @@ const deserializeAws_json1_1RegisterScalableTargetCommandError = async (output,
547
611
  });
548
612
  }
549
613
  };
614
+ const deserializeAws_json1_1TagResourceCommand = async (output, context) => {
615
+ if (output.statusCode >= 300) {
616
+ return deserializeAws_json1_1TagResourceCommandError(output, context);
617
+ }
618
+ const data = await parseBody(output.body, context);
619
+ let contents = {};
620
+ contents = deserializeAws_json1_1TagResourceResponse(data, context);
621
+ const response = {
622
+ $metadata: deserializeMetadata(output),
623
+ ...contents,
624
+ };
625
+ return Promise.resolve(response);
626
+ };
627
+ exports.deserializeAws_json1_1TagResourceCommand = deserializeAws_json1_1TagResourceCommand;
628
+ const deserializeAws_json1_1TagResourceCommandError = async (output, context) => {
629
+ const parsedOutput = {
630
+ ...output,
631
+ body: await parseErrorBody(output.body, context),
632
+ };
633
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
634
+ switch (errorCode) {
635
+ case "ResourceNotFoundException":
636
+ case "com.amazonaws.applicationautoscaling#ResourceNotFoundException":
637
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
638
+ case "TooManyTagsException":
639
+ case "com.amazonaws.applicationautoscaling#TooManyTagsException":
640
+ throw await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context);
641
+ case "ValidationException":
642
+ case "com.amazonaws.applicationautoscaling#ValidationException":
643
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
644
+ default:
645
+ const parsedBody = parsedOutput.body;
646
+ (0, smithy_client_1.throwDefaultError)({
647
+ output,
648
+ parsedBody,
649
+ exceptionCtor: ApplicationAutoScalingServiceException_1.ApplicationAutoScalingServiceException,
650
+ errorCode,
651
+ });
652
+ }
653
+ };
654
+ const deserializeAws_json1_1UntagResourceCommand = async (output, context) => {
655
+ if (output.statusCode >= 300) {
656
+ return deserializeAws_json1_1UntagResourceCommandError(output, context);
657
+ }
658
+ const data = await parseBody(output.body, context);
659
+ let contents = {};
660
+ contents = deserializeAws_json1_1UntagResourceResponse(data, context);
661
+ const response = {
662
+ $metadata: deserializeMetadata(output),
663
+ ...contents,
664
+ };
665
+ return Promise.resolve(response);
666
+ };
667
+ exports.deserializeAws_json1_1UntagResourceCommand = deserializeAws_json1_1UntagResourceCommand;
668
+ const deserializeAws_json1_1UntagResourceCommandError = async (output, context) => {
669
+ const parsedOutput = {
670
+ ...output,
671
+ body: await parseErrorBody(output.body, context),
672
+ };
673
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
674
+ switch (errorCode) {
675
+ case "ResourceNotFoundException":
676
+ case "com.amazonaws.applicationautoscaling#ResourceNotFoundException":
677
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
678
+ case "ValidationException":
679
+ case "com.amazonaws.applicationautoscaling#ValidationException":
680
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
681
+ default:
682
+ const parsedBody = parsedOutput.body;
683
+ (0, smithy_client_1.throwDefaultError)({
684
+ output,
685
+ parsedBody,
686
+ exceptionCtor: ApplicationAutoScalingServiceException_1.ApplicationAutoScalingServiceException,
687
+ errorCode,
688
+ });
689
+ }
690
+ };
550
691
  const deserializeAws_json1_1ConcurrentUpdateExceptionResponse = async (parsedOutput, context) => {
551
692
  const body = parsedOutput.body;
552
693
  const deserialized = deserializeAws_json1_1ConcurrentUpdateException(body, context);
@@ -601,6 +742,24 @@ const deserializeAws_json1_1ObjectNotFoundExceptionResponse = async (parsedOutpu
601
742
  });
602
743
  return (0, smithy_client_1.decorateServiceException)(exception, body);
603
744
  };
745
+ const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
746
+ const body = parsedOutput.body;
747
+ const deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
748
+ const exception = new models_0_1.ResourceNotFoundException({
749
+ $metadata: deserializeMetadata(parsedOutput),
750
+ ...deserialized,
751
+ });
752
+ return (0, smithy_client_1.decorateServiceException)(exception, body);
753
+ };
754
+ const deserializeAws_json1_1TooManyTagsExceptionResponse = async (parsedOutput, context) => {
755
+ const body = parsedOutput.body;
756
+ const deserialized = deserializeAws_json1_1TooManyTagsException(body, context);
757
+ const exception = new models_0_1.TooManyTagsException({
758
+ $metadata: deserializeMetadata(parsedOutput),
759
+ ...deserialized,
760
+ });
761
+ return (0, smithy_client_1.decorateServiceException)(exception, body);
762
+ };
604
763
  const deserializeAws_json1_1ValidationExceptionResponse = async (parsedOutput, context) => {
605
764
  const body = parsedOutput.body;
606
765
  const deserialized = deserializeAws_json1_1ValidationException(body, context);
@@ -690,6 +849,11 @@ const serializeAws_json1_1DescribeScheduledActionsRequest = (input, context) =>
690
849
  ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }),
691
850
  };
692
851
  };
852
+ const serializeAws_json1_1ListTagsForResourceRequest = (input, context) => {
853
+ return {
854
+ ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
855
+ };
856
+ };
693
857
  const serializeAws_json1_1MetricDimension = (input, context) => {
694
858
  return {
695
859
  ...(input.Name != null && { Name: input.Name }),
@@ -750,6 +914,7 @@ const serializeAws_json1_1RegisterScalableTargetRequest = (input, context) => {
750
914
  ...(input.SuspendedState != null && {
751
915
  SuspendedState: serializeAws_json1_1SuspendedState(input.SuspendedState, context),
752
916
  }),
917
+ ...(input.Tags != null && { Tags: serializeAws_json1_1TagMap(input.Tags, context) }),
753
918
  };
754
919
  };
755
920
  const serializeAws_json1_1ResourceIdsMaxLen1600 = (input, context) => {
@@ -801,6 +966,28 @@ const serializeAws_json1_1SuspendedState = (input, context) => {
801
966
  ...(input.ScheduledScalingSuspended != null && { ScheduledScalingSuspended: input.ScheduledScalingSuspended }),
802
967
  };
803
968
  };
969
+ const serializeAws_json1_1TagKeyList = (input, context) => {
970
+ return input
971
+ .filter((e) => e != null)
972
+ .map((entry) => {
973
+ return entry;
974
+ });
975
+ };
976
+ const serializeAws_json1_1TagMap = (input, context) => {
977
+ return Object.entries(input).reduce((acc, [key, value]) => {
978
+ if (value === null) {
979
+ return acc;
980
+ }
981
+ acc[key] = value;
982
+ return acc;
983
+ }, {});
984
+ };
985
+ const serializeAws_json1_1TagResourceRequest = (input, context) => {
986
+ return {
987
+ ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
988
+ ...(input.Tags != null && { Tags: serializeAws_json1_1TagMap(input.Tags, context) }),
989
+ };
990
+ };
804
991
  const serializeAws_json1_1TargetTrackingMetric = (input, context) => {
805
992
  return {
806
993
  ...(input.Dimensions != null && {
@@ -862,6 +1049,12 @@ const serializeAws_json1_1TargetTrackingScalingPolicyConfiguration = (input, con
862
1049
  ...(input.TargetValue != null && { TargetValue: (0, smithy_client_1.serializeFloat)(input.TargetValue) }),
863
1050
  };
864
1051
  };
1052
+ const serializeAws_json1_1UntagResourceRequest = (input, context) => {
1053
+ return {
1054
+ ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1055
+ ...(input.TagKeys != null && { TagKeys: serializeAws_json1_1TagKeyList(input.TagKeys, context) }),
1056
+ };
1057
+ };
865
1058
  const deserializeAws_json1_1Alarm = (output, context) => {
866
1059
  return {
867
1060
  AlarmARN: (0, smithy_client_1.expectString)(output.AlarmARN),
@@ -957,6 +1150,11 @@ const deserializeAws_json1_1LimitExceededException = (output, context) => {
957
1150
  Message: (0, smithy_client_1.expectString)(output.Message),
958
1151
  };
959
1152
  };
1153
+ const deserializeAws_json1_1ListTagsForResourceResponse = (output, context) => {
1154
+ return {
1155
+ Tags: output.Tags != null ? deserializeAws_json1_1TagMap(output.Tags, context) : undefined,
1156
+ };
1157
+ };
960
1158
  const deserializeAws_json1_1MetricDimension = (output, context) => {
961
1159
  return {
962
1160
  Name: (0, smithy_client_1.expectString)(output.Name),
@@ -1014,7 +1212,15 @@ const deserializeAws_json1_1PutScheduledActionResponse = (output, context) => {
1014
1212
  return {};
1015
1213
  };
1016
1214
  const deserializeAws_json1_1RegisterScalableTargetResponse = (output, context) => {
1017
- return {};
1215
+ return {
1216
+ ScalableTargetARN: (0, smithy_client_1.expectString)(output.ScalableTargetARN),
1217
+ };
1218
+ };
1219
+ const deserializeAws_json1_1ResourceNotFoundException = (output, context) => {
1220
+ return {
1221
+ Message: (0, smithy_client_1.expectString)(output.Message),
1222
+ ResourceName: (0, smithy_client_1.expectString)(output.ResourceName),
1223
+ };
1018
1224
  };
1019
1225
  const deserializeAws_json1_1ScalableTarget = (output, context) => {
1020
1226
  return {
@@ -1026,6 +1232,7 @@ const deserializeAws_json1_1ScalableTarget = (output, context) => {
1026
1232
  ResourceId: (0, smithy_client_1.expectString)(output.ResourceId),
1027
1233
  RoleARN: (0, smithy_client_1.expectString)(output.RoleARN),
1028
1234
  ScalableDimension: (0, smithy_client_1.expectString)(output.ScalableDimension),
1235
+ ScalableTargetARN: (0, smithy_client_1.expectString)(output.ScalableTargetARN),
1029
1236
  ServiceNamespace: (0, smithy_client_1.expectString)(output.ServiceNamespace),
1030
1237
  SuspendedState: output.SuspendedState != null ? deserializeAws_json1_1SuspendedState(output.SuspendedState, context) : undefined,
1031
1238
  };
@@ -1173,6 +1380,18 @@ const deserializeAws_json1_1SuspendedState = (output, context) => {
1173
1380
  ScheduledScalingSuspended: (0, smithy_client_1.expectBoolean)(output.ScheduledScalingSuspended),
1174
1381
  };
1175
1382
  };
1383
+ const deserializeAws_json1_1TagMap = (output, context) => {
1384
+ return Object.entries(output).reduce((acc, [key, value]) => {
1385
+ if (value === null) {
1386
+ return acc;
1387
+ }
1388
+ acc[key] = (0, smithy_client_1.expectString)(value);
1389
+ return acc;
1390
+ }, {});
1391
+ };
1392
+ const deserializeAws_json1_1TagResourceResponse = (output, context) => {
1393
+ return {};
1394
+ };
1176
1395
  const deserializeAws_json1_1TargetTrackingMetric = (output, context) => {
1177
1396
  return {
1178
1397
  Dimensions: output.Dimensions != null
@@ -1242,6 +1461,15 @@ const deserializeAws_json1_1TargetTrackingScalingPolicyConfiguration = (output,
1242
1461
  TargetValue: (0, smithy_client_1.limitedParseDouble)(output.TargetValue),
1243
1462
  };
1244
1463
  };
1464
+ const deserializeAws_json1_1TooManyTagsException = (output, context) => {
1465
+ return {
1466
+ Message: (0, smithy_client_1.expectString)(output.Message),
1467
+ ResourceName: (0, smithy_client_1.expectString)(output.ResourceName),
1468
+ };
1469
+ };
1470
+ const deserializeAws_json1_1UntagResourceResponse = (output, context) => {
1471
+ return {};
1472
+ };
1245
1473
  const deserializeAws_json1_1ValidationException = (output, context) => {
1246
1474
  return {
1247
1475
  Message: (0, smithy_client_1.expectString)(output.Message),
@@ -6,9 +6,12 @@ import { DescribeScalableTargetsCommand, } from "./commands/DescribeScalableTarg
6
6
  import { DescribeScalingActivitiesCommand, } from "./commands/DescribeScalingActivitiesCommand";
7
7
  import { DescribeScalingPoliciesCommand, } from "./commands/DescribeScalingPoliciesCommand";
8
8
  import { DescribeScheduledActionsCommand, } from "./commands/DescribeScheduledActionsCommand";
9
+ import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
9
10
  import { PutScalingPolicyCommand, } from "./commands/PutScalingPolicyCommand";
10
11
  import { PutScheduledActionCommand, } from "./commands/PutScheduledActionCommand";
11
12
  import { RegisterScalableTargetCommand, } from "./commands/RegisterScalableTargetCommand";
13
+ import { TagResourceCommand } from "./commands/TagResourceCommand";
14
+ import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
12
15
  export class ApplicationAutoScaling extends ApplicationAutoScalingClient {
13
16
  deleteScalingPolicy(args, optionsOrCb, cb) {
14
17
  const command = new DeleteScalingPolicyCommand(args);
@@ -108,6 +111,20 @@ export class ApplicationAutoScaling extends ApplicationAutoScalingClient {
108
111
  return this.send(command, optionsOrCb);
109
112
  }
110
113
  }
114
+ listTagsForResource(args, optionsOrCb, cb) {
115
+ const command = new ListTagsForResourceCommand(args);
116
+ if (typeof optionsOrCb === "function") {
117
+ this.send(command, optionsOrCb);
118
+ }
119
+ else if (typeof cb === "function") {
120
+ if (typeof optionsOrCb !== "object")
121
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
122
+ this.send(command, optionsOrCb || {}, cb);
123
+ }
124
+ else {
125
+ return this.send(command, optionsOrCb);
126
+ }
127
+ }
111
128
  putScalingPolicy(args, optionsOrCb, cb) {
112
129
  const command = new PutScalingPolicyCommand(args);
113
130
  if (typeof optionsOrCb === "function") {
@@ -150,4 +167,32 @@ export class ApplicationAutoScaling extends ApplicationAutoScalingClient {
150
167
  return this.send(command, optionsOrCb);
151
168
  }
152
169
  }
170
+ tagResource(args, optionsOrCb, cb) {
171
+ const command = new TagResourceCommand(args);
172
+ if (typeof optionsOrCb === "function") {
173
+ this.send(command, optionsOrCb);
174
+ }
175
+ else if (typeof cb === "function") {
176
+ if (typeof optionsOrCb !== "object")
177
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
178
+ this.send(command, optionsOrCb || {}, cb);
179
+ }
180
+ else {
181
+ return this.send(command, optionsOrCb);
182
+ }
183
+ }
184
+ untagResource(args, optionsOrCb, cb) {
185
+ const command = new UntagResourceCommand(args);
186
+ if (typeof optionsOrCb === "function") {
187
+ this.send(command, optionsOrCb);
188
+ }
189
+ else if (typeof cb === "function") {
190
+ if (typeof optionsOrCb !== "object")
191
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
192
+ this.send(command, optionsOrCb || {}, cb);
193
+ }
194
+ else {
195
+ return this.send(command, optionsOrCb);
196
+ }
197
+ }
153
198
  }
@@ -4,10 +4,6 @@ import { Command as $Command } from "@aws-sdk/smithy-client";
4
4
  import { DeleteScalingPolicyRequestFilterSensitiveLog, DeleteScalingPolicyResponseFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_json1_1DeleteScalingPolicyCommand, serializeAws_json1_1DeleteScalingPolicyCommand, } from "../protocols/Aws_json1_1";
6
6
  export class DeleteScalingPolicyCommand extends $Command {
7
- constructor(input) {
8
- super();
9
- this.input = input;
10
- }
11
7
  static getEndpointParameterInstructions() {
12
8
  return {
13
9
  UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
@@ -16,6 +12,10 @@ export class DeleteScalingPolicyCommand extends $Command {
16
12
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
13
  };
18
14
  }
15
+ constructor(input) {
16
+ super();
17
+ this.input = input;
18
+ }
19
19
  resolveMiddleware(clientStack, configuration, options) {
20
20
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
21
  this.middlewareStack.use(getEndpointPlugin(configuration, DeleteScalingPolicyCommand.getEndpointParameterInstructions()));
@@ -4,10 +4,6 @@ import { Command as $Command } from "@aws-sdk/smithy-client";
4
4
  import { DeleteScheduledActionRequestFilterSensitiveLog, DeleteScheduledActionResponseFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_json1_1DeleteScheduledActionCommand, serializeAws_json1_1DeleteScheduledActionCommand, } from "../protocols/Aws_json1_1";
6
6
  export class DeleteScheduledActionCommand extends $Command {
7
- constructor(input) {
8
- super();
9
- this.input = input;
10
- }
11
7
  static getEndpointParameterInstructions() {
12
8
  return {
13
9
  UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
@@ -16,6 +12,10 @@ export class DeleteScheduledActionCommand extends $Command {
16
12
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
13
  };
18
14
  }
15
+ constructor(input) {
16
+ super();
17
+ this.input = input;
18
+ }
19
19
  resolveMiddleware(clientStack, configuration, options) {
20
20
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
21
  this.middlewareStack.use(getEndpointPlugin(configuration, DeleteScheduledActionCommand.getEndpointParameterInstructions()));
@@ -4,10 +4,6 @@ import { Command as $Command } from "@aws-sdk/smithy-client";
4
4
  import { DeregisterScalableTargetRequestFilterSensitiveLog, DeregisterScalableTargetResponseFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_json1_1DeregisterScalableTargetCommand, serializeAws_json1_1DeregisterScalableTargetCommand, } from "../protocols/Aws_json1_1";
6
6
  export class DeregisterScalableTargetCommand extends $Command {
7
- constructor(input) {
8
- super();
9
- this.input = input;
10
- }
11
7
  static getEndpointParameterInstructions() {
12
8
  return {
13
9
  UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
@@ -16,6 +12,10 @@ export class DeregisterScalableTargetCommand extends $Command {
16
12
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
13
  };
18
14
  }
15
+ constructor(input) {
16
+ super();
17
+ this.input = input;
18
+ }
19
19
  resolveMiddleware(clientStack, configuration, options) {
20
20
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
21
  this.middlewareStack.use(getEndpointPlugin(configuration, DeregisterScalableTargetCommand.getEndpointParameterInstructions()));
@@ -4,10 +4,6 @@ import { Command as $Command } from "@aws-sdk/smithy-client";
4
4
  import { DescribeScalableTargetsRequestFilterSensitiveLog, DescribeScalableTargetsResponseFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_json1_1DescribeScalableTargetsCommand, serializeAws_json1_1DescribeScalableTargetsCommand, } from "../protocols/Aws_json1_1";
6
6
  export class DescribeScalableTargetsCommand extends $Command {
7
- constructor(input) {
8
- super();
9
- this.input = input;
10
- }
11
7
  static getEndpointParameterInstructions() {
12
8
  return {
13
9
  UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
@@ -16,6 +12,10 @@ export class DescribeScalableTargetsCommand extends $Command {
16
12
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
13
  };
18
14
  }
15
+ constructor(input) {
16
+ super();
17
+ this.input = input;
18
+ }
19
19
  resolveMiddleware(clientStack, configuration, options) {
20
20
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
21
  this.middlewareStack.use(getEndpointPlugin(configuration, DescribeScalableTargetsCommand.getEndpointParameterInstructions()));
@@ -4,10 +4,6 @@ import { Command as $Command } from "@aws-sdk/smithy-client";
4
4
  import { DescribeScalingActivitiesRequestFilterSensitiveLog, DescribeScalingActivitiesResponseFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_json1_1DescribeScalingActivitiesCommand, serializeAws_json1_1DescribeScalingActivitiesCommand, } from "../protocols/Aws_json1_1";
6
6
  export class DescribeScalingActivitiesCommand extends $Command {
7
- constructor(input) {
8
- super();
9
- this.input = input;
10
- }
11
7
  static getEndpointParameterInstructions() {
12
8
  return {
13
9
  UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
@@ -16,6 +12,10 @@ export class DescribeScalingActivitiesCommand extends $Command {
16
12
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
13
  };
18
14
  }
15
+ constructor(input) {
16
+ super();
17
+ this.input = input;
18
+ }
19
19
  resolveMiddleware(clientStack, configuration, options) {
20
20
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
21
  this.middlewareStack.use(getEndpointPlugin(configuration, DescribeScalingActivitiesCommand.getEndpointParameterInstructions()));
@@ -4,10 +4,6 @@ import { Command as $Command } from "@aws-sdk/smithy-client";
4
4
  import { DescribeScalingPoliciesRequestFilterSensitiveLog, DescribeScalingPoliciesResponseFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_json1_1DescribeScalingPoliciesCommand, serializeAws_json1_1DescribeScalingPoliciesCommand, } from "../protocols/Aws_json1_1";
6
6
  export class DescribeScalingPoliciesCommand extends $Command {
7
- constructor(input) {
8
- super();
9
- this.input = input;
10
- }
11
7
  static getEndpointParameterInstructions() {
12
8
  return {
13
9
  UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
@@ -16,6 +12,10 @@ export class DescribeScalingPoliciesCommand extends $Command {
16
12
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
13
  };
18
14
  }
15
+ constructor(input) {
16
+ super();
17
+ this.input = input;
18
+ }
19
19
  resolveMiddleware(clientStack, configuration, options) {
20
20
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
21
  this.middlewareStack.use(getEndpointPlugin(configuration, DescribeScalingPoliciesCommand.getEndpointParameterInstructions()));
@@ -4,10 +4,6 @@ import { Command as $Command } from "@aws-sdk/smithy-client";
4
4
  import { DescribeScheduledActionsRequestFilterSensitiveLog, DescribeScheduledActionsResponseFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_json1_1DescribeScheduledActionsCommand, serializeAws_json1_1DescribeScheduledActionsCommand, } from "../protocols/Aws_json1_1";
6
6
  export class DescribeScheduledActionsCommand extends $Command {
7
- constructor(input) {
8
- super();
9
- this.input = input;
10
- }
11
7
  static getEndpointParameterInstructions() {
12
8
  return {
13
9
  UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
@@ -16,6 +12,10 @@ export class DescribeScheduledActionsCommand extends $Command {
16
12
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
13
  };
18
14
  }
15
+ constructor(input) {
16
+ super();
17
+ this.input = input;
18
+ }
19
19
  resolveMiddleware(clientStack, configuration, options) {
20
20
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
21
  this.middlewareStack.use(getEndpointPlugin(configuration, DescribeScheduledActionsCommand.getEndpointParameterInstructions()));
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { ListTagsForResourceRequestFilterSensitiveLog, ListTagsForResourceResponseFilterSensitiveLog, } from "../models/models_0";
5
+ import { deserializeAws_json1_1ListTagsForResourceCommand, serializeAws_json1_1ListTagsForResourceCommand, } from "../protocols/Aws_json1_1";
6
+ export class ListTagsForResourceCommand extends $Command {
7
+ static getEndpointParameterInstructions() {
8
+ return {
9
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
10
+ Endpoint: { type: "builtInParams", name: "endpoint" },
11
+ Region: { type: "builtInParams", name: "region" },
12
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
13
+ };
14
+ }
15
+ constructor(input) {
16
+ super();
17
+ this.input = input;
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, ListTagsForResourceCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "ApplicationAutoScalingClient";
25
+ const commandName = "ListTagsForResourceCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: ListTagsForResourceRequestFilterSensitiveLog,
31
+ outputFilterSensitiveLog: ListTagsForResourceResponseFilterSensitiveLog,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return serializeAws_json1_1ListTagsForResourceCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return deserializeAws_json1_1ListTagsForResourceCommand(output, context);
41
+ }
42
+ }
@@ -4,10 +4,6 @@ import { Command as $Command } from "@aws-sdk/smithy-client";
4
4
  import { PutScalingPolicyRequestFilterSensitiveLog, PutScalingPolicyResponseFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_json1_1PutScalingPolicyCommand, serializeAws_json1_1PutScalingPolicyCommand, } from "../protocols/Aws_json1_1";
6
6
  export class PutScalingPolicyCommand extends $Command {
7
- constructor(input) {
8
- super();
9
- this.input = input;
10
- }
11
7
  static getEndpointParameterInstructions() {
12
8
  return {
13
9
  UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
@@ -16,6 +12,10 @@ export class PutScalingPolicyCommand extends $Command {
16
12
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
13
  };
18
14
  }
15
+ constructor(input) {
16
+ super();
17
+ this.input = input;
18
+ }
19
19
  resolveMiddleware(clientStack, configuration, options) {
20
20
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
21
  this.middlewareStack.use(getEndpointPlugin(configuration, PutScalingPolicyCommand.getEndpointParameterInstructions()));
@@ -4,10 +4,6 @@ import { Command as $Command } from "@aws-sdk/smithy-client";
4
4
  import { PutScheduledActionRequestFilterSensitiveLog, PutScheduledActionResponseFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_json1_1PutScheduledActionCommand, serializeAws_json1_1PutScheduledActionCommand, } from "../protocols/Aws_json1_1";
6
6
  export class PutScheduledActionCommand extends $Command {
7
- constructor(input) {
8
- super();
9
- this.input = input;
10
- }
11
7
  static getEndpointParameterInstructions() {
12
8
  return {
13
9
  UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
@@ -16,6 +12,10 @@ export class PutScheduledActionCommand extends $Command {
16
12
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
13
  };
18
14
  }
15
+ constructor(input) {
16
+ super();
17
+ this.input = input;
18
+ }
19
19
  resolveMiddleware(clientStack, configuration, options) {
20
20
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
21
  this.middlewareStack.use(getEndpointPlugin(configuration, PutScheduledActionCommand.getEndpointParameterInstructions()));