Record

ashleybrener edited this page May 6, 2013 · 1 revision
Clone this wiki locally

Class: Record

Record has the following methods.

Note that Record is an abstract class designed to be constructed with a Session instance and record type. (See below.)

new Record(session, type)

  • session Session. Session instance
  • type String. Dynect record type

Constructor for creating a typed Record instance.

delete(options, [callback])

  • options Object
    • record_id String. Dynect record_id.
  • callback Function Optional. The callback has argument (response), a Dynect JSON Response object.

Deletes an existing record.

get(options, [callback])

  • options Object
    • zone String. Dynect zone.
    • fqdn String. Dynect fqdn.
    • record_id String Optional. Dynect record_id.
  • callback Function Optional. The callback has argument (response) which is a Dynect Response object if record_id is specified, or an Array of Dynect Response objects if no record_id specified.

Gets existing record/s.

add(options, [callback])

  • options Object
    • zone String. Dynect zone.
    • fqdn String. Dynect fqdn.
    • data Object
      • rdata Object. RData defining the record to add.
      • ttl Number. TTL for the record. Set to 0 to use zone default.
  • callback Function Optional. The callback has argument (response) which is a Dynect Response object.

Creates a new record.

edit(options, [callback])

  • options Object
    • zone String. Dynect zone.
    • fqdn String. Dynect fqdn.
    • record_id String Optional. Dynect record_id.
    • data Object
      • rdata Object. RData defining the record to add.
      • ttl Number. TTL for the record. Set to 0 to use zone default.
  • callback Function Optional. The callback has argument (response) which is a Dynect Response object.

Updates an existing record, or replaces all records of this type at the specified fqdn.