Sha256: 8122023de5c79f3b0663cd8f60edfaf792c77e636f7d65000794482c5ccb6992

Contents?: true

Size: 1.74 KB

Versions: 102

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

102 entries across 102 versions & 18 rubygems

Version Path
fog-maestrodev-1.18.0.20131209090811 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-maestrodev-1.18.0.20131206115947 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-maestrodev-1.18.0.20131205181604 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-maestrodev-1.18.0.20131127194823 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-maestrodev-1.18.0.20131126183714 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-maestrodev-1.18.0.20131126122111 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-maestrodev-1.18.0.20131125111730 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-maestrodev-1.18.0.20131125083406 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-maestrodev-1.18.0.20131123105121 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-maestrodev-1.18.0.20131122203507 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-maestrodev-1.18.0.20131121075022 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-maestrodev-1.18.0.20131118164830 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-maestrodev-1.18.0.20131115184302 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-maestrodev-1.18.0.20131114200144 lib/fog/linode/requests/dns/domain_resource_create.rb
gapinc-fog-1.12.1.2.1 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-maestrodev-1.18.0.20131112185232 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-maestrodev-1.18.0.20131111203459 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-1.18.0 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-1.17.0 lib/fog/linode/requests/dns/domain_resource_create.rb
fog-1.16.0 lib/fog/linode/requests/dns/domain_resource_create.rb