Class: Capistrano::Autoscale::AWS::Base
- Inherits:
-
Object
- Object
- Capistrano::Autoscale::AWS::Base
show all
- Includes:
- DSL
- Defined in:
- lib/capistrano/autoscale/aws/base.rb
Instance Method Summary
collapse
Instance Method Details
#autoscaling_client ⇒ Object
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_id ⇒ Object
28
29
30
|
# File 'lib/capistrano/autoscale/aws/base.rb', line 28
def aws_access_key_id
fetch :aws_access_key_id
end
|
40
41
42
|
# File 'lib/capistrano/autoscale/aws/base.rb', line 40
def aws_autoscale_ami_tags
fetch :aws_autoscale_ami_tags
end
|
44
45
46
|
# File 'lib/capistrano/autoscale/aws/base.rb', line 44
def aws_autoscale_snapshot_tags
fetch :aws_autoscale_snapshot_tags
end
|
#aws_credentials ⇒ Object
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_options ⇒ Object
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_region ⇒ Object
36
37
38
|
# File 'lib/capistrano/autoscale/aws/base.rb', line 36
def aws_region
fetch :aws_region
end
|
#aws_secret_access_key ⇒ Object
32
33
34
|
# File 'lib/capistrano/autoscale/aws/base.rb', line 32
def aws_secret_access_key
fetch :aws_secret_access_key
end
|
#ec2_client ⇒ Object
9
10
11
|
# File 'lib/capistrano/autoscale/aws/base.rb', line 9
def ec2_client
@ec2_client ||= ::Aws::EC2::Client.new(aws_options)
end
|