aws 2.2.2 → 2.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -941,8 +941,7 @@ module Aws
941
941
  # Parse the xml text
942
942
  case @xml_lib
943
943
  when 'libxml'
944
- xml = XML::SaxParser.new
945
- xml.string = xml_text
944
+ xml = XML::SaxParser.string(xml_text)
946
945
  # check libxml-ruby version
947
946
  if XML::Parser::VERSION >= '0.5.1.0'
948
947
  xml.callbacks = RightSaxParserCallback.new(self)
@@ -17,20 +17,25 @@ module Aws
17
17
 
18
18
  @@api = ENV['RDS_API_VERSION'] || API_VERSION
19
19
 
20
+
20
21
  def self.api
21
22
  @@api
22
23
  end
23
24
 
25
+
24
26
  @@bench = AwsBenchmarkingBlock.new
25
27
 
28
+
26
29
  def self.bench_xml
27
30
  @@bench.xml
28
31
  end
29
32
 
33
+
30
34
  def self.bench_ec2
31
35
  @@bench.service
32
36
  end
33
37
 
38
+
34
39
  def initialize(aws_access_key_id=nil, aws_secret_access_key=nil, params={})
35
40
  uri = ENV['RDS_URL'] ? URI.parse(ENV['RDS_URL']) : nil
36
41
  init({ :name => 'RDS',
@@ -43,6 +48,7 @@ module Aws
43
48
  params)
44
49
  end
45
50
 
51
+
46
52
  def generate_request(action, params={})
47
53
  generate_request2(@aws_access_key_id, @aws_secret_access_key, action, @@api, @params, params)
48
54
  end
@@ -84,6 +90,7 @@ module Aws
84
90
  on_exception
85
91
  end
86
92
 
93
+
87
94
  # options:
88
95
  # DBInstanceIdentifier
89
96
  # MaxRecords
@@ -122,6 +129,63 @@ module Aws
122
129
  on_exception
123
130
  end
124
131
 
132
+
133
+ def create_db_security_groups(group_name, description, options={})
134
+ params = {}
135
+ params['DBSecurityGroupName'] = group_name
136
+ params['DBSecurityGroupDescription'] = description
137
+ params['Engine'] = options[:engine] || "MySQL5.1"
138
+ link = generate_request("CreateDBSecurityGroup", params)
139
+ resp = request_info_xml_simple(:rds_connection, @params, link, @logger)
140
+ rescue Exception
141
+ on_exception
142
+ end
143
+
144
+
145
+ def describe_db_security_groups(options={})
146
+ params = {}
147
+ params['DBSecurityGroupName'] = options[:DBSecurityGroupName] if options[:DBSecurityGroupName]
148
+ params['MaxRecords'] = options[:MaxRecords] if options[:MaxRecords]
149
+ link = generate_request("DescribeDBSecurityGroups", params)
150
+ resp = request_info_xml_simple(:rds_connection, @params, link, @logger)
151
+ rescue Exception
152
+ on_exception
153
+ end
154
+
155
+
156
+ def authorize_db_security_group_ingress(group_name, ec2_group_name, ec2_group_owner_id, options={})
157
+ params = {}
158
+ params['DBSecurityGroupName'] = group_name
159
+ params['EC2SecurityGroupOwnerId'] = ec2_group_owner_id
160
+ params['EC2Security-GroupName'] = ec2_group_name
161
+ link = generate_request("AuthorizeDBSecurityGroupIngress", params)
162
+ resp = request_info_xml_simple(:rds_connection, @params, link, @logger)
163
+ rescue Exception
164
+ on_exception
165
+ end
166
+
167
+
168
+ def authorize_db_security_group_ingress(group_name, ip_range, options={})
169
+ params = {}
170
+ params['DBSecurityGroupName'] = group_name
171
+ params['CIDRIP'] = ip_range
172
+ link = generate_request("AuthorizeDBSecurityGroupIngress", params)
173
+ resp = request_info_xml_simple(:rds_connection, @params, link, @logger)
174
+ rescue Exception
175
+ on_exception
176
+ end
177
+
178
+
179
+ def revoke_db_security_group_ingress(group_name, ip_range, options={})
180
+ params = {}
181
+ params['DBSecurityGroupName'] = group_name
182
+ params['CIDRIP'] = ip_range
183
+ link = generate_request("RevokeDBSecurityGroupIngress", params)
184
+ resp = request_info_xml_simple(:rds_connection, @params, link, @logger)
185
+ rescue Exception
186
+ on_exception
187
+ end
188
+
125
189
  end
126
190
 
127
191
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.2
4
+ version: 2.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Travis Reeder
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2010-02-02 00:00:00 -08:00
14
+ date: 2010-02-08 00:00:00 -08:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency