Sha256: 64186ca0019e6726d2a3d9d8a2bd598da471293e83af19d39a45ded49a26da03

Contents?: true

Size: 1.33 KB

Versions: 23

Compression:

Stored size: 1.33 KB

Contents

module Fog
  module AWS
    class RDS
      class Real

        require 'fog/aws/parsers/rds/delete_db_subnet_group'

        # Deletes a db subnet group
        # http://docs.aws.amazon.com/AmazonRDS/2013-09-09/APIReference/API_DeleteDBSubnetGroup.html
        # ==== Parameters
        # * DBSubnetGroupName <~String> - The name for the DB Subnet Group. This value is stored as a lowercase string. Must contain no more than 255 alphanumeric characters or hyphens. Must not be "Default".
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        def delete_db_subnet_group(name)
          params = { 'Action'  => 'DeleteDBSubnetGroup',
            'DBSubnetGroupName' => name,
            :parser   => Fog::Parsers::AWS::RDS::DeleteDBSubnetGroup.new }
          request(params)
        end

      end

      class Mock

        def delete_db_subnet_group(name)
          response = Excon::Response.new
          unless self.data[:subnet_groups] && self.data[:subnet_groups][name]
            raise Fog::AWS::RDS::NotFound.new("DBSubnetGroupNotFound => The subnet group '#{name}' doesn't exists")
          end

          response.body = {
            'ResponseMetadata'=>{ 'RequestId'=> Fog::AWS::Mock.request_id },
            'return' => true,
          }
          response
        end

      end
    end
  end
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
fog-1.22.0 lib/fog/aws/requests/rds/delete_db_subnet_group.rb
fog-1.21.0 lib/fog/aws/requests/rds/delete_db_subnet_group.rb
fog-maestrodev-1.20.0.20140305101839 lib/fog/aws/requests/rds/delete_db_subnet_group.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/aws/requests/rds/delete_db_subnet_group.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/aws/requests/rds/delete_db_subnet_group.rb
fog-1.20.0 lib/fog/aws/requests/rds/delete_db_subnet_group.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/aws/requests/rds/delete_db_subnet_group.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/aws/requests/rds/delete_db_subnet_group.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/aws/requests/rds/delete_db_subnet_group.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/aws/requests/rds/delete_db_subnet_group.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/aws/requests/rds/delete_db_subnet_group.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/aws/requests/rds/delete_db_subnet_group.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/aws/requests/rds/delete_db_subnet_group.rb
fog-1.19.0 lib/fog/aws/requests/rds/delete_db_subnet_group.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/aws/requests/rds/delete_db_subnet_group.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/aws/requests/rds/delete_db_subnet_group.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/aws/requests/rds/delete_db_subnet_group.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/aws/requests/rds/delete_db_subnet_group.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/aws/requests/rds/delete_db_subnet_group.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/aws/requests/rds/delete_db_subnet_group.rb