Class | Fog::DNS::Linode::Real
In: | lib/fog/linode/dns.rb lib/fog/linode/requests/dns/domain_resource_create.rb lib/fog/linode/requests/dns/domain_resource_delete.rb lib/fog/linode/requests/dns/domain_update.rb lib/fog/linode/requests/dns/domain_resource_list.rb lib/fog/linode/requests/dns/domain_resource_update.rb lib/fog/linode/requests/dns/domain_list.rb lib/fog/linode/requests/dns/domain_create.rb lib/fog/linode/requests/dns/domain_delete.rb
Parent: | Object

### Methods

domain_create domain_delete domain_list domain_resource_create domain_resource_delete domain_resource_list domain_resource_update domain_update new reload request

### Public Class methods

new(options={})

### Public Instance methods

domain_create(domain, type, options = {})

Creates a domain record

#### Parameters

- domain<~String>: The zone‘s name. Note, if master zone, SOA_email is required and if slave

                       master_ips is/are required

- type<~String>: master or slave
- options<~Hash>
  - description<~String> Currently undisplayed
  - SOA_email<~String> Required when type=master
  - refresh_sec<~Integer> numeric, default: ‘0‘
  - retry_sec<~Integer> numeric, default: ‘0‘
  - expire_sec<~Integer> numeric, default: ‘0‘
  - ttl_sec<~String> numeric, default: ‘0‘
  - status<~Integer> 0, 1, or 2 (disabled, active, edit mode), default: 1
  - master_ips<~String> When type=slave, the zone‘s master DNS servers list, semicolon separated

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - DATA<~Hash>:
      - ‘DomainID’<~Integer>: domain ID

domain_delete(domain_id)

Delete the given domain from the list Linode hosts

#### Parameters

- domain_id<~Integer>: id of domain to delete

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - DATA<~Hash>:

TODO: docs

domain_list(domain_id = nil)

List of domains (you have access to)

#### Parameters

- domain_id<~Integer>: limit the list to the domain ID specified

#### Returns

- response<~Excon::Response>:
  - body<~Array>:
    - DATA<~Array>
      - ‘DOMAINID’<~Interger>
      - ‘SOA_EMAIL’<~String>
      - ‘DESCRIPTION’<~String>
      - ‘TTL_SEC’<~String>
      - ‘EXPIRE_SEC’<~Integer>
      - ‘RETRY_SEC’<~Integer>
      - ‘DOMAIN’<~String>
      - ‘STATUS’<~Integer>
      - ‘MASTER_IPS’<~String>
      - ‘REFRESH_SEC’<~Integer>
      - ‘TYPE’<~String>

domain_resource_create(domain_id, type, options = {})

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

domain_resource_delete(domain_id, resource_id)

Delete the given resource from a domain

#### Parameters

- domain_id<~Integer>: id of domain resource belongs to
- resource_id<~Integer>: id of resouce to delete

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - DATA<~Hash>:
      - resource_id<~Integer>: resource id that was deleted

domain_resource_list(domain_id, resource_id = nil)

List of resource records for a domain

#### Parameters

- domain_id<~Integer>: limit the list to the domain ID specified
- resource_id<~Integer>: optional. use if want only a specific resource record

#### Returns

- response<~Excon::Response>:
  - body<~Array>:
    - DATA<~Array>
      - ‘PROTOCOL’<~String>: for SRV records. default is UDP
      - ‘TTL_SEC’<~Interger>:
      - ‘PRIORITY’<~Interger>: for MX and SRV records
      - ‘TYPE’<~String>: One of: NS, MX, A, AAAA, CNAME, TXT, or SRV
      - ‘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.

      - ‘WEIGHT’<~Interger>:
      - ‘RESOURCEID’<~Interger>: ID of the resource record
      - ‘PORT’<~Interger>:
      - ‘DOMAINID’<~Interger>: ID of the domain that this record belongs to
      - ‘NAME’<~Interger>: The hostname or FQDN. When Type=MX, the subdomain to delegate to

domain_resource_update(domain_id, resource_id, options = {})

Updates a resource record in a domain

#### Parameters

- domain_id<~Integer>: limit the list to the domain ID specified
- resource_id<~Integer>: id of resouce to delete
- options<~Hash>
  - type<~String>: One of: NS, MX, A, AAAA, CNAME, TXT, or SRV
  - 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 updated

domain_update(domain_id, options = {})

Update a domain record

#### Parameters

- domain_id<~Integer>: The ID to identify the zone
- options<~Hash>
  - domain<~String>: The zone‘s name.
  - type<~String>: master or slave
  - description<~String> Currently undisplayed
  - SOA_email<~String> Required when type=master
  - refresh_sec<~Integer> numeric, default: ‘0‘
  - retry_sec<~Integer> numeric, default: ‘0‘
  - expire_sec<~Integer> numeric, default: ‘0‘
  - ttl_sec<~String> numeric, default: ‘0‘
  - status<~Integer> 0, 1, or 2 (disabled, active, edit mode), default: 1
  - master_ips<~String> When type=slave, the zone‘s master DNS servers list, semicolon separated

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - DATA<~Hash>:
      - ‘DomainID’<~Integer>: domain ID

reload()
request(params)

[Validate]