1{ 2 "version": "1.0", 3 "examples": { 4 "DeleteScalingPolicy": [ 5 { 6 "input": { 7 "PolicyName": "web-app-cpu-lt-25", 8 "ResourceId": "service/default/web-app", 9 "ScalableDimension": "ecs:service:DesiredCount", 10 "ServiceNamespace": "ecs" 11 }, 12 "output": { 13 }, 14 "comments": { 15 "input": { 16 }, 17 "output": { 18 } 19 }, 20 "description": "This example deletes a scaling policy for the Amazon ECS service called web-app, which is running in the default cluster.", 21 "id": "to-delete-a-scaling-policy-1470863892689", 22 "title": "To delete a scaling policy" 23 } 24 ], 25 "DeregisterScalableTarget": [ 26 { 27 "input": { 28 "ResourceId": "service/default/web-app", 29 "ScalableDimension": "ecs:service:DesiredCount", 30 "ServiceNamespace": "ecs" 31 }, 32 "output": { 33 }, 34 "comments": { 35 "input": { 36 }, 37 "output": { 38 } 39 }, 40 "description": "This example deregisters a scalable target for an Amazon ECS service called web-app that is running in the default cluster.", 41 "id": "to-deregister-a-scalable-target-1470864164895", 42 "title": "To deregister a scalable target" 43 } 44 ], 45 "DescribeScalableTargets": [ 46 { 47 "input": { 48 "ServiceNamespace": "ecs" 49 }, 50 "output": { 51 "ScalableTargets": [ 52 { 53 "CreationTime": "2016-05-06T11:21:46.199Z", 54 "MaxCapacity": 10, 55 "MinCapacity": 1, 56 "ResourceId": "service/default/web-app", 57 "RoleARN": "arn:aws:iam::012345678910:role/ApplicationAutoscalingECSRole", 58 "ScalableDimension": "ecs:service:DesiredCount", 59 "ServiceNamespace": "ecs" 60 } 61 ] 62 }, 63 "comments": { 64 "input": { 65 }, 66 "output": { 67 } 68 }, 69 "description": "This example describes the scalable targets for the ecs service namespace.", 70 "id": "to-describe-scalable-targets-1470864286961", 71 "title": "To describe scalable targets" 72 } 73 ], 74 "DescribeScalingActivities": [ 75 { 76 "input": { 77 "ResourceId": "service/default/web-app", 78 "ScalableDimension": "ecs:service:DesiredCount", 79 "ServiceNamespace": "ecs" 80 }, 81 "output": { 82 "ScalingActivities": [ 83 { 84 "ActivityId": "e6c5f7d1-dbbb-4a3f-89b2-51f33e766399", 85 "Cause": "monitor alarm web-app-cpu-lt-25 in state ALARM triggered policy web-app-cpu-lt-25", 86 "Description": "Setting desired count to 1.", 87 "EndTime": "2016-05-06T16:04:32.111Z", 88 "ResourceId": "service/default/web-app", 89 "ScalableDimension": "ecs:service:DesiredCount", 90 "ServiceNamespace": "ecs", 91 "StartTime": "2016-05-06T16:03:58.171Z", 92 "StatusCode": "Successful", 93 "StatusMessage": "Successfully set desired count to 1. Change successfully fulfilled by ecs." 94 } 95 ] 96 }, 97 "comments": { 98 "input": { 99 }, 100 "output": { 101 } 102 }, 103 "description": "This example describes the scaling activities for an Amazon ECS service called web-app that is running in the default cluster.", 104 "id": "to-describe-scaling-activities-for-a-scalable-target-1470864398629", 105 "title": "To describe scaling activities for a scalable target" 106 } 107 ], 108 "DescribeScalingPolicies": [ 109 { 110 "input": { 111 "ServiceNamespace": "ecs" 112 }, 113 "output": { 114 "NextToken": "", 115 "ScalingPolicies": [ 116 { 117 "Alarms": [ 118 { 119 "AlarmARN": "arn:aws:cloudwatch:us-west-2:012345678910:alarm:web-app-cpu-gt-75", 120 "AlarmName": "web-app-cpu-gt-75" 121 } 122 ], 123 "CreationTime": "2016-05-06T12:11:39.230Z", 124 "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", 125 "PolicyName": "web-app-cpu-gt-75", 126 "PolicyType": "StepScaling", 127 "ResourceId": "service/default/web-app", 128 "ScalableDimension": "ecs:service:DesiredCount", 129 "ServiceNamespace": "ecs", 130 "StepScalingPolicyConfiguration": { 131 "AdjustmentType": "PercentChangeInCapacity", 132 "Cooldown": 60, 133 "StepAdjustments": [ 134 { 135 "MetricIntervalLowerBound": 0, 136 "ScalingAdjustment": 200 137 } 138 ] 139 } 140 } 141 ] 142 }, 143 "comments": { 144 "input": { 145 }, 146 "output": { 147 } 148 }, 149 "description": "This example describes the scaling policies for the ecs service namespace.", 150 "id": "to-describe-scaling-policies-1470864609734", 151 "title": "To describe scaling policies" 152 } 153 ], 154 "PutScalingPolicy": [ 155 { 156 "input": { 157 "PolicyName": "web-app-cpu-gt-75", 158 "PolicyType": "StepScaling", 159 "ResourceId": "service/default/web-app", 160 "ScalableDimension": "ecs:service:DesiredCount", 161 "ServiceNamespace": "ecs", 162 "StepScalingPolicyConfiguration": { 163 "AdjustmentType": "PercentChangeInCapacity", 164 "Cooldown": 60, 165 "StepAdjustments": [ 166 { 167 "MetricIntervalLowerBound": 0, 168 "ScalingAdjustment": 200 169 } 170 ] 171 } 172 }, 173 "output": { 174 "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" 175 }, 176 "comments": { 177 "input": { 178 }, 179 "output": { 180 } 181 }, 182 "description": "This example applies a scaling policy to an Amazon ECS service called web-app in the default cluster. The policy increases the desired count of the service by 200%, with a cool down period of 60 seconds.", 183 "id": "to-apply-a-scaling-policy-to-an-amazon-ecs-service-1470864779862", 184 "title": "To apply a scaling policy to an Amazon ECS service" 185 }, 186 { 187 "input": { 188 "PolicyName": "fleet-cpu-gt-75", 189 "PolicyType": "StepScaling", 190 "ResourceId": "spot-fleet-request/sfr-45e69d8a-be48-4539-bbf3-3464e99c50c3", 191 "ScalableDimension": "ec2:spot-fleet-request:TargetCapacity", 192 "ServiceNamespace": "ec2", 193 "StepScalingPolicyConfiguration": { 194 "AdjustmentType": "PercentChangeInCapacity", 195 "Cooldown": 180, 196 "StepAdjustments": [ 197 { 198 "MetricIntervalLowerBound": 0, 199 "ScalingAdjustment": 200 200 } 201 ] 202 } 203 }, 204 "output": { 205 "PolicyARN": "arn:aws:autoscaling:us-east-1:012345678910:scalingPolicy:89406401-0cb7-4130-b770-d97cca0e446b:resource/ec2/spot-fleet-request/sfr-45e69d8a-be48-4539-bbf3-3464e99c50c3:policyName/fleet-cpu-gt-75" 206 }, 207 "comments": { 208 "input": { 209 }, 210 "output": { 211 } 212 }, 213 "description": "This example applies a scaling policy to an Amazon EC2 Spot fleet. The policy increases the target capacity of the spot fleet by 200%, with a cool down period of 180 seconds.\",\n ", 214 "id": "to-apply-a-scaling-policy-to-an-amazon-ec2-spot-fleet-1472073278469", 215 "title": "To apply a scaling policy to an Amazon EC2 Spot fleet" 216 } 217 ], 218 "RegisterScalableTarget": [ 219 { 220 "input": { 221 "MaxCapacity": 10, 222 "MinCapacity": 1, 223 "ResourceId": "service/default/web-app", 224 "RoleARN": "arn:aws:iam::012345678910:role/ApplicationAutoscalingECSRole", 225 "ScalableDimension": "ecs:service:DesiredCount", 226 "ServiceNamespace": "ecs" 227 }, 228 "comments": { 229 "input": { 230 }, 231 "output": { 232 } 233 }, 234 "description": "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.", 235 "id": "to-register-a-new-scalable-target-1470864910380", 236 "title": "To register an ECS service as a scalable target" 237 }, 238 { 239 "input": { 240 "MaxCapacity": 10, 241 "MinCapacity": 1, 242 "ResourceId": "spot-fleet-request/sfr-45e69d8a-be48-4539-bbf3-3464e99c50c3", 243 "RoleARN": "arn:aws:iam::012345678910:role/ApplicationAutoscalingSpotRole", 244 "ScalableDimension": "ec2:spot-fleet-request:TargetCapacity", 245 "ServiceNamespace": "ec2" 246 }, 247 "output": { 248 }, 249 "comments": { 250 }, 251 "description": "This example registers a scalable target from an Amazon EC2 Spot fleet with a minimum target capacity of 1 and a maximum of 10.", 252 "id": "to-register-an-ec2-spot-fleet-as-a-scalable-target-1472072899649", 253 "title": "To register an EC2 Spot fleet as a scalable target" 254 } 255 ] 256 } 257} 258