aws-sdk-applicationautoscaling 1.0.0.rc1 → 1.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
@@ -18,731 +18,862 @@ require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
18
  require 'aws-sdk-core/plugins/response_paging.rb'
19
19
  require 'aws-sdk-core/plugins/stub_responses.rb'
20
20
  require 'aws-sdk-core/plugins/idempotency_token.rb'
21
+ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
21
22
  require 'aws-sdk-core/plugins/signature_v4.rb'
22
23
  require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
23
24
 
24
25
  Aws::Plugins::GlobalConfiguration.add_identifier(:applicationautoscaling)
25
26
 
26
- module Aws
27
- module ApplicationAutoScaling
28
- class Client < Seahorse::Client::Base
27
+ module Aws::ApplicationAutoScaling
28
+ class Client < Seahorse::Client::Base
29
29
 
30
- include Aws::ClientStubs
30
+ include Aws::ClientStubs
31
31
 
32
- @identifier = :applicationautoscaling
32
+ @identifier = :applicationautoscaling
33
33
 
34
- set_api(ClientApi::API)
34
+ set_api(ClientApi::API)
35
35
 
36
- add_plugin(Seahorse::Client::Plugins::ContentLength)
37
- add_plugin(Aws::Plugins::CredentialsConfiguration)
38
- add_plugin(Aws::Plugins::Logging)
39
- add_plugin(Aws::Plugins::ParamConverter)
40
- add_plugin(Aws::Plugins::ParamValidator)
41
- add_plugin(Aws::Plugins::UserAgent)
42
- add_plugin(Aws::Plugins::HelpfulSocketErrors)
43
- add_plugin(Aws::Plugins::RetryErrors)
44
- add_plugin(Aws::Plugins::GlobalConfiguration)
45
- add_plugin(Aws::Plugins::RegionalEndpoint)
46
- add_plugin(Aws::Plugins::ResponsePaging)
47
- add_plugin(Aws::Plugins::StubResponses)
48
- add_plugin(Aws::Plugins::IdempotencyToken)
49
- add_plugin(Aws::Plugins::SignatureV4)
50
- add_plugin(Aws::Plugins::Protocols::JsonRpc)
36
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
37
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
38
+ add_plugin(Aws::Plugins::Logging)
39
+ add_plugin(Aws::Plugins::ParamConverter)
40
+ add_plugin(Aws::Plugins::ParamValidator)
41
+ add_plugin(Aws::Plugins::UserAgent)
42
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
43
+ add_plugin(Aws::Plugins::RetryErrors)
44
+ add_plugin(Aws::Plugins::GlobalConfiguration)
45
+ add_plugin(Aws::Plugins::RegionalEndpoint)
46
+ add_plugin(Aws::Plugins::ResponsePaging)
47
+ add_plugin(Aws::Plugins::StubResponses)
48
+ add_plugin(Aws::Plugins::IdempotencyToken)
49
+ add_plugin(Aws::Plugins::JsonvalueConverter)
50
+ add_plugin(Aws::Plugins::SignatureV4)
51
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
51
52
 
52
- # @option options [required, Aws::CredentialProvider] :credentials
53
- # Your AWS credentials. This can be an instance of any one of the
54
- # following classes:
55
- #
56
- # * `Aws::Credentials` - Used for configuring static, non-refreshing
57
- # credentials.
58
- #
59
- # * `Aws::InstanceProfileCredentials` - Used for loading credentials
60
- # from an EC2 IMDS on an EC2 instance.
61
- #
62
- # * `Aws::SharedCredentials` - Used for loading credentials from a
63
- # shared file, such as `~/.aws/config`.
64
- #
65
- # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
66
- #
67
- # When `:credentials` are not configured directly, the following
68
- # locations will be searched for credentials:
69
- #
70
- # * `Aws.config[:credentials]`
71
- # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
72
- # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
73
- # * `~/.aws/credentials`
74
- # * `~/.aws/config`
75
- # * EC2 IMDS instance profile - When used by default, the timeouts are
76
- # very aggressive. Construct and pass an instance of
77
- # `Aws::InstanceProfileCredentails` to enable retries and extended
78
- # timeouts.
79
- # @option options [required, String] :region
80
- # The AWS region to connect to. The configured `:region` is
81
- # used to determine the service `:endpoint`. When not passed,
82
- # a default `:region` is search for in the following locations:
83
- #
84
- # * `Aws.config[:region]`
85
- # * `ENV['AWS_REGION']`
86
- # * `ENV['AMAZON_REGION']`
87
- # * `ENV['AWS_DEFAULT_REGION']`
88
- # * `~/.aws/credentials`
89
- # * `~/.aws/config`
90
- # @option options [String] :access_key_id
91
- # @option options [Boolean] :convert_params (true)
92
- # When `true`, an attempt is made to coerce request parameters into
93
- # the required types.
94
- # @option options [String] :endpoint
95
- # The client endpoint is normally constructed from the `:region`
96
- # option. You should only configure an `:endpoint` when connecting
97
- # to test endpoints. This should be avalid HTTP(S) URI.
98
- # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
99
- # The log formatter.
100
- # @option options [Symbol] :log_level (:info)
101
- # The log level to send messages to the `:logger` at.
102
- # @option options [Logger] :logger
103
- # The Logger instance to send log messages to. If this option
104
- # is not set, logging will be disabled.
105
- # @option options [String] :profile ("default")
106
- # Used when loading credentials from the shared credentials file
107
- # at HOME/.aws/credentials. When not specified, 'default' is used.
108
- # @option options [Integer] :retry_limit (3)
109
- # The maximum number of times to retry failed requests. Only
110
- # ~ 500 level server errors and certain ~ 400 level client errors
111
- # are retried. Generally, these are throttling errors, data
112
- # checksum errors, networking errors, timeout errors and auth
113
- # errors from expired credentials.
114
- # @option options [String] :secret_access_key
115
- # @option options [String] :session_token
116
- # @option options [Boolean] :simple_json (false)
117
- # Disables request parameter conversion, validation, and formatting.
118
- # Also disable response data type conversions. This option is useful
119
- # when you want to ensure the highest level of performance by
120
- # avoiding overhead of walking request parameters and response data
121
- # structures.
122
- #
123
- # When `:simple_json` is enabled, the request parameters hash must
124
- # be formatted exactly as the DynamoDB API expects.
125
- # @option options [Boolean] :stub_responses (false)
126
- # Causes the client to return stubbed responses. By default
127
- # fake responses are generated and returned. You can specify
128
- # the response data to return or errors to raise by calling
129
- # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
130
- #
131
- # ** Please note ** When response stubbing is enabled, no HTTP
132
- # requests are made, and retries are disabled.
133
- # @option options [Boolean] :validate_params (true)
134
- # When `true`, request parameters are validated before
135
- # sending the request.
136
- def initialize(*args)
137
- super
138
- end
139
-
140
- # @!group API Operations
53
+ # @option options [required, Aws::CredentialProvider] :credentials
54
+ # Your AWS credentials. This can be an instance of any one of the
55
+ # following classes:
56
+ #
57
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
58
+ # credentials.
59
+ #
60
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
61
+ # from an EC2 IMDS on an EC2 instance.
62
+ #
63
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
64
+ # shared file, such as `~/.aws/config`.
65
+ #
66
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
67
+ #
68
+ # When `:credentials` are not configured directly, the following
69
+ # locations will be searched for credentials:
70
+ #
71
+ # * `Aws.config[:credentials]`
72
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
73
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
74
+ # * `~/.aws/credentials`
75
+ # * `~/.aws/config`
76
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
77
+ # very aggressive. Construct and pass an instance of
78
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
79
+ # timeouts.
80
+ #
81
+ # @option options [required, String] :region
82
+ # The AWS region to connect to. The configured `:region` is
83
+ # used to determine the service `:endpoint`. When not passed,
84
+ # a default `:region` is search for in the following locations:
85
+ #
86
+ # * `Aws.config[:region]`
87
+ # * `ENV['AWS_REGION']`
88
+ # * `ENV['AMAZON_REGION']`
89
+ # * `ENV['AWS_DEFAULT_REGION']`
90
+ # * `~/.aws/credentials`
91
+ # * `~/.aws/config`
92
+ #
93
+ # @option options [String] :access_key_id
94
+ #
95
+ # @option options [Boolean] :convert_params (true)
96
+ # When `true`, an attempt is made to coerce request parameters into
97
+ # the required types.
98
+ #
99
+ # @option options [String] :endpoint
100
+ # The client endpoint is normally constructed from the `:region`
101
+ # option. You should only configure an `:endpoint` when connecting
102
+ # to test endpoints. This should be avalid HTTP(S) URI.
103
+ #
104
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
105
+ # The log formatter.
106
+ #
107
+ # @option options [Symbol] :log_level (:info)
108
+ # The log level to send messages to the `:logger` at.
109
+ #
110
+ # @option options [Logger] :logger
111
+ # The Logger instance to send log messages to. If this option
112
+ # is not set, logging will be disabled.
113
+ #
114
+ # @option options [String] :profile ("default")
115
+ # Used when loading credentials from the shared credentials file
116
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
117
+ #
118
+ # @option options [Integer] :retry_limit (3)
119
+ # The maximum number of times to retry failed requests. Only
120
+ # ~ 500 level server errors and certain ~ 400 level client errors
121
+ # are retried. Generally, these are throttling errors, data
122
+ # checksum errors, networking errors, timeout errors and auth
123
+ # errors from expired credentials.
124
+ #
125
+ # @option options [String] :secret_access_key
126
+ #
127
+ # @option options [String] :session_token
128
+ #
129
+ # @option options [Boolean] :simple_json (false)
130
+ # Disables request parameter conversion, validation, and formatting.
131
+ # Also disable response data type conversions. This option is useful
132
+ # when you want to ensure the highest level of performance by
133
+ # avoiding overhead of walking request parameters and response data
134
+ # structures.
135
+ #
136
+ # When `:simple_json` is enabled, the request parameters hash must
137
+ # be formatted exactly as the DynamoDB API expects.
138
+ #
139
+ # @option options [Boolean] :stub_responses (false)
140
+ # Causes the client to return stubbed responses. By default
141
+ # fake responses are generated and returned. You can specify
142
+ # the response data to return or errors to raise by calling
143
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
144
+ #
145
+ # ** Please note ** When response stubbing is enabled, no HTTP
146
+ # requests are made, and retries are disabled.
147
+ #
148
+ # @option options [Boolean] :validate_params (true)
149
+ # When `true`, request parameters are validated before
150
+ # sending the request.
151
+ #
152
+ def initialize(*args)
153
+ super
154
+ end
141
155
 
142
- # Deletes the specified Application Auto Scaling scaling policy.
143
- #
144
- # Deleting a policy deletes the underlying alarm action, but does not
145
- # delete the CloudWatch alarm associated with the scaling policy, even
146
- # if it no longer has an associated action.
147
- #
148
- # To create a scaling policy or update an existing one, see
149
- # PutScalingPolicy.
150
- # @option params [required, String] :policy_name
151
- # The name of the scaling policy.
152
- # @option params [required, String] :service_namespace
153
- # The namespace of the AWS service. For more information, see [AWS
154
- # Service Namespaces][1] in the *Amazon Web Services General Reference*.
155
- #
156
- #
157
- #
158
- # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
159
- # @option params [required, String] :resource_id
160
- # The identifier of the resource associated with the scalable target.
161
- # This string consists of the resource type and unique identifier.
162
- #
163
- # * ECS service - The resource type is `service` and the unique
164
- # identifier is the cluster name and service name. Example:
165
- # `service/default/sample-webapp`.
166
- #
167
- # * Spot fleet request - The resource type is `spot-fleet-request` and
168
- # the unique identifier is the Spot fleet request ID. Example:
169
- # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
170
- #
171
- # * EMR cluster - The resource type is `instancegroup` and the unique
172
- # identifier is the cluster ID and instance group ID. Example:
173
- # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
174
- # @option params [required, String] :scalable_dimension
175
- # The scalable dimension. This string consists of the service namespace,
176
- # resource type, and scaling property.
177
- #
178
- # * `ecs:service:DesiredCount` - The desired task count of an ECS
179
- # service.
180
- #
181
- # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
182
- # Spot fleet request.
183
- #
184
- # * `elasticmapreduce:instancegroup:InstanceCount` - The instance count
185
- # of an EMR Instance Group.
186
- # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
187
- #
188
- # @example Request syntax with placeholder values
189
- # resp = client.delete_scaling_policy({
190
- # policy_name: "ResourceIdMaxLen1600", # required
191
- # service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2
192
- # resource_id: "ResourceIdMaxLen1600", # required
193
- # scalable_dimension: "ecs:service:DesiredCount", # required, accepts ecs:service:DesiredCount, ec2:spot-fleet-request:TargetCapacity, elasticmapreduce:instancegroup:InstanceCount
194
- # })
195
- # @overload delete_scaling_policy(params = {})
196
- # @param [Hash] params ({})
197
- def delete_scaling_policy(params = {}, options = {})
198
- req = build_request(:delete_scaling_policy, params)
199
- req.send_request(options)
200
- end
156
+ # @!group API Operations
201
157
 
202
- # Deregisters a scalable target.
203
- #
204
- # Deregistering a scalable target deletes the scaling policies that are
205
- # associated with it.
206
- #
207
- # To create a scalable target or update an existing one, see
208
- # RegisterScalableTarget.
209
- # @option params [required, String] :service_namespace
210
- # The namespace of the AWS service. For more information, see [AWS
211
- # Service Namespaces][1] in the *Amazon Web Services General Reference*.
212
- #
213
- #
214
- #
215
- # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
216
- # @option params [required, String] :resource_id
217
- # The identifier of the resource associated with the scalable target.
218
- # This string consists of the resource type and unique identifier.
219
- #
220
- # * ECS service - The resource type is `service` and the unique
221
- # identifier is the cluster name and service name. Example:
222
- # `service/default/sample-webapp`.
223
- #
224
- # * Spot fleet request - The resource type is `spot-fleet-request` and
225
- # the unique identifier is the Spot fleet request ID. Example:
226
- # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
227
- #
228
- # * EMR cluster - The resource type is `instancegroup` and the unique
229
- # identifier is the cluster ID and instance group ID. Example:
230
- # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
231
- # @option params [required, String] :scalable_dimension
232
- # The scalable dimension associated with the scalable target. This
233
- # string consists of the service namespace, resource type, and scaling
234
- # property.
235
- #
236
- # * `ecs:service:DesiredCount` - The desired task count of an ECS
237
- # service.
238
- #
239
- # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
240
- # Spot fleet request.
241
- #
242
- # * `elasticmapreduce:instancegroup:InstanceCount` - The instance count
243
- # of an EMR Instance Group.
244
- # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
245
- #
246
- # @example Request syntax with placeholder values
247
- # resp = client.deregister_scalable_target({
248
- # service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2
249
- # resource_id: "ResourceIdMaxLen1600", # required
250
- # scalable_dimension: "ecs:service:DesiredCount", # required, accepts ecs:service:DesiredCount, ec2:spot-fleet-request:TargetCapacity, elasticmapreduce:instancegroup:InstanceCount
251
- # })
252
- # @overload deregister_scalable_target(params = {})
253
- # @param [Hash] params ({})
254
- def deregister_scalable_target(params = {}, options = {})
255
- req = build_request(:deregister_scalable_target, params)
256
- req.send_request(options)
257
- end
158
+ # Deletes the specified Application Auto Scaling scaling policy.
159
+ #
160
+ # Deleting a policy deletes the underlying alarm action, but does not
161
+ # delete the CloudWatch alarm associated with the scaling policy, even
162
+ # if it no longer has an associated action.
163
+ #
164
+ # To create a scaling policy or update an existing one, see
165
+ # PutScalingPolicy.
166
+ #
167
+ # @option params [required, String] :policy_name
168
+ # The name of the scaling policy.
169
+ #
170
+ # @option params [required, String] :service_namespace
171
+ # The namespace of the AWS service. For more information, see [AWS
172
+ # Service Namespaces][1] in the *Amazon Web Services General Reference*.
173
+ #
174
+ #
175
+ #
176
+ # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
177
+ #
178
+ # @option params [required, String] :resource_id
179
+ # The identifier of the resource associated with the scalable target.
180
+ # This string consists of the resource type and unique identifier.
181
+ #
182
+ # * ECS service - The resource type is `service` and the unique
183
+ # identifier is the cluster name and service name. Example:
184
+ # `service/default/sample-webapp`.
185
+ #
186
+ # * Spot fleet request - The resource type is `spot-fleet-request` and
187
+ # the unique identifier is the Spot fleet request ID. Example:
188
+ # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
189
+ #
190
+ # * EMR cluster - The resource type is `instancegroup` and the unique
191
+ # identifier is the cluster ID and instance group ID. Example:
192
+ # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
193
+ #
194
+ # * AppStream 2.0 fleet - The resource type is `fleet` and the unique
195
+ # identifier is the fleet name. Example: `fleet/sample-fleet`.
196
+ #
197
+ # @option params [required, String] :scalable_dimension
198
+ # The scalable dimension. This string consists of the service namespace,
199
+ # resource type, and scaling property.
200
+ #
201
+ # * `ecs:service:DesiredCount` - The desired task count of an ECS
202
+ # service.
203
+ #
204
+ # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
205
+ # Spot fleet request.
206
+ #
207
+ # * `elasticmapreduce:instancegroup:InstanceCount` - The instance count
208
+ # of an EMR Instance Group.
209
+ #
210
+ # * `appstream:fleet:DesiredCapacity` - The desired capacity of an
211
+ # AppStream 2.0 fleet.
212
+ #
213
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
214
+ #
215
+ # @example Request syntax with placeholder values
216
+ #
217
+ # resp = client.delete_scaling_policy({
218
+ # policy_name: "ResourceIdMaxLen1600", # required
219
+ # service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2, appstream
220
+ # resource_id: "ResourceIdMaxLen1600", # required
221
+ # scalable_dimension: "ecs:service:DesiredCount", # required, accepts ecs:service:DesiredCount, ec2:spot-fleet-request:TargetCapacity, elasticmapreduce:instancegroup:InstanceCount, appstream:fleet:DesiredCapacity
222
+ # })
223
+ #
224
+ # @see http://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DeleteScalingPolicy AWS API Documentation
225
+ #
226
+ # @overload delete_scaling_policy(params = {})
227
+ # @param [Hash] params ({})
228
+ def delete_scaling_policy(params = {}, options = {})
229
+ req = build_request(:delete_scaling_policy, params)
230
+ req.send_request(options)
231
+ end
258
232
 
259
- # Provides descriptive information about the scalable targets in the
260
- # specified namespace.
261
- #
262
- # You can filter the results using the `ResourceIds` and
263
- # `ScalableDimension` parameters.
264
- #
265
- # To create a scalable target or update an existing one, see
266
- # RegisterScalableTarget. If you are no longer using a scalable target,
267
- # you can deregister it using DeregisterScalableTarget.
268
- # @option params [required, String] :service_namespace
269
- # The namespace of the AWS service. For more information, see [AWS
270
- # Service Namespaces][1] in the *Amazon Web Services General Reference*.
271
- #
272
- #
273
- #
274
- # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
275
- # @option params [Array<String>] :resource_ids
276
- # The identifier of the resource associated with the scalable target.
277
- # This string consists of the resource type and unique identifier. If
278
- # you specify a scalable dimension, you must also specify a resource ID.
279
- #
280
- # * ECS service - The resource type is `service` and the unique
281
- # identifier is the cluster name and service name. Example:
282
- # `service/default/sample-webapp`.
283
- #
284
- # * Spot fleet request - The resource type is `spot-fleet-request` and
285
- # the unique identifier is the Spot fleet request ID. Example:
286
- # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
287
- #
288
- # * EMR cluster - The resource type is `instancegroup` and the unique
289
- # identifier is the cluster ID and instance group ID. Example:
290
- # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
291
- # @option params [String] :scalable_dimension
292
- # The scalable dimension associated with the scalable target. This
293
- # string consists of the service namespace, resource type, and scaling
294
- # property. If you specify a scalable dimension, you must also specify a
295
- # resource ID.
296
- #
297
- # * `ecs:service:DesiredCount` - The desired task count of an ECS
298
- # service.
299
- #
300
- # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
301
- # Spot fleet request.
302
- #
303
- # * `elasticmapreduce:instancegroup:InstanceCount` - The instance count
304
- # of an EMR Instance Group.
305
- # @option params [Integer] :max_results
306
- # The maximum number of scalable target results. This value can be
307
- # between 1 and 50. The default value is 50.
308
- #
309
- # If this parameter is used, the operation returns up to `MaxResults`
310
- # results at a time, along with a `NextToken` value. To get the next set
311
- # of results, include the `NextToken` value in a subsequent call. If
312
- # this parameter is not used, the operation returns up to 50 results and
313
- # a `NextToken` value, if applicable.
314
- # @option params [String] :next_token
315
- # The token for the next set of results.
316
- # @return [Types::DescribeScalableTargetsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
317
- #
318
- # * {Types::DescribeScalableTargetsResponse#scalable_targets #ScalableTargets} => Array&lt;Types::ScalableTarget&gt;
319
- # * {Types::DescribeScalableTargetsResponse#next_token #NextToken} => String
320
- #
321
- # @example Request syntax with placeholder values
322
- # resp = client.describe_scalable_targets({
323
- # service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2
324
- # resource_ids: ["ResourceIdMaxLen1600"],
325
- # scalable_dimension: "ecs:service:DesiredCount", # accepts ecs:service:DesiredCount, ec2:spot-fleet-request:TargetCapacity, elasticmapreduce:instancegroup:InstanceCount
326
- # max_results: 1,
327
- # next_token: "XmlString",
328
- # })
329
- #
330
- # @example Response structure
331
- # resp.scalable_targets #=> Array
332
- # resp.scalable_targets[0].service_namespace #=> String, one of "ecs", "elasticmapreduce", "ec2"
333
- # resp.scalable_targets[0].resource_id #=> String
334
- # resp.scalable_targets[0].scalable_dimension #=> String, one of "ecs:service:DesiredCount", "ec2:spot-fleet-request:TargetCapacity", "elasticmapreduce:instancegroup:InstanceCount"
335
- # resp.scalable_targets[0].min_capacity #=> Integer
336
- # resp.scalable_targets[0].max_capacity #=> Integer
337
- # resp.scalable_targets[0].role_arn #=> String
338
- # resp.scalable_targets[0].creation_time #=> Time
339
- # resp.next_token #=> String
340
- # @overload describe_scalable_targets(params = {})
341
- # @param [Hash] params ({})
342
- def describe_scalable_targets(params = {}, options = {})
343
- req = build_request(:describe_scalable_targets, params)
344
- req.send_request(options)
345
- end
233
+ # Deregisters a scalable target.
234
+ #
235
+ # Deregistering a scalable target deletes the scaling policies that are
236
+ # associated with it.
237
+ #
238
+ # To create a scalable target or update an existing one, see
239
+ # RegisterScalableTarget.
240
+ #
241
+ # @option params [required, String] :service_namespace
242
+ # The namespace of the AWS service. For more information, see [AWS
243
+ # Service Namespaces][1] in the *Amazon Web Services General Reference*.
244
+ #
245
+ #
246
+ #
247
+ # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
248
+ #
249
+ # @option params [required, String] :resource_id
250
+ # The identifier of the resource associated with the scalable target.
251
+ # This string consists of the resource type and unique identifier.
252
+ #
253
+ # * ECS service - The resource type is `service` and the unique
254
+ # identifier is the cluster name and service name. Example:
255
+ # `service/default/sample-webapp`.
256
+ #
257
+ # * Spot fleet request - The resource type is `spot-fleet-request` and
258
+ # the unique identifier is the Spot fleet request ID. Example:
259
+ # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
260
+ #
261
+ # * EMR cluster - The resource type is `instancegroup` and the unique
262
+ # identifier is the cluster ID and instance group ID. Example:
263
+ # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
264
+ #
265
+ # * AppStream 2.0 fleet - The resource type is `fleet` and the unique
266
+ # identifier is the fleet name. Example: `fleet/sample-fleet`.
267
+ #
268
+ # @option params [required, String] :scalable_dimension
269
+ # The scalable dimension associated with the scalable target. This
270
+ # string consists of the service namespace, resource type, and scaling
271
+ # property.
272
+ #
273
+ # * `ecs:service:DesiredCount` - The desired task count of an ECS
274
+ # service.
275
+ #
276
+ # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
277
+ # Spot fleet request.
278
+ #
279
+ # * `elasticmapreduce:instancegroup:InstanceCount` - The instance count
280
+ # of an EMR Instance Group.
281
+ #
282
+ # * `appstream:fleet:DesiredCapacity` - The desired capacity of an
283
+ # AppStream 2.0 fleet.
284
+ #
285
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
286
+ #
287
+ # @example Request syntax with placeholder values
288
+ #
289
+ # resp = client.deregister_scalable_target({
290
+ # service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2, appstream
291
+ # resource_id: "ResourceIdMaxLen1600", # required
292
+ # scalable_dimension: "ecs:service:DesiredCount", # required, accepts ecs:service:DesiredCount, ec2:spot-fleet-request:TargetCapacity, elasticmapreduce:instancegroup:InstanceCount, appstream:fleet:DesiredCapacity
293
+ # })
294
+ #
295
+ # @see http://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DeregisterScalableTarget AWS API Documentation
296
+ #
297
+ # @overload deregister_scalable_target(params = {})
298
+ # @param [Hash] params ({})
299
+ def deregister_scalable_target(params = {}, options = {})
300
+ req = build_request(:deregister_scalable_target, params)
301
+ req.send_request(options)
302
+ end
346
303
 
347
- # Provides descriptive information about the scaling activities in the
348
- # specified namespace from the previous six weeks.
349
- #
350
- # You can filter the results using the `ResourceId` and
351
- # `ScalableDimension` parameters.
352
- #
353
- # Scaling activities are triggered by CloudWatch alarms that are
354
- # associated with scaling policies. To view the scaling policies for a
355
- # service namespace, see DescribeScalingPolicies. To create a scaling
356
- # policy or update an existing one, see PutScalingPolicy.
357
- # @option params [required, String] :service_namespace
358
- # The namespace of the AWS service. For more information, see [AWS
359
- # Service Namespaces][1] in the *Amazon Web Services General Reference*.
360
- #
361
- #
362
- #
363
- # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
364
- # @option params [String] :resource_id
365
- # The identifier of the resource associated with the scaling activity.
366
- # This string consists of the resource type and unique identifier. If
367
- # you specify a scalable dimension, you must also specify a resource ID.
368
- #
369
- # * ECS service - The resource type is `service` and the unique
370
- # identifier is the cluster name and service name. Example:
371
- # `service/default/sample-webapp`.
372
- #
373
- # * Spot fleet request - The resource type is `spot-fleet-request` and
374
- # the unique identifier is the Spot fleet request ID. Example:
375
- # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
376
- #
377
- # * EMR cluster - The resource type is `instancegroup` and the unique
378
- # identifier is the cluster ID and instance group ID. Example:
379
- # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
380
- # @option params [String] :scalable_dimension
381
- # The scalable dimension. This string consists of the service namespace,
382
- # resource type, and scaling property. If you specify a scalable
383
- # dimension, you must also specify a resource ID.
384
- #
385
- # * `ecs:service:DesiredCount` - The desired task count of an ECS
386
- # service.
387
- #
388
- # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
389
- # Spot fleet request.
390
- #
391
- # * `elasticmapreduce:instancegroup:InstanceCount` - The instance count
392
- # of an EMR Instance Group.
393
- # @option params [Integer] :max_results
394
- # The maximum number of scalable target results. This value can be
395
- # between 1 and 50. The default value is 50.
396
- #
397
- # If this parameter is used, the operation returns up to `MaxResults`
398
- # results at a time, along with a `NextToken` value. To get the next set
399
- # of results, include the `NextToken` value in a subsequent call. If
400
- # this parameter is not used, the operation returns up to 50 results and
401
- # a `NextToken` value, if applicable.
402
- # @option params [String] :next_token
403
- # The token for the next set of results.
404
- # @return [Types::DescribeScalingActivitiesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
405
- #
406
- # * {Types::DescribeScalingActivitiesResponse#scaling_activities #ScalingActivities} => Array&lt;Types::ScalingActivity&gt;
407
- # * {Types::DescribeScalingActivitiesResponse#next_token #NextToken} => String
408
- #
409
- # @example Request syntax with placeholder values
410
- # resp = client.describe_scaling_activities({
411
- # service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2
412
- # resource_id: "ResourceIdMaxLen1600",
413
- # scalable_dimension: "ecs:service:DesiredCount", # accepts ecs:service:DesiredCount, ec2:spot-fleet-request:TargetCapacity, elasticmapreduce:instancegroup:InstanceCount
414
- # max_results: 1,
415
- # next_token: "XmlString",
416
- # })
417
- #
418
- # @example Response structure
419
- # resp.scaling_activities #=> Array
420
- # resp.scaling_activities[0].activity_id #=> String
421
- # resp.scaling_activities[0].service_namespace #=> String, one of "ecs", "elasticmapreduce", "ec2"
422
- # resp.scaling_activities[0].resource_id #=> String
423
- # resp.scaling_activities[0].scalable_dimension #=> String, one of "ecs:service:DesiredCount", "ec2:spot-fleet-request:TargetCapacity", "elasticmapreduce:instancegroup:InstanceCount"
424
- # resp.scaling_activities[0].description #=> String
425
- # resp.scaling_activities[0].cause #=> String
426
- # resp.scaling_activities[0].start_time #=> Time
427
- # resp.scaling_activities[0].end_time #=> Time
428
- # resp.scaling_activities[0].status_code #=> String, one of "Pending", "InProgress", "Successful", "Overridden", "Unfulfilled", "Failed"
429
- # resp.scaling_activities[0].status_message #=> String
430
- # resp.scaling_activities[0].details #=> String
431
- # resp.next_token #=> String
432
- # @overload describe_scaling_activities(params = {})
433
- # @param [Hash] params ({})
434
- def describe_scaling_activities(params = {}, options = {})
435
- req = build_request(:describe_scaling_activities, params)
436
- req.send_request(options)
437
- end
304
+ # Provides descriptive information about the scalable targets in the
305
+ # specified namespace.
306
+ #
307
+ # You can filter the results using the `ResourceIds` and
308
+ # `ScalableDimension` parameters.
309
+ #
310
+ # To create a scalable target or update an existing one, see
311
+ # RegisterScalableTarget. If you are no longer using a scalable target,
312
+ # you can deregister it using DeregisterScalableTarget.
313
+ #
314
+ # @option params [required, String] :service_namespace
315
+ # The namespace of the AWS service. For more information, see [AWS
316
+ # Service Namespaces][1] in the *Amazon Web Services General Reference*.
317
+ #
318
+ #
319
+ #
320
+ # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
321
+ #
322
+ # @option params [Array<String>] :resource_ids
323
+ # The identifier of the resource associated with the scalable target.
324
+ # This string consists of the resource type and unique identifier. If
325
+ # you specify a scalable dimension, you must also specify a resource ID.
326
+ #
327
+ # * ECS service - The resource type is `service` and the unique
328
+ # identifier is the cluster name and service name. Example:
329
+ # `service/default/sample-webapp`.
330
+ #
331
+ # * Spot fleet request - The resource type is `spot-fleet-request` and
332
+ # the unique identifier is the Spot fleet request ID. Example:
333
+ # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
334
+ #
335
+ # * EMR cluster - The resource type is `instancegroup` and the unique
336
+ # identifier is the cluster ID and instance group ID. Example:
337
+ # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
338
+ #
339
+ # * AppStream 2.0 fleet - The resource type is `fleet` and the unique
340
+ # identifier is the fleet name. Example: `fleet/sample-fleet`.
341
+ #
342
+ # @option params [String] :scalable_dimension
343
+ # The scalable dimension associated with the scalable target. This
344
+ # string consists of the service namespace, resource type, and scaling
345
+ # property. If you specify a scalable dimension, you must also specify a
346
+ # resource ID.
347
+ #
348
+ # * `ecs:service:DesiredCount` - The desired task count of an ECS
349
+ # service.
350
+ #
351
+ # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
352
+ # Spot fleet request.
353
+ #
354
+ # * `elasticmapreduce:instancegroup:InstanceCount` - The instance count
355
+ # of an EMR Instance Group.
356
+ #
357
+ # * `appstream:fleet:DesiredCapacity` - The desired capacity of an
358
+ # AppStream 2.0 fleet.
359
+ #
360
+ # @option params [Integer] :max_results
361
+ # The maximum number of scalable target results. This value can be
362
+ # between 1 and 50. The default value is 50.
363
+ #
364
+ # If this parameter is used, the operation returns up to `MaxResults`
365
+ # results at a time, along with a `NextToken` value. To get the next set
366
+ # of results, include the `NextToken` value in a subsequent call. If
367
+ # this parameter is not used, the operation returns up to 50 results and
368
+ # a `NextToken` value, if applicable.
369
+ #
370
+ # @option params [String] :next_token
371
+ # The token for the next set of results.
372
+ #
373
+ # @return [Types::DescribeScalableTargetsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
374
+ #
375
+ # * {Types::DescribeScalableTargetsResponse#scalable_targets #scalable_targets} => Array&lt;Types::ScalableTarget&gt;
376
+ # * {Types::DescribeScalableTargetsResponse#next_token #next_token} => String
377
+ #
378
+ # @example Request syntax with placeholder values
379
+ #
380
+ # resp = client.describe_scalable_targets({
381
+ # service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2, appstream
382
+ # resource_ids: ["ResourceIdMaxLen1600"],
383
+ # scalable_dimension: "ecs:service:DesiredCount", # accepts ecs:service:DesiredCount, ec2:spot-fleet-request:TargetCapacity, elasticmapreduce:instancegroup:InstanceCount, appstream:fleet:DesiredCapacity
384
+ # max_results: 1,
385
+ # next_token: "XmlString",
386
+ # })
387
+ #
388
+ # @example Response structure
389
+ #
390
+ # resp.scalable_targets #=> Array
391
+ # resp.scalable_targets[0].service_namespace #=> String, one of "ecs", "elasticmapreduce", "ec2", "appstream"
392
+ # resp.scalable_targets[0].resource_id #=> String
393
+ # resp.scalable_targets[0].scalable_dimension #=> String, one of "ecs:service:DesiredCount", "ec2:spot-fleet-request:TargetCapacity", "elasticmapreduce:instancegroup:InstanceCount", "appstream:fleet:DesiredCapacity"
394
+ # resp.scalable_targets[0].min_capacity #=> Integer
395
+ # resp.scalable_targets[0].max_capacity #=> Integer
396
+ # resp.scalable_targets[0].role_arn #=> String
397
+ # resp.scalable_targets[0].creation_time #=> Time
398
+ # resp.next_token #=> String
399
+ #
400
+ # @see http://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScalableTargets AWS API Documentation
401
+ #
402
+ # @overload describe_scalable_targets(params = {})
403
+ # @param [Hash] params ({})
404
+ def describe_scalable_targets(params = {}, options = {})
405
+ req = build_request(:describe_scalable_targets, params)
406
+ req.send_request(options)
407
+ end
438
408
 
439
- # Provides descriptive information about the scaling policies in the
440
- # specified namespace.
441
- #
442
- # You can filter the results using the `ResourceId`,
443
- # `ScalableDimension`, and `PolicyNames` parameters.
444
- #
445
- # To create a scaling policy or update an existing one, see
446
- # PutScalingPolicy. If you are no longer using a scaling policy, you can
447
- # delete it using DeleteScalingPolicy.
448
- # @option params [Array<String>] :policy_names
449
- # The names of the scaling policies to describe.
450
- # @option params [required, String] :service_namespace
451
- # The namespace of the AWS service. For more information, see [AWS
452
- # Service Namespaces][1] in the *Amazon Web Services General Reference*.
453
- #
454
- #
455
- #
456
- # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
457
- # @option params [String] :resource_id
458
- # The identifier of the resource associated with the scaling policy.
459
- # This string consists of the resource type and unique identifier. If
460
- # you specify a scalable dimension, you must also specify a resource ID.
461
- #
462
- # * ECS service - The resource type is `service` and the unique
463
- # identifier is the cluster name and service name. Example:
464
- # `service/default/sample-webapp`.
465
- #
466
- # * Spot fleet request - The resource type is `spot-fleet-request` and
467
- # the unique identifier is the Spot fleet request ID. Example:
468
- # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
469
- #
470
- # * EMR cluster - The resource type is `instancegroup` and the unique
471
- # identifier is the cluster ID and instance group ID. Example:
472
- # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
473
- # @option params [String] :scalable_dimension
474
- # The scalable dimension. This string consists of the service namespace,
475
- # resource type, and scaling property. If you specify a scalable
476
- # dimension, you must also specify a resource ID.
477
- #
478
- # * `ecs:service:DesiredCount` - The desired task count of an ECS
479
- # service.
480
- #
481
- # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
482
- # Spot fleet request.
483
- #
484
- # * `elasticmapreduce:instancegroup:InstanceCount` - The instance count
485
- # of an EMR Instance Group.
486
- # @option params [Integer] :max_results
487
- # The maximum number of scalable target results. This value can be
488
- # between 1 and 50. The default value is 50.
489
- #
490
- # If this parameter is used, the operation returns up to `MaxResults`
491
- # results at a time, along with a `NextToken` value. To get the next set
492
- # of results, include the `NextToken` value in a subsequent call. If
493
- # this parameter is not used, the operation returns up to 50 results and
494
- # a `NextToken` value, if applicable.
495
- # @option params [String] :next_token
496
- # The token for the next set of results.
497
- # @return [Types::DescribeScalingPoliciesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
498
- #
499
- # * {Types::DescribeScalingPoliciesResponse#scaling_policies #ScalingPolicies} => Array&lt;Types::ScalingPolicy&gt;
500
- # * {Types::DescribeScalingPoliciesResponse#next_token #NextToken} => String
501
- #
502
- # @example Request syntax with placeholder values
503
- # resp = client.describe_scaling_policies({
504
- # policy_names: ["ResourceIdMaxLen1600"],
505
- # service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2
506
- # resource_id: "ResourceIdMaxLen1600",
507
- # scalable_dimension: "ecs:service:DesiredCount", # accepts ecs:service:DesiredCount, ec2:spot-fleet-request:TargetCapacity, elasticmapreduce:instancegroup:InstanceCount
508
- # max_results: 1,
509
- # next_token: "XmlString",
510
- # })
511
- #
512
- # @example Response structure
513
- # resp.scaling_policies #=> Array
514
- # resp.scaling_policies[0].policy_arn #=> String
515
- # resp.scaling_policies[0].policy_name #=> String
516
- # resp.scaling_policies[0].service_namespace #=> String, one of "ecs", "elasticmapreduce", "ec2"
517
- # resp.scaling_policies[0].resource_id #=> String
518
- # resp.scaling_policies[0].scalable_dimension #=> String, one of "ecs:service:DesiredCount", "ec2:spot-fleet-request:TargetCapacity", "elasticmapreduce:instancegroup:InstanceCount"
519
- # resp.scaling_policies[0].policy_type #=> String, one of "StepScaling"
520
- # resp.scaling_policies[0].step_scaling_policy_configuration.adjustment_type #=> String, one of "ChangeInCapacity", "PercentChangeInCapacity", "ExactCapacity"
521
- # resp.scaling_policies[0].step_scaling_policy_configuration.step_adjustments #=> Array
522
- # resp.scaling_policies[0].step_scaling_policy_configuration.step_adjustments[0].metric_interval_lower_bound #=> Float
523
- # resp.scaling_policies[0].step_scaling_policy_configuration.step_adjustments[0].metric_interval_upper_bound #=> Float
524
- # resp.scaling_policies[0].step_scaling_policy_configuration.step_adjustments[0].scaling_adjustment #=> Integer
525
- # resp.scaling_policies[0].step_scaling_policy_configuration.min_adjustment_magnitude #=> Integer
526
- # resp.scaling_policies[0].step_scaling_policy_configuration.cooldown #=> Integer
527
- # resp.scaling_policies[0].step_scaling_policy_configuration.metric_aggregation_type #=> String, one of "Average", "Minimum", "Maximum"
528
- # resp.scaling_policies[0].alarms #=> Array
529
- # resp.scaling_policies[0].alarms[0].alarm_name #=> String
530
- # resp.scaling_policies[0].alarms[0].alarm_arn #=> String
531
- # resp.scaling_policies[0].creation_time #=> Time
532
- # resp.next_token #=> String
533
- # @overload describe_scaling_policies(params = {})
534
- # @param [Hash] params ({})
535
- def describe_scaling_policies(params = {}, options = {})
536
- req = build_request(:describe_scaling_policies, params)
537
- req.send_request(options)
538
- end
409
+ # Provides descriptive information about the scaling activities in the
410
+ # specified namespace from the previous six weeks.
411
+ #
412
+ # You can filter the results using the `ResourceId` and
413
+ # `ScalableDimension` parameters.
414
+ #
415
+ # Scaling activities are triggered by CloudWatch alarms that are
416
+ # associated with scaling policies. To view the scaling policies for a
417
+ # service namespace, see DescribeScalingPolicies. To create a scaling
418
+ # policy or update an existing one, see PutScalingPolicy.
419
+ #
420
+ # @option params [required, String] :service_namespace
421
+ # The namespace of the AWS service. For more information, see [AWS
422
+ # Service Namespaces][1] in the *Amazon Web Services General Reference*.
423
+ #
424
+ #
425
+ #
426
+ # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
427
+ #
428
+ # @option params [String] :resource_id
429
+ # The identifier of the resource associated with the scaling activity.
430
+ # This string consists of the resource type and unique identifier. If
431
+ # you specify a scalable dimension, you must also specify a resource ID.
432
+ #
433
+ # * ECS service - The resource type is `service` and the unique
434
+ # identifier is the cluster name and service name. Example:
435
+ # `service/default/sample-webapp`.
436
+ #
437
+ # * Spot fleet request - The resource type is `spot-fleet-request` and
438
+ # the unique identifier is the Spot fleet request ID. Example:
439
+ # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
440
+ #
441
+ # * EMR cluster - The resource type is `instancegroup` and the unique
442
+ # identifier is the cluster ID and instance group ID. Example:
443
+ # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
444
+ #
445
+ # * AppStream 2.0 fleet - The resource type is `fleet` and the unique
446
+ # identifier is the fleet name. Example: `fleet/sample-fleet`.
447
+ #
448
+ # @option params [String] :scalable_dimension
449
+ # The scalable dimension. This string consists of the service namespace,
450
+ # resource type, and scaling property. If you specify a scalable
451
+ # dimension, you must also specify a resource ID.
452
+ #
453
+ # * `ecs:service:DesiredCount` - The desired task count of an ECS
454
+ # service.
455
+ #
456
+ # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
457
+ # Spot fleet request.
458
+ #
459
+ # * `elasticmapreduce:instancegroup:InstanceCount` - The instance count
460
+ # of an EMR Instance Group.
461
+ #
462
+ # * `appstream:fleet:DesiredCapacity` - The desired capacity of an
463
+ # AppStream 2.0 fleet.
464
+ #
465
+ # @option params [Integer] :max_results
466
+ # The maximum number of scalable target results. This value can be
467
+ # between 1 and 50. The default value is 50.
468
+ #
469
+ # If this parameter is used, the operation returns up to `MaxResults`
470
+ # results at a time, along with a `NextToken` value. To get the next set
471
+ # of results, include the `NextToken` value in a subsequent call. If
472
+ # this parameter is not used, the operation returns up to 50 results and
473
+ # a `NextToken` value, if applicable.
474
+ #
475
+ # @option params [String] :next_token
476
+ # The token for the next set of results.
477
+ #
478
+ # @return [Types::DescribeScalingActivitiesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
479
+ #
480
+ # * {Types::DescribeScalingActivitiesResponse#scaling_activities #scaling_activities} => Array&lt;Types::ScalingActivity&gt;
481
+ # * {Types::DescribeScalingActivitiesResponse#next_token #next_token} => String
482
+ #
483
+ # @example Request syntax with placeholder values
484
+ #
485
+ # resp = client.describe_scaling_activities({
486
+ # service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2, appstream
487
+ # resource_id: "ResourceIdMaxLen1600",
488
+ # scalable_dimension: "ecs:service:DesiredCount", # accepts ecs:service:DesiredCount, ec2:spot-fleet-request:TargetCapacity, elasticmapreduce:instancegroup:InstanceCount, appstream:fleet:DesiredCapacity
489
+ # max_results: 1,
490
+ # next_token: "XmlString",
491
+ # })
492
+ #
493
+ # @example Response structure
494
+ #
495
+ # resp.scaling_activities #=> Array
496
+ # resp.scaling_activities[0].activity_id #=> String
497
+ # resp.scaling_activities[0].service_namespace #=> String, one of "ecs", "elasticmapreduce", "ec2", "appstream"
498
+ # resp.scaling_activities[0].resource_id #=> String
499
+ # resp.scaling_activities[0].scalable_dimension #=> String, one of "ecs:service:DesiredCount", "ec2:spot-fleet-request:TargetCapacity", "elasticmapreduce:instancegroup:InstanceCount", "appstream:fleet:DesiredCapacity"
500
+ # resp.scaling_activities[0].description #=> String
501
+ # resp.scaling_activities[0].cause #=> String
502
+ # resp.scaling_activities[0].start_time #=> Time
503
+ # resp.scaling_activities[0].end_time #=> Time
504
+ # resp.scaling_activities[0].status_code #=> String, one of "Pending", "InProgress", "Successful", "Overridden", "Unfulfilled", "Failed"
505
+ # resp.scaling_activities[0].status_message #=> String
506
+ # resp.scaling_activities[0].details #=> String
507
+ # resp.next_token #=> String
508
+ #
509
+ # @see http://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScalingActivities AWS API Documentation
510
+ #
511
+ # @overload describe_scaling_activities(params = {})
512
+ # @param [Hash] params ({})
513
+ def describe_scaling_activities(params = {}, options = {})
514
+ req = build_request(:describe_scaling_activities, params)
515
+ req.send_request(options)
516
+ end
539
517
 
540
- # Creates or updates a policy for an Application Auto Scaling scalable
541
- # target.
542
- #
543
- # Each scalable target is identified by a service namespace, resource
544
- # ID, and scalable dimension. A scaling policy applies to the scalable
545
- # target identified by those three attributes. You cannot create a
546
- # scaling policy without first registering a scalable target using
547
- # RegisterScalableTarget.
548
- #
549
- # To update a policy, specify its policy name and the parameters that
550
- # you want to change. Any parameters that you don't specify are not
551
- # changed by this update request.
552
- #
553
- # You can view the scaling policies for a service namespace using
554
- # DescribeScalingPolicies. If you are no longer using a scaling policy,
555
- # you can delete it using DeleteScalingPolicy.
556
- # @option params [required, String] :policy_name
557
- # The name of the scaling policy.
558
- # @option params [required, String] :service_namespace
559
- # The namespace of the AWS service. For more information, see [AWS
560
- # Service Namespaces][1] in the *Amazon Web Services General Reference*.
561
- #
562
- #
563
- #
564
- # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
565
- # @option params [required, String] :resource_id
566
- # The identifier of the resource associated with the scaling policy.
567
- # This string consists of the resource type and unique identifier.
568
- #
569
- # * ECS service - The resource type is `service` and the unique
570
- # identifier is the cluster name and service name. Example:
571
- # `service/default/sample-webapp`.
572
- #
573
- # * Spot fleet request - The resource type is `spot-fleet-request` and
574
- # the unique identifier is the Spot fleet request ID. Example:
575
- # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
576
- #
577
- # * EMR cluster - The resource type is `instancegroup` and the unique
578
- # identifier is the cluster ID and instance group ID. Example:
579
- # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
580
- # @option params [required, String] :scalable_dimension
581
- # The scalable dimension. This string consists of the service namespace,
582
- # resource type, and scaling property.
583
- #
584
- # * `ecs:service:DesiredCount` - The desired task count of an ECS
585
- # service.
586
- #
587
- # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
588
- # Spot fleet request.
589
- #
590
- # * `elasticmapreduce:instancegroup:InstanceCount` - The instance count
591
- # of an EMR Instance Group.
592
- # @option params [String] :policy_type
593
- # The policy type. If you are creating a new policy, this parameter is
594
- # required. If you are updating a policy, this parameter is not
595
- # required.
596
- # @option params [Types::StepScalingPolicyConfiguration] :step_scaling_policy_configuration
597
- # The configuration for the step scaling policy. If you are creating a
598
- # new policy, this parameter is required. If you are updating a policy,
599
- # this parameter is not required. For more information, see
600
- # StepScalingPolicyConfiguration and StepAdjustment.
601
- # @return [Types::PutScalingPolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
602
- #
603
- # * {Types::PutScalingPolicyResponse#policy_arn #PolicyARN} => String
604
- #
605
- # @example Request syntax with placeholder values
606
- # resp = client.put_scaling_policy({
607
- # policy_name: "PolicyName", # required
608
- # service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2
609
- # resource_id: "ResourceIdMaxLen1600", # required
610
- # scalable_dimension: "ecs:service:DesiredCount", # required, accepts ecs:service:DesiredCount, ec2:spot-fleet-request:TargetCapacity, elasticmapreduce:instancegroup:InstanceCount
611
- # policy_type: "StepScaling", # accepts StepScaling
612
- # step_scaling_policy_configuration: {
613
- # adjustment_type: "ChangeInCapacity", # accepts ChangeInCapacity, PercentChangeInCapacity, ExactCapacity
614
- # step_adjustments: [
615
- # {
616
- # metric_interval_lower_bound: 1.0,
617
- # metric_interval_upper_bound: 1.0,
618
- # scaling_adjustment: 1, # required
619
- # },
620
- # ],
621
- # min_adjustment_magnitude: 1,
622
- # cooldown: 1,
623
- # metric_aggregation_type: "Average", # accepts Average, Minimum, Maximum
624
- # },
625
- # })
626
- #
627
- # @example Response structure
628
- # resp.policy_arn #=> String
629
- # @overload put_scaling_policy(params = {})
630
- # @param [Hash] params ({})
631
- def put_scaling_policy(params = {}, options = {})
632
- req = build_request(:put_scaling_policy, params)
633
- req.send_request(options)
634
- end
518
+ # Provides descriptive information about the scaling policies in the
519
+ # specified namespace.
520
+ #
521
+ # You can filter the results using the `ResourceId`,
522
+ # `ScalableDimension`, and `PolicyNames` parameters.
523
+ #
524
+ # To create a scaling policy or update an existing one, see
525
+ # PutScalingPolicy. If you are no longer using a scaling policy, you can
526
+ # delete it using DeleteScalingPolicy.
527
+ #
528
+ # @option params [Array<String>] :policy_names
529
+ # The names of the scaling policies to describe.
530
+ #
531
+ # @option params [required, String] :service_namespace
532
+ # The namespace of the AWS service. For more information, see [AWS
533
+ # Service Namespaces][1] in the *Amazon Web Services General Reference*.
534
+ #
535
+ #
536
+ #
537
+ # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
538
+ #
539
+ # @option params [String] :resource_id
540
+ # The identifier of the resource associated with the scaling policy.
541
+ # This string consists of the resource type and unique identifier. If
542
+ # you specify a scalable dimension, you must also specify a resource ID.
543
+ #
544
+ # * ECS service - The resource type is `service` and the unique
545
+ # identifier is the cluster name and service name. Example:
546
+ # `service/default/sample-webapp`.
547
+ #
548
+ # * Spot fleet request - The resource type is `spot-fleet-request` and
549
+ # the unique identifier is the Spot fleet request ID. Example:
550
+ # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
551
+ #
552
+ # * EMR cluster - The resource type is `instancegroup` and the unique
553
+ # identifier is the cluster ID and instance group ID. Example:
554
+ # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
555
+ #
556
+ # * AppStream 2.0 fleet - The resource type is `fleet` and the unique
557
+ # identifier is the fleet name. Example: `fleet/sample-fleet`.
558
+ #
559
+ # @option params [String] :scalable_dimension
560
+ # The scalable dimension. This string consists of the service namespace,
561
+ # resource type, and scaling property. If you specify a scalable
562
+ # dimension, you must also specify a resource ID.
563
+ #
564
+ # * `ecs:service:DesiredCount` - The desired task count of an ECS
565
+ # service.
566
+ #
567
+ # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
568
+ # Spot fleet request.
569
+ #
570
+ # * `elasticmapreduce:instancegroup:InstanceCount` - The instance count
571
+ # of an EMR Instance Group.
572
+ #
573
+ # * `appstream:fleet:DesiredCapacity` - The desired capacity of an
574
+ # AppStream 2.0 fleet.
575
+ #
576
+ # @option params [Integer] :max_results
577
+ # The maximum number of scalable target results. This value can be
578
+ # between 1 and 50. The default value is 50.
579
+ #
580
+ # If this parameter is used, the operation returns up to `MaxResults`
581
+ # results at a time, along with a `NextToken` value. To get the next set
582
+ # of results, include the `NextToken` value in a subsequent call. If
583
+ # this parameter is not used, the operation returns up to 50 results and
584
+ # a `NextToken` value, if applicable.
585
+ #
586
+ # @option params [String] :next_token
587
+ # The token for the next set of results.
588
+ #
589
+ # @return [Types::DescribeScalingPoliciesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
590
+ #
591
+ # * {Types::DescribeScalingPoliciesResponse#scaling_policies #scaling_policies} => Array&lt;Types::ScalingPolicy&gt;
592
+ # * {Types::DescribeScalingPoliciesResponse#next_token #next_token} => String
593
+ #
594
+ # @example Request syntax with placeholder values
595
+ #
596
+ # resp = client.describe_scaling_policies({
597
+ # policy_names: ["ResourceIdMaxLen1600"],
598
+ # service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2, appstream
599
+ # resource_id: "ResourceIdMaxLen1600",
600
+ # scalable_dimension: "ecs:service:DesiredCount", # accepts ecs:service:DesiredCount, ec2:spot-fleet-request:TargetCapacity, elasticmapreduce:instancegroup:InstanceCount, appstream:fleet:DesiredCapacity
601
+ # max_results: 1,
602
+ # next_token: "XmlString",
603
+ # })
604
+ #
605
+ # @example Response structure
606
+ #
607
+ # resp.scaling_policies #=> Array
608
+ # resp.scaling_policies[0].policy_arn #=> String
609
+ # resp.scaling_policies[0].policy_name #=> String
610
+ # resp.scaling_policies[0].service_namespace #=> String, one of "ecs", "elasticmapreduce", "ec2", "appstream"
611
+ # resp.scaling_policies[0].resource_id #=> String
612
+ # resp.scaling_policies[0].scalable_dimension #=> String, one of "ecs:service:DesiredCount", "ec2:spot-fleet-request:TargetCapacity", "elasticmapreduce:instancegroup:InstanceCount", "appstream:fleet:DesiredCapacity"
613
+ # resp.scaling_policies[0].policy_type #=> String, one of "StepScaling"
614
+ # resp.scaling_policies[0].step_scaling_policy_configuration.adjustment_type #=> String, one of "ChangeInCapacity", "PercentChangeInCapacity", "ExactCapacity"
615
+ # resp.scaling_policies[0].step_scaling_policy_configuration.step_adjustments #=> Array
616
+ # resp.scaling_policies[0].step_scaling_policy_configuration.step_adjustments[0].metric_interval_lower_bound #=> Float
617
+ # resp.scaling_policies[0].step_scaling_policy_configuration.step_adjustments[0].metric_interval_upper_bound #=> Float
618
+ # resp.scaling_policies[0].step_scaling_policy_configuration.step_adjustments[0].scaling_adjustment #=> Integer
619
+ # resp.scaling_policies[0].step_scaling_policy_configuration.min_adjustment_magnitude #=> Integer
620
+ # resp.scaling_policies[0].step_scaling_policy_configuration.cooldown #=> Integer
621
+ # resp.scaling_policies[0].step_scaling_policy_configuration.metric_aggregation_type #=> String, one of "Average", "Minimum", "Maximum"
622
+ # resp.scaling_policies[0].alarms #=> Array
623
+ # resp.scaling_policies[0].alarms[0].alarm_name #=> String
624
+ # resp.scaling_policies[0].alarms[0].alarm_arn #=> String
625
+ # resp.scaling_policies[0].creation_time #=> Time
626
+ # resp.next_token #=> String
627
+ #
628
+ # @see http://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScalingPolicies AWS API Documentation
629
+ #
630
+ # @overload describe_scaling_policies(params = {})
631
+ # @param [Hash] params ({})
632
+ def describe_scaling_policies(params = {}, options = {})
633
+ req = build_request(:describe_scaling_policies, params)
634
+ req.send_request(options)
635
+ end
635
636
 
636
- # Registers or updates a scalable target. A scalable target is a
637
- # resource that Application Auto Scaling can scale out or scale in.
638
- # After you have registered a scalable target, you can use this
639
- # operation to update the minimum and maximum values for your scalable
640
- # dimension.
641
- #
642
- # After you register a scalable target, you can create and apply scaling
643
- # policies using PutScalingPolicy. You can view the scaling policies for
644
- # a service namespace using DescribeScalableTargets. If you are no
645
- # longer using a scalable target, you can deregister it using
646
- # DeregisterScalableTarget.
647
- # @option params [required, String] :service_namespace
648
- # The namespace of the AWS service. For more information, see [AWS
649
- # Service Namespaces][1] in the *Amazon Web Services General Reference*.
650
- #
651
- #
652
- #
653
- # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
654
- # @option params [required, String] :resource_id
655
- # The identifier of the resource associated with the scalable target.
656
- # This string consists of the resource type and unique identifier.
657
- #
658
- # * ECS service - The resource type is `service` and the unique
659
- # identifier is the cluster name and service name. Example:
660
- # `service/default/sample-webapp`.
661
- #
662
- # * Spot fleet request - The resource type is `spot-fleet-request` and
663
- # the unique identifier is the Spot fleet request ID. Example:
664
- # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
665
- #
666
- # * EMR cluster - The resource type is `instancegroup` and the unique
667
- # identifier is the cluster ID and instance group ID. Example:
668
- # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
669
- # @option params [required, String] :scalable_dimension
670
- # The scalable dimension associated with the scalable target. This
671
- # string consists of the service namespace, resource type, and scaling
672
- # property.
673
- #
674
- # * `ecs:service:DesiredCount` - The desired task count of an ECS
675
- # service.
676
- #
677
- # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
678
- # Spot fleet request.
679
- #
680
- # * `elasticmapreduce:instancegroup:InstanceCount` - The instance count
681
- # of an EMR Instance Group.
682
- # @option params [Integer] :min_capacity
683
- # The minimum value to scale to in response to a scale in event. This
684
- # parameter is required if you are registering a scalable target and
685
- # optional if you are updating one.
686
- # @option params [Integer] :max_capacity
687
- # The maximum value to scale to in response to a scale out event. This
688
- # parameter is required if you are registering a scalable target and
689
- # optional if you are updating one.
690
- # @option params [String] :role_arn
691
- # The ARN of an IAM role that allows Application Auto Scaling to modify
692
- # the scalable target on your behalf. This parameter is required when
693
- # you register a scalable target and optional when you update one.
694
- # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
695
- #
696
- # @example Request syntax with placeholder values
697
- # resp = client.register_scalable_target({
698
- # service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2
699
- # resource_id: "ResourceIdMaxLen1600", # required
700
- # scalable_dimension: "ecs:service:DesiredCount", # required, accepts ecs:service:DesiredCount, ec2:spot-fleet-request:TargetCapacity, elasticmapreduce:instancegroup:InstanceCount
701
- # min_capacity: 1,
702
- # max_capacity: 1,
703
- # role_arn: "ResourceIdMaxLen1600",
704
- # })
705
- # @overload register_scalable_target(params = {})
706
- # @param [Hash] params ({})
707
- def register_scalable_target(params = {}, options = {})
708
- req = build_request(:register_scalable_target, params)
709
- req.send_request(options)
710
- end
637
+ # Creates or updates a policy for an Application Auto Scaling scalable
638
+ # target.
639
+ #
640
+ # Each scalable target is identified by a service namespace, resource
641
+ # ID, and scalable dimension. A scaling policy applies to the scalable
642
+ # target identified by those three attributes. You cannot create a
643
+ # scaling policy without first registering a scalable target using
644
+ # RegisterScalableTarget.
645
+ #
646
+ # To update a policy, specify its policy name and the parameters that
647
+ # you want to change. Any parameters that you don't specify are not
648
+ # changed by this update request.
649
+ #
650
+ # You can view the scaling policies for a service namespace using
651
+ # DescribeScalingPolicies. If you are no longer using a scaling policy,
652
+ # you can delete it using DeleteScalingPolicy.
653
+ #
654
+ # @option params [required, String] :policy_name
655
+ # The name of the scaling policy.
656
+ #
657
+ # @option params [required, String] :service_namespace
658
+ # The namespace of the AWS service. For more information, see [AWS
659
+ # Service Namespaces][1] in the *Amazon Web Services General Reference*.
660
+ #
661
+ #
662
+ #
663
+ # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
664
+ #
665
+ # @option params [required, String] :resource_id
666
+ # The identifier of the resource associated with the scaling policy.
667
+ # This string consists of the resource type and unique identifier.
668
+ #
669
+ # * ECS service - The resource type is `service` and the unique
670
+ # identifier is the cluster name and service name. Example:
671
+ # `service/default/sample-webapp`.
672
+ #
673
+ # * Spot fleet request - The resource type is `spot-fleet-request` and
674
+ # the unique identifier is the Spot fleet request ID. Example:
675
+ # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
676
+ #
677
+ # * EMR cluster - The resource type is `instancegroup` and the unique
678
+ # identifier is the cluster ID and instance group ID. Example:
679
+ # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
680
+ #
681
+ # * AppStream 2.0 fleet - The resource type is `fleet` and the unique
682
+ # identifier is the fleet name. Example: `fleet/sample-fleet`.
683
+ #
684
+ # @option params [required, String] :scalable_dimension
685
+ # The scalable dimension. This string consists of the service namespace,
686
+ # resource type, and scaling property.
687
+ #
688
+ # * `ecs:service:DesiredCount` - The desired task count of an ECS
689
+ # service.
690
+ #
691
+ # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
692
+ # Spot fleet request.
693
+ #
694
+ # * `elasticmapreduce:instancegroup:InstanceCount` - The instance count
695
+ # of an EMR Instance Group.
696
+ #
697
+ # * `appstream:fleet:DesiredCapacity` - The desired capacity of an
698
+ # AppStream 2.0 fleet.
699
+ #
700
+ # @option params [String] :policy_type
701
+ # The policy type. If you are creating a new policy, this parameter is
702
+ # required. If you are updating a policy, this parameter is not
703
+ # required.
704
+ #
705
+ # @option params [Types::StepScalingPolicyConfiguration] :step_scaling_policy_configuration
706
+ # The configuration for the step scaling policy. If you are creating a
707
+ # new policy, this parameter is required. If you are updating a policy,
708
+ # this parameter is not required. For more information, see
709
+ # StepScalingPolicyConfiguration and StepAdjustment.
710
+ #
711
+ # @return [Types::PutScalingPolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
712
+ #
713
+ # * {Types::PutScalingPolicyResponse#policy_arn #policy_arn} => String
714
+ #
715
+ # @example Request syntax with placeholder values
716
+ #
717
+ # resp = client.put_scaling_policy({
718
+ # policy_name: "PolicyName", # required
719
+ # service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2, appstream
720
+ # resource_id: "ResourceIdMaxLen1600", # required
721
+ # scalable_dimension: "ecs:service:DesiredCount", # required, accepts ecs:service:DesiredCount, ec2:spot-fleet-request:TargetCapacity, elasticmapreduce:instancegroup:InstanceCount, appstream:fleet:DesiredCapacity
722
+ # policy_type: "StepScaling", # accepts StepScaling
723
+ # step_scaling_policy_configuration: {
724
+ # adjustment_type: "ChangeInCapacity", # accepts ChangeInCapacity, PercentChangeInCapacity, ExactCapacity
725
+ # step_adjustments: [
726
+ # {
727
+ # metric_interval_lower_bound: 1.0,
728
+ # metric_interval_upper_bound: 1.0,
729
+ # scaling_adjustment: 1, # required
730
+ # },
731
+ # ],
732
+ # min_adjustment_magnitude: 1,
733
+ # cooldown: 1,
734
+ # metric_aggregation_type: "Average", # accepts Average, Minimum, Maximum
735
+ # },
736
+ # })
737
+ #
738
+ # @example Response structure
739
+ #
740
+ # resp.policy_arn #=> String
741
+ #
742
+ # @see http://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/PutScalingPolicy AWS API Documentation
743
+ #
744
+ # @overload put_scaling_policy(params = {})
745
+ # @param [Hash] params ({})
746
+ def put_scaling_policy(params = {}, options = {})
747
+ req = build_request(:put_scaling_policy, params)
748
+ req.send_request(options)
749
+ end
711
750
 
712
- # @!endgroup
751
+ # Registers or updates a scalable target. A scalable target is a
752
+ # resource that Application Auto Scaling can scale out or scale in.
753
+ # After you have registered a scalable target, you can use this
754
+ # operation to update the minimum and maximum values for your scalable
755
+ # dimension.
756
+ #
757
+ # After you register a scalable target, you can create and apply scaling
758
+ # policies using PutScalingPolicy. You can view the scaling policies for
759
+ # a service namespace using DescribeScalableTargets. If you are no
760
+ # longer using a scalable target, you can deregister it using
761
+ # DeregisterScalableTarget.
762
+ #
763
+ # @option params [required, String] :service_namespace
764
+ # The namespace of the AWS service. For more information, see [AWS
765
+ # Service Namespaces][1] in the *Amazon Web Services General Reference*.
766
+ #
767
+ #
768
+ #
769
+ # [1]: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
770
+ #
771
+ # @option params [required, String] :resource_id
772
+ # The identifier of the resource associated with the scalable target.
773
+ # This string consists of the resource type and unique identifier.
774
+ #
775
+ # * ECS service - The resource type is `service` and the unique
776
+ # identifier is the cluster name and service name. Example:
777
+ # `service/default/sample-webapp`.
778
+ #
779
+ # * Spot fleet request - The resource type is `spot-fleet-request` and
780
+ # the unique identifier is the Spot fleet request ID. Example:
781
+ # `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
782
+ #
783
+ # * EMR cluster - The resource type is `instancegroup` and the unique
784
+ # identifier is the cluster ID and instance group ID. Example:
785
+ # `instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0`.
786
+ #
787
+ # * AppStream 2.0 fleet - The resource type is `fleet` and the unique
788
+ # identifier is the fleet name. Example: `fleet/sample-fleet`.
789
+ #
790
+ # @option params [required, String] :scalable_dimension
791
+ # The scalable dimension associated with the scalable target. This
792
+ # string consists of the service namespace, resource type, and scaling
793
+ # property.
794
+ #
795
+ # * `ecs:service:DesiredCount` - The desired task count of an ECS
796
+ # service.
797
+ #
798
+ # * `ec2:spot-fleet-request:TargetCapacity` - The target capacity of a
799
+ # Spot fleet request.
800
+ #
801
+ # * `elasticmapreduce:instancegroup:InstanceCount` - The instance count
802
+ # of an EMR Instance Group.
803
+ #
804
+ # * `appstream:fleet:DesiredCapacity` - The desired capacity of an
805
+ # AppStream 2.0 fleet.
806
+ #
807
+ # @option params [Integer] :min_capacity
808
+ # The minimum value to scale to in response to a scale in event. This
809
+ # parameter is required if you are registering a scalable target and
810
+ # optional if you are updating one.
811
+ #
812
+ # @option params [Integer] :max_capacity
813
+ # The maximum value to scale to in response to a scale out event. This
814
+ # parameter is required if you are registering a scalable target and
815
+ # optional if you are updating one.
816
+ #
817
+ # @option params [String] :role_arn
818
+ # The ARN of an IAM role that allows Application Auto Scaling to modify
819
+ # the scalable target on your behalf. This parameter is required when
820
+ # you register a scalable target and optional when you update one.
821
+ #
822
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
823
+ #
824
+ # @example Request syntax with placeholder values
825
+ #
826
+ # resp = client.register_scalable_target({
827
+ # service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2, appstream
828
+ # resource_id: "ResourceIdMaxLen1600", # required
829
+ # scalable_dimension: "ecs:service:DesiredCount", # required, accepts ecs:service:DesiredCount, ec2:spot-fleet-request:TargetCapacity, elasticmapreduce:instancegroup:InstanceCount, appstream:fleet:DesiredCapacity
830
+ # min_capacity: 1,
831
+ # max_capacity: 1,
832
+ # role_arn: "ResourceIdMaxLen1600",
833
+ # })
834
+ #
835
+ # @see http://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/RegisterScalableTarget AWS API Documentation
836
+ #
837
+ # @overload register_scalable_target(params = {})
838
+ # @param [Hash] params ({})
839
+ def register_scalable_target(params = {}, options = {})
840
+ req = build_request(:register_scalable_target, params)
841
+ req.send_request(options)
842
+ end
713
843
 
714
- # @param params ({})
715
- # @api private
716
- def build_request(operation_name, params = {})
717
- handlers = @handlers.for(operation_name)
718
- context = Seahorse::Client::RequestContext.new(
719
- operation_name: operation_name,
720
- operation: config.api.operation(operation_name),
721
- client: self,
722
- params: params,
723
- config: config)
724
- context[:gem_name] = 'aws-sdk-applicationautoscaling'
725
- context[:gem_version] = '1.0.0.rc1'
726
- Seahorse::Client::Request.new(handlers, context)
727
- end
844
+ # @!endgroup
728
845
 
729
- # @api private
730
- # @deprecated
731
- def waiter_names
732
- []
733
- end
846
+ # @param params ({})
847
+ # @api private
848
+ def build_request(operation_name, params = {})
849
+ handlers = @handlers.for(operation_name)
850
+ context = Seahorse::Client::RequestContext.new(
851
+ operation_name: operation_name,
852
+ operation: config.api.operation(operation_name),
853
+ client: self,
854
+ params: params,
855
+ config: config)
856
+ context[:gem_name] = 'aws-sdk-applicationautoscaling'
857
+ context[:gem_version] = '1.0.0.rc2'
858
+ Seahorse::Client::Request.new(handlers, context)
859
+ end
734
860
 
735
- class << self
861
+ # @api private
862
+ # @deprecated
863
+ def waiter_names
864
+ []
865
+ end
736
866
 
737
- # @api private
738
- attr_reader :identifier
867
+ class << self
739
868
 
740
- # @api private
741
- def errors_module
742
- Errors
743
- end
869
+ # @api private
870
+ attr_reader :identifier
744
871
 
872
+ # @api private
873
+ def errors_module
874
+ Errors
745
875
  end
876
+
746
877
  end
747
878
  end
748
879
  end