Class: Capistrano::Autoscale::AWS::Base

Inherits:
Object
  • Object
show all
Includes:
DSL
Defined in:
lib/capistrano/autoscale/aws/base.rb

Instance Method Summary collapse

Instance Method Details

#autoscaling_clientObject



13
14
15
# File 'lib/capistrano/autoscale/aws/base.rb', line 13

def autoscaling_client
  @autoscaling_client ||= ::Aws::AutoScaling::Client.new(aws_options)
end

#aws_access_key_idObject



28
29
30
# File 'lib/capistrano/autoscale/aws/base.rb', line 28

def aws_access_key_id
  fetch :aws_access_key_id
end

#aws_autoscale_ami_tagsObject



40
41
42
# File 'lib/capistrano/autoscale/aws/base.rb', line 40

def aws_autoscale_ami_tags
  fetch :aws_autoscale_ami_tags
end

#aws_autoscale_snapshot_tagsObject



44
45
46
# File 'lib/capistrano/autoscale/aws/base.rb', line 44

def aws_autoscale_snapshot_tags
  fetch :aws_autoscale_snapshot_tags
end

#aws_credentialsObject



24
25
26
# File 'lib/capistrano/autoscale/aws/base.rb', line 24

def aws_credentials
  fetch :aws_credentials, ::Aws::Credentials.new(aws_access_key_id, aws_secret_access_key)
end

#aws_optionsObject



17
18
19
20
21
22
# File 'lib/capistrano/autoscale/aws/base.rb', line 17

def aws_options
  options = {}
  options[:region] = aws_region if aws_region
  options[:credentials] = aws_credentials if aws_credentials.set?
  options
end

#aws_regionObject



36
37
38
# File 'lib/capistrano/autoscale/aws/base.rb', line 36

def aws_region
  fetch :aws_region
end

#aws_secret_access_keyObject



32
33
34
# File 'lib/capistrano/autoscale/aws/base.rb', line 32

def aws_secret_access_key
  fetch :aws_secret_access_key
end

#ec2_clientObject



9
10
11
# File 'lib/capistrano/autoscale/aws/base.rb', line 9

def ec2_client
  @ec2_client ||= ::Aws::EC2::Client.new(aws_options)
end