aws-sdk 1.5.7 → 1.5.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/aws.rb +2 -0
- data/lib/aws/api_config/EMR-2009-03-31.yml +349 -0
- data/lib/aws/auto_scaling.rb +8 -8
- data/lib/aws/auto_scaling/group.rb +2 -2
- data/lib/aws/auto_scaling/instance.rb +1 -1
- data/lib/aws/auto_scaling/launch_configuration.rb +4 -4
- data/lib/aws/auto_scaling/launch_configuration_collection.rb +11 -11
- data/lib/aws/auto_scaling/scaling_policy.rb +1 -1
- data/lib/aws/auto_scaling/scheduled_action.rb +1 -1
- data/lib/aws/auto_scaling/tag.rb +3 -3
- data/lib/aws/cloud_formation/stack.rb +7 -7
- data/lib/aws/cloud_formation/stack_collection.rb +13 -13
- data/lib/aws/cloud_formation/stack_event_collection.rb +2 -2
- data/lib/aws/cloud_formation/stack_resource.rb +1 -1
- data/lib/aws/cloud_formation/stack_resource_summary_collection.rb +10 -18
- data/lib/aws/cloud_formation/stack_summary_collection.rb +12 -16
- data/lib/aws/core.rb +7 -1
- data/lib/aws/core/collection.rb +12 -12
- data/lib/aws/core/configuration.rb +4 -0
- data/lib/aws/core/credential_providers.rb +23 -23
- data/lib/aws/core/inflection.rb +2 -0
- data/lib/aws/core/model.rb +6 -6
- data/lib/aws/core/policy.rb +102 -102
- data/lib/aws/core/resource.rb +81 -80
- data/lib/aws/core/response.rb +23 -23
- data/lib/aws/core/xml/frame.rb +4 -2
- data/lib/aws/dynamo_db/resource.rb +2 -2
- data/lib/aws/dynamo_db/table.rb +5 -5
- data/lib/aws/ec2/availability_zone.rb +2 -3
- data/lib/aws/ec2/export_task.rb +7 -7
- data/lib/aws/ec2/image.rb +5 -5
- data/lib/aws/ec2/instance.rb +40 -40
- data/lib/aws/ec2/instance_collection.rb +5 -2
- data/lib/aws/ec2/key_pair.rb +1 -1
- data/lib/aws/ec2/network_acl.rb +1 -1
- data/lib/aws/ec2/network_interface.rb +2 -2
- data/lib/aws/ec2/region.rb +1 -1
- data/lib/aws/ec2/resource.rb +1 -1
- data/lib/aws/ec2/route_table.rb +1 -1
- data/lib/aws/ec2/security_group.rb +4 -4
- data/lib/aws/ec2/subnet.rb +1 -1
- data/lib/aws/ec2/volume.rb +1 -1
- data/lib/aws/ec2/vpn_connection.rb +1 -1
- data/lib/aws/ec2/vpn_gateway.rb +2 -2
- data/lib/aws/elb/listener_opts.rb +1 -1
- data/lib/aws/elb/load_balancer.rb +5 -5
- data/lib/aws/elb/load_balancer_collection.rb +17 -9
- data/lib/aws/elb/load_balancer_policy.rb +2 -2
- data/lib/aws/emr.rb +84 -0
- data/lib/aws/emr/client.rb +309 -0
- data/lib/aws/emr/config.rb +18 -0
- data/lib/aws/emr/errors.rb +22 -0
- data/lib/aws/emr/instance_group.rb +138 -0
- data/lib/aws/emr/instance_group_collection.rb +82 -0
- data/lib/aws/emr/job_flow.rb +296 -0
- data/lib/aws/emr/job_flow_collection.rb +185 -0
- data/lib/aws/emr/request.rb +23 -0
- data/lib/aws/iam/access_key.rb +1 -1
- data/lib/aws/iam/account_alias_collection.rb +2 -2
- data/lib/aws/iam/client.rb +1 -1
- data/lib/aws/iam/group.rb +2 -2
- data/lib/aws/iam/policy_collection.rb +1 -1
- data/lib/aws/iam/server_certificate.rb +2 -2
- data/lib/aws/iam/signing_certificate.rb +1 -1
- data/lib/aws/iam/user.rb +2 -2
- data/lib/aws/iam/virtual_mfa_device.rb +1 -1
- data/lib/aws/s3/client.rb +57 -55
- data/lib/aws/s3/config.rb +2 -0
- data/lib/aws/s3/request.rb +14 -6
- data/lib/aws/simple_email_service/identity.rb +9 -7
- data/lib/aws/simple_workflow/domain.rb +1 -1
- data/lib/aws/simple_workflow/resource.rb +2 -2
- data/lib/aws/simple_workflow/workflow_execution.rb +5 -5
- data/lib/aws/sns/subscription_collection.rb +33 -35
- data/lib/aws/sns/topic_collection.rb +13 -18
- data/lib/aws/sns/topic_subscription_collection.rb +8 -9
- data/lib/aws/sqs/queue.rb +4 -4
- data/lib/aws/sqs/queue_collection.rb +17 -13
- metadata +13 -4
- data/lib/aws/cloud_formation/stack_summary.rb +0 -71
data/lib/aws/ec2/region.rb
CHANGED
@@ -41,7 +41,7 @@ module AWS
|
|
41
41
|
# @return [String] The name of the region (e.g. "us-east-1").
|
42
42
|
attr_reader :name
|
43
43
|
|
44
|
-
attribute :endpoint, :
|
44
|
+
attribute :endpoint, :from => :region_endpoint, :static => true
|
45
45
|
|
46
46
|
populates_from(:describe_regions) do |resp|
|
47
47
|
resp.region_info.find{|r| r.region_name == name }
|
data/lib/aws/ec2/resource.rb
CHANGED
@@ -76,7 +76,7 @@ module AWS
|
|
76
76
|
def describe_attribute_call(attribute)
|
77
77
|
name = describe_attribute_call_name
|
78
78
|
|
79
|
-
attr_opt_name = Core::Inflection.class_name(attribute.
|
79
|
+
attr_opt_name = Core::Inflection.class_name(attribute.from.to_s)
|
80
80
|
attr_opt_name = attr_opt_name[0,1].downcase + attr_opt_name[1..-1]
|
81
81
|
|
82
82
|
client.send(name, Hash[[[response_id_method.to_sym,
|
data/lib/aws/ec2/route_table.rb
CHANGED
@@ -50,17 +50,17 @@ module AWS
|
|
50
50
|
|
51
51
|
alias_method :id, :security_group_id
|
52
52
|
|
53
|
-
attribute :name, :
|
53
|
+
attribute :name, :from => :group_name, :static => true
|
54
54
|
|
55
55
|
attribute :owner_id, :static => true
|
56
56
|
|
57
57
|
attribute :vpc_id, :static => true
|
58
58
|
|
59
|
-
attribute :description, :
|
59
|
+
attribute :description, :from => :group_description, :static => true
|
60
60
|
|
61
|
-
attribute :ip_permissions_list, :
|
61
|
+
attribute :ip_permissions_list, :from => :ip_permissions
|
62
62
|
|
63
|
-
attribute :ip_permissions_list_egress, :
|
63
|
+
attribute :ip_permissions_list_egress, :from => :ip_permissions_egress
|
64
64
|
|
65
65
|
populates_from(:describe_security_groups) do |resp|
|
66
66
|
resp.security_group_index[id]
|
data/lib/aws/ec2/subnet.rb
CHANGED
@@ -47,7 +47,7 @@ module AWS
|
|
47
47
|
attribute :available_ip_address_count, :integer => true, :static => true
|
48
48
|
|
49
49
|
attribute :availability_zone_name,
|
50
|
-
:
|
50
|
+
:from => :availability_zone, :static => true
|
51
51
|
|
52
52
|
populates_from(:create_subnet) do |resp|
|
53
53
|
resp.subnet if resp.subnet.subnet_id == subnet_id
|
data/lib/aws/ec2/volume.rb
CHANGED
data/lib/aws/ec2/vpn_gateway.rb
CHANGED
@@ -29,12 +29,12 @@ module AWS
|
|
29
29
|
attr_reader :vpn_gateway_id
|
30
30
|
|
31
31
|
alias_method :id, :vpn_gateway_id
|
32
|
-
|
32
|
+
|
33
33
|
attribute :state, :to_sym => true
|
34
34
|
|
35
35
|
attribute :vpn_type, :static => true
|
36
36
|
|
37
|
-
attribute :attachment_set, :
|
37
|
+
attribute :attachment_set, :from => :attachments
|
38
38
|
|
39
39
|
protected :attachment_set
|
40
40
|
|
@@ -36,10 +36,10 @@ module AWS
|
|
36
36
|
super(options.merge(:name => name.to_s))
|
37
37
|
end
|
38
38
|
|
39
|
-
attribute :name, :
|
39
|
+
attribute :name, :from => :load_balancer_name, :static => true
|
40
40
|
|
41
41
|
#availability_zones
|
42
|
-
attribute :availability_zone_names, :
|
42
|
+
attribute :availability_zone_names, :from => :availability_zones
|
43
43
|
|
44
44
|
#backend_server_policies
|
45
45
|
attribute :backend_server_descriptions
|
@@ -53,17 +53,17 @@ module AWS
|
|
53
53
|
attribute :dns_name, :static => true
|
54
54
|
|
55
55
|
#health_check_configuration
|
56
|
-
attribute :health_check_description, :
|
56
|
+
attribute :health_check_description, :from => :health_check
|
57
57
|
|
58
58
|
#instances
|
59
|
-
attribute :instance_descriptions, :
|
59
|
+
attribute :instance_descriptions, :from => :instances
|
60
60
|
|
61
61
|
#listeners
|
62
62
|
attribute :listener_descriptions
|
63
63
|
|
64
64
|
#source_security_group
|
65
65
|
attribute :security_group_description,
|
66
|
-
:
|
66
|
+
:from => :source_security_group,
|
67
67
|
:static => true
|
68
68
|
|
69
69
|
populates_from(:describe_load_balancers) do |resp|
|
@@ -36,7 +36,7 @@ module AWS
|
|
36
36
|
# :instance_port => 80,
|
37
37
|
# :instance_protocol => :http,
|
38
38
|
# }])
|
39
|
-
#
|
39
|
+
#
|
40
40
|
# @param [String] name The name of your load balancer. The name must
|
41
41
|
# be unique within your set of load balancers.
|
42
42
|
#
|
@@ -60,11 +60,19 @@ module AWS
|
|
60
60
|
# for more detailed description of each option.
|
61
61
|
#
|
62
62
|
# @option options [String,IAM::ServerCertificate] :server_certificate (nil)
|
63
|
-
# The ARN string of an IAM::ServerCertifcate or an
|
63
|
+
# The ARN string of an IAM::ServerCertifcate or an
|
64
64
|
# IAM::ServerCertificate object. Reqruied for HTTPs listeners.
|
65
65
|
#
|
66
66
|
def create name, options = {}
|
67
|
-
|
67
|
+
|
68
|
+
unless options[:availability_zones]
|
69
|
+
raise ArgumentError, "missing required :availability_zones option"
|
70
|
+
end
|
71
|
+
|
72
|
+
unless options[:listeners]
|
73
|
+
raise ArgumentError, "missing required :listeners option"
|
74
|
+
end
|
75
|
+
|
68
76
|
zones = [options[:availability_zones]].flatten.collect do |zone|
|
69
77
|
zone.is_a?(EC2::AvailabilityZone) ? zone.name : zone
|
70
78
|
end
|
@@ -94,20 +102,20 @@ module AWS
|
|
94
102
|
|
95
103
|
protected
|
96
104
|
def _each_item options = {}, &block
|
97
|
-
response = client.describe_load_balancers
|
98
|
-
response.load_balancer_descriptions.each do |description|
|
105
|
+
response = client.describe_load_balancers(options)
|
106
|
+
response.data[:load_balancer_descriptions].each do |description|
|
99
107
|
|
100
108
|
load_balancer = LoadBalancer.new_from(
|
101
|
-
:describe_load_balancers,
|
102
|
-
description,
|
103
|
-
description
|
109
|
+
:describe_load_balancers,
|
110
|
+
description,
|
111
|
+
description[:load_balancer_name],
|
104
112
|
:config => config)
|
105
113
|
|
106
114
|
yield(load_balancer)
|
107
115
|
|
108
116
|
end
|
109
117
|
end
|
110
|
-
|
118
|
+
|
111
119
|
end
|
112
120
|
end
|
113
121
|
end
|
@@ -24,9 +24,9 @@ module AWS
|
|
24
24
|
# @return [LoadBalancer] Returns the load balancer this policy belongs to.
|
25
25
|
attr_reader :load_balancer
|
26
26
|
|
27
|
-
attribute :name, :static => true, :
|
27
|
+
attribute :name, :static => true, :from => :policy_name
|
28
28
|
|
29
|
-
attribute :type, :static => true, :
|
29
|
+
attribute :type, :static => true, :from => :policy_type_name
|
30
30
|
|
31
31
|
attribute :policy_attribute_descriptions, :static => true
|
32
32
|
|
data/lib/aws/emr.rb
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
# Copyright 2011-2012 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License"). You
|
4
|
+
# may not use this file except in compliance with the License. A copy of
|
5
|
+
# the License is located at
|
6
|
+
#
|
7
|
+
# http://aws.amazon.com/apache2.0/
|
8
|
+
#
|
9
|
+
# or in the "license" file accompanying this file. This file is
|
10
|
+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
11
|
+
# ANY KIND, either express or implied. See the License for the specific
|
12
|
+
# language governing permissions and limitations under the License.
|
13
|
+
|
14
|
+
require 'aws/core'
|
15
|
+
require 'aws/emr/config'
|
16
|
+
require 'time'
|
17
|
+
|
18
|
+
module AWS
|
19
|
+
|
20
|
+
# Provides an expressive, object-oriented interface to Amazon Elastic
|
21
|
+
# MapReduce.
|
22
|
+
#
|
23
|
+
# To use Amazon Elastic MapReduce you must first
|
24
|
+
# {sign up here}[http://aws.amazon.com/elasticmapreduce/]
|
25
|
+
#
|
26
|
+
# For more information about Amazon Elastic MapReduce, see:
|
27
|
+
#
|
28
|
+
# * {Amazon Elastic MapReduce}[http://aws.amazon.com/elasticmapreduce/]
|
29
|
+
# * {Amazon Elastic MapReduce Documentation}[http://aws.amazon.com/documentation/elasticmapreduce/]
|
30
|
+
#
|
31
|
+
# == Credentials
|
32
|
+
#
|
33
|
+
# You can setup default credentials for all AWS services via
|
34
|
+
# AWS.config:
|
35
|
+
#
|
36
|
+
# AWS.config(
|
37
|
+
# :access_key_id => 'YOUR_ACCESS_KEY_ID',
|
38
|
+
# :secret_access_key => 'YOUR_SECRET_ACCESS_KEY')
|
39
|
+
#
|
40
|
+
# Or you can set them directly on the EMR interface:
|
41
|
+
#
|
42
|
+
# emr = AWS::EMR.new(
|
43
|
+
# :access_key_id => 'YOUR_ACCESS_KEY_ID',
|
44
|
+
# :secret_access_key => 'YOUR_SECRET_ACCESS_KEY')
|
45
|
+
#
|
46
|
+
# = Job Flows
|
47
|
+
#
|
48
|
+
# The {#job_flows} method returns a collection you use to interact
|
49
|
+
# with your job flows.
|
50
|
+
#
|
51
|
+
# # creating a job flow
|
52
|
+
# job_flow = emr.job_flows.create(...)
|
53
|
+
#
|
54
|
+
# # enumerating job flows
|
55
|
+
# emr.job_flows.each do |job_flow|
|
56
|
+
# puts job_flow.id
|
57
|
+
# end
|
58
|
+
#
|
59
|
+
# See {JobFlowCollection} and {JobFlow} for more information on working
|
60
|
+
# with job flows.
|
61
|
+
#
|
62
|
+
class EMR
|
63
|
+
|
64
|
+
AWS.register_autoloads(self) do
|
65
|
+
autoload :Client, 'client'
|
66
|
+
autoload :Errors, 'errors'
|
67
|
+
autoload :InstanceGroup, 'instance_group'
|
68
|
+
autoload :InstanceGroupCollection, 'instance_group_collection'
|
69
|
+
autoload :JobFlow, 'job_flow'
|
70
|
+
autoload :JobFlowCollection, 'job_flow_collection'
|
71
|
+
autoload :Request, 'request'
|
72
|
+
end
|
73
|
+
|
74
|
+
include Core::ServiceInterface
|
75
|
+
|
76
|
+
# @return [JobFlowCollection] Returns a collection that represents all
|
77
|
+
# job flows.
|
78
|
+
def job_flows
|
79
|
+
JobFlowCollection.new(:config => config)
|
80
|
+
end
|
81
|
+
alias_method :jobs, :job_flows
|
82
|
+
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,309 @@
|
|
1
|
+
# Copyright 2011-2012 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License"). You
|
4
|
+
# may not use this file except in compliance with the License. A copy of
|
5
|
+
# the License is located at
|
6
|
+
#
|
7
|
+
# http://aws.amazon.com/apache2.0/
|
8
|
+
#
|
9
|
+
# or in the "license" file accompanying this file. This file is
|
10
|
+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
11
|
+
# ANY KIND, either express or implied. See the License for the specific
|
12
|
+
# language governing permissions and limitations under the License.
|
13
|
+
|
14
|
+
module AWS
|
15
|
+
class EMR
|
16
|
+
class Client < Core::Client
|
17
|
+
|
18
|
+
API_VERSION = '2009-03-31'
|
19
|
+
|
20
|
+
extend Core::Client::QueryXML
|
21
|
+
|
22
|
+
# @private
|
23
|
+
CACHEABLE_REQUESTS = Set[]
|
24
|
+
|
25
|
+
## client methods ##
|
26
|
+
|
27
|
+
# Calls the AddInstanceGroups API operation.
|
28
|
+
# @method add_instance_groups(options = {})
|
29
|
+
# @param [Hash] options
|
30
|
+
# * +:instance_groups+ - *required* - (Array<Hash>) Instance Groups to
|
31
|
+
# add.
|
32
|
+
# * +:name+ - (String) Friendly name given to the instance group.
|
33
|
+
# * +:market+ - (String) Market type of the Amazon EC2 instances used
|
34
|
+
# to create a cluster node.
|
35
|
+
# * +:instance_role+ - *required* - (String) The role of the instance
|
36
|
+
# group in the cluster.
|
37
|
+
# * +:bid_price+ - (String) Bid price for each Amazon EC2 instance in
|
38
|
+
# the instance group when launching nodes as Spot Instances,
|
39
|
+
# expressed in USD.
|
40
|
+
# * +:instance_type+ - *required* - (String) The Amazon EC2 instance
|
41
|
+
# type for all instances in the instance group.
|
42
|
+
# * +:instance_count+ - *required* - (Integer) Target number of
|
43
|
+
# instances for the instance group.
|
44
|
+
# * +:job_flow_id+ - *required* - (String) Job flow in which to add the
|
45
|
+
# instance groups.
|
46
|
+
# @return [Core::Response]
|
47
|
+
# Returns a reponse object whos #data method returns a hash
|
48
|
+
# the following structure:
|
49
|
+
# * +:job_flow_id+ - (String)
|
50
|
+
# * +:instance_group_ids+ - (Array<String>)
|
51
|
+
define_client_method :add_instance_groups, 'AddInstanceGroups'
|
52
|
+
|
53
|
+
# Calls the AddJobFlowSteps API operation.
|
54
|
+
# @method add_job_flow_steps(options = {})
|
55
|
+
# @param [Hash] options
|
56
|
+
# * +:job_flow_id+ - *required* - (String) A string that uniquely
|
57
|
+
# identifies the job flow. This identifier is returned by RunJobFlow
|
58
|
+
# and can also be obtained from DescribeJobFlows.
|
59
|
+
# * +:steps+ - *required* - (Array<Hash>) A list of StepConfig to be
|
60
|
+
# executed by the job flow.
|
61
|
+
# * +:name+ - *required* - (String) The name of the job flow step.
|
62
|
+
# * +:action_on_failure+ - (String) Specifies the action to take if
|
63
|
+
# the job flow step fails.
|
64
|
+
# * +:hadoop_jar_step+ - *required* - (Hash) Specifies the JAR file
|
65
|
+
# used for the job flow step.
|
66
|
+
# * +:properties+ - (Array<Hash>) A list of Java properties that
|
67
|
+
# are set when the step runs. You can use these properties to
|
68
|
+
# pass key value pairs to your main function.
|
69
|
+
# * +:key+ - (String) The unique identifier of a key value pair.
|
70
|
+
# * +:value+ - (String) The value part of the identified key.
|
71
|
+
# * +:jar+ - *required* - (String) A path to a JAR file run during
|
72
|
+
# the step.
|
73
|
+
# * +:main_class+ - (String) The name of the main class in the
|
74
|
+
# specified Java file. If not specified, the JAR file should
|
75
|
+
# specify a Main-Class in its manifest file.
|
76
|
+
# * +:args+ - (Array<String>) A list of command line arguments
|
77
|
+
# passed to the JAR file's main function when executed.
|
78
|
+
# @return [Core::Response]
|
79
|
+
define_client_method :add_job_flow_steps, 'AddJobFlowSteps'
|
80
|
+
|
81
|
+
# Calls the DescribeJobFlows API operation.
|
82
|
+
# @method describe_job_flows(options = {})
|
83
|
+
# @param [Hash] options
|
84
|
+
# * +:created_after+ - (String<ISO8601 datetime>) Return only job flows
|
85
|
+
# created after this date and time.
|
86
|
+
# * +:created_before+ - (String<ISO8601 datetime>) Return only job
|
87
|
+
# flows created before this date and time.
|
88
|
+
# * +:job_flow_ids+ - (Array<String>) Return only job flows whose job
|
89
|
+
# flow ID is contained in this list.
|
90
|
+
# * +:job_flow_states+ - (Array<String>) Return only job flows whose
|
91
|
+
# state is contained in this list.
|
92
|
+
# @return [Core::Response]
|
93
|
+
# Returns a reponse object whos #data method returns a hash
|
94
|
+
# the following structure:
|
95
|
+
# * +:job_flows+ - (Array<Hash>)
|
96
|
+
# * +:job_flow_id+ - (String)
|
97
|
+
# * +:name+ - (String)
|
98
|
+
# * +:log_uri+ - (String)
|
99
|
+
# * +:ami_version+ - (String)
|
100
|
+
# * +:execution_status_detail+ - (Hash)
|
101
|
+
# * +:state+ - (String)
|
102
|
+
# * +:creation_date_time+ - (Time)
|
103
|
+
# * +:start_date_time+ - (Time)
|
104
|
+
# * +:ready_date_time+ - (Time)
|
105
|
+
# * +:end_date_time+ - (Time)
|
106
|
+
# * +:last_state_change_reason+ - (String)
|
107
|
+
# * +:instances+ - (Hash)
|
108
|
+
# * +:master_instance_type+ - (String)
|
109
|
+
# * +:master_public_dns_name+ - (String)
|
110
|
+
# * +:master_instance_id+ - (String)
|
111
|
+
# * +:slave_instance_type+ - (String)
|
112
|
+
# * +:instance_count+ - (Integer)
|
113
|
+
# * +:instance_groups+ - (Array<Hash>)
|
114
|
+
# * +:instance_group_id+ - (String)
|
115
|
+
# * +:name+ - (String)
|
116
|
+
# * +:market+ - (String)
|
117
|
+
# * +:instance_role+ - (String)
|
118
|
+
# * +:bid_price+ - (String)
|
119
|
+
# * +:instance_type+ - (String)
|
120
|
+
# * +:instance_request_count+ - (Integer)
|
121
|
+
# * +:instance_running_count+ - (Integer)
|
122
|
+
# * +:state+ - (String)
|
123
|
+
# * +:last_state_change_reason+ - (String)
|
124
|
+
# * +:creation_date_time+ - (Time)
|
125
|
+
# * +:start_date_time+ - (Time)
|
126
|
+
# * +:ready_date_time+ - (Time)
|
127
|
+
# * +:end_date_time+ - (Time)
|
128
|
+
# * +:normalized_instance_hours+ - (Integer)
|
129
|
+
# * +:ec2_key_name+ - (String)
|
130
|
+
# * +:ec2_subnet_id+ - (String)
|
131
|
+
# * +:placement+ - (Hash)
|
132
|
+
# * +:availability_zone+ - (String)
|
133
|
+
# * +:keep_job_flow_alive_when_no_steps+ - (Boolean)
|
134
|
+
# * +:termination_protected+ - (Boolean)
|
135
|
+
# * +:hadoop_version+ - (String)
|
136
|
+
# * +:steps+ - (Array<Hash>)
|
137
|
+
# * +:step_config+ - (Hash)
|
138
|
+
# * +:name+ - (String)
|
139
|
+
# * +:action_on_failure+ - (String)
|
140
|
+
# * +:hadoop_jar_step+ - (Hash)
|
141
|
+
# * +:properties+ - (Array<Hash>)
|
142
|
+
# * +:key+ - (String)
|
143
|
+
# * +:value+ - (String)
|
144
|
+
# * +:jar+ - (String)
|
145
|
+
# * +:main_class+ - (String)
|
146
|
+
# * +:args+ - (Array<String>)
|
147
|
+
# * +:execution_status_detail+ - (Hash)
|
148
|
+
# * +:state+ - (String)
|
149
|
+
# * +:creation_date_time+ - (Time)
|
150
|
+
# * +:start_date_time+ - (Time)
|
151
|
+
# * +:end_date_time+ - (Time)
|
152
|
+
# * +:last_state_change_reason+ - (String)
|
153
|
+
# * +:bootstrap_actions+ - (Array<Hash>)
|
154
|
+
# * +:bootstrap_action_config+ - (Hash)
|
155
|
+
# * +:name+ - (String)
|
156
|
+
# * +:script_bootstrap_action+ - (Hash)
|
157
|
+
# * +:path+ - (String)
|
158
|
+
# * +:args+ - (Array<String>)
|
159
|
+
# * +:supported_products+ - (Array<String>)
|
160
|
+
define_client_method :describe_job_flows, 'DescribeJobFlows'
|
161
|
+
|
162
|
+
# Calls the ModifyInstanceGroups API operation.
|
163
|
+
# @method modify_instance_groups(options = {})
|
164
|
+
# @param [Hash] options
|
165
|
+
# * +:instance_groups+ - (Array<Hash>) Instance groups to change.
|
166
|
+
# * +:instance_group_id+ - *required* - (String) Unique ID of the
|
167
|
+
# instance group to expand or shrink.
|
168
|
+
# * +:instance_count+ - *required* - (Integer) Target size for the
|
169
|
+
# instance group.
|
170
|
+
# @return [Core::Response]
|
171
|
+
define_client_method :modify_instance_groups, 'ModifyInstanceGroups'
|
172
|
+
|
173
|
+
# Calls the RunJobFlow API operation.
|
174
|
+
# @method run_job_flow(options = {})
|
175
|
+
# @param [Hash] options
|
176
|
+
# * +:name+ - *required* - (String) The name of the job flow.
|
177
|
+
# * +:log_uri+ - (String) Specifies the location in Amazon S3 to write
|
178
|
+
# the log files of the job flow. If a value is not provided, logs are
|
179
|
+
# not created.
|
180
|
+
# * +:additional_info+ - (String) A JSON string for selecting
|
181
|
+
# additional features.
|
182
|
+
# * +:ami_version+ - (String) The version of the Amazon Machine Image
|
183
|
+
# (AMI) to use when launching Amazon EC2 instances in the job flow.
|
184
|
+
# The following values ane valid: "latest" (latest AMI version;
|
185
|
+
# currently AMI 2.0, Hadoop 0.20.205) "2.0" (AMI 2.0, Hadoop
|
186
|
+
# 0.20.205) "1.0" (AMI 1.0, Hadoop 0.18) If this value is not
|
187
|
+
# specified, the job flow uses the default of (AMI 1.0, Hadoop 0.18).
|
188
|
+
# If the AMI supports multiple verisons of Hadoop (for example, AMI
|
189
|
+
# 1.0 supports both Hadoop 0.18 and 0.20) you can use the
|
190
|
+
# JobFlowInstancesConfig HadoopVersion parameter to modify the
|
191
|
+
# version of Hadoop from the defaults shown above. For details about
|
192
|
+
# the AMI versions currently supported by Amazon ElasticMapReduce, go
|
193
|
+
# to AMI Versions Supported in Elastic MapReduce in the Amazon
|
194
|
+
# Elastic MapReduce Developer's Guide.
|
195
|
+
# * +:instances+ - *required* - (Hash) A specification of the number
|
196
|
+
# and type of Amazon EC2 instances on which to run the job flow.
|
197
|
+
# * +:master_instance_type+ - (String) The EC2 instance type of the
|
198
|
+
# master node.
|
199
|
+
# * +:slave_instance_type+ - (String) The EC2 instance type of the
|
200
|
+
# slave nodes.
|
201
|
+
# * +:instance_count+ - (Integer) The number of Amazon EC2 instances
|
202
|
+
# used to execute the job flow.
|
203
|
+
# * +:instance_groups+ - (Array<Hash>) Configuration for the job
|
204
|
+
# flow's instance groups.
|
205
|
+
# * +:name+ - (String) Friendly name given to the instance group.
|
206
|
+
# * +:market+ - (String) Market type of the Amazon EC2 instances
|
207
|
+
# used to create a cluster node.
|
208
|
+
# * +:instance_role+ - *required* - (String) The role of the
|
209
|
+
# instance group in the cluster.
|
210
|
+
# * +:bid_price+ - (String) Bid price for each Amazon EC2 instance
|
211
|
+
# in the instance group when launching nodes as Spot Instances,
|
212
|
+
# expressed in USD.
|
213
|
+
# * +:instance_type+ - *required* - (String) The Amazon EC2
|
214
|
+
# instance type for all instances in the instance group.
|
215
|
+
# * +:instance_count+ - *required* - (Integer) Target number of
|
216
|
+
# instances for the instance group.
|
217
|
+
# * +:ec2_key_name+ - (String) Specifies the name of the Amazon EC2
|
218
|
+
# key pair that can be used to ssh to the master node as the user
|
219
|
+
# called "hadoop."
|
220
|
+
# * +:placement+ - (Hash) Specifies the Availability Zone the job
|
221
|
+
# flow will run in.
|
222
|
+
# * +:availability_zone+ - *required* - (String) The Amazon EC2
|
223
|
+
# Availability Zone for the job flow.
|
224
|
+
# * +:keep_job_flow_alive_when_no_steps+ - (Boolean) Specifies
|
225
|
+
# whether the job flow should terminate after completing all steps.
|
226
|
+
# * +:termination_protected+ - (Boolean) Specifies whether to lock
|
227
|
+
# the job flow to prevent the Amazon EC2 instances from being
|
228
|
+
# terminated by API call, user intervention, or in the event of a
|
229
|
+
# job flow error.
|
230
|
+
# * +:hadoop_version+ - (String) Specifies the Hadoop version for the
|
231
|
+
# job flow. Valid inputs are "0.18", "0.20", or "0.20.205". If you
|
232
|
+
# do not set this value, the default of 0.18 is used, unless the
|
233
|
+
# AmiVersion parameter is set in the RunJobFlow call, in which case
|
234
|
+
# the default version of Hadoop for that AMI version is used.
|
235
|
+
# * +:ec2_subnet_id+ - (String) To launch the job flow in Amazon
|
236
|
+
# Virtual Private Cloud (Amazon VPC), set this parameter to the
|
237
|
+
# identifier of the Amazon VPC subnet where you want the job flow
|
238
|
+
# to launch. If you do not specify this value, the job flow is
|
239
|
+
# launched in the normal Amazon Web Services cloud, outside of an
|
240
|
+
# Amazon VPC. Amazon VPC currently does not support cluster compute
|
241
|
+
# quadruple extra large (cc1.4xlarge) instances. Thus you cannot
|
242
|
+
# specify the cc1.4xlarge instance type for nodes of a job flow
|
243
|
+
# launched in a Amazon VPC.
|
244
|
+
# * +:steps+ - (Array<Hash>) A list of steps to be executed by the job
|
245
|
+
# flow.
|
246
|
+
# * +:name+ - *required* - (String) The name of the job flow step.
|
247
|
+
# * +:action_on_failure+ - (String) Specifies the action to take if
|
248
|
+
# the job flow step fails.
|
249
|
+
# * +:hadoop_jar_step+ - *required* - (Hash) Specifies the JAR file
|
250
|
+
# used for the job flow step.
|
251
|
+
# * +:properties+ - (Array<Hash>) A list of Java properties that
|
252
|
+
# are set when the step runs. You can use these properties to
|
253
|
+
# pass key value pairs to your main function.
|
254
|
+
# * +:key+ - (String) The unique identifier of a key value pair.
|
255
|
+
# * +:value+ - (String) The value part of the identified key.
|
256
|
+
# * +:jar+ - *required* - (String) A path to a JAR file run during
|
257
|
+
# the step.
|
258
|
+
# * +:main_class+ - (String) The name of the main class in the
|
259
|
+
# specified Java file. If not specified, the JAR file should
|
260
|
+
# specify a Main-Class in its manifest file.
|
261
|
+
# * +:args+ - (Array<String>) A list of command line arguments
|
262
|
+
# passed to the JAR file's main function when executed.
|
263
|
+
# * +:bootstrap_actions+ - (Array<Hash>) A list of bootstrap actions
|
264
|
+
# that will be run before Hadoop is started on the cluster nodes.
|
265
|
+
# * +:name+ - *required* - (String) The name of the bootstrap action.
|
266
|
+
# * +:script_bootstrap_action+ - *required* - (Hash) The script run
|
267
|
+
# by the bootstrap action.
|
268
|
+
# * +:path+ - *required* - (String) Location of the script to run
|
269
|
+
# during a bootstrap action. Can be either a location in Amazon
|
270
|
+
# S3 or on a local file system.
|
271
|
+
# * +:args+ - (Array<String>) A list of command line arguments to
|
272
|
+
# pass to the bootstrap action script.
|
273
|
+
# * +:supported_products+ - (Array<String>) A list of strings used by
|
274
|
+
# third-party software to tag the job flow. Currently the only valid
|
275
|
+
# value is "karmasphere-enterprise-utility", which tags the job flow
|
276
|
+
# for management by Karmasphere.
|
277
|
+
# @return [Core::Response]
|
278
|
+
# Returns a reponse object whos #data method returns a hash
|
279
|
+
# the following structure:
|
280
|
+
# * +:job_flow_id+ - (String)
|
281
|
+
define_client_method :run_job_flow, 'RunJobFlow'
|
282
|
+
|
283
|
+
# Calls the SetTerminationProtection API operation.
|
284
|
+
# @method set_termination_protection(options = {})
|
285
|
+
# @param [Hash] options
|
286
|
+
# * +:job_flow_ids+ - *required* - (Array<String>) A list of strings
|
287
|
+
# that uniquely identify the job flows to protect. This identifier is
|
288
|
+
# returned by RunJobFlow and can also be obtained from
|
289
|
+
# DescribeJobFlows .
|
290
|
+
# * +:termination_protected+ - *required* - (Boolean) A Boolean that
|
291
|
+
# indicates whether to protect the job flow and prevent the Amazon
|
292
|
+
# EC2 instances in the cluster from shutting down due to API calls,
|
293
|
+
# user intervention, or job-flow error.
|
294
|
+
# @return [Core::Response]
|
295
|
+
define_client_method :set_termination_protection, 'SetTerminationProtection'
|
296
|
+
|
297
|
+
# Calls the TerminateJobFlows API operation.
|
298
|
+
# @method terminate_job_flows(options = {})
|
299
|
+
# @param [Hash] options
|
300
|
+
# * +:job_flow_ids+ - *required* - (Array<String>) A list of job flows
|
301
|
+
# to be shutdown.
|
302
|
+
# @return [Core::Response]
|
303
|
+
define_client_method :terminate_job_flows, 'TerminateJobFlows'
|
304
|
+
|
305
|
+
## end client methods ##
|
306
|
+
|
307
|
+
end
|
308
|
+
end
|
309
|
+
end
|