Class | Fog::DNS::DNSMadeEasy::Real

In:

lib/fog/dnsmadeeasy/dns.rb
lib/fog/dnsmadeeasy/requests/dns/create_domain.rb
lib/fog/dnsmadeeasy/requests/dns/create_record.rb
lib/fog/dnsmadeeasy/requests/dns/create_secondary.rb
lib/fog/dnsmadeeasy/requests/dns/delete_all_domains.rb
lib/fog/dnsmadeeasy/requests/dns/delete_all_secondary.rb
lib/fog/dnsmadeeasy/requests/dns/delete_domain.rb
lib/fog/dnsmadeeasy/requests/dns/delete_record.rb
lib/fog/dnsmadeeasy/requests/dns/delete_secondary.rb
lib/fog/dnsmadeeasy/requests/dns/get_domain.rb
lib/fog/dnsmadeeasy/requests/dns/get_record.rb
lib/fog/dnsmadeeasy/requests/dns/get_secondary.rb
lib/fog/dnsmadeeasy/requests/dns/list_domains.rb
lib/fog/dnsmadeeasy/requests/dns/list_records.rb
lib/fog/dnsmadeeasy/requests/dns/list_secondary.rb
lib/fog/dnsmadeeasy/requests/dns/update_record.rb
lib/fog/dnsmadeeasy/requests/dns/update_secondary.rb

Parent: | Object

### Methods

create_domain create_record create_secondary delete_all_domains delete_all_secondary delete_domain delete_record delete_secondary get_domain get_record get_secondary list_domains list_records list_secondary new reload update_record update_secondary

### Public Class methods

new(options={})

Initialize connection to DNS Made Easy

#### Notes

options parameter must include values for :dnsmadeeasy_api_key and :dnsmadeeasy_secret_key in order to create a connection

#### Examples

      dns = Fog::DNS::DNSMadeEasy.new(
        :dnsmadeeasy_api_key => your_dnsmadeeasy_api_key,
        :dnsmadeeasy_secret_key => your_dnsmadeeasy_secret_key
      )

#### Parameters

- options<~Hash> - config arguments for connection. Defaults to {}.

#### Returns

- dns object with connection to aws.

### Public Instance methods

create_domain(domain)

Creates a domain entry with the specified name. Returns errors if name is not valid or conflicts with another domain.

#### Parameters

- domain<~String> - domain name

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - name<~String> The domain name.
    - nameServer<~Array> List of strings, Name servers associated with this domain e.g. ["ns1.dnsmadeeasy.com", "ns2.dnsmadeeasy.com"]
    - gtdEnabled<~Boolean> true | false - Indicator of whether or not this domain uses the Global Traffic Director.
  - status<~Integer> - 201 - domain successfully created, 400 - domain name not valid, see errors in response content

create_record(domain, name, type, data, options = {})

Creates a record with the representation specified in the request content. Returns errors if record is not valid. Note that a record ID will be generated by the system with this request and any ID that is sent will be ignored. Records are not modifiable for domains that are locked to a template.

#### Parameters

- domain<~String> Domain name.
- name<~String> Record name.
- type<~String> Record type. Values: A, AAAA, CNAME, HTTPRED, MX, NS, PTR, SRV, TXT
- data<~String> Record data
- options<~Hash> - optional
  - ttl<~Integer> Time to live. The amount of time a record will be cached before being refreshed. Default: 1800 (30 mins)
  - gtdLocation<~String> Global Traffic Director location. Values: DEFAULT, US_EAST, US_WEST, EUROPE
  - password<~String> For A records. Password used to authenticate for dynamic DNS.
  - description<~String> For HTTPRED records. A description of the HTTPRED record.
  - keywords<~String> For HTTPRED records. Keywords associated with the HTTPRED record.
  - title<~String> For HTTPRED records. The title of the HTTPRED record.
  - redirectType<~String> For HTTPRED records. Type of redirection performed. Values: Hidden Frame Masked, Standard - 302, Standard - 301
  - hardLink<~Boolean> For HTTPRED records.

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - id<~Integer> Unique record identifier
    - name<~String>
    - type<~String>
    - data<~String>
    - ttl<~Integer>
    - gtdLocation<~String>
    - password<~String>
    - description<~String>
    - keywords<~String>
    - title<~String>
    - redirectType<~String>
    - hardLink<~Boolean>
  - ‘status’<~Integer> - 201 - record successfully created, 400 - record not valid, see errors in response content, 404 - domain not found

create_secondary(secondary_name, ip_addresses)

Creates a secondary entry with the specified name. Returns errors if name is not valid or conflicts with another domain.

#### Parameters

- secondary_name<~String> - secondary name
- ip_addresses<~Array> - List of secondary ip addresses

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - name<~String> Secondary name.
    - ip<~Array> List of strings, IP addresses for your master nameserver associated with this secondary entry. e.g. ["10.10.10.10", "10.10.10.11"]
    - gtdLocation<~String> Global Traffic Director location. Values: DEFAULT, US_EAST, US_WEST, EUROPE
  - status<~Integer> - 201 - secondary entry successfully created or modified, 400 - secondary entry name or IP addresses not valid, see errors in response content

delete_all_domains()

Deletes all domains for your account.

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
  - status<~Integer> - 200 - OK

delete_all_secondary()

Deletes all secondary entries for your account.

#### Returns

- response<~Excon::Response>:
  - status<~Integer> 200 - OK

delete_domain(domain)

Delete the given domain from your account.

#### Parameters

- domain<~String> - domain name

#### Returns

- response<~Excon::Response>:
  - status<~Integer> 200 - OK, 404 - specified domain name is not found

delete_record(domain, record_id)

Deletes the record with the specified id. Note that records are not modifiable for domains that are locked to a template.

#### Parameters

- domain<~String> - domain name
- record_id<~String> - record id

#### Returns

- response<~Excon::Response>:
  - status<~Integer> 200 - OK, 404 - specified domain name or record id is not found

delete_secondary(secondary_name)

Deletes the specified secondary entry.

#### Parameters

- secondary_name<~String> - secondary domain name

#### Returns

- response<~Excon::Response>:
  - status<~Integer> 200 - OK, 404 - specified secondary entry name is not found

get_domain(domain)

Get the details for a specific domain in your account.

#### Parameters

- domain<~String> - domain name

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - name<~String> The domain name.
    - nameServer<~Array> List of strings, Name servers associated with this domain e.g. ["ns1.dnsmadeeasy.com", "ns2.dnsmadeeasy.com"]
    - gtdEnabled<~Boolean> Indicator of whether or not this domain uses the Global Traffic Director.
  - status<~Integer> 200 - OK, 404 - specified domain name is not found

get_record(domain, record_id)

Returns a record object representing the record with the specified id.

#### Parameters

- domain<~String>
- record_id<~Integer>

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - id<~Integer> Unique record identifier
    - name<~String> Record name.
    - type<~String> Record type. Values: A, AAAA, CNAME, HTTPRED, MX, NS, PTR, SRV, TXT
    - data<~String> Record data
    - ttl<~Integer> Time to live. The amount of time a record will be cached before being refreshed. Default: 1800
    - gtdLocation<~String> Global Traffic Director location. Values: DEFAULT, US_EAST, US_WEST, EUROPE
    - password<~String> For A records. Password used to authenticate for dynamic DNS.
    - description<~String> For HTTPRED records. A description of the HTTPRED record.
    - keywords<~String> For HTTPRED records. Keywords associated with the HTTPRED record.
    - title<~String> For HTTPRED records. The title of the HTTPRED record.
    - redirectType<~String> For HTTPRED records. Type of redirection performed. Values: Hidden Frame Masked, Standard - 302, Standard - 301
    - hardLink<~Boolean> For HTTPRED records.
  - status<~Integer> - 200 - OK, 404 - specified domain name or record id is not found

get_secondary(secondary_name)

Returns the secondary entry object representation of the specified secondary entry.

#### Parameters

- secondary_name<~String> - secondary name

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - name<~String> Secondary name.
    - ip<~Array> List of strings, IP addresses for your master nameserver associated with this secondary entry. e.g. ["10.10.10.10", "10.10.10.11"]
    - gtdLocation<~String> Global Traffic Director location. Values: DEFAULT, US_EAST, US_WEST, EUROPE
  - status<~Integer> - 200 - OK, 404 - specified secondary entry name is not found

list_domains()

Returns a list of all domain names for your account.

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - list<~Array> e.g. ["domain1.com","domain2.com", "domain3.com"]
  - status<~Integer> - 200 - OK

list_records(domain, options = {})

Returns a list of record objects containing all records for the specified domain

#### Parameters

- domain<~String>
- options<~Hash>
  - gtdLocation<~String> Global Traffic Director location. Values: DEFAULT, US_EAST, US_WEST, EUROPE
  - type<~String> Record type. Values: A, AAAA, CNAME, HTTPRED, MX, NS, PTR, SRV, TXT

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - id<~Integer> Unique record identifier
    - name<~String> Record name.
    - type<~String> Record type. Values: A, AAAA, CNAME, HTTPRED, MX, NS, PTR, SRV, TXT
    - data<~String>
    - ttl<~Integer> Time to live. The amount of time a record will be cached before being refreshed.
    - gtdLocation<~String> Global Traffic Director location. Values: DEFAULT, US_EAST, US_WEST, EUROPE
    - password<~String> For A records. Password used to authenticate for dynamic DNS.
    - description<~String> For HTTPRED records. A description of the HTTPRED record.
    - keywords<~String> For HTTPRED records. Keywords associated with the HTTPRED record.
    - title<~String> For HTTPRED records. The title of the HTTPRED record.
    - redirectType<~String> For HTTPRED records. Type of redirection performed. Values: Hidden Frame Masked, Standard - 302, Standard - 301
    - hardLink<~Boolean> For HTTPRED records.
  - status<~Integer> - 200 - OK, 404 - specified domain name is not found

list_secondary()

Returns a list of all secondary entry names for your account.

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - list<~Array> e.g. ["xxx.domain.com", "xxx.domain.com"]
  - status<~Integer> 200 - OK

reload()
update_record(domain, record_id, options = {})

Updates a record with the representation specified in the request content. Returns errors if record is not valid. Note that a record ID will be generated by the system with this request and any ID that is sent will be ignored. Records are not modifiable for domains that are locked to a template.

DNS Made Easy has no update record method but they plan to add it in the next update! They sent a reponse suggesting, there going to internaly delete/create a new record when we make update record call, so I‘ve done the same here for now! If want to update a record, it might be better to manually destroy and then create a new record

#### Parameters

- domain<~String> Domain name.
- record_id<~Integer> Record id.
- options<~Hash>
  - name<~String> Record name.
  - type<~String> Record type. Values: A, AAAA, CNAME, HTTPRED, MX, NS, PTR, SRV, TXT
  - ttl<~Integer> Time to live. The amount of time a record will be cached before being refreshed. Default: 1800 (30 mins)
  - gtdLocation<~String> Global Traffic Director location. Values: DEFAULT, US_EAST, US_WEST, EUROPE
  - password<~String> For A records. Password used to authenticate for dynamic DNS.
  - description<~String> For HTTPRED records. A description of the HTTPRED record.
  - keywords<~String> For HTTPRED records. Keywords associated with the HTTPRED record.
  - title<~String> For HTTPRED records. The title of the HTTPRED record.
  - redirectType<~String> For HTTPRED records. Type of redirection performed. Values: Hidden Frame Masked, Standard - 302, Standard - 301
  - hardLink<~Boolean> For HTTPRED records.

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - id<~Integer> Unique record identifier
    - name<~String>
    - type<~String>
    - data<~String>
    - ttl<~Integer>
    - gtdLocation<~String>
    - password<~String>
    - description<~String>
    - keywords<~String>
    - title<~String>
    - redirectType<~String>
    - hardLink<~Boolean>
  - ‘status’<~Integer> - 201 - record successfully created, 400 - record not valid, see errors in response content, 404 - domain not found

update_secondary(secondary_name, ip_addresses)

Modifies a secondary entry with the specified name. Returns errors if name is not valid or conflicts with another domain.

#### Parameters

- secondary_name<~String> - secondary name
- ip_addresses<~Array> - List of secondary ip addresses

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - name<~String> Secondary name.
    - ip<~Array> List of strings, IP addresses for your master nameserver associated with this secondary entry. e.g. ["10.10.10.10", "10.10.10.11"]
    - gtdLocation<~String> Global Traffic Director location. Values: DEFAULT, US_EAST, US_WEST, EUROPE
  - status<~Integer> - 201 - secondary entry successfully created or modified, 400 - secondary entry name or IP addresses not valid, see errors in response content

[Validate]