1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/aws/requests/redshift/delete_cluster_snapshot.rb

44 lines
1.7 KiB
Ruby
Raw Normal View History

2013-08-30 04:21:23 -04:00
module Fog
module AWS
class Redshift
class Real
require 'fog/aws/parsers/redshift/cluster_snapshot'
2013-08-30 04:21:23 -04:00
# ==== Parameters
2014-02-19 12:30:59 +00:00
#
2013-08-30 04:21:23 -04:00
# @param [Hash] options
# * :snapshot_identifier - required - (String)
2014-02-19 12:30:59 +00:00
# A unique identifier for the snapshot that you are requesting. This identifier
2013-08-30 04:21:23 -04:00
# must be unique for all snapshots within the AWS account. Constraints: Cannot be
2014-02-19 12:30:59 +00:00
# null, empty, or blank Must contain from 1 to 255 alphanumeric characters or
2013-08-30 04:21:23 -04:00
# hyphens First character must be a letter Cannot end with a hyphen or contain two
# consecutive hyphens Example: my-snapshot-id
2014-02-19 12:30:59 +00:00
# * :snapshot_cluster_identifier - required - (String)
2013-08-30 04:21:23 -04:00
# The cluster identifier for which you want a snapshot.
#
# ==== See Also
2014-02-19 12:30:59 +00:00
# http://docs.aws.amazon.com/redshift/latest/APIReference/API_CreateClusterSnapshot.html
2013-08-30 04:21:23 -04:00
def delete_cluster_snapshot(options = {})
snapshot_identifier = options[:snapshot_identifier]
snapshot_cluster_identifier = options[:snapshot_cluster_identifier]
path = "/"
params = {
:headers => {},
:path => path,
:method => :put,
:query => {},
:parser => Fog::Parsers::Redshift::AWS::ClusterSnapshot.new
2013-08-30 04:21:23 -04:00
}
params[:query]['Action'] = 'DeleteClusterSnapshot'
params[:query]['SnapshotIdentifier'] = snapshot_identifier if snapshot_identifier
params[:query]['SnapshotClusterIdentifier'] = snapshot_cluster_identifier if snapshot_cluster_identifier
request(params)
end
end
end
end
2014-02-19 12:30:59 +00:00
end