Module: AWS
- Defined in:
- lib/fog/aws/bin.rb
Instance Method Summary collapse
- #[](service) ⇒ Object
- #addresses ⇒ Object
- #directories ⇒ Object
- #flavors ⇒ Object
- #images ⇒ Object
- #initialized? ⇒ Boolean
- #key_pairs ⇒ Object
- #security_groups ⇒ Object
- #servers ⇒ Object
- #snapshots ⇒ Object
- #volumes ⇒ Object
Instance Method Details
#[](service) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/fog/aws/bin.rb', line 10 def [](service) @@connections ||= Hash.new do |hash, key| credentials = Fog.credentials.reject do |k, v| ![:aws_access_key_id, :aws_secret_access_key].include?(k) end hash[key] = case key when :ec2 Fog::AWS::EC2.new(credentials) when :elb Fog::AWS::ELB.new(credentials) when :simpledb Fog::AWS::SimpleDB.new(credentials) when :s3 Fog::AWS::S3.new(credentials) end end @@connections[service] end |
#addresses ⇒ Object
29 30 31 |
# File 'lib/fog/aws/bin.rb', line 29 def addresses self[:ec2].addresses end |
#directories ⇒ Object
33 34 35 |
# File 'lib/fog/aws/bin.rb', line 33 def directories self[:s3].directories end |
#flavors ⇒ Object
37 38 39 |
# File 'lib/fog/aws/bin.rb', line 37 def flavors self[:ec2].flavors end |
#images ⇒ Object
41 42 43 |
# File 'lib/fog/aws/bin.rb', line 41 def images self[:ec2].images end |
#initialized? ⇒ Boolean
6 7 8 |
# File 'lib/fog/aws/bin.rb', line 6 def initialized? true end |
#key_pairs ⇒ Object
49 50 51 |
# File 'lib/fog/aws/bin.rb', line 49 def key_pairs self[:ec2].key_pairs end |
#security_groups ⇒ Object
53 54 55 |
# File 'lib/fog/aws/bin.rb', line 53 def security_groups self[:ec2].security_groups end |
#servers ⇒ Object
45 46 47 |
# File 'lib/fog/aws/bin.rb', line 45 def servers self[:ec2].servers end |
#snapshots ⇒ Object
57 58 59 |
# File 'lib/fog/aws/bin.rb', line 57 def snapshots self[:ec2].snapshots end |
#volumes ⇒ Object
61 62 63 |
# File 'lib/fog/aws/bin.rb', line 61 def volumes self[:ec2].volumes end |