class Bosh::AwsCliPlugin::AwsProvider
Attributes
credentials[R]
Public Class Methods
new(credentials)
click to toggle source
# File lib/bosh_cli_plugin_aws/aws_provider.rb, line 6 def initialize(credentials) @credentials = credentials end
Public Instance Methods
ec2()
click to toggle source
# 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()
click to toggle source
# 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()
click to toggle source
# File lib/bosh_cli_plugin_aws/aws_provider.rb, line 18 def iam @iam ||= ::AWS::IAM.new(credentials) end
rds()
click to toggle source
# 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()
click to toggle source
# 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()
click to toggle source
# File lib/bosh_cli_plugin_aws/aws_provider.rb, line 34 def region credentials['region'] end
route53()
click to toggle source
# File lib/bosh_cli_plugin_aws/aws_provider.rb, line 30 def route53 @aws_route53 ||= ::AWS::Route53.new(credentials) end
s3()
click to toggle source
# File lib/bosh_cli_plugin_aws/aws_provider.rb, line 38 def s3 @s3 ||= ::AWS::S3.new(credentials) end
Private Instance Methods
ec2_endpoint()
click to toggle source
# File lib/bosh_cli_plugin_aws/aws_provider.rb, line 44 def ec2_endpoint "ec2.#{region}.amazonaws.com" end
elb_endpoint()
click to toggle source
# File lib/bosh_cli_plugin_aws/aws_provider.rb, line 48 def elb_endpoint "elasticloadbalancing.#{region}.amazonaws.com" end
rds_endpoint()
click to toggle source
# File lib/bosh_cli_plugin_aws/aws_provider.rb, line 52 def rds_endpoint "rds.#{region}.amazonaws.com" end