aws-sdk-emr 1.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e2fe76544a9bc625b192198ce644e0c900dc4d50
4
+ data.tar.gz: 68da9a389b12e2ae3156320ecb3d1b0ec2943a90
5
+ SHA512:
6
+ metadata.gz: d2945f4213d4c3a05038772aa53adceb1362f66254c1452f642eb144b38253072cf821c51879057efe7ab008bf1c15e445bd9e1a726cc3e015e89a8b80bbe8db
7
+ data.tar.gz: d49a41a337f072964020e35120d2831bb802ccb7fb92908fbd5ef23bc56b2d8f6c0640d9216a4b324624b23c4408cda52a9104aedc77ad4232f074c46848c395
@@ -0,0 +1,48 @@
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
+ require 'aws-sdk-core'
9
+ require 'aws-sigv4'
10
+
11
+ require_relative 'aws-sdk-emr/types'
12
+ require_relative 'aws-sdk-emr/client_api'
13
+ require_relative 'aws-sdk-emr/client'
14
+ require_relative 'aws-sdk-emr/errors'
15
+ require_relative 'aws-sdk-emr/waiters'
16
+ require_relative 'aws-sdk-emr/resource'
17
+ require_relative 'aws-sdk-emr/customizations'
18
+
19
+ # This module provides support for Amazon Elastic MapReduce. This module is available in the
20
+ # `aws-sdk-emr` gem.
21
+ #
22
+ # # Client
23
+ #
24
+ # The {Client} class provides one method for each API operation. Operation
25
+ # methods each accept a hash of request parameters and return a response
26
+ # structure.
27
+ #
28
+ # See {Client} for more information.
29
+ #
30
+ # # Errors
31
+ #
32
+ # Errors returned from Amazon Elastic MapReduce all
33
+ # extend {Errors::ServiceError}.
34
+ #
35
+ # begin
36
+ # # do stuff
37
+ # rescue Aws::EMR::Errors::ServiceError
38
+ # # rescues all service API errors
39
+ # end
40
+ #
41
+ # See {Errors} for more information.
42
+ #
43
+ # @service
44
+ module Aws::EMR
45
+
46
+ GEM_VERSION = '1.0.0.rc1'
47
+
48
+ end
@@ -0,0 +1,1777 @@
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
+ require 'seahorse/client/plugins/content_length.rb'
9
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
10
+ require 'aws-sdk-core/plugins/logging.rb'
11
+ require 'aws-sdk-core/plugins/param_converter.rb'
12
+ require 'aws-sdk-core/plugins/param_validator.rb'
13
+ require 'aws-sdk-core/plugins/user_agent.rb'
14
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
15
+ require 'aws-sdk-core/plugins/retry_errors.rb'
16
+ require 'aws-sdk-core/plugins/global_configuration.rb'
17
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
+ require 'aws-sdk-core/plugins/response_paging.rb'
19
+ require 'aws-sdk-core/plugins/stub_responses.rb'
20
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
21
+ require 'aws-sdk-core/plugins/signature_v4.rb'
22
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
23
+
24
+ Aws::Plugins::GlobalConfiguration.add_identifier(:emr)
25
+
26
+ module Aws
27
+ module EMR
28
+ class Client < Seahorse::Client::Base
29
+
30
+ include Aws::ClientStubs
31
+
32
+ @identifier = :emr
33
+
34
+ set_api(ClientApi::API)
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)
51
+
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
141
+
142
+ # Adds one or more instance groups to a running cluster.
143
+ # @option params [required, Array<Types::InstanceGroupConfig>] :instance_groups
144
+ # Instance groups to add.
145
+ # @option params [required, String] :job_flow_id
146
+ # Job flow in which to add the instance groups.
147
+ # @return [Types::AddInstanceGroupsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
148
+ #
149
+ # * {Types::AddInstanceGroupsOutput#job_flow_id #JobFlowId} => String
150
+ # * {Types::AddInstanceGroupsOutput#instance_group_ids #InstanceGroupIds} => Array&lt;String&gt;
151
+ #
152
+ # @example Request syntax with placeholder values
153
+ # resp = client.add_instance_groups({
154
+ # instance_groups: [ # required
155
+ # {
156
+ # name: "XmlStringMaxLen256",
157
+ # market: "ON_DEMAND", # accepts ON_DEMAND, SPOT
158
+ # instance_role: "MASTER", # required, accepts MASTER, CORE, TASK
159
+ # bid_price: "XmlStringMaxLen256",
160
+ # instance_type: "InstanceType", # required
161
+ # instance_count: 1, # required
162
+ # configurations: [
163
+ # {
164
+ # classification: "String",
165
+ # configurations: {
166
+ # # recursive ConfigurationList
167
+ # },
168
+ # properties: {
169
+ # "String" => "String",
170
+ # },
171
+ # },
172
+ # ],
173
+ # ebs_configuration: {
174
+ # ebs_block_device_configs: [
175
+ # {
176
+ # volume_specification: { # required
177
+ # volume_type: "String", # required
178
+ # iops: 1,
179
+ # size_in_gb: 1, # required
180
+ # },
181
+ # volumes_per_instance: 1,
182
+ # },
183
+ # ],
184
+ # ebs_optimized: false,
185
+ # },
186
+ # auto_scaling_policy: {
187
+ # constraints: { # required
188
+ # min_capacity: 1, # required
189
+ # max_capacity: 1, # required
190
+ # },
191
+ # rules: [ # required
192
+ # {
193
+ # name: "String", # required
194
+ # description: "String",
195
+ # action: { # required
196
+ # market: "ON_DEMAND", # accepts ON_DEMAND, SPOT
197
+ # simple_scaling_policy_configuration: { # required
198
+ # adjustment_type: "CHANGE_IN_CAPACITY", # accepts CHANGE_IN_CAPACITY, PERCENT_CHANGE_IN_CAPACITY, EXACT_CAPACITY
199
+ # scaling_adjustment: 1, # required
200
+ # cool_down: 1,
201
+ # },
202
+ # },
203
+ # trigger: { # required
204
+ # cloud_watch_alarm_definition: { # required
205
+ # comparison_operator: "GREATER_THAN_OR_EQUAL", # required, accepts GREATER_THAN_OR_EQUAL, GREATER_THAN, LESS_THAN, LESS_THAN_OR_EQUAL
206
+ # evaluation_periods: 1,
207
+ # metric_name: "String", # required
208
+ # namespace: "String",
209
+ # period: 1, # required
210
+ # statistic: "SAMPLE_COUNT", # accepts SAMPLE_COUNT, AVERAGE, SUM, MINIMUM, MAXIMUM
211
+ # threshold: 1.0, # required
212
+ # unit: "NONE", # accepts NONE, SECONDS, MICRO_SECONDS, MILLI_SECONDS, BYTES, KILO_BYTES, MEGA_BYTES, GIGA_BYTES, TERA_BYTES, BITS, KILO_BITS, MEGA_BITS, GIGA_BITS, TERA_BITS, PERCENT, COUNT, BYTES_PER_SECOND, KILO_BYTES_PER_SECOND, MEGA_BYTES_PER_SECOND, GIGA_BYTES_PER_SECOND, TERA_BYTES_PER_SECOND, BITS_PER_SECOND, KILO_BITS_PER_SECOND, MEGA_BITS_PER_SECOND, GIGA_BITS_PER_SECOND, TERA_BITS_PER_SECOND, COUNT_PER_SECOND
213
+ # dimensions: [
214
+ # {
215
+ # key: "String",
216
+ # value: "String",
217
+ # },
218
+ # ],
219
+ # },
220
+ # },
221
+ # },
222
+ # ],
223
+ # },
224
+ # },
225
+ # ],
226
+ # job_flow_id: "XmlStringMaxLen256", # required
227
+ # })
228
+ #
229
+ # @example Response structure
230
+ # resp.job_flow_id #=> String
231
+ # resp.instance_group_ids #=> Array
232
+ # resp.instance_group_ids[0] #=> String
233
+ # @overload add_instance_groups(params = {})
234
+ # @param [Hash] params ({})
235
+ def add_instance_groups(params = {}, options = {})
236
+ req = build_request(:add_instance_groups, params)
237
+ req.send_request(options)
238
+ end
239
+
240
+ # AddJobFlowSteps adds new steps to a running job flow. A maximum of 256
241
+ # steps are allowed in each job flow.
242
+ #
243
+ # If your job flow is long-running (such as a Hive data warehouse) or
244
+ # complex, you may require more than 256 steps to process your data. You
245
+ # can bypass the 256-step limitation in various ways, including using
246
+ # the SSH shell to connect to the master node and submitting queries
247
+ # directly to the software running on the master node, such as Hive and
248
+ # Hadoop. For more information on how to do this, see [Add More than 256
249
+ # Steps to a Job Flow][1] in the *Amazon EMR Developer's Guide*.
250
+ #
251
+ # A step specifies the location of a JAR file stored either on the
252
+ # master node of the job flow or in Amazon S3. Each step is performed by
253
+ # the main function of the main class of the JAR file. The main class
254
+ # can be specified either in the manifest of the JAR or by using the
255
+ # MainFunction parameter of the step.
256
+ #
257
+ # Amazon EMR executes each step in the order listed. For a step to be
258
+ # considered complete, the main function must exit with a zero exit code
259
+ # and all Hadoop jobs started while the step was running must have
260
+ # completed and run successfully.
261
+ #
262
+ # You can only add steps to a job flow that is in one of the following
263
+ # states: STARTING, BOOTSTRAPPING, RUNNING, or WAITING.
264
+ #
265
+ #
266
+ #
267
+ # [1]: http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/AddMoreThan256Steps.html
268
+ # @option params [required, String] :job_flow_id
269
+ # A string that uniquely identifies the job flow. This identifier is
270
+ # returned by RunJobFlow and can also be obtained from ListClusters.
271
+ # @option params [required, Array<Types::StepConfig>] :steps
272
+ # A list of StepConfig to be executed by the job flow.
273
+ # @return [Types::AddJobFlowStepsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
274
+ #
275
+ # * {Types::AddJobFlowStepsOutput#step_ids #StepIds} => Array&lt;String&gt;
276
+ #
277
+ # @example Request syntax with placeholder values
278
+ # resp = client.add_job_flow_steps({
279
+ # job_flow_id: "XmlStringMaxLen256", # required
280
+ # steps: [ # required
281
+ # {
282
+ # name: "XmlStringMaxLen256", # required
283
+ # action_on_failure: "TERMINATE_JOB_FLOW", # accepts TERMINATE_JOB_FLOW, TERMINATE_CLUSTER, CANCEL_AND_WAIT, CONTINUE
284
+ # hadoop_jar_step: { # required
285
+ # properties: [
286
+ # {
287
+ # key: "XmlString",
288
+ # value: "XmlString",
289
+ # },
290
+ # ],
291
+ # jar: "XmlString", # required
292
+ # main_class: "XmlString",
293
+ # args: ["XmlString"],
294
+ # },
295
+ # },
296
+ # ],
297
+ # })
298
+ #
299
+ # @example Response structure
300
+ # resp.step_ids #=> Array
301
+ # resp.step_ids[0] #=> String
302
+ # @overload add_job_flow_steps(params = {})
303
+ # @param [Hash] params ({})
304
+ def add_job_flow_steps(params = {}, options = {})
305
+ req = build_request(:add_job_flow_steps, params)
306
+ req.send_request(options)
307
+ end
308
+
309
+ # Adds tags to an Amazon EMR resource. Tags make it easier to associate
310
+ # clusters in various ways, such as grouping clusters to track your
311
+ # Amazon EMR resource allocation costs. For more information, see
312
+ # [Tagging Amazon EMR Resources][1].
313
+ #
314
+ #
315
+ #
316
+ # [1]: http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-plan-tags.html
317
+ # @option params [required, String] :resource_id
318
+ # The Amazon EMR resource identifier to which tags will be added. This
319
+ # value must be a cluster identifier.
320
+ # @option params [required, Array<Types::Tag>] :tags
321
+ # A list of tags to associate with a cluster and propagate to EC2
322
+ # instances. Tags are user-defined key/value pairs that consist of a
323
+ # required key string with a maximum of 128 characters, and an optional
324
+ # value string with a maximum of 256 characters.
325
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
326
+ #
327
+ # @example Request syntax with placeholder values
328
+ # resp = client.add_tags({
329
+ # resource_id: "ResourceId", # required
330
+ # tags: [ # required
331
+ # {
332
+ # key: "String",
333
+ # value: "String",
334
+ # },
335
+ # ],
336
+ # })
337
+ # @overload add_tags(params = {})
338
+ # @param [Hash] params ({})
339
+ def add_tags(params = {}, options = {})
340
+ req = build_request(:add_tags, params)
341
+ req.send_request(options)
342
+ end
343
+
344
+ # Cancels a pending step or steps in a running cluster. Available only
345
+ # in Amazon EMR versions 4.8.0 and later, excluding version 5.0.0. A
346
+ # maximum of 256 steps are allowed in each CancelSteps request.
347
+ # CancelSteps is idempotent but asynchronous; it does not guarantee a
348
+ # step will be canceled, even if the request is successfully submitted.
349
+ # You can only cancel steps that are in a `PENDING` state.
350
+ # @option params [String] :cluster_id
351
+ # The `ClusterID` for which specified steps will be canceled. Use
352
+ # RunJobFlow and ListClusters to get ClusterIDs.
353
+ # @option params [Array<String>] :step_ids
354
+ # The list of `StepIDs` to cancel. Use ListSteps to get steps and their
355
+ # states for the specified cluster.
356
+ # @return [Types::CancelStepsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
357
+ #
358
+ # * {Types::CancelStepsOutput#cancel_steps_info_list #CancelStepsInfoList} => Array&lt;Types::CancelStepsInfo&gt;
359
+ #
360
+ # @example Request syntax with placeholder values
361
+ # resp = client.cancel_steps({
362
+ # cluster_id: "XmlStringMaxLen256",
363
+ # step_ids: ["XmlStringMaxLen256"],
364
+ # })
365
+ #
366
+ # @example Response structure
367
+ # resp.cancel_steps_info_list #=> Array
368
+ # resp.cancel_steps_info_list[0].step_id #=> String
369
+ # resp.cancel_steps_info_list[0].status #=> String, one of "SUBMITTED", "FAILED"
370
+ # resp.cancel_steps_info_list[0].reason #=> String
371
+ # @overload cancel_steps(params = {})
372
+ # @param [Hash] params ({})
373
+ def cancel_steps(params = {}, options = {})
374
+ req = build_request(:cancel_steps, params)
375
+ req.send_request(options)
376
+ end
377
+
378
+ # Creates a security configuration, which is stored in the service and
379
+ # can be specified when a cluster is created.
380
+ # @option params [required, String] :name
381
+ # The name of the security configuration.
382
+ # @option params [required, String] :security_configuration
383
+ # The security configuration details in JSON format.
384
+ # @return [Types::CreateSecurityConfigurationOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
385
+ #
386
+ # * {Types::CreateSecurityConfigurationOutput#name #Name} => String
387
+ # * {Types::CreateSecurityConfigurationOutput#creation_date_time #CreationDateTime} => Time
388
+ #
389
+ # @example Request syntax with placeholder values
390
+ # resp = client.create_security_configuration({
391
+ # name: "XmlString", # required
392
+ # security_configuration: "String", # required
393
+ # })
394
+ #
395
+ # @example Response structure
396
+ # resp.name #=> String
397
+ # resp.creation_date_time #=> Time
398
+ # @overload create_security_configuration(params = {})
399
+ # @param [Hash] params ({})
400
+ def create_security_configuration(params = {}, options = {})
401
+ req = build_request(:create_security_configuration, params)
402
+ req.send_request(options)
403
+ end
404
+
405
+ # Deletes a security configuration.
406
+ # @option params [required, String] :name
407
+ # The name of the security configuration.
408
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
409
+ #
410
+ # @example Request syntax with placeholder values
411
+ # resp = client.delete_security_configuration({
412
+ # name: "XmlString", # required
413
+ # })
414
+ # @overload delete_security_configuration(params = {})
415
+ # @param [Hash] params ({})
416
+ def delete_security_configuration(params = {}, options = {})
417
+ req = build_request(:delete_security_configuration, params)
418
+ req.send_request(options)
419
+ end
420
+
421
+ # Provides cluster-level details including status, hardware and software
422
+ # configuration, VPC settings, and so on. For information about the
423
+ # cluster steps, see ListSteps.
424
+ # @option params [required, String] :cluster_id
425
+ # The identifier of the cluster to describe.
426
+ # @return [Types::DescribeClusterOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
427
+ #
428
+ # * {Types::DescribeClusterOutput#cluster #Cluster} => Types::Cluster
429
+ #
430
+ # @example Request syntax with placeholder values
431
+ # resp = client.describe_cluster({
432
+ # cluster_id: "ClusterId", # required
433
+ # })
434
+ #
435
+ # @example Response structure
436
+ # resp.cluster.id #=> String
437
+ # resp.cluster.name #=> String
438
+ # resp.cluster.status.state #=> String, one of "STARTING", "BOOTSTRAPPING", "RUNNING", "WAITING", "TERMINATING", "TERMINATED", "TERMINATED_WITH_ERRORS"
439
+ # resp.cluster.status.state_change_reason.code #=> String, one of "INTERNAL_ERROR", "VALIDATION_ERROR", "INSTANCE_FAILURE", "BOOTSTRAP_FAILURE", "USER_REQUEST", "STEP_FAILURE", "ALL_STEPS_COMPLETED"
440
+ # resp.cluster.status.state_change_reason.message #=> String
441
+ # resp.cluster.status.timeline.creation_date_time #=> Time
442
+ # resp.cluster.status.timeline.ready_date_time #=> Time
443
+ # resp.cluster.status.timeline.end_date_time #=> Time
444
+ # resp.cluster.ec2_instance_attributes.ec2_key_name #=> String
445
+ # resp.cluster.ec2_instance_attributes.ec2_subnet_id #=> String
446
+ # resp.cluster.ec2_instance_attributes.ec2_availability_zone #=> String
447
+ # resp.cluster.ec2_instance_attributes.iam_instance_profile #=> String
448
+ # resp.cluster.ec2_instance_attributes.emr_managed_master_security_group #=> String
449
+ # resp.cluster.ec2_instance_attributes.emr_managed_slave_security_group #=> String
450
+ # resp.cluster.ec2_instance_attributes.service_access_security_group #=> String
451
+ # resp.cluster.ec2_instance_attributes.additional_master_security_groups #=> Array
452
+ # resp.cluster.ec2_instance_attributes.additional_master_security_groups[0] #=> String
453
+ # resp.cluster.ec2_instance_attributes.additional_slave_security_groups #=> Array
454
+ # resp.cluster.ec2_instance_attributes.additional_slave_security_groups[0] #=> String
455
+ # resp.cluster.log_uri #=> String
456
+ # resp.cluster.requested_ami_version #=> String
457
+ # resp.cluster.running_ami_version #=> String
458
+ # resp.cluster.release_label #=> String
459
+ # resp.cluster.auto_terminate #=> Boolean
460
+ # resp.cluster.termination_protected #=> Boolean
461
+ # resp.cluster.visible_to_all_users #=> Boolean
462
+ # resp.cluster.applications #=> Array
463
+ # resp.cluster.applications[0].name #=> String
464
+ # resp.cluster.applications[0].version #=> String
465
+ # resp.cluster.applications[0].args #=> Array
466
+ # resp.cluster.applications[0].args[0] #=> String
467
+ # resp.cluster.applications[0].additional_info #=> Hash
468
+ # resp.cluster.applications[0].additional_info["String"] #=> String
469
+ # resp.cluster.tags #=> Array
470
+ # resp.cluster.tags[0].key #=> String
471
+ # resp.cluster.tags[0].value #=> String
472
+ # resp.cluster.service_role #=> String
473
+ # resp.cluster.normalized_instance_hours #=> Integer
474
+ # resp.cluster.master_public_dns_name #=> String
475
+ # resp.cluster.configurations #=> Array
476
+ # resp.cluster.configurations[0].classification #=> String
477
+ # resp.cluster.configurations[0].configurations #=> Types::ConfigurationList
478
+ # resp.cluster.configurations[0].properties #=> Hash
479
+ # resp.cluster.configurations[0].properties["String"] #=> String
480
+ # resp.cluster.security_configuration #=> String
481
+ # resp.cluster.auto_scaling_role #=> String
482
+ # resp.cluster.scale_down_behavior #=> String, one of "TERMINATE_AT_INSTANCE_HOUR", "TERMINATE_AT_TASK_COMPLETION"
483
+ # @overload describe_cluster(params = {})
484
+ # @param [Hash] params ({})
485
+ def describe_cluster(params = {}, options = {})
486
+ req = build_request(:describe_cluster, params)
487
+ req.send_request(options)
488
+ end
489
+
490
+ # This API is deprecated and will eventually be removed. We recommend
491
+ # you use ListClusters, DescribeCluster, ListSteps, ListInstanceGroups
492
+ # and ListBootstrapActions instead.
493
+ #
494
+ # DescribeJobFlows returns a list of job flows that match all of the
495
+ # supplied parameters. The parameters can include a list of job flow
496
+ # IDs, job flow states, and restrictions on job flow creation date and
497
+ # time.
498
+ #
499
+ # Regardless of supplied parameters, only job flows created within the
500
+ # last two months are returned.
501
+ #
502
+ # If no parameters are supplied, then job flows matching either of the
503
+ # following criteria are returned:
504
+ #
505
+ # * Job flows created and completed in the last two weeks
506
+ #
507
+ # * Job flows created within the last two months that are in one of the
508
+ # following states: `RUNNING`, `WAITING`, `SHUTTING_DOWN`, `STARTING`
509
+ #
510
+ # Amazon EMR can return a maximum of 512 job flow descriptions.
511
+ # @option params [Time,DateTime,Date,Integer,String] :created_after
512
+ # Return only job flows created after this date and time.
513
+ # @option params [Time,DateTime,Date,Integer,String] :created_before
514
+ # Return only job flows created before this date and time.
515
+ # @option params [Array<String>] :job_flow_ids
516
+ # Return only job flows whose job flow ID is contained in this list.
517
+ # @option params [Array<String>] :job_flow_states
518
+ # Return only job flows whose state is contained in this list.
519
+ # @return [Types::DescribeJobFlowsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
520
+ #
521
+ # * {Types::DescribeJobFlowsOutput#job_flows #JobFlows} => Array&lt;Types::JobFlowDetail&gt;
522
+ #
523
+ # @example Request syntax with placeholder values
524
+ # resp = client.describe_job_flows({
525
+ # created_after: Time.now,
526
+ # created_before: Time.now,
527
+ # job_flow_ids: ["XmlString"],
528
+ # job_flow_states: ["STARTING"], # accepts STARTING, BOOTSTRAPPING, RUNNING, WAITING, SHUTTING_DOWN, TERMINATED, COMPLETED, FAILED
529
+ # })
530
+ #
531
+ # @example Response structure
532
+ # resp.job_flows #=> Array
533
+ # resp.job_flows[0].job_flow_id #=> String
534
+ # resp.job_flows[0].name #=> String
535
+ # resp.job_flows[0].log_uri #=> String
536
+ # resp.job_flows[0].ami_version #=> String
537
+ # resp.job_flows[0].execution_status_detail.state #=> String, one of "STARTING", "BOOTSTRAPPING", "RUNNING", "WAITING", "SHUTTING_DOWN", "TERMINATED", "COMPLETED", "FAILED"
538
+ # resp.job_flows[0].execution_status_detail.creation_date_time #=> Time
539
+ # resp.job_flows[0].execution_status_detail.start_date_time #=> Time
540
+ # resp.job_flows[0].execution_status_detail.ready_date_time #=> Time
541
+ # resp.job_flows[0].execution_status_detail.end_date_time #=> Time
542
+ # resp.job_flows[0].execution_status_detail.last_state_change_reason #=> String
543
+ # resp.job_flows[0].instances.master_instance_type #=> String
544
+ # resp.job_flows[0].instances.master_public_dns_name #=> String
545
+ # resp.job_flows[0].instances.master_instance_id #=> String
546
+ # resp.job_flows[0].instances.slave_instance_type #=> String
547
+ # resp.job_flows[0].instances.instance_count #=> Integer
548
+ # resp.job_flows[0].instances.instance_groups #=> Array
549
+ # resp.job_flows[0].instances.instance_groups[0].instance_group_id #=> String
550
+ # resp.job_flows[0].instances.instance_groups[0].name #=> String
551
+ # resp.job_flows[0].instances.instance_groups[0].market #=> String, one of "ON_DEMAND", "SPOT"
552
+ # resp.job_flows[0].instances.instance_groups[0].instance_role #=> String, one of "MASTER", "CORE", "TASK"
553
+ # resp.job_flows[0].instances.instance_groups[0].bid_price #=> String
554
+ # resp.job_flows[0].instances.instance_groups[0].instance_type #=> String
555
+ # resp.job_flows[0].instances.instance_groups[0].instance_request_count #=> Integer
556
+ # resp.job_flows[0].instances.instance_groups[0].instance_running_count #=> Integer
557
+ # resp.job_flows[0].instances.instance_groups[0].state #=> String, one of "PROVISIONING", "BOOTSTRAPPING", "RUNNING", "RESIZING", "SUSPENDED", "TERMINATING", "TERMINATED", "ARRESTED", "SHUTTING_DOWN", "ENDED"
558
+ # resp.job_flows[0].instances.instance_groups[0].last_state_change_reason #=> String
559
+ # resp.job_flows[0].instances.instance_groups[0].creation_date_time #=> Time
560
+ # resp.job_flows[0].instances.instance_groups[0].start_date_time #=> Time
561
+ # resp.job_flows[0].instances.instance_groups[0].ready_date_time #=> Time
562
+ # resp.job_flows[0].instances.instance_groups[0].end_date_time #=> Time
563
+ # resp.job_flows[0].instances.normalized_instance_hours #=> Integer
564
+ # resp.job_flows[0].instances.ec2_key_name #=> String
565
+ # resp.job_flows[0].instances.ec2_subnet_id #=> String
566
+ # resp.job_flows[0].instances.placement.availability_zone #=> String
567
+ # resp.job_flows[0].instances.keep_job_flow_alive_when_no_steps #=> Boolean
568
+ # resp.job_flows[0].instances.termination_protected #=> Boolean
569
+ # resp.job_flows[0].instances.hadoop_version #=> String
570
+ # resp.job_flows[0].steps #=> Array
571
+ # resp.job_flows[0].steps[0].step_config.name #=> String
572
+ # resp.job_flows[0].steps[0].step_config.action_on_failure #=> String, one of "TERMINATE_JOB_FLOW", "TERMINATE_CLUSTER", "CANCEL_AND_WAIT", "CONTINUE"
573
+ # resp.job_flows[0].steps[0].step_config.hadoop_jar_step.properties #=> Array
574
+ # resp.job_flows[0].steps[0].step_config.hadoop_jar_step.properties[0].key #=> String
575
+ # resp.job_flows[0].steps[0].step_config.hadoop_jar_step.properties[0].value #=> String
576
+ # resp.job_flows[0].steps[0].step_config.hadoop_jar_step.jar #=> String
577
+ # resp.job_flows[0].steps[0].step_config.hadoop_jar_step.main_class #=> String
578
+ # resp.job_flows[0].steps[0].step_config.hadoop_jar_step.args #=> Array
579
+ # resp.job_flows[0].steps[0].step_config.hadoop_jar_step.args[0] #=> String
580
+ # resp.job_flows[0].steps[0].execution_status_detail.state #=> String, one of "PENDING", "RUNNING", "CONTINUE", "COMPLETED", "CANCELLED", "FAILED", "INTERRUPTED"
581
+ # resp.job_flows[0].steps[0].execution_status_detail.creation_date_time #=> Time
582
+ # resp.job_flows[0].steps[0].execution_status_detail.start_date_time #=> Time
583
+ # resp.job_flows[0].steps[0].execution_status_detail.end_date_time #=> Time
584
+ # resp.job_flows[0].steps[0].execution_status_detail.last_state_change_reason #=> String
585
+ # resp.job_flows[0].bootstrap_actions #=> Array
586
+ # resp.job_flows[0].bootstrap_actions[0].bootstrap_action_config.name #=> String
587
+ # resp.job_flows[0].bootstrap_actions[0].bootstrap_action_config.script_bootstrap_action.path #=> String
588
+ # resp.job_flows[0].bootstrap_actions[0].bootstrap_action_config.script_bootstrap_action.args #=> Array
589
+ # resp.job_flows[0].bootstrap_actions[0].bootstrap_action_config.script_bootstrap_action.args[0] #=> String
590
+ # resp.job_flows[0].supported_products #=> Array
591
+ # resp.job_flows[0].supported_products[0] #=> String
592
+ # resp.job_flows[0].visible_to_all_users #=> Boolean
593
+ # resp.job_flows[0].job_flow_role #=> String
594
+ # resp.job_flows[0].service_role #=> String
595
+ # resp.job_flows[0].auto_scaling_role #=> String
596
+ # resp.job_flows[0].scale_down_behavior #=> String, one of "TERMINATE_AT_INSTANCE_HOUR", "TERMINATE_AT_TASK_COMPLETION"
597
+ # @overload describe_job_flows(params = {})
598
+ # @param [Hash] params ({})
599
+ def describe_job_flows(params = {}, options = {})
600
+ req = build_request(:describe_job_flows, params)
601
+ req.send_request(options)
602
+ end
603
+
604
+ # Provides the details of a security configuration by returning the
605
+ # configuration JSON.
606
+ # @option params [required, String] :name
607
+ # The name of the security configuration.
608
+ # @return [Types::DescribeSecurityConfigurationOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
609
+ #
610
+ # * {Types::DescribeSecurityConfigurationOutput#name #Name} => String
611
+ # * {Types::DescribeSecurityConfigurationOutput#security_configuration #SecurityConfiguration} => String
612
+ # * {Types::DescribeSecurityConfigurationOutput#creation_date_time #CreationDateTime} => Time
613
+ #
614
+ # @example Request syntax with placeholder values
615
+ # resp = client.describe_security_configuration({
616
+ # name: "XmlString", # required
617
+ # })
618
+ #
619
+ # @example Response structure
620
+ # resp.name #=> String
621
+ # resp.security_configuration #=> String
622
+ # resp.creation_date_time #=> Time
623
+ # @overload describe_security_configuration(params = {})
624
+ # @param [Hash] params ({})
625
+ def describe_security_configuration(params = {}, options = {})
626
+ req = build_request(:describe_security_configuration, params)
627
+ req.send_request(options)
628
+ end
629
+
630
+ # Provides more detail about the cluster step.
631
+ # @option params [required, String] :cluster_id
632
+ # The identifier of the cluster with steps to describe.
633
+ # @option params [required, String] :step_id
634
+ # The identifier of the step to describe.
635
+ # @return [Types::DescribeStepOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
636
+ #
637
+ # * {Types::DescribeStepOutput#step #Step} => Types::Step
638
+ #
639
+ # @example Request syntax with placeholder values
640
+ # resp = client.describe_step({
641
+ # cluster_id: "ClusterId", # required
642
+ # step_id: "StepId", # required
643
+ # })
644
+ #
645
+ # @example Response structure
646
+ # resp.step.id #=> String
647
+ # resp.step.name #=> String
648
+ # resp.step.config.jar #=> String
649
+ # resp.step.config.properties #=> Hash
650
+ # resp.step.config.properties["String"] #=> String
651
+ # resp.step.config.main_class #=> String
652
+ # resp.step.config.args #=> Array
653
+ # resp.step.config.args[0] #=> String
654
+ # resp.step.action_on_failure #=> String, one of "TERMINATE_JOB_FLOW", "TERMINATE_CLUSTER", "CANCEL_AND_WAIT", "CONTINUE"
655
+ # resp.step.status.state #=> String, one of "PENDING", "CANCEL_PENDING", "RUNNING", "COMPLETED", "CANCELLED", "FAILED", "INTERRUPTED"
656
+ # resp.step.status.state_change_reason.code #=> String, one of "NONE"
657
+ # resp.step.status.state_change_reason.message #=> String
658
+ # resp.step.status.failure_details.reason #=> String
659
+ # resp.step.status.failure_details.message #=> String
660
+ # resp.step.status.failure_details.log_file #=> String
661
+ # resp.step.status.timeline.creation_date_time #=> Time
662
+ # resp.step.status.timeline.start_date_time #=> Time
663
+ # resp.step.status.timeline.end_date_time #=> Time
664
+ # @overload describe_step(params = {})
665
+ # @param [Hash] params ({})
666
+ def describe_step(params = {}, options = {})
667
+ req = build_request(:describe_step, params)
668
+ req.send_request(options)
669
+ end
670
+
671
+ # Provides information about the bootstrap actions associated with a
672
+ # cluster.
673
+ # @option params [required, String] :cluster_id
674
+ # The cluster identifier for the bootstrap actions to list.
675
+ # @option params [String] :marker
676
+ # The pagination token that indicates the next set of results to
677
+ # retrieve.
678
+ # @return [Types::ListBootstrapActionsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
679
+ #
680
+ # * {Types::ListBootstrapActionsOutput#bootstrap_actions #BootstrapActions} => Array&lt;Types::Command&gt;
681
+ # * {Types::ListBootstrapActionsOutput#marker #Marker} => String
682
+ #
683
+ # @example Request syntax with placeholder values
684
+ # resp = client.list_bootstrap_actions({
685
+ # cluster_id: "ClusterId", # required
686
+ # marker: "Marker",
687
+ # })
688
+ #
689
+ # @example Response structure
690
+ # resp.bootstrap_actions #=> Array
691
+ # resp.bootstrap_actions[0].name #=> String
692
+ # resp.bootstrap_actions[0].script_path #=> String
693
+ # resp.bootstrap_actions[0].args #=> Array
694
+ # resp.bootstrap_actions[0].args[0] #=> String
695
+ # resp.marker #=> String
696
+ # @overload list_bootstrap_actions(params = {})
697
+ # @param [Hash] params ({})
698
+ def list_bootstrap_actions(params = {}, options = {})
699
+ req = build_request(:list_bootstrap_actions, params)
700
+ req.send_request(options)
701
+ end
702
+
703
+ # Provides the status of all clusters visible to this AWS account.
704
+ # Allows you to filter the list of clusters based on certain criteria;
705
+ # for example, filtering by cluster creation date and time or by status.
706
+ # This call returns a maximum of 50 clusters per call, but returns a
707
+ # marker to track the paging of the cluster list across multiple
708
+ # ListClusters calls.
709
+ # @option params [Time,DateTime,Date,Integer,String] :created_after
710
+ # The creation date and time beginning value filter for listing
711
+ # clusters.
712
+ # @option params [Time,DateTime,Date,Integer,String] :created_before
713
+ # The creation date and time end value filter for listing clusters.
714
+ # @option params [Array<String>] :cluster_states
715
+ # The cluster state filters to apply when listing clusters.
716
+ # @option params [String] :marker
717
+ # The pagination token that indicates the next set of results to
718
+ # retrieve.
719
+ # @return [Types::ListClustersOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
720
+ #
721
+ # * {Types::ListClustersOutput#clusters #Clusters} => Array&lt;Types::ClusterSummary&gt;
722
+ # * {Types::ListClustersOutput#marker #Marker} => String
723
+ #
724
+ # @example Request syntax with placeholder values
725
+ # resp = client.list_clusters({
726
+ # created_after: Time.now,
727
+ # created_before: Time.now,
728
+ # cluster_states: ["STARTING"], # accepts STARTING, BOOTSTRAPPING, RUNNING, WAITING, TERMINATING, TERMINATED, TERMINATED_WITH_ERRORS
729
+ # marker: "Marker",
730
+ # })
731
+ #
732
+ # @example Response structure
733
+ # resp.clusters #=> Array
734
+ # resp.clusters[0].id #=> String
735
+ # resp.clusters[0].name #=> String
736
+ # resp.clusters[0].status.state #=> String, one of "STARTING", "BOOTSTRAPPING", "RUNNING", "WAITING", "TERMINATING", "TERMINATED", "TERMINATED_WITH_ERRORS"
737
+ # resp.clusters[0].status.state_change_reason.code #=> String, one of "INTERNAL_ERROR", "VALIDATION_ERROR", "INSTANCE_FAILURE", "BOOTSTRAP_FAILURE", "USER_REQUEST", "STEP_FAILURE", "ALL_STEPS_COMPLETED"
738
+ # resp.clusters[0].status.state_change_reason.message #=> String
739
+ # resp.clusters[0].status.timeline.creation_date_time #=> Time
740
+ # resp.clusters[0].status.timeline.ready_date_time #=> Time
741
+ # resp.clusters[0].status.timeline.end_date_time #=> Time
742
+ # resp.clusters[0].normalized_instance_hours #=> Integer
743
+ # resp.marker #=> String
744
+ # @overload list_clusters(params = {})
745
+ # @param [Hash] params ({})
746
+ def list_clusters(params = {}, options = {})
747
+ req = build_request(:list_clusters, params)
748
+ req.send_request(options)
749
+ end
750
+
751
+ # Provides all available details about the instance groups in a cluster.
752
+ # @option params [required, String] :cluster_id
753
+ # The identifier of the cluster for which to list the instance groups.
754
+ # @option params [String] :marker
755
+ # The pagination token that indicates the next set of results to
756
+ # retrieve.
757
+ # @return [Types::ListInstanceGroupsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
758
+ #
759
+ # * {Types::ListInstanceGroupsOutput#instance_groups #InstanceGroups} => Array&lt;Types::InstanceGroup&gt;
760
+ # * {Types::ListInstanceGroupsOutput#marker #Marker} => String
761
+ #
762
+ # @example Request syntax with placeholder values
763
+ # resp = client.list_instance_groups({
764
+ # cluster_id: "ClusterId", # required
765
+ # marker: "Marker",
766
+ # })
767
+ #
768
+ # @example Response structure
769
+ # resp.instance_groups #=> Array
770
+ # resp.instance_groups[0].id #=> String
771
+ # resp.instance_groups[0].name #=> String
772
+ # resp.instance_groups[0].market #=> String, one of "ON_DEMAND", "SPOT"
773
+ # resp.instance_groups[0].instance_group_type #=> String, one of "MASTER", "CORE", "TASK"
774
+ # resp.instance_groups[0].bid_price #=> String
775
+ # resp.instance_groups[0].instance_type #=> String
776
+ # resp.instance_groups[0].requested_instance_count #=> Integer
777
+ # resp.instance_groups[0].running_instance_count #=> Integer
778
+ # resp.instance_groups[0].status.state #=> String, one of "PROVISIONING", "BOOTSTRAPPING", "RUNNING", "RESIZING", "SUSPENDED", "TERMINATING", "TERMINATED", "ARRESTED", "SHUTTING_DOWN", "ENDED"
779
+ # resp.instance_groups[0].status.state_change_reason.code #=> String, one of "INTERNAL_ERROR", "VALIDATION_ERROR", "INSTANCE_FAILURE", "CLUSTER_TERMINATED"
780
+ # resp.instance_groups[0].status.state_change_reason.message #=> String
781
+ # resp.instance_groups[0].status.timeline.creation_date_time #=> Time
782
+ # resp.instance_groups[0].status.timeline.ready_date_time #=> Time
783
+ # resp.instance_groups[0].status.timeline.end_date_time #=> Time
784
+ # resp.instance_groups[0].configurations #=> Array
785
+ # resp.instance_groups[0].configurations[0].classification #=> String
786
+ # resp.instance_groups[0].configurations[0].configurations #=> Types::ConfigurationList
787
+ # resp.instance_groups[0].configurations[0].properties #=> Hash
788
+ # resp.instance_groups[0].configurations[0].properties["String"] #=> String
789
+ # resp.instance_groups[0].ebs_block_devices #=> Array
790
+ # resp.instance_groups[0].ebs_block_devices[0].volume_specification.volume_type #=> String
791
+ # resp.instance_groups[0].ebs_block_devices[0].volume_specification.iops #=> Integer
792
+ # resp.instance_groups[0].ebs_block_devices[0].volume_specification.size_in_gb #=> Integer
793
+ # resp.instance_groups[0].ebs_block_devices[0].device #=> String
794
+ # resp.instance_groups[0].ebs_optimized #=> Boolean
795
+ # resp.instance_groups[0].shrink_policy.decommission_timeout #=> Integer
796
+ # resp.instance_groups[0].shrink_policy.instance_resize_policy.instances_to_terminate #=> Array
797
+ # resp.instance_groups[0].shrink_policy.instance_resize_policy.instances_to_terminate[0] #=> String
798
+ # resp.instance_groups[0].shrink_policy.instance_resize_policy.instances_to_protect #=> Array
799
+ # resp.instance_groups[0].shrink_policy.instance_resize_policy.instances_to_protect[0] #=> String
800
+ # resp.instance_groups[0].shrink_policy.instance_resize_policy.instance_termination_timeout #=> Integer
801
+ # resp.instance_groups[0].auto_scaling_policy.status.state #=> String, one of "PENDING", "ATTACHING", "ATTACHED", "DETACHING", "DETACHED", "FAILED"
802
+ # resp.instance_groups[0].auto_scaling_policy.status.state_change_reason.code #=> String, one of "USER_REQUEST", "PROVISION_FAILURE", "CLEANUP_FAILURE"
803
+ # resp.instance_groups[0].auto_scaling_policy.status.state_change_reason.message #=> String
804
+ # resp.instance_groups[0].auto_scaling_policy.constraints.min_capacity #=> Integer
805
+ # resp.instance_groups[0].auto_scaling_policy.constraints.max_capacity #=> Integer
806
+ # resp.instance_groups[0].auto_scaling_policy.rules #=> Array
807
+ # resp.instance_groups[0].auto_scaling_policy.rules[0].name #=> String
808
+ # resp.instance_groups[0].auto_scaling_policy.rules[0].description #=> String
809
+ # resp.instance_groups[0].auto_scaling_policy.rules[0].action.market #=> String, one of "ON_DEMAND", "SPOT"
810
+ # resp.instance_groups[0].auto_scaling_policy.rules[0].action.simple_scaling_policy_configuration.adjustment_type #=> String, one of "CHANGE_IN_CAPACITY", "PERCENT_CHANGE_IN_CAPACITY", "EXACT_CAPACITY"
811
+ # resp.instance_groups[0].auto_scaling_policy.rules[0].action.simple_scaling_policy_configuration.scaling_adjustment #=> Integer
812
+ # resp.instance_groups[0].auto_scaling_policy.rules[0].action.simple_scaling_policy_configuration.cool_down #=> Integer
813
+ # resp.instance_groups[0].auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.comparison_operator #=> String, one of "GREATER_THAN_OR_EQUAL", "GREATER_THAN", "LESS_THAN", "LESS_THAN_OR_EQUAL"
814
+ # resp.instance_groups[0].auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.evaluation_periods #=> Integer
815
+ # resp.instance_groups[0].auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.metric_name #=> String
816
+ # resp.instance_groups[0].auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.namespace #=> String
817
+ # resp.instance_groups[0].auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.period #=> Integer
818
+ # resp.instance_groups[0].auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.statistic #=> String, one of "SAMPLE_COUNT", "AVERAGE", "SUM", "MINIMUM", "MAXIMUM"
819
+ # resp.instance_groups[0].auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.threshold #=> Float
820
+ # resp.instance_groups[0].auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.unit #=> String, one of "NONE", "SECONDS", "MICRO_SECONDS", "MILLI_SECONDS", "BYTES", "KILO_BYTES", "MEGA_BYTES", "GIGA_BYTES", "TERA_BYTES", "BITS", "KILO_BITS", "MEGA_BITS", "GIGA_BITS", "TERA_BITS", "PERCENT", "COUNT", "BYTES_PER_SECOND", "KILO_BYTES_PER_SECOND", "MEGA_BYTES_PER_SECOND", "GIGA_BYTES_PER_SECOND", "TERA_BYTES_PER_SECOND", "BITS_PER_SECOND", "KILO_BITS_PER_SECOND", "MEGA_BITS_PER_SECOND", "GIGA_BITS_PER_SECOND", "TERA_BITS_PER_SECOND", "COUNT_PER_SECOND"
821
+ # resp.instance_groups[0].auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.dimensions #=> Array
822
+ # resp.instance_groups[0].auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.dimensions[0].key #=> String
823
+ # resp.instance_groups[0].auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.dimensions[0].value #=> String
824
+ # resp.marker #=> String
825
+ # @overload list_instance_groups(params = {})
826
+ # @param [Hash] params ({})
827
+ def list_instance_groups(params = {}, options = {})
828
+ req = build_request(:list_instance_groups, params)
829
+ req.send_request(options)
830
+ end
831
+
832
+ # Provides information about the cluster instances that Amazon EMR
833
+ # provisions on behalf of a user when it creates the cluster. For
834
+ # example, this operation indicates when the EC2 instances reach the
835
+ # Ready state, when instances become available to Amazon EMR to use for
836
+ # jobs, and the IP addresses for cluster instances, etc.
837
+ # @option params [required, String] :cluster_id
838
+ # The identifier of the cluster for which to list the instances.
839
+ # @option params [String] :instance_group_id
840
+ # The identifier of the instance group for which to list the instances.
841
+ # @option params [Array<String>] :instance_group_types
842
+ # The type of instance group for which to list the instances.
843
+ # @option params [Array<String>] :instance_states
844
+ # A list of instance states that will filter the instances returned with
845
+ # this request.
846
+ # @option params [String] :marker
847
+ # The pagination token that indicates the next set of results to
848
+ # retrieve.
849
+ # @return [Types::ListInstancesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
850
+ #
851
+ # * {Types::ListInstancesOutput#instances #Instances} => Array&lt;Types::Instance&gt;
852
+ # * {Types::ListInstancesOutput#marker #Marker} => String
853
+ #
854
+ # @example Request syntax with placeholder values
855
+ # resp = client.list_instances({
856
+ # cluster_id: "ClusterId", # required
857
+ # instance_group_id: "InstanceGroupId",
858
+ # instance_group_types: ["MASTER"], # accepts MASTER, CORE, TASK
859
+ # instance_states: ["AWAITING_FULFILLMENT"], # accepts AWAITING_FULFILLMENT, PROVISIONING, BOOTSTRAPPING, RUNNING, TERMINATED
860
+ # marker: "Marker",
861
+ # })
862
+ #
863
+ # @example Response structure
864
+ # resp.instances #=> Array
865
+ # resp.instances[0].id #=> String
866
+ # resp.instances[0].ec2_instance_id #=> String
867
+ # resp.instances[0].public_dns_name #=> String
868
+ # resp.instances[0].public_ip_address #=> String
869
+ # resp.instances[0].private_dns_name #=> String
870
+ # resp.instances[0].private_ip_address #=> String
871
+ # resp.instances[0].status.state #=> String, one of "AWAITING_FULFILLMENT", "PROVISIONING", "BOOTSTRAPPING", "RUNNING", "TERMINATED"
872
+ # resp.instances[0].status.state_change_reason.code #=> String, one of "INTERNAL_ERROR", "VALIDATION_ERROR", "INSTANCE_FAILURE", "BOOTSTRAP_FAILURE", "CLUSTER_TERMINATED"
873
+ # resp.instances[0].status.state_change_reason.message #=> String
874
+ # resp.instances[0].status.timeline.creation_date_time #=> Time
875
+ # resp.instances[0].status.timeline.ready_date_time #=> Time
876
+ # resp.instances[0].status.timeline.end_date_time #=> Time
877
+ # resp.instances[0].instance_group_id #=> String
878
+ # resp.instances[0].ebs_volumes #=> Array
879
+ # resp.instances[0].ebs_volumes[0].device #=> String
880
+ # resp.instances[0].ebs_volumes[0].volume_id #=> String
881
+ # resp.marker #=> String
882
+ # @overload list_instances(params = {})
883
+ # @param [Hash] params ({})
884
+ def list_instances(params = {}, options = {})
885
+ req = build_request(:list_instances, params)
886
+ req.send_request(options)
887
+ end
888
+
889
+ # Lists all the security configurations visible to this account,
890
+ # providing their creation dates and times, and their names. This call
891
+ # returns a maximum of 50 clusters per call, but returns a marker to
892
+ # track the paging of the cluster list across multiple
893
+ # ListSecurityConfigurations calls.
894
+ # @option params [String] :marker
895
+ # The pagination token that indicates the set of results to retrieve.
896
+ # @return [Types::ListSecurityConfigurationsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
897
+ #
898
+ # * {Types::ListSecurityConfigurationsOutput#security_configurations #SecurityConfigurations} => Array&lt;Types::SecurityConfigurationSummary&gt;
899
+ # * {Types::ListSecurityConfigurationsOutput#marker #Marker} => String
900
+ #
901
+ # @example Request syntax with placeholder values
902
+ # resp = client.list_security_configurations({
903
+ # marker: "Marker",
904
+ # })
905
+ #
906
+ # @example Response structure
907
+ # resp.security_configurations #=> Array
908
+ # resp.security_configurations[0].name #=> String
909
+ # resp.security_configurations[0].creation_date_time #=> Time
910
+ # resp.marker #=> String
911
+ # @overload list_security_configurations(params = {})
912
+ # @param [Hash] params ({})
913
+ def list_security_configurations(params = {}, options = {})
914
+ req = build_request(:list_security_configurations, params)
915
+ req.send_request(options)
916
+ end
917
+
918
+ # Provides a list of steps for the cluster in reverse order unless you
919
+ # specify stepIds with the request.
920
+ # @option params [required, String] :cluster_id
921
+ # The identifier of the cluster for which to list the steps.
922
+ # @option params [Array<String>] :step_states
923
+ # The filter to limit the step list based on certain states.
924
+ # @option params [Array<String>] :step_ids
925
+ # The filter to limit the step list based on the identifier of the
926
+ # steps.
927
+ # @option params [String] :marker
928
+ # The pagination token that indicates the next set of results to
929
+ # retrieve.
930
+ # @return [Types::ListStepsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
931
+ #
932
+ # * {Types::ListStepsOutput#steps #Steps} => Array&lt;Types::StepSummary&gt;
933
+ # * {Types::ListStepsOutput#marker #Marker} => String
934
+ #
935
+ # @example Request syntax with placeholder values
936
+ # resp = client.list_steps({
937
+ # cluster_id: "ClusterId", # required
938
+ # step_states: ["PENDING"], # accepts PENDING, CANCEL_PENDING, RUNNING, COMPLETED, CANCELLED, FAILED, INTERRUPTED
939
+ # step_ids: ["XmlString"],
940
+ # marker: "Marker",
941
+ # })
942
+ #
943
+ # @example Response structure
944
+ # resp.steps #=> Array
945
+ # resp.steps[0].id #=> String
946
+ # resp.steps[0].name #=> String
947
+ # resp.steps[0].config.jar #=> String
948
+ # resp.steps[0].config.properties #=> Hash
949
+ # resp.steps[0].config.properties["String"] #=> String
950
+ # resp.steps[0].config.main_class #=> String
951
+ # resp.steps[0].config.args #=> Array
952
+ # resp.steps[0].config.args[0] #=> String
953
+ # resp.steps[0].action_on_failure #=> String, one of "TERMINATE_JOB_FLOW", "TERMINATE_CLUSTER", "CANCEL_AND_WAIT", "CONTINUE"
954
+ # resp.steps[0].status.state #=> String, one of "PENDING", "CANCEL_PENDING", "RUNNING", "COMPLETED", "CANCELLED", "FAILED", "INTERRUPTED"
955
+ # resp.steps[0].status.state_change_reason.code #=> String, one of "NONE"
956
+ # resp.steps[0].status.state_change_reason.message #=> String
957
+ # resp.steps[0].status.failure_details.reason #=> String
958
+ # resp.steps[0].status.failure_details.message #=> String
959
+ # resp.steps[0].status.failure_details.log_file #=> String
960
+ # resp.steps[0].status.timeline.creation_date_time #=> Time
961
+ # resp.steps[0].status.timeline.start_date_time #=> Time
962
+ # resp.steps[0].status.timeline.end_date_time #=> Time
963
+ # resp.marker #=> String
964
+ # @overload list_steps(params = {})
965
+ # @param [Hash] params ({})
966
+ def list_steps(params = {}, options = {})
967
+ req = build_request(:list_steps, params)
968
+ req.send_request(options)
969
+ end
970
+
971
+ # ModifyInstanceGroups modifies the number of nodes and configuration
972
+ # settings of an instance group. The input parameters include the new
973
+ # target instance count for the group and the instance group ID. The
974
+ # call will either succeed or fail atomically.
975
+ # @option params [String] :cluster_id
976
+ # The ID of the cluster to which the instance group belongs.
977
+ # @option params [Array<Types::InstanceGroupModifyConfig>] :instance_groups
978
+ # Instance groups to change.
979
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
980
+ #
981
+ # @example Request syntax with placeholder values
982
+ # resp = client.modify_instance_groups({
983
+ # cluster_id: "ClusterId",
984
+ # instance_groups: [
985
+ # {
986
+ # instance_group_id: "XmlStringMaxLen256", # required
987
+ # instance_count: 1,
988
+ # ec2_instance_ids_to_terminate: ["InstanceId"],
989
+ # shrink_policy: {
990
+ # decommission_timeout: 1,
991
+ # instance_resize_policy: {
992
+ # instances_to_terminate: ["InstanceId"],
993
+ # instances_to_protect: ["InstanceId"],
994
+ # instance_termination_timeout: 1,
995
+ # },
996
+ # },
997
+ # },
998
+ # ],
999
+ # })
1000
+ # @overload modify_instance_groups(params = {})
1001
+ # @param [Hash] params ({})
1002
+ def modify_instance_groups(params = {}, options = {})
1003
+ req = build_request(:modify_instance_groups, params)
1004
+ req.send_request(options)
1005
+ end
1006
+
1007
+ # Creates or updates an automatic scaling policy for a core instance
1008
+ # group or task instance group in an Amazon EMR cluster. The automatic
1009
+ # scaling policy defines how an instance group dynamically adds and
1010
+ # terminates EC2 instances in response to the value of a CloudWatch
1011
+ # metric.
1012
+ # @option params [required, String] :cluster_id
1013
+ # Specifies the ID of a cluster. The instance group to which the
1014
+ # automatic scaling policy is applied is within this cluster.
1015
+ # @option params [required, String] :instance_group_id
1016
+ # Specifies the ID of the instance group to which the automatic scaling
1017
+ # policy is applied.
1018
+ # @option params [required, Types::AutoScalingPolicy] :auto_scaling_policy
1019
+ # Specifies the definition of the automatic scaling policy.
1020
+ # @return [Types::PutAutoScalingPolicyOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1021
+ #
1022
+ # * {Types::PutAutoScalingPolicyOutput#cluster_id #ClusterId} => String
1023
+ # * {Types::PutAutoScalingPolicyOutput#instance_group_id #InstanceGroupId} => String
1024
+ # * {Types::PutAutoScalingPolicyOutput#auto_scaling_policy #AutoScalingPolicy} => Types::AutoScalingPolicyDescription
1025
+ #
1026
+ # @example Request syntax with placeholder values
1027
+ # resp = client.put_auto_scaling_policy({
1028
+ # cluster_id: "ClusterId", # required
1029
+ # instance_group_id: "InstanceGroupId", # required
1030
+ # auto_scaling_policy: { # required
1031
+ # constraints: { # required
1032
+ # min_capacity: 1, # required
1033
+ # max_capacity: 1, # required
1034
+ # },
1035
+ # rules: [ # required
1036
+ # {
1037
+ # name: "String", # required
1038
+ # description: "String",
1039
+ # action: { # required
1040
+ # market: "ON_DEMAND", # accepts ON_DEMAND, SPOT
1041
+ # simple_scaling_policy_configuration: { # required
1042
+ # adjustment_type: "CHANGE_IN_CAPACITY", # accepts CHANGE_IN_CAPACITY, PERCENT_CHANGE_IN_CAPACITY, EXACT_CAPACITY
1043
+ # scaling_adjustment: 1, # required
1044
+ # cool_down: 1,
1045
+ # },
1046
+ # },
1047
+ # trigger: { # required
1048
+ # cloud_watch_alarm_definition: { # required
1049
+ # comparison_operator: "GREATER_THAN_OR_EQUAL", # required, accepts GREATER_THAN_OR_EQUAL, GREATER_THAN, LESS_THAN, LESS_THAN_OR_EQUAL
1050
+ # evaluation_periods: 1,
1051
+ # metric_name: "String", # required
1052
+ # namespace: "String",
1053
+ # period: 1, # required
1054
+ # statistic: "SAMPLE_COUNT", # accepts SAMPLE_COUNT, AVERAGE, SUM, MINIMUM, MAXIMUM
1055
+ # threshold: 1.0, # required
1056
+ # unit: "NONE", # accepts NONE, SECONDS, MICRO_SECONDS, MILLI_SECONDS, BYTES, KILO_BYTES, MEGA_BYTES, GIGA_BYTES, TERA_BYTES, BITS, KILO_BITS, MEGA_BITS, GIGA_BITS, TERA_BITS, PERCENT, COUNT, BYTES_PER_SECOND, KILO_BYTES_PER_SECOND, MEGA_BYTES_PER_SECOND, GIGA_BYTES_PER_SECOND, TERA_BYTES_PER_SECOND, BITS_PER_SECOND, KILO_BITS_PER_SECOND, MEGA_BITS_PER_SECOND, GIGA_BITS_PER_SECOND, TERA_BITS_PER_SECOND, COUNT_PER_SECOND
1057
+ # dimensions: [
1058
+ # {
1059
+ # key: "String",
1060
+ # value: "String",
1061
+ # },
1062
+ # ],
1063
+ # },
1064
+ # },
1065
+ # },
1066
+ # ],
1067
+ # },
1068
+ # })
1069
+ #
1070
+ # @example Response structure
1071
+ # resp.cluster_id #=> String
1072
+ # resp.instance_group_id #=> String
1073
+ # resp.auto_scaling_policy.status.state #=> String, one of "PENDING", "ATTACHING", "ATTACHED", "DETACHING", "DETACHED", "FAILED"
1074
+ # resp.auto_scaling_policy.status.state_change_reason.code #=> String, one of "USER_REQUEST", "PROVISION_FAILURE", "CLEANUP_FAILURE"
1075
+ # resp.auto_scaling_policy.status.state_change_reason.message #=> String
1076
+ # resp.auto_scaling_policy.constraints.min_capacity #=> Integer
1077
+ # resp.auto_scaling_policy.constraints.max_capacity #=> Integer
1078
+ # resp.auto_scaling_policy.rules #=> Array
1079
+ # resp.auto_scaling_policy.rules[0].name #=> String
1080
+ # resp.auto_scaling_policy.rules[0].description #=> String
1081
+ # resp.auto_scaling_policy.rules[0].action.market #=> String, one of "ON_DEMAND", "SPOT"
1082
+ # resp.auto_scaling_policy.rules[0].action.simple_scaling_policy_configuration.adjustment_type #=> String, one of "CHANGE_IN_CAPACITY", "PERCENT_CHANGE_IN_CAPACITY", "EXACT_CAPACITY"
1083
+ # resp.auto_scaling_policy.rules[0].action.simple_scaling_policy_configuration.scaling_adjustment #=> Integer
1084
+ # resp.auto_scaling_policy.rules[0].action.simple_scaling_policy_configuration.cool_down #=> Integer
1085
+ # resp.auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.comparison_operator #=> String, one of "GREATER_THAN_OR_EQUAL", "GREATER_THAN", "LESS_THAN", "LESS_THAN_OR_EQUAL"
1086
+ # resp.auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.evaluation_periods #=> Integer
1087
+ # resp.auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.metric_name #=> String
1088
+ # resp.auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.namespace #=> String
1089
+ # resp.auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.period #=> Integer
1090
+ # resp.auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.statistic #=> String, one of "SAMPLE_COUNT", "AVERAGE", "SUM", "MINIMUM", "MAXIMUM"
1091
+ # resp.auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.threshold #=> Float
1092
+ # resp.auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.unit #=> String, one of "NONE", "SECONDS", "MICRO_SECONDS", "MILLI_SECONDS", "BYTES", "KILO_BYTES", "MEGA_BYTES", "GIGA_BYTES", "TERA_BYTES", "BITS", "KILO_BITS", "MEGA_BITS", "GIGA_BITS", "TERA_BITS", "PERCENT", "COUNT", "BYTES_PER_SECOND", "KILO_BYTES_PER_SECOND", "MEGA_BYTES_PER_SECOND", "GIGA_BYTES_PER_SECOND", "TERA_BYTES_PER_SECOND", "BITS_PER_SECOND", "KILO_BITS_PER_SECOND", "MEGA_BITS_PER_SECOND", "GIGA_BITS_PER_SECOND", "TERA_BITS_PER_SECOND", "COUNT_PER_SECOND"
1093
+ # resp.auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.dimensions #=> Array
1094
+ # resp.auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.dimensions[0].key #=> String
1095
+ # resp.auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.dimensions[0].value #=> String
1096
+ # @overload put_auto_scaling_policy(params = {})
1097
+ # @param [Hash] params ({})
1098
+ def put_auto_scaling_policy(params = {}, options = {})
1099
+ req = build_request(:put_auto_scaling_policy, params)
1100
+ req.send_request(options)
1101
+ end
1102
+
1103
+ # Removes an automatic scaling policy from a specified instance group
1104
+ # within an EMR cluster.
1105
+ # @option params [required, String] :cluster_id
1106
+ # Specifies the ID of a cluster. The instance group to which the
1107
+ # automatic scaling policy is applied is within this cluster.
1108
+ # @option params [required, String] :instance_group_id
1109
+ # Specifies the ID of the instance group to which the scaling policy is
1110
+ # applied.
1111
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1112
+ #
1113
+ # @example Request syntax with placeholder values
1114
+ # resp = client.remove_auto_scaling_policy({
1115
+ # cluster_id: "ClusterId", # required
1116
+ # instance_group_id: "InstanceGroupId", # required
1117
+ # })
1118
+ # @overload remove_auto_scaling_policy(params = {})
1119
+ # @param [Hash] params ({})
1120
+ def remove_auto_scaling_policy(params = {}, options = {})
1121
+ req = build_request(:remove_auto_scaling_policy, params)
1122
+ req.send_request(options)
1123
+ end
1124
+
1125
+ # Removes tags from an Amazon EMR resource. Tags make it easier to
1126
+ # associate clusters in various ways, such as grouping clusters to track
1127
+ # your Amazon EMR resource allocation costs. For more information, see
1128
+ # [Tagging Amazon EMR Resources][1].
1129
+ #
1130
+ # The following example removes the stack tag with value Prod from a
1131
+ # cluster:
1132
+ #
1133
+ #
1134
+ #
1135
+ # [1]: http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-plan-tags.html
1136
+ # @option params [required, String] :resource_id
1137
+ # The Amazon EMR resource identifier from which tags will be removed.
1138
+ # This value must be a cluster identifier.
1139
+ # @option params [required, Array<String>] :tag_keys
1140
+ # A list of tag keys to remove from a resource.
1141
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1142
+ #
1143
+ # @example Request syntax with placeholder values
1144
+ # resp = client.remove_tags({
1145
+ # resource_id: "ResourceId", # required
1146
+ # tag_keys: ["String"], # required
1147
+ # })
1148
+ # @overload remove_tags(params = {})
1149
+ # @param [Hash] params ({})
1150
+ def remove_tags(params = {}, options = {})
1151
+ req = build_request(:remove_tags, params)
1152
+ req.send_request(options)
1153
+ end
1154
+
1155
+ # RunJobFlow creates and starts running a new job flow. The job flow
1156
+ # will run the steps specified. After the job flow completes, the
1157
+ # cluster is stopped and the HDFS partition is lost. To prevent loss of
1158
+ # data, configure the last step of the job flow to store results in
1159
+ # Amazon S3. If the JobFlowInstancesConfig `KeepJobFlowAliveWhenNoSteps`
1160
+ # parameter is set to `TRUE`, the job flow will transition to the
1161
+ # WAITING state rather than shutting down after the steps have
1162
+ # completed.
1163
+ #
1164
+ # For additional protection, you can set the JobFlowInstancesConfig
1165
+ # `TerminationProtected` parameter to `TRUE` to lock the job flow and
1166
+ # prevent it from being terminated by API call, user intervention, or in
1167
+ # the event of a job flow error.
1168
+ #
1169
+ # A maximum of 256 steps are allowed in each job flow.
1170
+ #
1171
+ # If your job flow is long-running (such as a Hive data warehouse) or
1172
+ # complex, you may require more than 256 steps to process your data. You
1173
+ # can bypass the 256-step limitation in various ways, including using
1174
+ # the SSH shell to connect to the master node and submitting queries
1175
+ # directly to the software running on the master node, such as Hive and
1176
+ # Hadoop. For more information on how to do this, see [Add More than 256
1177
+ # Steps to a Job Flow][1] in the *Amazon EMR Management Guide*.
1178
+ #
1179
+ # For long running job flows, we recommend that you periodically store
1180
+ # your results.
1181
+ #
1182
+ #
1183
+ #
1184
+ # [1]: http://docs.aws.amazon.com/ElasticMapReduce/latest/Management/Guide/AddMoreThan256Steps.html
1185
+ # @option params [required, String] :name
1186
+ # The name of the job flow.
1187
+ # @option params [String] :log_uri
1188
+ # The location in Amazon S3 to write the log files of the job flow. If a
1189
+ # value is not provided, logs are not created.
1190
+ # @option params [String] :additional_info
1191
+ # A JSON string for selecting additional features.
1192
+ # @option params [String] :ami_version
1193
+ # <note markdown="1"> For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and
1194
+ # greater, use ReleaseLabel.
1195
+ #
1196
+ # </note>
1197
+ #
1198
+ # The version of the Amazon Machine Image (AMI) to use when launching
1199
+ # Amazon EC2 instances in the job flow. The following values are valid:
1200
+ #
1201
+ # * The version number of the AMI to use, for example, "2.0."
1202
+ #
1203
+ # ^
1204
+ #
1205
+ # If the AMI supports multiple versions of Hadoop (for example, AMI 1.0
1206
+ # supports both Hadoop 0.18 and 0.20) you can use the
1207
+ # JobFlowInstancesConfig `HadoopVersion` parameter to modify the version
1208
+ # of Hadoop from the defaults shown above.
1209
+ #
1210
+ # For details about the AMI versions currently supported by Amazon
1211
+ # Elastic MapReduce, see [AMI Versions Supported in Elastic
1212
+ # MapReduce][1] in the *Amazon Elastic MapReduce Developer Guide.*
1213
+ #
1214
+ # <note markdown="1"> Previously, the EMR AMI version API parameter options allowed you to
1215
+ # use latest for the latest AMI version rather than specify a numerical
1216
+ # value. Some regions no longer support this deprecated option as they
1217
+ # only have a newer release label version of EMR, which requires you to
1218
+ # specify an EMR release label release (EMR 4.x or later).
1219
+ #
1220
+ # </note>
1221
+ #
1222
+ #
1223
+ #
1224
+ # [1]: http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/EnvironmentConfig_AMIVersion.html#ami-versions-supported
1225
+ # @option params [String] :release_label
1226
+ # <note markdown="1"> Amazon EMR releases 4.x or later.
1227
+ #
1228
+ # </note>
1229
+ #
1230
+ # The release label for the Amazon EMR release. For Amazon EMR 3.x and
1231
+ # 2.x AMIs, use amiVersion instead instead of ReleaseLabel.
1232
+ # @option params [required, Types::JobFlowInstancesConfig] :instances
1233
+ # A specification of the number and type of Amazon EC2 instances on
1234
+ # which to run the job flow.
1235
+ # @option params [Array<Types::StepConfig>] :steps
1236
+ # A list of steps to be executed by the job flow.
1237
+ # @option params [Array<Types::BootstrapActionConfig>] :bootstrap_actions
1238
+ # A list of bootstrap actions that will be run before Hadoop is started
1239
+ # on the cluster nodes.
1240
+ # @option params [Array<String>] :supported_products
1241
+ # <note markdown="1"> For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and
1242
+ # greater, use Applications.
1243
+ #
1244
+ # </note>
1245
+ #
1246
+ # A list of strings that indicates third-party software to use with the
1247
+ # job flow. For more information, see [Use Third Party Applications with
1248
+ # Amazon EMR][1]. Currently supported values are:
1249
+ #
1250
+ # * "mapr-m3" - launch the job flow using MapR M3 Edition.
1251
+ #
1252
+ # * "mapr-m5" - launch the job flow using MapR M5 Edition.
1253
+ #
1254
+ #
1255
+ #
1256
+ # [1]: http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-supported-products.html
1257
+ # @option params [Array<Types::SupportedProductConfig>] :new_supported_products
1258
+ # <note markdown="1"> For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and
1259
+ # greater, use Applications.
1260
+ #
1261
+ # </note>
1262
+ #
1263
+ # A list of strings that indicates third-party software to use with the
1264
+ # job flow that accepts a user argument list. EMR accepts and forwards
1265
+ # the argument list to the corresponding installation script as
1266
+ # bootstrap action arguments. For more information, see [Launch a Job
1267
+ # Flow on the MapR Distribution for Hadoop][1]. Currently supported
1268
+ # values are:
1269
+ #
1270
+ # * "mapr-m3" - launch the cluster using MapR M3 Edition.
1271
+ #
1272
+ # * "mapr-m5" - launch the cluster using MapR M5 Edition.
1273
+ #
1274
+ # * "mapr" with the user arguments specifying "--edition,m3" or
1275
+ # "--edition,m5" - launch the job flow using MapR M3 or M5 Edition
1276
+ # respectively.
1277
+ #
1278
+ # * "mapr-m7" - launch the cluster using MapR M7 Edition.
1279
+ #
1280
+ # * "hunk" - launch the cluster with the Hunk Big Data Analtics
1281
+ # Platform.
1282
+ #
1283
+ # * "hue"- launch the cluster with Hue installed.
1284
+ #
1285
+ # * "spark" - launch the cluster with Apache Spark installed.
1286
+ #
1287
+ # * "ganglia" - launch the cluster with the Ganglia Monitoring System
1288
+ # installed.
1289
+ #
1290
+ #
1291
+ #
1292
+ # [1]: http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-mapr.html
1293
+ # @option params [Array<Types::Application>] :applications
1294
+ # <note markdown="1"> Amazon EMR releases 4.x or later.
1295
+ #
1296
+ # </note>
1297
+ #
1298
+ # A list of applications for the cluster. Valid values are: "Hadoop",
1299
+ # "Hive", "Mahout", "Pig", and "Spark." They are case
1300
+ # insensitive.
1301
+ # @option params [Array<Types::Configuration>] :configurations
1302
+ # <note markdown="1"> Amazon EMR releases 4.x or later.
1303
+ #
1304
+ # </note>
1305
+ #
1306
+ # The list of configurations supplied for the EMR cluster you are
1307
+ # creating.
1308
+ # @option params [Boolean] :visible_to_all_users
1309
+ # Whether the job flow is visible to all IAM users of the AWS account
1310
+ # associated with the job flow. If this value is set to `true`, all IAM
1311
+ # users of that AWS account can view and (if they have the proper policy
1312
+ # permissions set) manage the job flow. If it is set to `false`, only
1313
+ # the IAM user that created the job flow can view and manage it.
1314
+ # @option params [String] :job_flow_role
1315
+ # Also called instance profile and EC2 role. An IAM role for an EMR
1316
+ # cluster. The EC2 instances of the cluster assume this role. The
1317
+ # default role is `EMR_EC2_DefaultRole`. In order to use the default
1318
+ # role, you must have already created it using the CLI or console.
1319
+ # @option params [String] :service_role
1320
+ # The IAM role that will be assumed by the Amazon EMR service to access
1321
+ # AWS resources on your behalf.
1322
+ # @option params [Array<Types::Tag>] :tags
1323
+ # A list of tags to associate with a cluster and propagate to Amazon EC2
1324
+ # instances.
1325
+ # @option params [String] :security_configuration
1326
+ # The name of a security configuration to apply to the cluster.
1327
+ # @option params [String] :auto_scaling_role
1328
+ # An IAM role for automatic scaling policies. The default role is
1329
+ # `EMR_AutoScaling_DefaultRole`. The IAM role provides permissions that
1330
+ # the automatic scaling feature requires to launch and terminate EC2
1331
+ # instances in an instance group.
1332
+ # @option params [String] :scale_down_behavior
1333
+ # Specifies the way that individual Amazon EC2 instances terminate when
1334
+ # an automatic scale-in activity occurs or an instance group is resized.
1335
+ # `TERMINATE_AT_INSTANCE_HOUR` indicates that Amazon EMR terminates
1336
+ # nodes at the instance-hour boundary, regardless of when the request to
1337
+ # terminate the instance was submitted. This option is only available
1338
+ # with Amazon EMR 5.1.0 and later and is the default for clusters
1339
+ # created using that version. `TERMINATE_AT_TASK_COMPLETION` indicates
1340
+ # that Amazon EMR blacklists and drains tasks from nodes before
1341
+ # terminating the Amazon EC2 instances, regardless of the instance-hour
1342
+ # boundary. With either behavior, Amazon EMR removes the least active
1343
+ # nodes first and blocks instance termination if it could lead to HDFS
1344
+ # corruption. `TERMINATE_AT_TASK_COMPLETION` available only in Amazon
1345
+ # EMR version 4.1.0 and later, and is the default for versions of Amazon
1346
+ # EMR earlier than 5.1.0.
1347
+ # @return [Types::RunJobFlowOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1348
+ #
1349
+ # * {Types::RunJobFlowOutput#job_flow_id #JobFlowId} => String
1350
+ #
1351
+ # @example Request syntax with placeholder values
1352
+ # resp = client.run_job_flow({
1353
+ # name: "XmlStringMaxLen256", # required
1354
+ # log_uri: "XmlString",
1355
+ # additional_info: "XmlString",
1356
+ # ami_version: "XmlStringMaxLen256",
1357
+ # release_label: "XmlStringMaxLen256",
1358
+ # instances: { # required
1359
+ # master_instance_type: "InstanceType",
1360
+ # slave_instance_type: "InstanceType",
1361
+ # instance_count: 1,
1362
+ # instance_groups: [
1363
+ # {
1364
+ # name: "XmlStringMaxLen256",
1365
+ # market: "ON_DEMAND", # accepts ON_DEMAND, SPOT
1366
+ # instance_role: "MASTER", # required, accepts MASTER, CORE, TASK
1367
+ # bid_price: "XmlStringMaxLen256",
1368
+ # instance_type: "InstanceType", # required
1369
+ # instance_count: 1, # required
1370
+ # configurations: [
1371
+ # {
1372
+ # classification: "String",
1373
+ # configurations: {
1374
+ # # recursive ConfigurationList
1375
+ # },
1376
+ # properties: {
1377
+ # "String" => "String",
1378
+ # },
1379
+ # },
1380
+ # ],
1381
+ # ebs_configuration: {
1382
+ # ebs_block_device_configs: [
1383
+ # {
1384
+ # volume_specification: { # required
1385
+ # volume_type: "String", # required
1386
+ # iops: 1,
1387
+ # size_in_gb: 1, # required
1388
+ # },
1389
+ # volumes_per_instance: 1,
1390
+ # },
1391
+ # ],
1392
+ # ebs_optimized: false,
1393
+ # },
1394
+ # auto_scaling_policy: {
1395
+ # constraints: { # required
1396
+ # min_capacity: 1, # required
1397
+ # max_capacity: 1, # required
1398
+ # },
1399
+ # rules: [ # required
1400
+ # {
1401
+ # name: "String", # required
1402
+ # description: "String",
1403
+ # action: { # required
1404
+ # market: "ON_DEMAND", # accepts ON_DEMAND, SPOT
1405
+ # simple_scaling_policy_configuration: { # required
1406
+ # adjustment_type: "CHANGE_IN_CAPACITY", # accepts CHANGE_IN_CAPACITY, PERCENT_CHANGE_IN_CAPACITY, EXACT_CAPACITY
1407
+ # scaling_adjustment: 1, # required
1408
+ # cool_down: 1,
1409
+ # },
1410
+ # },
1411
+ # trigger: { # required
1412
+ # cloud_watch_alarm_definition: { # required
1413
+ # comparison_operator: "GREATER_THAN_OR_EQUAL", # required, accepts GREATER_THAN_OR_EQUAL, GREATER_THAN, LESS_THAN, LESS_THAN_OR_EQUAL
1414
+ # evaluation_periods: 1,
1415
+ # metric_name: "String", # required
1416
+ # namespace: "String",
1417
+ # period: 1, # required
1418
+ # statistic: "SAMPLE_COUNT", # accepts SAMPLE_COUNT, AVERAGE, SUM, MINIMUM, MAXIMUM
1419
+ # threshold: 1.0, # required
1420
+ # unit: "NONE", # accepts NONE, SECONDS, MICRO_SECONDS, MILLI_SECONDS, BYTES, KILO_BYTES, MEGA_BYTES, GIGA_BYTES, TERA_BYTES, BITS, KILO_BITS, MEGA_BITS, GIGA_BITS, TERA_BITS, PERCENT, COUNT, BYTES_PER_SECOND, KILO_BYTES_PER_SECOND, MEGA_BYTES_PER_SECOND, GIGA_BYTES_PER_SECOND, TERA_BYTES_PER_SECOND, BITS_PER_SECOND, KILO_BITS_PER_SECOND, MEGA_BITS_PER_SECOND, GIGA_BITS_PER_SECOND, TERA_BITS_PER_SECOND, COUNT_PER_SECOND
1421
+ # dimensions: [
1422
+ # {
1423
+ # key: "String",
1424
+ # value: "String",
1425
+ # },
1426
+ # ],
1427
+ # },
1428
+ # },
1429
+ # },
1430
+ # ],
1431
+ # },
1432
+ # },
1433
+ # ],
1434
+ # ec2_key_name: "XmlStringMaxLen256",
1435
+ # placement: {
1436
+ # availability_zone: "XmlString", # required
1437
+ # },
1438
+ # keep_job_flow_alive_when_no_steps: false,
1439
+ # termination_protected: false,
1440
+ # hadoop_version: "XmlStringMaxLen256",
1441
+ # ec2_subnet_id: "XmlStringMaxLen256",
1442
+ # emr_managed_master_security_group: "XmlStringMaxLen256",
1443
+ # emr_managed_slave_security_group: "XmlStringMaxLen256",
1444
+ # service_access_security_group: "XmlStringMaxLen256",
1445
+ # additional_master_security_groups: ["XmlStringMaxLen256"],
1446
+ # additional_slave_security_groups: ["XmlStringMaxLen256"],
1447
+ # },
1448
+ # steps: [
1449
+ # {
1450
+ # name: "XmlStringMaxLen256", # required
1451
+ # action_on_failure: "TERMINATE_JOB_FLOW", # accepts TERMINATE_JOB_FLOW, TERMINATE_CLUSTER, CANCEL_AND_WAIT, CONTINUE
1452
+ # hadoop_jar_step: { # required
1453
+ # properties: [
1454
+ # {
1455
+ # key: "XmlString",
1456
+ # value: "XmlString",
1457
+ # },
1458
+ # ],
1459
+ # jar: "XmlString", # required
1460
+ # main_class: "XmlString",
1461
+ # args: ["XmlString"],
1462
+ # },
1463
+ # },
1464
+ # ],
1465
+ # bootstrap_actions: [
1466
+ # {
1467
+ # name: "XmlStringMaxLen256", # required
1468
+ # script_bootstrap_action: { # required
1469
+ # path: "XmlString", # required
1470
+ # args: ["XmlString"],
1471
+ # },
1472
+ # },
1473
+ # ],
1474
+ # supported_products: ["XmlStringMaxLen256"],
1475
+ # new_supported_products: [
1476
+ # {
1477
+ # name: "XmlStringMaxLen256",
1478
+ # args: ["XmlString"],
1479
+ # },
1480
+ # ],
1481
+ # applications: [
1482
+ # {
1483
+ # name: "String",
1484
+ # version: "String",
1485
+ # args: ["String"],
1486
+ # additional_info: {
1487
+ # "String" => "String",
1488
+ # },
1489
+ # },
1490
+ # ],
1491
+ # configurations: [
1492
+ # {
1493
+ # classification: "String",
1494
+ # configurations: {
1495
+ # # recursive ConfigurationList
1496
+ # },
1497
+ # properties: {
1498
+ # "String" => "String",
1499
+ # },
1500
+ # },
1501
+ # ],
1502
+ # visible_to_all_users: false,
1503
+ # job_flow_role: "XmlString",
1504
+ # service_role: "XmlString",
1505
+ # tags: [
1506
+ # {
1507
+ # key: "String",
1508
+ # value: "String",
1509
+ # },
1510
+ # ],
1511
+ # security_configuration: "XmlString",
1512
+ # auto_scaling_role: "XmlString",
1513
+ # scale_down_behavior: "TERMINATE_AT_INSTANCE_HOUR", # accepts TERMINATE_AT_INSTANCE_HOUR, TERMINATE_AT_TASK_COMPLETION
1514
+ # })
1515
+ #
1516
+ # @example Response structure
1517
+ # resp.job_flow_id #=> String
1518
+ # @overload run_job_flow(params = {})
1519
+ # @param [Hash] params ({})
1520
+ def run_job_flow(params = {}, options = {})
1521
+ req = build_request(:run_job_flow, params)
1522
+ req.send_request(options)
1523
+ end
1524
+
1525
+ # SetTerminationProtection locks a job flow so the EC2 instances in the
1526
+ # cluster cannot be terminated by user intervention, an API call, or in
1527
+ # the event of a job-flow error. The cluster still terminates upon
1528
+ # successful completion of the job flow. Calling
1529
+ # SetTerminationProtection on a job flow is analogous to calling the
1530
+ # Amazon EC2 DisableAPITermination API on all of the EC2 instances in a
1531
+ # cluster.
1532
+ #
1533
+ # SetTerminationProtection is used to prevent accidental termination of
1534
+ # a job flow and to ensure that in the event of an error, the instances
1535
+ # will persist so you can recover any data stored in their ephemeral
1536
+ # instance storage.
1537
+ #
1538
+ # To terminate a job flow that has been locked by setting
1539
+ # SetTerminationProtection to `true`, you must first unlock the job flow
1540
+ # by a subsequent call to SetTerminationProtection in which you set the
1541
+ # value to `false`.
1542
+ #
1543
+ # For more information, see[Protecting a Job Flow from Termination][1]
1544
+ # in the *Amazon EMR Guide.*
1545
+ #
1546
+ #
1547
+ #
1548
+ # [1]: http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/UsingEMR_TerminationProtection.html
1549
+ # @option params [required, Array<String>] :job_flow_ids
1550
+ # A list of strings that uniquely identify the job flows to protect.
1551
+ # This identifier is returned by RunJobFlow and can also be obtained
1552
+ # from DescribeJobFlows .
1553
+ # @option params [required, Boolean] :termination_protected
1554
+ # A Boolean that indicates whether to protect the job flow and prevent
1555
+ # the Amazon EC2 instances in the cluster from shutting down due to API
1556
+ # calls, user intervention, or job-flow error.
1557
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1558
+ #
1559
+ # @example Request syntax with placeholder values
1560
+ # resp = client.set_termination_protection({
1561
+ # job_flow_ids: ["XmlString"], # required
1562
+ # termination_protected: false, # required
1563
+ # })
1564
+ # @overload set_termination_protection(params = {})
1565
+ # @param [Hash] params ({})
1566
+ def set_termination_protection(params = {}, options = {})
1567
+ req = build_request(:set_termination_protection, params)
1568
+ req.send_request(options)
1569
+ end
1570
+
1571
+ # Sets whether all AWS Identity and Access Management (IAM) users under
1572
+ # your account can access the specified job flows. This action works on
1573
+ # running job flows. You can also set the visibility of a job flow when
1574
+ # you launch it using the `VisibleToAllUsers` parameter of RunJobFlow.
1575
+ # The SetVisibleToAllUsers action can be called only by an IAM user who
1576
+ # created the job flow or the AWS account that owns the job flow.
1577
+ # @option params [required, Array<String>] :job_flow_ids
1578
+ # Identifiers of the job flows to receive the new visibility setting.
1579
+ # @option params [required, Boolean] :visible_to_all_users
1580
+ # Whether the specified job flows are visible to all IAM users of the
1581
+ # AWS account associated with the job flow. If this value is set to
1582
+ # True, all IAM users of that AWS account can view and, if they have the
1583
+ # proper IAM policy permissions set, manage the job flows. If it is set
1584
+ # to False, only the IAM user that created a job flow can view and
1585
+ # manage it.
1586
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1587
+ #
1588
+ # @example Request syntax with placeholder values
1589
+ # resp = client.set_visible_to_all_users({
1590
+ # job_flow_ids: ["XmlString"], # required
1591
+ # visible_to_all_users: false, # required
1592
+ # })
1593
+ # @overload set_visible_to_all_users(params = {})
1594
+ # @param [Hash] params ({})
1595
+ def set_visible_to_all_users(params = {}, options = {})
1596
+ req = build_request(:set_visible_to_all_users, params)
1597
+ req.send_request(options)
1598
+ end
1599
+
1600
+ # TerminateJobFlows shuts a list of job flows down. When a job flow is
1601
+ # shut down, any step not yet completed is canceled and the EC2
1602
+ # instances on which the job flow is running are stopped. Any log files
1603
+ # not already saved are uploaded to Amazon S3 if a LogUri was specified
1604
+ # when the job flow was created.
1605
+ #
1606
+ # The maximum number of JobFlows allowed is 10. The call to
1607
+ # TerminateJobFlows is asynchronous. Depending on the configuration of
1608
+ # the job flow, it may take up to 1-5 minutes for the job flow to
1609
+ # completely terminate and release allocated resources, such as Amazon
1610
+ # EC2 instances.
1611
+ # @option params [required, Array<String>] :job_flow_ids
1612
+ # A list of job flows to be shutdown.
1613
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1614
+ #
1615
+ # @example Request syntax with placeholder values
1616
+ # resp = client.terminate_job_flows({
1617
+ # job_flow_ids: ["XmlString"], # required
1618
+ # })
1619
+ # @overload terminate_job_flows(params = {})
1620
+ # @param [Hash] params ({})
1621
+ def terminate_job_flows(params = {}, options = {})
1622
+ req = build_request(:terminate_job_flows, params)
1623
+ req.send_request(options)
1624
+ end
1625
+
1626
+ # @!endgroup
1627
+
1628
+ # @param params ({})
1629
+ # @api private
1630
+ def build_request(operation_name, params = {})
1631
+ handlers = @handlers.for(operation_name)
1632
+ context = Seahorse::Client::RequestContext.new(
1633
+ operation_name: operation_name,
1634
+ operation: config.api.operation(operation_name),
1635
+ client: self,
1636
+ params: params,
1637
+ config: config)
1638
+ context[:gem_name] = 'aws-sdk-emr'
1639
+ context[:gem_version] = '1.0.0.rc1'
1640
+ Seahorse::Client::Request.new(handlers, context)
1641
+ end
1642
+
1643
+ # Polls an API operation until a resource enters a desired state.
1644
+ #
1645
+ # ## Basic Usage
1646
+ #
1647
+ # A waiter will call an API operation until:
1648
+ #
1649
+ # * It is successful
1650
+ # * It enters a terminal state
1651
+ # * It makes the maximum number of attempts
1652
+ #
1653
+ # In between attempts, the waiter will sleep.
1654
+ #
1655
+ # # polls in a loop, sleeping between attempts
1656
+ # client.waiter_until(waiter_name, params)
1657
+ #
1658
+ # ## Configuration
1659
+ #
1660
+ # You can configure the maximum number of polling attempts, and the
1661
+ # delay (in seconds) between each polling attempt. You can pass
1662
+ # configuration as the final arguments hash.
1663
+ #
1664
+ # # poll for ~25 seconds
1665
+ # client.wait_until(waiter_name, params, {
1666
+ # max_attempts: 5,
1667
+ # delay: 5,
1668
+ # })
1669
+ #
1670
+ # ## Callbacks
1671
+ #
1672
+ # You can be notified before each polling attempt and before each
1673
+ # delay. If you throw `:success` or `:failure` from these callbacks,
1674
+ # it will terminate the waiter.
1675
+ #
1676
+ # started_at = Time.now
1677
+ # client.wait_until(waiter_name, params, {
1678
+ #
1679
+ # # disable max attempts
1680
+ # max_attempts: nil,
1681
+ #
1682
+ # # poll for 1 hour, instead of a number of attempts
1683
+ # before_wait: -> (attempts, response) do
1684
+ # throw :failure if Time.now - started_at > 3600
1685
+ # end
1686
+ # })
1687
+ #
1688
+ # ## Handling Errors
1689
+ #
1690
+ # When a waiter is unsuccessful, it will raise an error.
1691
+ # All of the failure errors extend from
1692
+ # {Aws::Waiters::Errors::WaiterFailed}.
1693
+ #
1694
+ # begin
1695
+ # client.wait_until(...)
1696
+ # rescue Aws::Waiters::Errors::WaiterFailed
1697
+ # # resource did not enter the desired state in time
1698
+ # end
1699
+ #
1700
+ # ## Valid Waiters
1701
+ #
1702
+ # The following table lists the valid waiter names, the operations they call,
1703
+ # and the default `:delay` and `:max_attempts` values.
1704
+ #
1705
+ # | waiter_name | params | :delay | :max_attempts |
1706
+ # | --------------- | ------------------- | -------- | ------------- |
1707
+ # | cluster_running | {#describe_cluster} | 30 | 60 |
1708
+ # | step_complete | {#describe_step} | 30 | 60 |
1709
+ #
1710
+ # @raise [Errors::FailureStateError] Raised when the waiter terminates
1711
+ # because the waiter has entered a state that it will not transition
1712
+ # out of, preventing success.
1713
+ #
1714
+ # @raise [Errors::TooManyAttemptsError] Raised when the configured
1715
+ # maximum number of attempts have been made, and the waiter is not
1716
+ # yet successful.
1717
+ #
1718
+ # @raise [Errors::UnexpectedError] Raised when an error is encounted
1719
+ # while polling for a resource that is not expected.
1720
+ #
1721
+ # @raise [Errors::NoSuchWaiterError] Raised when you request to wait
1722
+ # for an unknown state.
1723
+ #
1724
+ # @return [Boolean] Returns `true` if the waiter was successful.
1725
+ # @param [Symbol] waiter_name
1726
+ # @param [Hash] params ({})
1727
+ # @param [Hash] options ({})
1728
+ # @option options [Integer] :max_attempts
1729
+ # @option options [Integer] :delay
1730
+ # @option options [Proc] :before_attempt
1731
+ # @option options [Proc] :before_wait
1732
+ def wait_until(waiter_name, params = {}, options = {})
1733
+ w = waiter(waiter_name, options)
1734
+ yield(w.waiter) if block_given? # deprecated
1735
+ w.wait(params)
1736
+ end
1737
+
1738
+ # @api private
1739
+ # @deprecated
1740
+ def waiter_names
1741
+ waiters.keys
1742
+ end
1743
+
1744
+ private
1745
+
1746
+ # @param [Symbol] waiter_name
1747
+ # @param [Hash] options ({})
1748
+ def waiter(waiter_name, options = {})
1749
+ waiter_class = waiters[waiter_name]
1750
+ if waiter_class
1751
+ waiter_class.new(options.merge(client: self))
1752
+ else
1753
+ raise Aws::Waiters::Errors::NoSuchWaiterError.new(waiter_name, waiters.keys)
1754
+ end
1755
+ end
1756
+
1757
+ def waiters
1758
+ {
1759
+ cluster_running: Waiters::ClusterRunning,
1760
+ step_complete: Waiters::StepComplete
1761
+ }
1762
+ end
1763
+
1764
+ class << self
1765
+
1766
+ # @api private
1767
+ attr_reader :identifier
1768
+
1769
+ # @api private
1770
+ def errors_module
1771
+ Errors
1772
+ end
1773
+
1774
+ end
1775
+ end
1776
+ end
1777
+ end