aws-sdk-applicationautoscaling 1.0.0.rc1

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.
@@ -0,0 +1,991 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws
9
+ module ApplicationAutoScaling
10
+ module Types
11
+
12
+ # Represents a CloudWatch alarm associated with a scaling policy.
13
+ # @!attribute [rw] alarm_name
14
+ # The name of the alarm.
15
+ # @return [String]
16
+ #
17
+ # @!attribute [rw] alarm_arn
18
+ # The Amazon Resource Name (ARN) of the alarm.
19
+ # @return [String]
20
+ class Alarm < Struct.new(
21
+ :alarm_name,
22
+ :alarm_arn)
23
+ include Aws::Structure
24
+ end
25
+
26
+ # @note When making an API call, pass DeleteScalingPolicyRequest
27
+ # data as a hash:
28
+ #
29
+ # {
30
+ # policy_name: "ResourceIdMaxLen1600", # required
31
+ # service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2
32
+ # resource_id: "ResourceIdMaxLen1600", # required
33
+ # scalable_dimension: "ecs:service:DesiredCount", # required, accepts ecs:service:DesiredCount, ec2:spot-fleet-request:TargetCapacity, elasticmapreduce:instancegroup:InstanceCount
34
+ # }
35
+ # @!attribute [rw] policy_name
36
+ # The name of the scaling policy.
37
+ # @return [String]
38
+ #
39
+ # @!attribute [rw] service_namespace
40
+ # The namespace of the AWS service. For more information, see [AWS
41
+ # Service Namespaces][1] in the *Amazon Web Services General
42
+ # Reference*.
43
+ #
44
+ #
45
+ #
46
+ # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
47
+ # @return [String]
48
+ #
49
+ # @!attribute [rw] resource_id
50
+ # The identifier of the resource associated with the scalable target.
51
+ # This string consists of the resource type and unique identifier.
52
+ #
53
+ # * ECS service - The resource type is `service` and the unique
54
+ # identifier is the cluster name and service name. Example:
55
+ # `service/default/sample-webapp`.
56
+ #
57
+ # * Spot fleet request - The resource type is `spot-fleet-request` and
58
+ # the unique identifier is the Spot fleet request ID. Example:
59
+ # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
60
+ #
61
+ # * EMR cluster - The resource type is `instancegroup` and the unique
62
+ # identifier is the cluster ID and instance group ID. Example:
63
+ # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
64
+ # @return [String]
65
+ #
66
+ # @!attribute [rw] scalable_dimension
67
+ # The scalable dimension. This string consists of the service
68
+ # namespace, resource type, and scaling property.
69
+ #
70
+ # * `ecs:service:DesiredCount` - The desired task count of an ECS
71
+ # service.
72
+ #
73
+ # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
74
+ # Spot fleet request.
75
+ #
76
+ # * `elasticmapreduce:instancegroup:InstanceCount` - The instance
77
+ # count of an EMR Instance Group.
78
+ # @return [String]
79
+ class DeleteScalingPolicyRequest < Struct.new(
80
+ :policy_name,
81
+ :service_namespace,
82
+ :resource_id,
83
+ :scalable_dimension)
84
+ include Aws::Structure
85
+ end
86
+
87
+ class DeleteScalingPolicyResponse < Aws::EmptyStructure; end
88
+
89
+ # @note When making an API call, pass DeregisterScalableTargetRequest
90
+ # data as a hash:
91
+ #
92
+ # {
93
+ # service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2
94
+ # resource_id: "ResourceIdMaxLen1600", # required
95
+ # scalable_dimension: "ecs:service:DesiredCount", # required, accepts ecs:service:DesiredCount, ec2:spot-fleet-request:TargetCapacity, elasticmapreduce:instancegroup:InstanceCount
96
+ # }
97
+ # @!attribute [rw] service_namespace
98
+ # The namespace of the AWS service. For more information, see [AWS
99
+ # Service Namespaces][1] in the *Amazon Web Services General
100
+ # Reference*.
101
+ #
102
+ #
103
+ #
104
+ # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
105
+ # @return [String]
106
+ #
107
+ # @!attribute [rw] resource_id
108
+ # The identifier of the resource associated with the scalable target.
109
+ # This string consists of the resource type and unique identifier.
110
+ #
111
+ # * ECS service - The resource type is `service` and the unique
112
+ # identifier is the cluster name and service name. Example:
113
+ # `service/default/sample-webapp`.
114
+ #
115
+ # * Spot fleet request - The resource type is `spot-fleet-request` and
116
+ # the unique identifier is the Spot fleet request ID. Example:
117
+ # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
118
+ #
119
+ # * EMR cluster - The resource type is `instancegroup` and the unique
120
+ # identifier is the cluster ID and instance group ID. Example:
121
+ # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
122
+ # @return [String]
123
+ #
124
+ # @!attribute [rw] scalable_dimension
125
+ # The scalable dimension associated with the scalable target. This
126
+ # string consists of the service namespace, resource type, and scaling
127
+ # property.
128
+ #
129
+ # * `ecs:service:DesiredCount` - The desired task count of an ECS
130
+ # service.
131
+ #
132
+ # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
133
+ # Spot fleet request.
134
+ #
135
+ # * `elasticmapreduce:instancegroup:InstanceCount` - The instance
136
+ # count of an EMR Instance Group.
137
+ # @return [String]
138
+ class DeregisterScalableTargetRequest < Struct.new(
139
+ :service_namespace,
140
+ :resource_id,
141
+ :scalable_dimension)
142
+ include Aws::Structure
143
+ end
144
+
145
+ class DeregisterScalableTargetResponse < Aws::EmptyStructure; end
146
+
147
+ # @note When making an API call, pass DescribeScalableTargetsRequest
148
+ # data as a hash:
149
+ #
150
+ # {
151
+ # service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2
152
+ # resource_ids: ["ResourceIdMaxLen1600"],
153
+ # scalable_dimension: "ecs:service:DesiredCount", # accepts ecs:service:DesiredCount, ec2:spot-fleet-request:TargetCapacity, elasticmapreduce:instancegroup:InstanceCount
154
+ # max_results: 1,
155
+ # next_token: "XmlString",
156
+ # }
157
+ # @!attribute [rw] service_namespace
158
+ # The namespace of the AWS service. For more information, see [AWS
159
+ # Service Namespaces][1] in the *Amazon Web Services General
160
+ # Reference*.
161
+ #
162
+ #
163
+ #
164
+ # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
165
+ # @return [String]
166
+ #
167
+ # @!attribute [rw] resource_ids
168
+ # The identifier of the resource associated with the scalable target.
169
+ # This string consists of the resource type and unique identifier. If
170
+ # you specify a scalable dimension, you must also specify a resource
171
+ # ID.
172
+ #
173
+ # * ECS service - The resource type is `service` and the unique
174
+ # identifier is the cluster name and service name. Example:
175
+ # `service/default/sample-webapp`.
176
+ #
177
+ # * Spot fleet request - The resource type is `spot-fleet-request` and
178
+ # the unique identifier is the Spot fleet request ID. Example:
179
+ # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
180
+ #
181
+ # * EMR cluster - The resource type is `instancegroup` and the unique
182
+ # identifier is the cluster ID and instance group ID. Example:
183
+ # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
184
+ # @return [Array<String>]
185
+ #
186
+ # @!attribute [rw] scalable_dimension
187
+ # The scalable dimension associated with the scalable target. This
188
+ # string consists of the service namespace, resource type, and scaling
189
+ # property. If you specify a scalable dimension, you must also specify
190
+ # a resource ID.
191
+ #
192
+ # * `ecs:service:DesiredCount` - The desired task count of an ECS
193
+ # service.
194
+ #
195
+ # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
196
+ # Spot fleet request.
197
+ #
198
+ # * `elasticmapreduce:instancegroup:InstanceCount` - The instance
199
+ # count of an EMR Instance Group.
200
+ # @return [String]
201
+ #
202
+ # @!attribute [rw] max_results
203
+ # The maximum number of scalable target results. This value can be
204
+ # between 1 and 50. The default value is 50.
205
+ #
206
+ # If this parameter is used, the operation returns up to `MaxResults`
207
+ # results at a time, along with a `NextToken` value. To get the next
208
+ # set of results, include the `NextToken` value in a subsequent call.
209
+ # If this parameter is not used, the operation returns up to 50
210
+ # results and a `NextToken` value, if applicable.
211
+ # @return [Integer]
212
+ #
213
+ # @!attribute [rw] next_token
214
+ # The token for the next set of results.
215
+ # @return [String]
216
+ class DescribeScalableTargetsRequest < Struct.new(
217
+ :service_namespace,
218
+ :resource_ids,
219
+ :scalable_dimension,
220
+ :max_results,
221
+ :next_token)
222
+ include Aws::Structure
223
+ end
224
+
225
+ # @!attribute [rw] scalable_targets
226
+ # The list of scalable targets that matches the request parameters.
227
+ # @return [Array<Types::ScalableTarget>]
228
+ #
229
+ # @!attribute [rw] next_token
230
+ # The token required to get the next set of results. This value is
231
+ # `null` if there are no more results to return.
232
+ # @return [String]
233
+ class DescribeScalableTargetsResponse < Struct.new(
234
+ :scalable_targets,
235
+ :next_token)
236
+ include Aws::Structure
237
+ end
238
+
239
+ # @note When making an API call, pass DescribeScalingActivitiesRequest
240
+ # data as a hash:
241
+ #
242
+ # {
243
+ # service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2
244
+ # resource_id: "ResourceIdMaxLen1600",
245
+ # scalable_dimension: "ecs:service:DesiredCount", # accepts ecs:service:DesiredCount, ec2:spot-fleet-request:TargetCapacity, elasticmapreduce:instancegroup:InstanceCount
246
+ # max_results: 1,
247
+ # next_token: "XmlString",
248
+ # }
249
+ # @!attribute [rw] service_namespace
250
+ # The namespace of the AWS service. For more information, see [AWS
251
+ # Service Namespaces][1] in the *Amazon Web Services General
252
+ # Reference*.
253
+ #
254
+ #
255
+ #
256
+ # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
257
+ # @return [String]
258
+ #
259
+ # @!attribute [rw] resource_id
260
+ # The identifier of the resource associated with the scaling activity.
261
+ # This string consists of the resource type and unique identifier. If
262
+ # you specify a scalable dimension, you must also specify a resource
263
+ # ID.
264
+ #
265
+ # * ECS service - The resource type is `service` and the unique
266
+ # identifier is the cluster name and service name. Example:
267
+ # `service/default/sample-webapp`.
268
+ #
269
+ # * Spot fleet request - The resource type is `spot-fleet-request` and
270
+ # the unique identifier is the Spot fleet request ID. Example:
271
+ # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
272
+ #
273
+ # * EMR cluster - The resource type is `instancegroup` and the unique
274
+ # identifier is the cluster ID and instance group ID. Example:
275
+ # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
276
+ # @return [String]
277
+ #
278
+ # @!attribute [rw] scalable_dimension
279
+ # The scalable dimension. This string consists of the service
280
+ # namespace, resource type, and scaling property. If you specify a
281
+ # scalable dimension, you must also specify a resource ID.
282
+ #
283
+ # * `ecs:service:DesiredCount` - The desired task count of an ECS
284
+ # service.
285
+ #
286
+ # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
287
+ # Spot fleet request.
288
+ #
289
+ # * `elasticmapreduce:instancegroup:InstanceCount` - The instance
290
+ # count of an EMR Instance Group.
291
+ # @return [String]
292
+ #
293
+ # @!attribute [rw] max_results
294
+ # The maximum number of scalable target results. This value can be
295
+ # between 1 and 50. The default value is 50.
296
+ #
297
+ # If this parameter is used, the operation returns up to `MaxResults`
298
+ # results at a time, along with a `NextToken` value. To get the next
299
+ # set of results, include the `NextToken` value in a subsequent call.
300
+ # If this parameter is not used, the operation returns up to 50
301
+ # results and a `NextToken` value, if applicable.
302
+ # @return [Integer]
303
+ #
304
+ # @!attribute [rw] next_token
305
+ # The token for the next set of results.
306
+ # @return [String]
307
+ class DescribeScalingActivitiesRequest < Struct.new(
308
+ :service_namespace,
309
+ :resource_id,
310
+ :scalable_dimension,
311
+ :max_results,
312
+ :next_token)
313
+ include Aws::Structure
314
+ end
315
+
316
+ # @!attribute [rw] scaling_activities
317
+ # A list of scaling activity objects.
318
+ # @return [Array<Types::ScalingActivity>]
319
+ #
320
+ # @!attribute [rw] next_token
321
+ # The token required to get the next set of results. This value is
322
+ # `null` if there are no more results to return.
323
+ # @return [String]
324
+ class DescribeScalingActivitiesResponse < Struct.new(
325
+ :scaling_activities,
326
+ :next_token)
327
+ include Aws::Structure
328
+ end
329
+
330
+ # @note When making an API call, pass DescribeScalingPoliciesRequest
331
+ # data as a hash:
332
+ #
333
+ # {
334
+ # policy_names: ["ResourceIdMaxLen1600"],
335
+ # service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2
336
+ # resource_id: "ResourceIdMaxLen1600",
337
+ # scalable_dimension: "ecs:service:DesiredCount", # accepts ecs:service:DesiredCount, ec2:spot-fleet-request:TargetCapacity, elasticmapreduce:instancegroup:InstanceCount
338
+ # max_results: 1,
339
+ # next_token: "XmlString",
340
+ # }
341
+ # @!attribute [rw] policy_names
342
+ # The names of the scaling policies to describe.
343
+ # @return [Array<String>]
344
+ #
345
+ # @!attribute [rw] service_namespace
346
+ # The namespace of the AWS service. For more information, see [AWS
347
+ # Service Namespaces][1] in the *Amazon Web Services General
348
+ # Reference*.
349
+ #
350
+ #
351
+ #
352
+ # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
353
+ # @return [String]
354
+ #
355
+ # @!attribute [rw] resource_id
356
+ # The identifier of the resource associated with the scaling policy.
357
+ # This string consists of the resource type and unique identifier. If
358
+ # you specify a scalable dimension, you must also specify a resource
359
+ # ID.
360
+ #
361
+ # * ECS service - The resource type is `service` and the unique
362
+ # identifier is the cluster name and service name. Example:
363
+ # `service/default/sample-webapp`.
364
+ #
365
+ # * Spot fleet request - The resource type is `spot-fleet-request` and
366
+ # the unique identifier is the Spot fleet request ID. Example:
367
+ # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
368
+ #
369
+ # * EMR cluster - The resource type is `instancegroup` and the unique
370
+ # identifier is the cluster ID and instance group ID. Example:
371
+ # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
372
+ # @return [String]
373
+ #
374
+ # @!attribute [rw] scalable_dimension
375
+ # The scalable dimension. This string consists of the service
376
+ # namespace, resource type, and scaling property. If you specify a
377
+ # scalable dimension, you must also specify a resource ID.
378
+ #
379
+ # * `ecs:service:DesiredCount` - The desired task count of an ECS
380
+ # service.
381
+ #
382
+ # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
383
+ # Spot fleet request.
384
+ #
385
+ # * `elasticmapreduce:instancegroup:InstanceCount` - The instance
386
+ # count of an EMR Instance Group.
387
+ # @return [String]
388
+ #
389
+ # @!attribute [rw] max_results
390
+ # The maximum number of scalable target results. This value can be
391
+ # between 1 and 50. The default value is 50.
392
+ #
393
+ # If this parameter is used, the operation returns up to `MaxResults`
394
+ # results at a time, along with a `NextToken` value. To get the next
395
+ # set of results, include the `NextToken` value in a subsequent call.
396
+ # If this parameter is not used, the operation returns up to 50
397
+ # results and a `NextToken` value, if applicable.
398
+ # @return [Integer]
399
+ #
400
+ # @!attribute [rw] next_token
401
+ # The token for the next set of results.
402
+ # @return [String]
403
+ class DescribeScalingPoliciesRequest < Struct.new(
404
+ :policy_names,
405
+ :service_namespace,
406
+ :resource_id,
407
+ :scalable_dimension,
408
+ :max_results,
409
+ :next_token)
410
+ include Aws::Structure
411
+ end
412
+
413
+ # @!attribute [rw] scaling_policies
414
+ # A list of scaling policy objects.
415
+ # @return [Array<Types::ScalingPolicy>]
416
+ #
417
+ # @!attribute [rw] next_token
418
+ # The token required to get the next set of results. This value is
419
+ # `null` if there are no more results to return.
420
+ # @return [String]
421
+ class DescribeScalingPoliciesResponse < Struct.new(
422
+ :scaling_policies,
423
+ :next_token)
424
+ include Aws::Structure
425
+ end
426
+
427
+ # @note When making an API call, pass PutScalingPolicyRequest
428
+ # data as a hash:
429
+ #
430
+ # {
431
+ # policy_name: "PolicyName", # required
432
+ # service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2
433
+ # resource_id: "ResourceIdMaxLen1600", # required
434
+ # scalable_dimension: "ecs:service:DesiredCount", # required, accepts ecs:service:DesiredCount, ec2:spot-fleet-request:TargetCapacity, elasticmapreduce:instancegroup:InstanceCount
435
+ # policy_type: "StepScaling", # accepts StepScaling
436
+ # step_scaling_policy_configuration: {
437
+ # adjustment_type: "ChangeInCapacity", # accepts ChangeInCapacity, PercentChangeInCapacity, ExactCapacity
438
+ # step_adjustments: [
439
+ # {
440
+ # metric_interval_lower_bound: 1.0,
441
+ # metric_interval_upper_bound: 1.0,
442
+ # scaling_adjustment: 1, # required
443
+ # },
444
+ # ],
445
+ # min_adjustment_magnitude: 1,
446
+ # cooldown: 1,
447
+ # metric_aggregation_type: "Average", # accepts Average, Minimum, Maximum
448
+ # },
449
+ # }
450
+ # @!attribute [rw] policy_name
451
+ # The name of the scaling policy.
452
+ # @return [String]
453
+ #
454
+ # @!attribute [rw] service_namespace
455
+ # The namespace of the AWS service. For more information, see [AWS
456
+ # Service Namespaces][1] in the *Amazon Web Services General
457
+ # Reference*.
458
+ #
459
+ #
460
+ #
461
+ # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
462
+ # @return [String]
463
+ #
464
+ # @!attribute [rw] resource_id
465
+ # The identifier of the resource associated with the scaling policy.
466
+ # This string consists of the resource type and unique identifier.
467
+ #
468
+ # * ECS service - The resource type is `service` and the unique
469
+ # identifier is the cluster name and service name. Example:
470
+ # `service/default/sample-webapp`.
471
+ #
472
+ # * Spot fleet request - The resource type is `spot-fleet-request` and
473
+ # the unique identifier is the Spot fleet request ID. Example:
474
+ # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
475
+ #
476
+ # * EMR cluster - The resource type is `instancegroup` and the unique
477
+ # identifier is the cluster ID and instance group ID. Example:
478
+ # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
479
+ # @return [String]
480
+ #
481
+ # @!attribute [rw] scalable_dimension
482
+ # The scalable dimension. This string consists of the service
483
+ # namespace, resource type, and scaling property.
484
+ #
485
+ # * `ecs:service:DesiredCount` - The desired task count of an ECS
486
+ # service.
487
+ #
488
+ # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
489
+ # Spot fleet request.
490
+ #
491
+ # * `elasticmapreduce:instancegroup:InstanceCount` - The instance
492
+ # count of an EMR Instance Group.
493
+ # @return [String]
494
+ #
495
+ # @!attribute [rw] policy_type
496
+ # The policy type. If you are creating a new policy, this parameter is
497
+ # required. If you are updating a policy, this parameter is not
498
+ # required.
499
+ # @return [String]
500
+ #
501
+ # @!attribute [rw] step_scaling_policy_configuration
502
+ # The configuration for the step scaling policy. If you are creating a
503
+ # new policy, this parameter is required. If you are updating a
504
+ # policy, this parameter is not required. For more information, see
505
+ # StepScalingPolicyConfiguration and StepAdjustment.
506
+ # @return [Types::StepScalingPolicyConfiguration]
507
+ class PutScalingPolicyRequest < Struct.new(
508
+ :policy_name,
509
+ :service_namespace,
510
+ :resource_id,
511
+ :scalable_dimension,
512
+ :policy_type,
513
+ :step_scaling_policy_configuration)
514
+ include Aws::Structure
515
+ end
516
+
517
+ # @!attribute [rw] policy_arn
518
+ # The Amazon Resource Name (ARN) of the resulting scaling policy.
519
+ # @return [String]
520
+ class PutScalingPolicyResponse < Struct.new(
521
+ :policy_arn)
522
+ include Aws::Structure
523
+ end
524
+
525
+ # @note When making an API call, pass RegisterScalableTargetRequest
526
+ # data as a hash:
527
+ #
528
+ # {
529
+ # service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2
530
+ # resource_id: "ResourceIdMaxLen1600", # required
531
+ # scalable_dimension: "ecs:service:DesiredCount", # required, accepts ecs:service:DesiredCount, ec2:spot-fleet-request:TargetCapacity, elasticmapreduce:instancegroup:InstanceCount
532
+ # min_capacity: 1,
533
+ # max_capacity: 1,
534
+ # role_arn: "ResourceIdMaxLen1600",
535
+ # }
536
+ # @!attribute [rw] service_namespace
537
+ # The namespace of the AWS service. For more information, see [AWS
538
+ # Service Namespaces][1] in the *Amazon Web Services General
539
+ # Reference*.
540
+ #
541
+ #
542
+ #
543
+ # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
544
+ # @return [String]
545
+ #
546
+ # @!attribute [rw] resource_id
547
+ # The identifier of the resource associated with the scalable target.
548
+ # This string consists of the resource type and unique identifier.
549
+ #
550
+ # * ECS service - The resource type is `service` and the unique
551
+ # identifier is the cluster name and service name. Example:
552
+ # `service/default/sample-webapp`.
553
+ #
554
+ # * Spot fleet request - The resource type is `spot-fleet-request` and
555
+ # the unique identifier is the Spot fleet request ID. Example:
556
+ # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
557
+ #
558
+ # * EMR cluster - The resource type is `instancegroup` and the unique
559
+ # identifier is the cluster ID and instance group ID. Example:
560
+ # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
561
+ # @return [String]
562
+ #
563
+ # @!attribute [rw] scalable_dimension
564
+ # The scalable dimension associated with the scalable target. This
565
+ # string consists of the service namespace, resource type, and scaling
566
+ # property.
567
+ #
568
+ # * `ecs:service:DesiredCount` - The desired task count of an ECS
569
+ # service.
570
+ #
571
+ # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
572
+ # Spot fleet request.
573
+ #
574
+ # * `elasticmapreduce:instancegroup:InstanceCount` - The instance
575
+ # count of an EMR Instance Group.
576
+ # @return [String]
577
+ #
578
+ # @!attribute [rw] min_capacity
579
+ # The minimum value to scale to in response to a scale in event. This
580
+ # parameter is required if you are registering a scalable target and
581
+ # optional if you are updating one.
582
+ # @return [Integer]
583
+ #
584
+ # @!attribute [rw] max_capacity
585
+ # The maximum value to scale to in response to a scale out event. This
586
+ # parameter is required if you are registering a scalable target and
587
+ # optional if you are updating one.
588
+ # @return [Integer]
589
+ #
590
+ # @!attribute [rw] role_arn
591
+ # The ARN of an IAM role that allows Application Auto Scaling to
592
+ # modify the scalable target on your behalf. This parameter is
593
+ # required when you register a scalable target and optional when you
594
+ # update one.
595
+ # @return [String]
596
+ class RegisterScalableTargetRequest < Struct.new(
597
+ :service_namespace,
598
+ :resource_id,
599
+ :scalable_dimension,
600
+ :min_capacity,
601
+ :max_capacity,
602
+ :role_arn)
603
+ include Aws::Structure
604
+ end
605
+
606
+ class RegisterScalableTargetResponse < Aws::EmptyStructure; end
607
+
608
+ # Represents a scalable target.
609
+ # @!attribute [rw] service_namespace
610
+ # The namespace of the AWS service. For more information, see [AWS
611
+ # Service Namespaces][1] in the *Amazon Web Services General
612
+ # Reference*.
613
+ #
614
+ #
615
+ #
616
+ # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
617
+ # @return [String]
618
+ #
619
+ # @!attribute [rw] resource_id
620
+ # The identifier of the resource associated with the scalable target.
621
+ # This string consists of the resource type and unique identifier.
622
+ #
623
+ # * ECS service - The resource type is `service` and the unique
624
+ # identifier is the cluster name and service name. Example:
625
+ # `service/default/sample-webapp`.
626
+ #
627
+ # * Spot fleet request - The resource type is `spot-fleet-request` and
628
+ # the unique identifier is the Spot fleet request ID. Example:
629
+ # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
630
+ #
631
+ # * EMR cluster - The resource type is `instancegroup` and the unique
632
+ # identifier is the cluster ID and instance group ID. Example:
633
+ # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
634
+ # @return [String]
635
+ #
636
+ # @!attribute [rw] scalable_dimension
637
+ # The scalable dimension associated with the scalable target. This
638
+ # string consists of the service namespace, resource type, and scaling
639
+ # property.
640
+ #
641
+ # * `ecs:service:DesiredCount` - The desired task count of an ECS
642
+ # service.
643
+ #
644
+ # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
645
+ # Spot fleet request.
646
+ #
647
+ # * `elasticmapreduce:instancegroup:InstanceCount` - The instance
648
+ # count of an EMR Instance Group.
649
+ # @return [String]
650
+ #
651
+ # @!attribute [rw] min_capacity
652
+ # The minimum value to scale to in response to a scale in event.
653
+ # @return [Integer]
654
+ #
655
+ # @!attribute [rw] max_capacity
656
+ # The maximum value to scale to in response to a scale out event.
657
+ # @return [Integer]
658
+ #
659
+ # @!attribute [rw] role_arn
660
+ # The ARN of an IAM role that allows Application Auto Scaling to
661
+ # modify the scalable target on your behalf.
662
+ # @return [String]
663
+ #
664
+ # @!attribute [rw] creation_time
665
+ # The Unix timestamp for when the scalable target was created.
666
+ # @return [Time]
667
+ class ScalableTarget < Struct.new(
668
+ :service_namespace,
669
+ :resource_id,
670
+ :scalable_dimension,
671
+ :min_capacity,
672
+ :max_capacity,
673
+ :role_arn,
674
+ :creation_time)
675
+ include Aws::Structure
676
+ end
677
+
678
+ # Represents a scaling activity.
679
+ # @!attribute [rw] activity_id
680
+ # The unique identifier of the scaling activity.
681
+ # @return [String]
682
+ #
683
+ # @!attribute [rw] service_namespace
684
+ # The namespace of the AWS service. For more information, see [AWS
685
+ # Service Namespaces][1] in the *Amazon Web Services General
686
+ # Reference*.
687
+ #
688
+ #
689
+ #
690
+ # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
691
+ # @return [String]
692
+ #
693
+ # @!attribute [rw] resource_id
694
+ # The identifier of the resource associated with the scaling activity.
695
+ # This string consists of the resource type and unique identifier.
696
+ #
697
+ # * ECS service - The resource type is `service` and the unique
698
+ # identifier is the cluster name and service name. Example:
699
+ # `service/default/sample-webapp`.
700
+ #
701
+ # * Spot fleet request - The resource type is `spot-fleet-request` and
702
+ # the unique identifier is the Spot fleet request ID. Example:
703
+ # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
704
+ #
705
+ # * EMR cluster - The resource type is `instancegroup` and the unique
706
+ # identifier is the cluster ID and instance group ID. Example:
707
+ # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
708
+ # @return [String]
709
+ #
710
+ # @!attribute [rw] scalable_dimension
711
+ # The scalable dimension. This string consists of the service
712
+ # namespace, resource type, and scaling property.
713
+ #
714
+ # * `ecs:service:DesiredCount` - The desired task count of an ECS
715
+ # service.
716
+ #
717
+ # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
718
+ # Spot fleet request.
719
+ #
720
+ # * `elasticmapreduce:instancegroup:InstanceCount` - The instance
721
+ # count of an EMR Instance Group.
722
+ # @return [String]
723
+ #
724
+ # @!attribute [rw] description
725
+ # A simple description of what action the scaling activity intends to
726
+ # accomplish.
727
+ # @return [String]
728
+ #
729
+ # @!attribute [rw] cause
730
+ # A simple description of what caused the scaling activity to happen.
731
+ # @return [String]
732
+ #
733
+ # @!attribute [rw] start_time
734
+ # The Unix timestamp for when the scaling activity began.
735
+ # @return [Time]
736
+ #
737
+ # @!attribute [rw] end_time
738
+ # The Unix timestamp for when the scaling activity ended.
739
+ # @return [Time]
740
+ #
741
+ # @!attribute [rw] status_code
742
+ # Indicates the status of the scaling activity.
743
+ # @return [String]
744
+ #
745
+ # @!attribute [rw] status_message
746
+ # A simple message about the current status of the scaling activity.
747
+ # @return [String]
748
+ #
749
+ # @!attribute [rw] details
750
+ # The details about the scaling activity.
751
+ # @return [String]
752
+ class ScalingActivity < Struct.new(
753
+ :activity_id,
754
+ :service_namespace,
755
+ :resource_id,
756
+ :scalable_dimension,
757
+ :description,
758
+ :cause,
759
+ :start_time,
760
+ :end_time,
761
+ :status_code,
762
+ :status_message,
763
+ :details)
764
+ include Aws::Structure
765
+ end
766
+
767
+ # Represents a scaling policy.
768
+ # @!attribute [rw] policy_arn
769
+ # The Amazon Resource Name (ARN) of the scaling policy.
770
+ # @return [String]
771
+ #
772
+ # @!attribute [rw] policy_name
773
+ # The name of the scaling policy.
774
+ # @return [String]
775
+ #
776
+ # @!attribute [rw] service_namespace
777
+ # The namespace of the AWS service. For more information, see [AWS
778
+ # Service Namespaces][1] in the *Amazon Web Services General
779
+ # Reference*.
780
+ #
781
+ #
782
+ #
783
+ # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
784
+ # @return [String]
785
+ #
786
+ # @!attribute [rw] resource_id
787
+ # The identifier of the resource associated with the scaling policy.
788
+ # This string consists of the resource type and unique identifier.
789
+ #
790
+ # * ECS service - The resource type is `service` and the unique
791
+ # identifier is the cluster name and service name. Example:
792
+ # `service/default/sample-webapp`.
793
+ #
794
+ # * Spot fleet request - The resource type is `spot-fleet-request` and
795
+ # the unique identifier is the Spot fleet request ID. Example:
796
+ # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
797
+ #
798
+ # * EMR cluster - The resource type is `instancegroup` and the unique
799
+ # identifier is the cluster ID and instance group ID. Example:
800
+ # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
801
+ # @return [String]
802
+ #
803
+ # @!attribute [rw] scalable_dimension
804
+ # The scalable dimension. This string consists of the service
805
+ # namespace, resource type, and scaling property.
806
+ #
807
+ # * `ecs:service:DesiredCount` - The desired task count of an ECS
808
+ # service.
809
+ #
810
+ # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
811
+ # Spot fleet request.
812
+ #
813
+ # * `elasticmapreduce:instancegroup:InstanceCount` - The instance
814
+ # count of an EMR Instance Group.
815
+ # @return [String]
816
+ #
817
+ # @!attribute [rw] policy_type
818
+ # The scaling policy type.
819
+ # @return [String]
820
+ #
821
+ # @!attribute [rw] step_scaling_policy_configuration
822
+ # The configuration for the step scaling policy.
823
+ # @return [Types::StepScalingPolicyConfiguration]
824
+ #
825
+ # @!attribute [rw] alarms
826
+ # The CloudWatch alarms associated with the scaling policy.
827
+ # @return [Array<Types::Alarm>]
828
+ #
829
+ # @!attribute [rw] creation_time
830
+ # The Unix timestamp for when the scaling policy was created.
831
+ # @return [Time]
832
+ class ScalingPolicy < Struct.new(
833
+ :policy_arn,
834
+ :policy_name,
835
+ :service_namespace,
836
+ :resource_id,
837
+ :scalable_dimension,
838
+ :policy_type,
839
+ :step_scaling_policy_configuration,
840
+ :alarms,
841
+ :creation_time)
842
+ include Aws::Structure
843
+ end
844
+
845
+ # Represents a step adjustment for a StepScalingPolicyConfiguration.
846
+ # Describes an adjustment based on the difference between the value of
847
+ # the aggregated CloudWatch metric and the breach threshold that you've
848
+ # defined for the alarm.
849
+ #
850
+ # For the following examples, suppose that you have an alarm with a
851
+ # breach threshold of 50:
852
+ #
853
+ # * To trigger the adjustment when the metric is greater than or equal
854
+ # to 50 and less than 60, specify a lower bound of 0 and an upper
855
+ # bound of 10.
856
+ #
857
+ # * To trigger the adjustment when the metric is greater than 40 and
858
+ # less than or equal to 50, specify a lower bound of -10 and an upper
859
+ # bound of 0.
860
+ #
861
+ # There are a few rules for the step adjustments for your step policy:
862
+ #
863
+ # * The ranges of your step adjustments can't overlap or have a gap.
864
+ #
865
+ # * At most one step adjustment can have a null lower bound. If one step
866
+ # adjustment has a negative lower bound, then there must be a step
867
+ # adjustment with a null lower bound.
868
+ #
869
+ # * At most one step adjustment can have a null upper bound. If one step
870
+ # adjustment has a positive upper bound, then there must be a step
871
+ # adjustment with a null upper bound.
872
+ #
873
+ # * The upper and lower bound can't be null in the same step
874
+ # adjustment.
875
+ # @note When making an API call, pass StepAdjustment
876
+ # data as a hash:
877
+ #
878
+ # {
879
+ # metric_interval_lower_bound: 1.0,
880
+ # metric_interval_upper_bound: 1.0,
881
+ # scaling_adjustment: 1, # required
882
+ # }
883
+ # @!attribute [rw] metric_interval_lower_bound
884
+ # The lower bound for the difference between the alarm threshold and
885
+ # the CloudWatch metric. If the metric value is above the breach
886
+ # threshold, the lower bound is inclusive (the metric must be greater
887
+ # than or equal to the threshold plus the lower bound). Otherwise, it
888
+ # is exclusive (the metric must be greater than the threshold plus the
889
+ # lower bound). A null value indicates negative infinity.
890
+ # @return [Float]
891
+ #
892
+ # @!attribute [rw] metric_interval_upper_bound
893
+ # The upper bound for the difference between the alarm threshold and
894
+ # the CloudWatch metric. If the metric value is above the breach
895
+ # threshold, the upper bound is exclusive (the metric must be less
896
+ # than the threshold plus the upper bound). Otherwise, it is inclusive
897
+ # (the metric must be less than or equal to the threshold plus the
898
+ # upper bound). A null value indicates positive infinity.
899
+ #
900
+ # The upper bound must be greater than the lower bound.
901
+ # @return [Float]
902
+ #
903
+ # @!attribute [rw] scaling_adjustment
904
+ # The amount by which to scale, based on the specified adjustment
905
+ # type. A positive value adds to the current scalable dimension while
906
+ # a negative number removes from the current scalable dimension.
907
+ # @return [Integer]
908
+ class StepAdjustment < Struct.new(
909
+ :metric_interval_lower_bound,
910
+ :metric_interval_upper_bound,
911
+ :scaling_adjustment)
912
+ include Aws::Structure
913
+ end
914
+
915
+ # Represents a step scaling policy configuration.
916
+ # @note When making an API call, pass StepScalingPolicyConfiguration
917
+ # data as a hash:
918
+ #
919
+ # {
920
+ # adjustment_type: "ChangeInCapacity", # accepts ChangeInCapacity, PercentChangeInCapacity, ExactCapacity
921
+ # step_adjustments: [
922
+ # {
923
+ # metric_interval_lower_bound: 1.0,
924
+ # metric_interval_upper_bound: 1.0,
925
+ # scaling_adjustment: 1, # required
926
+ # },
927
+ # ],
928
+ # min_adjustment_magnitude: 1,
929
+ # cooldown: 1,
930
+ # metric_aggregation_type: "Average", # accepts Average, Minimum, Maximum
931
+ # }
932
+ # @!attribute [rw] adjustment_type
933
+ # The adjustment type, which specifies how the `ScalingAdjustment`
934
+ # parameter in a StepAdjustment is interpreted.
935
+ # @return [String]
936
+ #
937
+ # @!attribute [rw] step_adjustments
938
+ # A set of adjustments that enable you to scale based on the size of
939
+ # the alarm breach.
940
+ # @return [Array<Types::StepAdjustment>]
941
+ #
942
+ # @!attribute [rw] min_adjustment_magnitude
943
+ # The minimum number to adjust your scalable dimension as a result of
944
+ # a scaling activity. If the adjustment type is
945
+ # `PercentChangeInCapacity`, the scaling policy changes the scalable
946
+ # dimension of the scalable target by this amount.
947
+ # @return [Integer]
948
+ #
949
+ # @!attribute [rw] cooldown
950
+ # The amount of time, in seconds, after a scaling activity completes
951
+ # where previous trigger-related scaling activities can influence
952
+ # future scaling events.
953
+ #
954
+ # For scale out policies, while `Cooldown` is in effect, the capacity
955
+ # that has been added by the previous scale out event that initiated
956
+ # the `Cooldown` is calculated as part of the desired capacity for the
957
+ # next scale out. The intention is to continuously (but not
958
+ # excessively) scale out. For example, an alarm triggers a step
959
+ # scaling policy to scale out an Amazon ECS service by 2 tasks, the
960
+ # scaling activity completes successfully, and a `Cooldown` period of
961
+ # 5 minutes starts. During the `Cooldown` period, if the alarm
962
+ # triggers the same policy again but at a more aggressive step
963
+ # adjustment to scale out the service by 3 tasks, the 2 tasks that
964
+ # were added in the previous scale out event are considered part of
965
+ # that capacity and only 1 additional task is added to the desired
966
+ # count.
967
+ #
968
+ # For scale in policies, the `Cooldown` period is used to block
969
+ # subsequent scale in requests until it has expired. The intention is
970
+ # to scale in conservatively to protect your application's
971
+ # availability. However, if another alarm triggers a scale out policy
972
+ # during the `Cooldown` period after a scale-in, Application Auto
973
+ # Scaling scales out your scalable target immediately.
974
+ # @return [Integer]
975
+ #
976
+ # @!attribute [rw] metric_aggregation_type
977
+ # The aggregation type for the CloudWatch metrics. Valid values are
978
+ # `Minimum`, `Maximum`, and `Average`.
979
+ # @return [String]
980
+ class StepScalingPolicyConfiguration < Struct.new(
981
+ :adjustment_type,
982
+ :step_adjustments,
983
+ :min_adjustment_magnitude,
984
+ :cooldown,
985
+ :metric_aggregation_type)
986
+ include Aws::Structure
987
+ end
988
+
989
+ end
990
+ end
991
+ end