Sha256: 48050b2a46fc938522a5b1c21a4668935135860c2e2755733739790fbda0e4f9

Contents?: true

Size: 1.9 KB

Versions: 10

Compression:

Stored size: 1.9 KB

Contents

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

        # escribes the ClassicLink DNS support status of one or more VPCs
        #
        # ==== Parameters
        # * options<~Hash>
        #   * vpc_ids<~Array> - An array of vpc ids to restrict results to
        #   * 'MaxResults'    - Maximum number of items to return
        #   * 'NextToken'     - The token for the next set of items to return
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'requestId'<~String> - Id of the request
        #     * 'vpcs'<~Array>       - Information about the ClassicLink DNS support status of the VPCs
        #       * 'vpcId'<~String>
        #       * 'classicLinkDnsSupported'<~Boolean>
        #
        # http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpcClassicLinkDnsSupport.html

        def describe_vpc_classic_link_dns_support(options={})
          params = {}
          params.merge!(Fog::AWS.indexed_param('VpcIds', options[:vpc_ids])) if options[:vpc_ids]
          request({
            'Action'     => 'DescribeVpcClassicLinkDnsSupport',
            'MaxResults' => options['MaxResults'],
            'NextToken'  => options['NextToken'],
            :parser      => Fog::Parsers::Compute::AWS::DescribeVpcClassicLinkDnsSupport.new
          }.merge(params))
        end
      end

      class Mock
        def describe_vpc_classic_link_dns_support(options={})
          response = Excon::Response.new

          vpcs = self.data[:vpcs]

          if options[:vpc_ids]
            vpcs = vpcs.select { |v| options[:vpc_ids].include?(v['vpcId']) }
          end

          response.body = {'vpcs' => vpcs.map { |v| {"vpcId" => v['vpcId'], "classicLinkDnsSupported" => v['classicLinkDnsSupport']} } }
          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/describe_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/describe_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/describe_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/describe_vpc_classic_link_dns_support.rb
fog-aws-3.0.0 lib/fog/aws/requests/compute/describe_vpc_classic_link_dns_support.rb
fog-aws-2.0.1 lib/fog/aws/requests/compute/describe_vpc_classic_link_dns_support.rb
fog-aws-2.0.0 lib/fog/aws/requests/compute/describe_vpc_classic_link_dns_support.rb
fog-aws-1.4.1 lib/fog/aws/requests/compute/describe_vpc_classic_link_dns_support.rb
fog-aws-1.4.0 lib/fog/aws/requests/compute/describe_vpc_classic_link_dns_support.rb
fog-aws-1.3.0 lib/fog/aws/requests/compute/describe_vpc_classic_link_dns_support.rb