1
0
Fork 0
mirror of https://github.com/fog/fog-aws.git synced 2022-11-09 13:50:52 -05:00
fog--fog-aws/lib/fog/aws/models/elasticache/subnet_group.rb
Josh Lane d48d376e9c initial import
* take the liberty of correcting Aws naming
2014-12-31 09:17:51 -08:00

32 lines
845 B
Ruby

require 'fog/core/model'
module Fog
module AWS
class Elasticache
class SubnetGroup < Fog::Model
identity :id, :aliases => ['CacheSubnetGroupName', :name]
attribute :description, :aliases => 'CacheSubnetGroupDescription'
attribute :vpc_id, :aliases => 'VpcId'
attribute :subnet_ids, :aliases => 'Subnets'
def ready?
# Just returning true, as Elasticache subnet groups
# seem to not have a status, unlike RDS subnet groups.
true
end
def save
requires :description, :id, :subnet_ids
service.create_cache_subnet_group(id, subnet_ids, description)
reload
end
def destroy
requires :id
service.delete_cache_subnet_group(id)
true
end
end
end
end
end