application-autoscaling-2016-02-06.examples.json 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  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. "DeleteScheduledAction": [
  26. {
  27. "input": {
  28. "ResourceId": "fleet/sample-fleet",
  29. "ScalableDimension": "appstream:fleet:DesiredCapacity",
  30. "ScheduledActionName": "my-recurring-action",
  31. "ServiceNamespace": "appstream"
  32. },
  33. "output": {
  34. },
  35. "comments": {
  36. "input": {
  37. },
  38. "output": {
  39. }
  40. },
  41. "description": "This example deletes a scheduled action for the AppStream 2.0 fleet called sample-fleet.",
  42. "id": "to-delete-a-scheduled-action-1677963329606",
  43. "title": "To delete a scheduled action"
  44. }
  45. ],
  46. "DeregisterScalableTarget": [
  47. {
  48. "input": {
  49. "ResourceId": "service/default/web-app",
  50. "ScalableDimension": "ecs:service:DesiredCount",
  51. "ServiceNamespace": "ecs"
  52. },
  53. "output": {
  54. },
  55. "comments": {
  56. "input": {
  57. },
  58. "output": {
  59. }
  60. },
  61. "description": "This example deregisters a scalable target for an Amazon ECS service called web-app that is running in the default cluster.",
  62. "id": "to-deregister-a-scalable-target-1470864164895",
  63. "title": "To deregister a scalable target"
  64. }
  65. ],
  66. "DescribeScalableTargets": [
  67. {
  68. "input": {
  69. "ServiceNamespace": "ecs"
  70. },
  71. "output": {
  72. "ScalableTargets": [
  73. {
  74. "CreationTime": "2019-05-06T11:21:46.199Z",
  75. "MaxCapacity": 10,
  76. "MinCapacity": 1,
  77. "ResourceId": "service/default/web-app",
  78. "RoleARN": "arn:aws:iam::012345678910:role/aws-service-role/ecs.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_ECSService",
  79. "ScalableDimension": "ecs:service:DesiredCount",
  80. "ServiceNamespace": "ecs",
  81. "SuspendedState": {
  82. "DynamicScalingInSuspended": false,
  83. "DynamicScalingOutSuspended": false,
  84. "ScheduledScalingSuspended": false
  85. }
  86. }
  87. ]
  88. },
  89. "comments": {
  90. "input": {
  91. },
  92. "output": {
  93. }
  94. },
  95. "description": "This example describes the scalable targets for the ECS service namespace.",
  96. "id": "to-describe-scalable-targets-1470864286961",
  97. "title": "To describe scalable targets"
  98. }
  99. ],
  100. "DescribeScalingActivities": [
  101. {
  102. "input": {
  103. "ResourceId": "service/default/web-app",
  104. "ScalableDimension": "ecs:service:DesiredCount",
  105. "ServiceNamespace": "ecs"
  106. },
  107. "output": {
  108. "ScalingActivities": [
  109. {
  110. "ActivityId": "e6c5f7d1-dbbb-4a3f-89b2-51f33e766399",
  111. "Cause": "monitor alarm web-app-cpu-lt-25 in state ALARM triggered policy web-app-cpu-lt-25",
  112. "Description": "Setting desired count to 1.",
  113. "EndTime": "2019-05-06T16:04:32.111Z",
  114. "ResourceId": "service/default/web-app",
  115. "ScalableDimension": "ecs:service:DesiredCount",
  116. "ServiceNamespace": "ecs",
  117. "StartTime": "2019-05-06T16:03:58.171Z",
  118. "StatusCode": "Successful",
  119. "StatusMessage": "Successfully set desired count to 1. Change successfully fulfilled by ecs."
  120. }
  121. ]
  122. },
  123. "comments": {
  124. "input": {
  125. },
  126. "output": {
  127. }
  128. },
  129. "description": "This example describes the scaling activities for an Amazon ECS service called web-app that is running in the default cluster.",
  130. "id": "to-describe-scaling-activities-for-a-scalable-target-1470864398629",
  131. "title": "To describe scaling activities for a scalable target"
  132. }
  133. ],
  134. "DescribeScalingPolicies": [
  135. {
  136. "input": {
  137. "ServiceNamespace": "ecs"
  138. },
  139. "output": {
  140. "NextToken": "",
  141. "ScalingPolicies": [
  142. {
  143. "Alarms": [
  144. {
  145. "AlarmARN": "arn:aws:cloudwatch:us-west-2:012345678910:alarm:web-app-cpu-gt-75",
  146. "AlarmName": "web-app-cpu-gt-75"
  147. }
  148. ],
  149. "CreationTime": "2019-05-06T12:11:39.230Z",
  150. "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",
  151. "PolicyName": "web-app-cpu-gt-75",
  152. "PolicyType": "StepScaling",
  153. "ResourceId": "service/default/web-app",
  154. "ScalableDimension": "ecs:service:DesiredCount",
  155. "ServiceNamespace": "ecs",
  156. "StepScalingPolicyConfiguration": {
  157. "AdjustmentType": "PercentChangeInCapacity",
  158. "Cooldown": 60,
  159. "StepAdjustments": [
  160. {
  161. "MetricIntervalLowerBound": 0,
  162. "ScalingAdjustment": 200
  163. }
  164. ]
  165. }
  166. }
  167. ]
  168. },
  169. "comments": {
  170. "input": {
  171. },
  172. "output": {
  173. }
  174. },
  175. "description": "This example describes the scaling policies for the ECS service namespace.",
  176. "id": "to-describe-scaling-policies-1470864609734",
  177. "title": "To describe scaling policies"
  178. }
  179. ],
  180. "DescribeScheduledActions": [
  181. {
  182. "input": {
  183. "ServiceNamespace": "dynamodb"
  184. },
  185. "output": {
  186. "ScheduledActions": [
  187. {
  188. "CreationTime": 1561571888.361,
  189. "ResourceId": "table/my-table",
  190. "ScalableDimension": "dynamodb:table:WriteCapacityUnits",
  191. "ScalableTargetAction": {
  192. "MaxCapacity": 20,
  193. "MinCapacity": 15
  194. },
  195. "Schedule": "at(2019-05-20T18:35:00)",
  196. "ScheduledActionARN": "arn:aws:autoscaling:us-west-2:123456789012:scheduledAction:2d36aa3b-cdf9-4565-b290-81db519b227d:resource/dynamodb/table/my-table:scheduledActionName/my-first-scheduled-action",
  197. "ScheduledActionName": "my-first-scheduled-action",
  198. "ServiceNamespace": "dynamodb"
  199. },
  200. {
  201. "CreationTime": 1561571946.021,
  202. "ResourceId": "table/my-table",
  203. "ScalableDimension": "dynamodb:table:WriteCapacityUnits",
  204. "ScalableTargetAction": {
  205. "MaxCapacity": 10,
  206. "MinCapacity": 5
  207. },
  208. "Schedule": "at(2019-05-20T18:40:00)",
  209. "ScheduledActionARN": "arn:aws:autoscaling:us-west-2:123456789012:scheduledAction:2d36aa3b-cdf9-4565-b290-81db519b227d:resource/dynamodb/table/my-table:scheduledActionName/my-second-scheduled-action",
  210. "ScheduledActionName": "my-second-scheduled-action",
  211. "ServiceNamespace": "dynamodb"
  212. }
  213. ]
  214. },
  215. "comments": {
  216. "input": {
  217. },
  218. "output": {
  219. }
  220. },
  221. "description": "This example describes the scheduled actions for the dynamodb service namespace.",
  222. "id": "to-describe-scheduled-actions-1677965249349",
  223. "title": "To describe scheduled actions"
  224. }
  225. ],
  226. "ListTagsForResource": [
  227. {
  228. "input": {
  229. "ResourceARN": "arn:aws:application-autoscaling:us-west-2:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123"
  230. },
  231. "output": {
  232. "Tags": {
  233. "environment": "production"
  234. }
  235. },
  236. "comments": {
  237. "input": {
  238. },
  239. "output": {
  240. }
  241. },
  242. "description": "This example lists the tag key names and values that are attached to the scalable target specified by its ARN.",
  243. "id": "to-list-tags-for-a-scalable-target-1677971474903",
  244. "title": "To list tags for a scalable target"
  245. }
  246. ],
  247. "PutScalingPolicy": [
  248. {
  249. "input": {
  250. "PolicyName": "cpu75-target-tracking-scaling-policy",
  251. "PolicyType": "TargetTrackingScaling",
  252. "ResourceId": "service/default/web-app",
  253. "ScalableDimension": "ecs:service:DesiredCount",
  254. "ServiceNamespace": "ecs",
  255. "TargetTrackingScalingPolicyConfiguration": {
  256. "PredefinedMetricSpecification": {
  257. "PredefinedMetricType": "ECSServiceAverageCPUUtilization"
  258. },
  259. "ScaleInCooldown": 60,
  260. "ScaleOutCooldown": 60,
  261. "TargetValue": 75
  262. }
  263. },
  264. "output": {
  265. "Alarms": [
  266. {
  267. "AlarmARN": "arn:aws:cloudwatch:us-west-2:012345678910:alarm:TargetTracking-service/default/web-app-AlarmHigh-d4f0770c-b46e-434a-a60f-3b36d653feca",
  268. "AlarmName": "TargetTracking-service/default/web-app-AlarmHigh-d4f0770c-b46e-434a-a60f-3b36d653feca"
  269. },
  270. {
  271. "AlarmARN": "arn:aws:cloudwatch:us-west-2:012345678910:alarm:TargetTracking-service/default/web-app-AlarmLow-1b437334-d19b-4a63-a812-6c67aaf2910d",
  272. "AlarmName": "TargetTracking-service/default/web-app-AlarmLow-1b437334-d19b-4a63-a812-6c67aaf2910d"
  273. }
  274. ],
  275. "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"
  276. },
  277. "comments": {
  278. "input": {
  279. },
  280. "output": {
  281. }
  282. },
  283. "description": "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.",
  284. "id": "to-apply-a-target-tracking-scaling-policy-with-a-predefined-metric-specification-1569364247984",
  285. "title": "To apply a target tracking scaling policy with a predefined metric specification"
  286. }
  287. ],
  288. "PutScheduledAction": [
  289. {
  290. "input": {
  291. "ResourceId": "table/TestTable",
  292. "ScalableDimension": "dynamodb:table:WriteCapacityUnits",
  293. "ScalableTargetAction": {
  294. "MinCapacity": 6
  295. },
  296. "Schedule": "cron(15 12 * * ? *)",
  297. "ScheduledActionName": "my-recurring-action",
  298. "ServiceNamespace": "dynamodb"
  299. },
  300. "output": {
  301. },
  302. "comments": {
  303. "input": {
  304. },
  305. "output": {
  306. }
  307. },
  308. "description": "This example adds a scheduled action to a DynamoDB table called TestTable to scale out on a recurring schedule. On the specified schedule (every day at 12:15pm UTC), if the current capacity is below the value specified for MinCapacity, Application Auto Scaling scales out to the value specified by MinCapacity.",
  309. "id": "to-create-a-recurring-scheduled-action-1677970068621",
  310. "title": "To create a recurring scheduled action"
  311. }
  312. ],
  313. "RegisterScalableTarget": [
  314. {
  315. "input": {
  316. "MaxCapacity": 10,
  317. "MinCapacity": 1,
  318. "ResourceId": "service/default/web-app",
  319. "ScalableDimension": "ecs:service:DesiredCount",
  320. "ServiceNamespace": "ecs"
  321. },
  322. "output": {
  323. "ScalableTargetARN": "arn:aws:application-autoscaling:us-east-1:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123"
  324. },
  325. "comments": {
  326. "input": {
  327. },
  328. "output": {
  329. }
  330. },
  331. "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.",
  332. "id": "to-register-a-new-scalable-target-1470864910380",
  333. "title": "To register an ECS service as a scalable target"
  334. }
  335. ],
  336. "TagResource": [
  337. {
  338. "input": {
  339. "ResourceARN": "arn:aws:application-autoscaling:us-west-2:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123",
  340. "Tags": {
  341. "environment": "production"
  342. }
  343. },
  344. "output": {
  345. },
  346. "comments": {
  347. "input": {
  348. },
  349. "output": {
  350. }
  351. },
  352. "description": "This example adds a tag with the key name \"environment\" and the value \"production\" to the scalable target specified by its ARN.",
  353. "id": "to-add-a-tag-to-a-scalable-target-1677970764620",
  354. "title": "To add a tag to a scalable target"
  355. }
  356. ],
  357. "UntagResource": [
  358. {
  359. "input": {
  360. "ResourceARN": "arn:aws:application-autoscaling:us-west-2:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123",
  361. "TagKeys": [
  362. "environment"
  363. ]
  364. },
  365. "output": {
  366. },
  367. "comments": {
  368. "input": {
  369. },
  370. "output": {
  371. }
  372. },
  373. "description": "This example removes the tag pair with the key name \"environment\" from the scalable target specified by its ARN.",
  374. "id": "to-remove-a-tag-from-a-scalable-target-1677971117168",
  375. "title": "To remove a tag from a scalable target"
  376. }
  377. ]
  378. }
  379. }