Class: Fog::AWS::RDS::Snapshot
- Inherits:
- 
      Model
      
        - Object
- Model
- Fog::AWS::RDS::Snapshot
 
- Defined in:
- lib/fog/aws/models/rds/snapshot.rb
Instance Method Summary collapse
Instance Method Details
#cluster ⇒ Object
| 59 60 61 62 | # File 'lib/fog/aws/models/rds/snapshot.rb', line 59 def cluster requires :cluster_id service.clusters.get(cluster_id) end | 
#destroy ⇒ Object
| 29 30 31 32 33 34 35 36 37 38 39 | # File 'lib/fog/aws/models/rds/snapshot.rb', line 29 def destroy requires :id requires_one :instance_id, :cluster_id if instance_id service.delete_db_snapshot(id) else service.delete_db_cluster_snapshot(id) end true end | 
#ready? ⇒ Boolean
| 25 26 27 | # File 'lib/fog/aws/models/rds/snapshot.rb', line 25 def ready? state == 'available' end | 
#save ⇒ Object
| 41 42 43 44 45 46 47 48 49 50 51 52 | # File 'lib/fog/aws/models/rds/snapshot.rb', line 41 def save requires_one :instance_id, :cluster_id requires :id data = if instance_id service.create_db_snapshot(instance_id, id).body['CreateDBSnapshotResult']['DBSnapshot'] elsif cluster_id service.create_db_cluster_snapshot(cluster_id, id).body['CreateDBClusterSnapshotResult']['DBClusterSnapshot'] end merge_attributes(data) true end | 
#server ⇒ Object
| 54 55 56 57 | # File 'lib/fog/aws/models/rds/snapshot.rb', line 54 def server requires :instance_id service.servers.get(instance_id) end |