Sha256: 7be23e9412225c0d7dcbd9e7b9485e83a286ea9d711d5607addc8adbd9c612d6

Contents?: true

Size: 1.74 KB

Versions: 43

Compression:

Stored size: 1.74 KB

Contents

module Fog
  module DNS
    class Linode
      class Real
        # Creates a resource record in a domain
        #
        # ==== Parameters
        # * domain_id<~Integer>: limit the list to the domain ID specified
        # * type<~String>: One of: NS, MX, A, AAAA, CNAME, TXT, or SRV
        # * options<~Hash>
        #   * name<~String>: The hostname or FQDN. When Type=MX the subdomain to delegate to the
        #                    Target MX server
        #   * target<~String> When Type=MX the hostname. When Type=CNAME the target of the alias.
        #                    When Type=TXT the value of the record. When Type=A or AAAA the token
        #                    of '[remote_addr]' will be substituted with the IP address of the request.
        #   * priority<~Integer>: priority for MX and SRV records, 0-255 - default: 10
        #   * weight<~Integer>: default: 5
        #   * port<~Integer>: default: 80
        #   * protocol<~String>: The protocol to append to an SRV record. Ignored on other record
        #                        types. default: udp
        #   * ttl_sec<~Integer>: note, Linode will round the input to set values (300, 3600, 7200, etc)
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * DATA<~Hash>:
        #       * 'ResourceID'<~Integer>: ID of the resource record created
        def domain_resource_create(domain_id, type, options = {})
          query= {}
          request(
            :expects  => 200,
            :method   => 'GET',
            :query    => {
              :api_action   => 'domain.resource.create',
              :domainID => domain_id,
              :type  => type
            }.merge!( options)
          )
        end
      end
    end
  end
end

Version data entries

43 entries across 41 versions & 6 rubygems

Version Path
fog-2.3.0 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-ifeel-2.2.0 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-2.2.0 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-2.1.0 lib/fog/linode/requests/dns/domain_resource_create.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-1.42.1/lib/fog/linode/requests/dns/domain_resource_create.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-1.42.1/lib/fog/linode/requests/dns/domain_resource_create.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-1.42.1/lib/fog/linode/requests/dns/domain_resource_create.rb
fog-1.42.1 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-2.0.0 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-1.42.0 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-1.41.0 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-1.40.0 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-1.39.0 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-1.38.0 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-1.37.0 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-1.36.0 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-1.35.0 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-2.0.0.pre.0 lib/fog/linode/requests/dns/domain_resource_create.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/lib/fog/linode/requests/dns/domain_resource_create.rb
fog-1.34.0 lib/fog/linode/requests/dns/domain_resource_create.rb