mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Adding S3 snapshot location for elasticache
Only viable for redis engine
This commit is contained in:
parent
d3c0e30a34
commit
fde4a8d2a0
2 changed files with 8 additions and 0 deletions
|
@ -32,6 +32,8 @@ module Fog
|
||||||
:aliases => 'CacheSubnetGroupName'
|
:aliases => 'CacheSubnetGroupName'
|
||||||
attribute :vpc_security_groups,
|
attribute :vpc_security_groups,
|
||||||
:aliases => 'VpcSecurityGroups', :type => :array
|
:aliases => 'VpcSecurityGroups', :type => :array
|
||||||
|
attribute :s3_snapshot_location,
|
||||||
|
:aliases => 'SnapshotArns', :type => :array
|
||||||
|
|
||||||
attr_accessor :parameter_group_name
|
attr_accessor :parameter_group_name
|
||||||
|
|
||||||
|
@ -63,6 +65,7 @@ module Fog
|
||||||
:port => port,
|
:port => port,
|
||||||
:preferred_availablility_zone => zone,
|
:preferred_availablility_zone => zone,
|
||||||
:preferred_maintenance_window => maintenance_window,
|
:preferred_maintenance_window => maintenance_window,
|
||||||
|
:s3_snapshot_location => s3_snapshot_location,
|
||||||
:parameter_group_name => parameter_group_name || parameter_group['CacheParameterGroupName'],
|
:parameter_group_name => parameter_group_name || parameter_group['CacheParameterGroupName'],
|
||||||
:cache_subnet_group_name => cache_subnet_group_name,
|
:cache_subnet_group_name => cache_subnet_group_name,
|
||||||
:vpc_security_groups => vpc_security_groups,
|
:vpc_security_groups => vpc_security_groups,
|
||||||
|
|
|
@ -23,6 +23,7 @@ module Fog
|
||||||
# * :preferred_availablility_zone <~String>
|
# * :preferred_availablility_zone <~String>
|
||||||
# * :preferred_maintenance_window <~String>
|
# * :preferred_maintenance_window <~String>
|
||||||
# * :cache_subnet_group_name <~String>
|
# * :cache_subnet_group_name <~String>
|
||||||
|
# * :s3_snapshot_location <~String> - Amazon resource location for snapshot
|
||||||
# === Returns
|
# === Returns
|
||||||
# * response <~Excon::Response>:
|
# * response <~Excon::Response>:
|
||||||
# * body <~Hash>
|
# * body <~Hash>
|
||||||
|
@ -45,6 +46,10 @@ module Fog
|
||||||
:parser => Fog::Parsers::AWS::Elasticache::SingleCacheCluster.new
|
:parser => Fog::Parsers::AWS::Elasticache::SingleCacheCluster.new
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if s3_snapshot_location = options.delete(:s3_snapshot_location)
|
||||||
|
req_options.merge!(Fog::AWS.indexed_param('SnapshotArns.member.%d', [*s3_snapshot_location]))
|
||||||
|
end
|
||||||
|
|
||||||
if cache_security_groups = options.delete(:security_group_names)
|
if cache_security_groups = options.delete(:security_group_names)
|
||||||
req_options.merge!(Fog::AWS.indexed_param('CacheSecurityGroupNames.member.%d', [*cache_security_groups]))
|
req_options.merge!(Fog::AWS.indexed_param('CacheSecurityGroupNames.member.%d', [*cache_security_groups]))
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue