Class: Bosh::Aws::AwsProvider
- Inherits:
-
Object
- Object
- Bosh::Aws::AwsProvider
- Defined in:
- lib/bosh_cli_plugin_aws/aws_provider.rb
Instance Attribute Summary collapse
-
#credentials ⇒ Object
readonly
Returns the value of attribute credentials.
Instance Method Summary collapse
- #ec2 ⇒ Object
- #elb ⇒ Object
- #iam ⇒ Object
-
#initialize(credentials) ⇒ AwsProvider
constructor
A new instance of AwsProvider.
- #rds ⇒ Object
- #rds_client ⇒ Object
- #region ⇒ Object
- #route53 ⇒ Object
- #s3 ⇒ Object
Constructor Details
#initialize(credentials) ⇒ AwsProvider
Returns a new instance of AwsProvider.
6 7 8 |
# File 'lib/bosh_cli_plugin_aws/aws_provider.rb', line 6 def initialize(credentials) @credentials = credentials end |
Instance Attribute Details
#credentials ⇒ Object (readonly)
Returns the value of attribute credentials.
4 5 6 |
# File 'lib/bosh_cli_plugin_aws/aws_provider.rb', line 4 def credentials @credentials end |
Instance Method Details
#ec2 ⇒ Object
10 11 12 |
# File 'lib/bosh_cli_plugin_aws/aws_provider.rb', line 10 def ec2 @ec2 ||= ::AWS::EC2.new(credentials.merge('ec2_endpoint' => ec2_endpoint)) end |
#elb ⇒ Object
14 15 16 |
# File 'lib/bosh_cli_plugin_aws/aws_provider.rb', line 14 def elb @elb ||= ::AWS::ELB.new(credentials.merge('elb_endpoint' => elb_endpoint)) end |
#iam ⇒ Object
18 19 20 |
# File 'lib/bosh_cli_plugin_aws/aws_provider.rb', line 18 def iam @iam ||= ::AWS::IAM.new(credentials) end |
#rds ⇒ Object
22 23 24 |
# File 'lib/bosh_cli_plugin_aws/aws_provider.rb', line 22 def rds @rds ||= ::AWS::RDS.new(credentials.merge('rds_endpoint' => rds_endpoint)) end |
#rds_client ⇒ Object
26 27 28 |
# File 'lib/bosh_cli_plugin_aws/aws_provider.rb', line 26 def rds_client @rds_client ||= ::AWS::RDS::Client.new(credentials.merge('rds_endpoint' => rds_endpoint)) end |
#region ⇒ Object
34 35 36 |
# File 'lib/bosh_cli_plugin_aws/aws_provider.rb', line 34 def region credentials['region'] end |
#route53 ⇒ Object
30 31 32 |
# File 'lib/bosh_cli_plugin_aws/aws_provider.rb', line 30 def route53 @aws_route53 ||= ::AWS::Route53.new(credentials) end |
#s3 ⇒ Object
38 39 40 |
# File 'lib/bosh_cli_plugin_aws/aws_provider.rb', line 38 def s3 @s3 ||= ::AWS::S3.new(credentials) end |