Sha256: a966900d862ec401d1922bccea52f23f6eface5ee2bb9f14234c6aef96295fa9

Contents?: true

Size: 1.37 KB

Versions: 10

Compression:

Stored size: 1.37 KB

Contents

module Fog
  module Compute
    class AWS
      class Real
        require 'fog/aws/parsers/compute/basic'

        # Disables DNS hostname resolution for ClassicLink
        #
        # ==== Parameters
        # * vpc_id<~String> - The ID of the ClassicLink-enabled VPC.
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'requestId'<~String> - Id of the request
        #     * 'return'<~Boolean>   - Whether the request succeeded
        #
        # http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DisableVpcClassicLinkDnsSupport.html

        def disable_vpc_classic_link_dns_support(vpc_id)
          request(
            'Action' => 'DisableVpcClassicLinkDnsSupport',
            'VpcId'  => vpc_id,
            :parser  => Fog::Parsers::Compute::AWS::Basic.new
          )
        end
      end

      class Mock
        def disable_vpc_classic_link_dns_support(vpc_id)
          response = Excon::Response.new
          unless vpc = self.data[:vpcs].find { |v| v['vpcId'] == vpc_id }
            raise Fog::Compute::AWS::NotFound.new("The VPC '#{vpc_id}' does not exist")
          end
          vpc['classicLinkDnsSupport'] = false
          response.body = {
            'requestId' => Fog::AWS::Mock.request_id,
            'return'    => true
          }
          response
        end
      end
    end
  end
end

Version data entries

10 entries across 8 versions & 2 rubygems

Version Path
fog-aws-3.1.0 lib/fog/aws/requests/compute/disable_vpc_classic_link_dns_support.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-aws-2.0.1/lib/fog/aws/requests/compute/disable_vpc_classic_link_dns_support.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-aws-2.0.1/lib/fog/aws/requests/compute/disable_vpc_classic_link_dns_support.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-aws-2.0.1/lib/fog/aws/requests/compute/disable_vpc_classic_link_dns_support.rb
fog-aws-3.0.0 lib/fog/aws/requests/compute/disable_vpc_classic_link_dns_support.rb
fog-aws-2.0.1 lib/fog/aws/requests/compute/disable_vpc_classic_link_dns_support.rb
fog-aws-2.0.0 lib/fog/aws/requests/compute/disable_vpc_classic_link_dns_support.rb
fog-aws-1.4.1 lib/fog/aws/requests/compute/disable_vpc_classic_link_dns_support.rb
fog-aws-1.4.0 lib/fog/aws/requests/compute/disable_vpc_classic_link_dns_support.rb
fog-aws-1.3.0 lib/fog/aws/requests/compute/disable_vpc_classic_link_dns_support.rb