Sha256: 7769fb895cdcad765f38bf22542b74d148284fca216e61b42df3efe8eb559f84

Contents?: true

Size: 1.38 KB

Versions: 36

Compression:

Stored size: 1.38 KB

Contents

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

        # Enables a VPC to support 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_EnableVpcClassicLinkDnsSupport.html

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

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

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
fog-aws-3.29.0 lib/fog/aws/requests/compute/enable_vpc_classic_link_dns_support.rb
fog-aws-3.28.0 lib/fog/aws/requests/compute/enable_vpc_classic_link_dns_support.rb
fog-aws-3.27.0 lib/fog/aws/requests/compute/enable_vpc_classic_link_dns_support.rb
fog-aws-3.26.0 lib/fog/aws/requests/compute/enable_vpc_classic_link_dns_support.rb
fog-aws-3.25.0 lib/fog/aws/requests/compute/enable_vpc_classic_link_dns_support.rb
fog-aws-3.24.0 lib/fog/aws/requests/compute/enable_vpc_classic_link_dns_support.rb
fog-aws-3.23.0 lib/fog/aws/requests/compute/enable_vpc_classic_link_dns_support.rb
fog-aws-3.22.0 lib/fog/aws/requests/compute/enable_vpc_classic_link_dns_support.rb
fog-aws-3.21.1 lib/fog/aws/requests/compute/enable_vpc_classic_link_dns_support.rb
fog-aws-3.21.0 lib/fog/aws/requests/compute/enable_vpc_classic_link_dns_support.rb
fog-aws-3.20.0 lib/fog/aws/requests/compute/enable_vpc_classic_link_dns_support.rb
fog-aws-3.19.0 lib/fog/aws/requests/compute/enable_vpc_classic_link_dns_support.rb
fog-aws-3.18.0 lib/fog/aws/requests/compute/enable_vpc_classic_link_dns_support.rb
fog-aws-3.17.0 lib/fog/aws/requests/compute/enable_vpc_classic_link_dns_support.rb
fog-aws-3.16.0 lib/fog/aws/requests/compute/enable_vpc_classic_link_dns_support.rb
fog-aws-3.15.0 lib/fog/aws/requests/compute/enable_vpc_classic_link_dns_support.rb
fog-aws-3.14.0 lib/fog/aws/requests/compute/enable_vpc_classic_link_dns_support.rb
fog-aws-3.13.0 lib/fog/aws/requests/compute/enable_vpc_classic_link_dns_support.rb
fog-aws-3.12.0 lib/fog/aws/requests/compute/enable_vpc_classic_link_dns_support.rb
fog-aws-3.11.0 lib/fog/aws/requests/compute/enable_vpc_classic_link_dns_support.rb