@aws-sdk/client-application-auto-scaling 3.288.0 → 3.289.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.
@@ -34,6 +34,20 @@ export interface DeleteScalingPolicyCommandOutput extends DeleteScalingPolicyRes
34
34
  * @see {@link DeleteScalingPolicyCommandOutput} for command's `response` shape.
35
35
  * @see {@link ApplicationAutoScalingClientResolvedConfig | config} for ApplicationAutoScalingClient's `config` shape.
36
36
  *
37
+ * @example To delete a scaling policy
38
+ * ```javascript
39
+ * // This example deletes a scaling policy for the Amazon ECS service called web-app, which is running in the default cluster.
40
+ * const input = {
41
+ * "PolicyName": "web-app-cpu-lt-25",
42
+ * "ResourceId": "service/default/web-app",
43
+ * "ScalableDimension": "ecs:service:DesiredCount",
44
+ * "ServiceNamespace": "ecs"
45
+ * };
46
+ * const command = new DeleteScalingPolicyCommand(input);
47
+ * await client.send(command);
48
+ * // example id: to-delete-a-scaling-policy-1470863892689
49
+ * ```
50
+ *
37
51
  */
38
52
  export declare class DeleteScalingPolicyCommand extends $Command<DeleteScalingPolicyCommandInput, DeleteScalingPolicyCommandOutput, ApplicationAutoScalingClientResolvedConfig> {
39
53
  readonly input: DeleteScalingPolicyCommandInput;
@@ -34,6 +34,19 @@ export interface DeregisterScalableTargetCommandOutput extends DeregisterScalabl
34
34
  * @see {@link DeregisterScalableTargetCommandOutput} for command's `response` shape.
35
35
  * @see {@link ApplicationAutoScalingClientResolvedConfig | config} for ApplicationAutoScalingClient's `config` shape.
36
36
  *
37
+ * @example To deregister a scalable target
38
+ * ```javascript
39
+ * // This example deregisters a scalable target for an Amazon ECS service called web-app that is running in the default cluster.
40
+ * const input = {
41
+ * "ResourceId": "service/default/web-app",
42
+ * "ScalableDimension": "ecs:service:DesiredCount",
43
+ * "ServiceNamespace": "ecs"
44
+ * };
45
+ * const command = new DeregisterScalableTargetCommand(input);
46
+ * await client.send(command);
47
+ * // example id: to-deregister-a-scalable-target-1470864164895
48
+ * ```
49
+ *
37
50
  */
38
51
  export declare class DeregisterScalableTargetCommand extends $Command<DeregisterScalableTargetCommandInput, DeregisterScalableTargetCommandOutput, ApplicationAutoScalingClientResolvedConfig> {
39
52
  readonly input: DeregisterScalableTargetCommandInput;
@@ -31,6 +31,37 @@ export interface DescribeScalableTargetsCommandOutput extends DescribeScalableTa
31
31
  * @see {@link DescribeScalableTargetsCommandOutput} for command's `response` shape.
32
32
  * @see {@link ApplicationAutoScalingClientResolvedConfig | config} for ApplicationAutoScalingClient's `config` shape.
33
33
  *
34
+ * @example To describe scalable targets
35
+ * ```javascript
36
+ * // This example describes the scalable targets for the ECS service namespace.
37
+ * const input = {
38
+ * "ServiceNamespace": "ecs"
39
+ * };
40
+ * const command = new DescribeScalableTargetsCommand(input);
41
+ * const response = await client.send(command);
42
+ * /* response ==
43
+ * {
44
+ * "ScalableTargets": [
45
+ * {
46
+ * "CreationTime": "2019-05-06T11:21:46.199Z",
47
+ * "MaxCapacity": 10,
48
+ * "MinCapacity": 1,
49
+ * "ResourceId": "service/default/web-app",
50
+ * "RoleARN": "arn:aws:iam::012345678910:role/aws-service-role/ecs.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_ECSService",
51
+ * "ScalableDimension": "ecs:service:DesiredCount",
52
+ * "ServiceNamespace": "ecs",
53
+ * "SuspendedState": {
54
+ * "DynamicScalingInSuspended": false,
55
+ * "DynamicScalingOutSuspended": false,
56
+ * "ScheduledScalingSuspended": false
57
+ * }
58
+ * }
59
+ * ]
60
+ * }
61
+ * *\/
62
+ * // example id: to-describe-scalable-targets-1470864286961
63
+ * ```
64
+ *
34
65
  */
35
66
  export declare class DescribeScalableTargetsCommand extends $Command<DescribeScalableTargetsCommandInput, DescribeScalableTargetsCommandOutput, ApplicationAutoScalingClientResolvedConfig> {
36
67
  readonly input: DescribeScalableTargetsCommandInput;
@@ -33,6 +33,37 @@ export interface DescribeScalingActivitiesCommandOutput extends DescribeScalingA
33
33
  * @see {@link DescribeScalingActivitiesCommandOutput} for command's `response` shape.
34
34
  * @see {@link ApplicationAutoScalingClientResolvedConfig | config} for ApplicationAutoScalingClient's `config` shape.
35
35
  *
36
+ * @example To describe scaling activities for a scalable target
37
+ * ```javascript
38
+ * // This example describes the scaling activities for an Amazon ECS service called web-app that is running in the default cluster.
39
+ * const input = {
40
+ * "ResourceId": "service/default/web-app",
41
+ * "ScalableDimension": "ecs:service:DesiredCount",
42
+ * "ServiceNamespace": "ecs"
43
+ * };
44
+ * const command = new DescribeScalingActivitiesCommand(input);
45
+ * const response = await client.send(command);
46
+ * /* response ==
47
+ * {
48
+ * "ScalingActivities": [
49
+ * {
50
+ * "ActivityId": "e6c5f7d1-dbbb-4a3f-89b2-51f33e766399",
51
+ * "Cause": "monitor alarm web-app-cpu-lt-25 in state ALARM triggered policy web-app-cpu-lt-25",
52
+ * "Description": "Setting desired count to 1.",
53
+ * "EndTime": "2019-05-06T16:04:32.111Z",
54
+ * "ResourceId": "service/default/web-app",
55
+ * "ScalableDimension": "ecs:service:DesiredCount",
56
+ * "ServiceNamespace": "ecs",
57
+ * "StartTime": "2019-05-06T16:03:58.171Z",
58
+ * "StatusCode": "Successful",
59
+ * "StatusMessage": "Successfully set desired count to 1. Change successfully fulfilled by ecs."
60
+ * }
61
+ * ]
62
+ * }
63
+ * *\/
64
+ * // example id: to-describe-scaling-activities-for-a-scalable-target-1470864398629
65
+ * ```
66
+ *
36
67
  */
37
68
  export declare class DescribeScalingActivitiesCommand extends $Command<DescribeScalingActivitiesCommandInput, DescribeScalingActivitiesCommandOutput, ApplicationAutoScalingClientResolvedConfig> {
38
69
  readonly input: DescribeScalingActivitiesCommandInput;
@@ -32,6 +32,49 @@ export interface DescribeScalingPoliciesCommandOutput extends DescribeScalingPol
32
32
  * @see {@link DescribeScalingPoliciesCommandOutput} for command's `response` shape.
33
33
  * @see {@link ApplicationAutoScalingClientResolvedConfig | config} for ApplicationAutoScalingClient's `config` shape.
34
34
  *
35
+ * @example To describe scaling policies
36
+ * ```javascript
37
+ * // This example describes the scaling policies for the ECS service namespace.
38
+ * const input = {
39
+ * "ServiceNamespace": "ecs"
40
+ * };
41
+ * const command = new DescribeScalingPoliciesCommand(input);
42
+ * const response = await client.send(command);
43
+ * /* response ==
44
+ * {
45
+ * "NextToken": "",
46
+ * "ScalingPolicies": [
47
+ * {
48
+ * "Alarms": [
49
+ * {
50
+ * "AlarmARN": "arn:aws:cloudwatch:us-west-2:012345678910:alarm:web-app-cpu-gt-75",
51
+ * "AlarmName": "web-app-cpu-gt-75"
52
+ * }
53
+ * ],
54
+ * "CreationTime": "2019-05-06T12:11:39.230Z",
55
+ * "PolicyARN": "arn:aws:autoscaling:us-west-2:012345678910:scalingPolicy:6d8972f3-efc8-437c-92d1-6270f29a66e7:resource/ecs/service/default/web-app:policyName/web-app-cpu-gt-75",
56
+ * "PolicyName": "web-app-cpu-gt-75",
57
+ * "PolicyType": "StepScaling",
58
+ * "ResourceId": "service/default/web-app",
59
+ * "ScalableDimension": "ecs:service:DesiredCount",
60
+ * "ServiceNamespace": "ecs",
61
+ * "StepScalingPolicyConfiguration": {
62
+ * "AdjustmentType": "PercentChangeInCapacity",
63
+ * "Cooldown": 60,
64
+ * "StepAdjustments": [
65
+ * {
66
+ * "MetricIntervalLowerBound": 0,
67
+ * "ScalingAdjustment": 200
68
+ * }
69
+ * ]
70
+ * }
71
+ * }
72
+ * ]
73
+ * }
74
+ * *\/
75
+ * // example id: to-describe-scaling-policies-1470864609734
76
+ * ```
77
+ *
35
78
  */
36
79
  export declare class DescribeScalingPoliciesCommand extends $Command<DescribeScalingPoliciesCommandInput, DescribeScalingPoliciesCommandOutput, ApplicationAutoScalingClientResolvedConfig> {
37
80
  readonly input: DescribeScalingPoliciesCommandInput;
@@ -53,6 +53,44 @@ export interface PutScalingPolicyCommandOutput extends PutScalingPolicyResponse,
53
53
  * @see {@link PutScalingPolicyCommandOutput} for command's `response` shape.
54
54
  * @see {@link ApplicationAutoScalingClientResolvedConfig | config} for ApplicationAutoScalingClient's `config` shape.
55
55
  *
56
+ * @example To apply a target tracking scaling policy with a predefined metric specification
57
+ * ```javascript
58
+ * // The following example applies a target tracking scaling policy with a predefined metric specification to an Amazon ECS service called web-app in the default cluster. The policy keeps the average CPU utilization of the service at 75 percent, with scale-out and scale-in cooldown periods of 60 seconds.
59
+ * const input = {
60
+ * "PolicyName": "cpu75-target-tracking-scaling-policy",
61
+ * "PolicyType": "TargetTrackingScaling",
62
+ * "ResourceId": "service/default/web-app",
63
+ * "ScalableDimension": "ecs:service:DesiredCount",
64
+ * "ServiceNamespace": "ecs",
65
+ * "TargetTrackingScalingPolicyConfiguration": {
66
+ * "PredefinedMetricSpecification": {
67
+ * "PredefinedMetricType": "ECSServiceAverageCPUUtilization"
68
+ * },
69
+ * "ScaleInCooldown": 60,
70
+ * "ScaleOutCooldown": 60,
71
+ * "TargetValue": 75
72
+ * }
73
+ * };
74
+ * const command = new PutScalingPolicyCommand(input);
75
+ * const response = await client.send(command);
76
+ * /* response ==
77
+ * {
78
+ * "Alarms": [
79
+ * {
80
+ * "AlarmARN": "arn:aws:cloudwatch:us-west-2:012345678910:alarm:TargetTracking-service/default/web-app-AlarmHigh-d4f0770c-b46e-434a-a60f-3b36d653feca",
81
+ * "AlarmName": "TargetTracking-service/default/web-app-AlarmHigh-d4f0770c-b46e-434a-a60f-3b36d653feca"
82
+ * },
83
+ * {
84
+ * "AlarmARN": "arn:aws:cloudwatch:us-west-2:012345678910:alarm:TargetTracking-service/default/web-app-AlarmLow-1b437334-d19b-4a63-a812-6c67aaf2910d",
85
+ * "AlarmName": "TargetTracking-service/default/web-app-AlarmLow-1b437334-d19b-4a63-a812-6c67aaf2910d"
86
+ * }
87
+ * ],
88
+ * "PolicyARN": "arn:aws:autoscaling:us-west-2:012345678910:scalingPolicy:6d8972f3-efc8-437c-92d1-6270f29a66e7:resource/ecs/service/default/web-app:policyName/cpu75-target-tracking-scaling-policy"
89
+ * }
90
+ * *\/
91
+ * // example id: to-apply-a-target-tracking-scaling-policy-with-a-predefined-metric-specification-1569364247984
92
+ * ```
93
+ *
56
94
  */
57
95
  export declare class PutScalingPolicyCommand extends $Command<PutScalingPolicyCommandInput, PutScalingPolicyCommandOutput, ApplicationAutoScalingClientResolvedConfig> {
58
96
  readonly input: PutScalingPolicyCommandInput;
@@ -53,6 +53,21 @@ export interface RegisterScalableTargetCommandOutput extends RegisterScalableTar
53
53
  * @see {@link RegisterScalableTargetCommandOutput} for command's `response` shape.
54
54
  * @see {@link ApplicationAutoScalingClientResolvedConfig | config} for ApplicationAutoScalingClient's `config` shape.
55
55
  *
56
+ * @example To register an ECS service as a scalable target
57
+ * ```javascript
58
+ * // This example registers a scalable target from an Amazon ECS service called web-app that is running on the default cluster, with a minimum desired count of 1 task and a maximum desired count of 10 tasks.
59
+ * const input = {
60
+ * "MaxCapacity": 10,
61
+ * "MinCapacity": 1,
62
+ * "ResourceId": "service/default/web-app",
63
+ * "ScalableDimension": "ecs:service:DesiredCount",
64
+ * "ServiceNamespace": "ecs"
65
+ * };
66
+ * const command = new RegisterScalableTargetCommand(input);
67
+ * await client.send(command);
68
+ * // example id: to-register-a-new-scalable-target-1470864910380
69
+ * ```
70
+ *
56
71
  */
57
72
  export declare class RegisterScalableTargetCommand extends $Command<RegisterScalableTargetCommandInput, RegisterScalableTargetCommandOutput, ApplicationAutoScalingClientResolvedConfig> {
58
73
  readonly input: RegisterScalableTargetCommandInput;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-application-auto-scaling",
3
3
  "description": "AWS SDK for JavaScript Application Auto Scaling Client for Node.js, Browser and React Native",
4
- "version": "3.288.0",
4
+ "version": "3.289.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,37 +20,37 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.288.0",
24
- "@aws-sdk/config-resolver": "3.287.0",
25
- "@aws-sdk/credential-provider-node": "3.288.0",
26
- "@aws-sdk/fetch-http-handler": "3.282.0",
27
- "@aws-sdk/hash-node": "3.272.0",
28
- "@aws-sdk/invalid-dependency": "3.272.0",
29
- "@aws-sdk/middleware-content-length": "3.282.0",
30
- "@aws-sdk/middleware-endpoint": "3.282.0",
31
- "@aws-sdk/middleware-host-header": "3.282.0",
32
- "@aws-sdk/middleware-logger": "3.288.0",
33
- "@aws-sdk/middleware-recursion-detection": "3.282.0",
34
- "@aws-sdk/middleware-retry": "3.287.0",
35
- "@aws-sdk/middleware-serde": "3.272.0",
36
- "@aws-sdk/middleware-signing": "3.282.0",
37
- "@aws-sdk/middleware-stack": "3.272.0",
38
- "@aws-sdk/middleware-user-agent": "3.282.0",
39
- "@aws-sdk/node-config-provider": "3.287.0",
40
- "@aws-sdk/node-http-handler": "3.282.0",
41
- "@aws-sdk/protocol-http": "3.282.0",
42
- "@aws-sdk/smithy-client": "3.279.0",
43
- "@aws-sdk/types": "3.272.0",
44
- "@aws-sdk/url-parser": "3.272.0",
23
+ "@aws-sdk/client-sts": "3.289.0",
24
+ "@aws-sdk/config-resolver": "3.289.0",
25
+ "@aws-sdk/credential-provider-node": "3.289.0",
26
+ "@aws-sdk/fetch-http-handler": "3.289.0",
27
+ "@aws-sdk/hash-node": "3.289.0",
28
+ "@aws-sdk/invalid-dependency": "3.289.0",
29
+ "@aws-sdk/middleware-content-length": "3.289.0",
30
+ "@aws-sdk/middleware-endpoint": "3.289.0",
31
+ "@aws-sdk/middleware-host-header": "3.289.0",
32
+ "@aws-sdk/middleware-logger": "3.289.0",
33
+ "@aws-sdk/middleware-recursion-detection": "3.289.0",
34
+ "@aws-sdk/middleware-retry": "3.289.0",
35
+ "@aws-sdk/middleware-serde": "3.289.0",
36
+ "@aws-sdk/middleware-signing": "3.289.0",
37
+ "@aws-sdk/middleware-stack": "3.289.0",
38
+ "@aws-sdk/middleware-user-agent": "3.289.0",
39
+ "@aws-sdk/node-config-provider": "3.289.0",
40
+ "@aws-sdk/node-http-handler": "3.289.0",
41
+ "@aws-sdk/protocol-http": "3.289.0",
42
+ "@aws-sdk/smithy-client": "3.289.0",
43
+ "@aws-sdk/types": "3.289.0",
44
+ "@aws-sdk/url-parser": "3.289.0",
45
45
  "@aws-sdk/util-base64": "3.208.0",
46
46
  "@aws-sdk/util-body-length-browser": "3.188.0",
47
47
  "@aws-sdk/util-body-length-node": "3.208.0",
48
- "@aws-sdk/util-defaults-mode-browser": "3.279.0",
49
- "@aws-sdk/util-defaults-mode-node": "3.287.0",
50
- "@aws-sdk/util-endpoints": "3.272.0",
51
- "@aws-sdk/util-retry": "3.272.0",
52
- "@aws-sdk/util-user-agent-browser": "3.282.0",
53
- "@aws-sdk/util-user-agent-node": "3.287.0",
48
+ "@aws-sdk/util-defaults-mode-browser": "3.289.0",
49
+ "@aws-sdk/util-defaults-mode-node": "3.289.0",
50
+ "@aws-sdk/util-endpoints": "3.289.0",
51
+ "@aws-sdk/util-retry": "3.289.0",
52
+ "@aws-sdk/util-user-agent-browser": "3.289.0",
53
+ "@aws-sdk/util-user-agent-node": "3.289.0",
54
54
  "@aws-sdk/util-utf8": "3.254.0",
55
55
  "tslib": "^2.3.1"
56
56
  },