class Fog::AWS::RDS::ClusterSnapshots
Public Class Methods
new(attributes)
click to toggle source
Calls superclass method
# File lib/fog/aws/models/rds/cluster_snapshots.rb, line 11 def initialize(attributes) self.filters ||= {} if attributes[:cluster] filters[:identifier] = attributes[:cluster].id end if attributes[:type] filters[:type] = attributes[:type] end super end
Public Instance Methods
all(filters_arg = filters)
click to toggle source
# File lib/fog/aws/models/rds/cluster_snapshots.rb, line 23 def all(filters_arg = filters) filters.merge!(filters_arg) page = service.describe_db_cluster_snapshots(filters).body['DescribeDBClusterSnapshotsResult'] filters[:marker] = page['Marker'] load(page['DBClusterSnapshots']) end
create(params={})
click to toggle source
Calls superclass method
# File lib/fog/aws/models/rds/cluster_snapshots.rb, line 38 def create(params={}) if cluster super(params.merge(:cluster_id => cluster.id)) else super(params) end end
get(identity)
click to toggle source
# File lib/fog/aws/models/rds/cluster_snapshots.rb, line 31 def get(identity) data = service.describe_db_cluster_snapshots(:snapshot_id => identity).body['DescribeDBClusterSnapshotsResult']['DBClusterSnapshots'].first new(data) # data is an attribute hash rescue Fog::AWS::RDS::NotFound nil end