class Fog::AWS::RDS::Snapshot
Public Instance Methods
cluster()
click to toggle source
# File lib/fog/aws/models/rds/snapshot.rb, line 59 def cluster requires :cluster_id service.clusters.get(cluster_id) end
destroy()
click to toggle source
# 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?()
click to toggle source
# File lib/fog/aws/models/rds/snapshot.rb, line 25 def ready? state == 'available' end
save()
click to toggle source
# 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()
click to toggle source
# File lib/fog/aws/models/rds/snapshot.rb, line 54 def server requires :instance_id service.servers.get(instance_id) end