Sha256: 6ed0b84128d4cbc839196f049dc1f7f2cc09f0693c663fe1f3985c05633f53d5

Contents?: true

Size: 786 Bytes

Versions: 22

Compression:

Stored size: 786 Bytes

Contents

require 'fog/core/model'

module Fog
  module AWS
    class RDS
      class SubnetGroup < Fog::Model
        identity   :id, :aliases => ['DBSubnetGroupName', :name]
        attribute  :description, :aliases => 'DBSubnetGroupDescription'
        attribute  :status, :aliases => 'SubnetGroupStatus'
        attribute  :vpc_id, :aliases => 'VpcId'
        attribute  :subnet_ids, :aliases => 'Subnets'

        def ready?
          requires :status
          status == 'Complete'
        end

        def save
          requires :description, :id, :subnet_ids
          service.create_db_subnet_group(id, subnet_ids, description)
          reload
        end

        def destroy
          requires :id
          service.delete_db_subnet_group(id)
        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/rds/subnet_group.rb
fog-aws-0.1.1 lib/fog/aws/models/rds/subnet_group.rb
fog-aws-0.1.0 lib/fog/aws/models/rds/subnet_group.rb
fog-aws-0.0.8 lib/fog/aws/models/rds/subnet_group.rb
fog-aws-0.0.7 lib/fog/aws/models/rds/subnet_group.rb
fog-aws-0.0.6 lib/fog/aws/models/rds/subnet_group.rb
fog-aws-0.0.5 lib/fog/aws/models/rds/subnet_group.rb
fog-1.26.0 lib/fog/aws/models/rds/subnet_group.rb
fog-1.25.0 lib/fog/aws/models/rds/subnet_group.rb
nsidc-fog-1.24.1 lib/fog/aws/models/rds/subnet_group.rb
fog-1.24.0 lib/fog/aws/models/rds/subnet_group.rb
ns-fog-1.22.11 lib/fog/aws/models/rds/subnet_group.rb
ns-fog-1.22.10 lib/fog/aws/models/rds/subnet_group.rb
ns-fog-1.22.9 lib/fog/aws/models/rds/subnet_group.rb
ns-fog-1.22.8 lib/fog/aws/models/rds/subnet_group.rb
ns-fog-1.22.7 lib/fog/aws/models/rds/subnet_group.rb
ns-fog-1.22.6 lib/fog/aws/models/rds/subnet_group.rb
fog-1.23.0 lib/fog/aws/models/rds/subnet_group.rb
ns-fog-1.22.4 lib/fog/aws/models/rds/subnet_group.rb
ns-fog-1.22.3 lib/fog/aws/models/rds/subnet_group.rb