Sha256: 888612d773ec5ec6afeeee78b95fff447333d5a3b4a462b8cd6ffe27f9fec871

Contents?: true

Size: 845 Bytes

Versions: 22

Compression:

Stored size: 845 Bytes

Contents

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

Version data entries

22 entries across 22 versions & 5 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/aws/models/elasticache/subnet_group.rb
fog-aws-0.1.1 lib/fog/aws/models/elasticache/subnet_group.rb
fog-aws-0.1.0 lib/fog/aws/models/elasticache/subnet_group.rb
fog-aws-0.0.8 lib/fog/aws/models/elasticache/subnet_group.rb
fog-aws-0.0.7 lib/fog/aws/models/elasticache/subnet_group.rb
fog-aws-0.0.6 lib/fog/aws/models/elasticache/subnet_group.rb
fog-aws-0.0.5 lib/fog/aws/models/elasticache/subnet_group.rb
fog-1.26.0 lib/fog/aws/models/elasticache/subnet_group.rb
fog-1.25.0 lib/fog/aws/models/elasticache/subnet_group.rb
nsidc-fog-1.24.1 lib/fog/aws/models/elasticache/subnet_group.rb
fog-1.24.0 lib/fog/aws/models/elasticache/subnet_group.rb
ns-fog-1.22.11 lib/fog/aws/models/elasticache/subnet_group.rb
ns-fog-1.22.10 lib/fog/aws/models/elasticache/subnet_group.rb
ns-fog-1.22.9 lib/fog/aws/models/elasticache/subnet_group.rb
ns-fog-1.22.8 lib/fog/aws/models/elasticache/subnet_group.rb
ns-fog-1.22.7 lib/fog/aws/models/elasticache/subnet_group.rb
ns-fog-1.22.6 lib/fog/aws/models/elasticache/subnet_group.rb
fog-1.23.0 lib/fog/aws/models/elasticache/subnet_group.rb
ns-fog-1.22.4 lib/fog/aws/models/elasticache/subnet_group.rb
ns-fog-1.22.3 lib/fog/aws/models/elasticache/subnet_group.rb