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

31 lines
819 B
Ruby
Raw Normal View History

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