Class: Capistrano::ASG::Rolling::Snapshot

Inherits:
Object
  • Object
show all
Includes:
AWS
Defined in:
lib/capistrano/asg/rolling/snapshot.rb

Overview

AWS EC2 EBS snapshot.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from AWS

#aws_autoscaling_client, #aws_ec2_client

Constructor Details

#initialize(id) ⇒ Snapshot

Returns a new instance of Snapshot.



12
13
14
# File 'lib/capistrano/asg/rolling/snapshot.rb', line 12

def initialize(id)
  @id = id
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



10
11
12
# File 'lib/capistrano/asg/rolling/snapshot.rb', line 10

def id
  @id
end

Instance Method Details

#deleteObject



16
17
18
# File 'lib/capistrano/asg/rolling/snapshot.rb', line 16

def delete
  aws_ec2_client.delete_snapshot(snapshot_id: id)
end