Updating a Record using the API requires specific syntax depending on whether you are using REST or SOAP. Use this table to find the syntax for your command.
Understanding How The API Works »
NOTE: Total number of records in a single Response Pool may not be more than 255.
WARNING: Dyn recommends setting an explicit fallback record entry in all Traffic Director services to ensure a query is always answered with a record. See TD Best Practices – Fallback Entry for more information on setting up a fall back entry.
REST Syntax
Click to view all REST Resources |
/REST/DSFRecord/ PUT — Updates a Record in the Traffic Director (DSF) service indicated.
HTTP Action — PUT
URI — https://api.dynect.net/REST/DSFRecord/<service_id>/<dsf_record_id>/
|
Arguments — Click for More Info
- string
label — A label for the Record
- string
weight — Weight for the Record. Defaults to 1.
Valid values for A or AAAA records: 1 – 15.
Valid values for CNAME records: 1 – 255.
- string
publish — Indicates when Record will be created.
Valid values:
Y — The Record will be created on execution.
N — The Record will be created when zone changes are next published.
- string
notes — A custom note field. All content in the string is added to the Zone Notes for the zones attached to this service when the zone is published. Only used when publish = Y
- string
automation — Defines how eligible can be changed in response to monitoring.
Valid values:
auto — Sets the serve_mode field to ‘Monitor & Obey’. Default.
auto_down — Sets the serve_mode field to ‘Monitor & Remove’.
manual — Couples with eligible value to determine other serve_mode field values.
- array
endpoints — The individual address(es) for a record. Multiple addresses are added as an array [ addr, addr ]. Endpoints are monitored if automation is set to auto or auto_down and there is a monitor attached to the service.
- string
endpoint_up_count — Number of endpoints that must be up for the Record status to be ‘up’.
- string
eligible — Indicates whether or not the Record can be served.
Valid values:
false — When automation is set to manual, sets the serve_mode field to ‘Do Not Serve’.
true — Default. When automation is set to manual, sets the serve_mode field to ‘Always Serve’.
- string
master_line — Required. RData to define the record. Use EITHER master_line OR rdata, only one is required.
EXAMPLE: string master_line Example, A Record
{“label”:”generic_a_record”, “master_line”:”1.2.3.4″}
– OR –
|
Response — Click for More Info
string status — The status of the pool indicated by any attached monitors
Valid values:
ok — The object is available (up).
unknown — The object has not provided a status to the monitor.
down — ‘x’ records are ineligible or Unable to satisfy minimum eligible records.
string response_time — Time it took to receive a response from the endpoints
string torpidity — Performance indicator for the Record. Lower is better.
string last_monitored — Epoch timestamp of the last time the Record Set was monitored
string pending_change — Indicates whether or not the object will be added, updated, or deleted.
|
SOAP Syntax
Click to view all SOAP Commands |
UpdateDSFRecord — Updates a Record in the Traffic Director (DSF) service indicated.
|
Arguments — Click for More Info
- string
service_id — Required. Identifier for the Traffic Director (DSF) service.
- string
dsf_record_id — Identifier for the Record.
- string
label — A label for the Record
- string
weight — Weight for the Record. Defaults to 1.
Valid values for A or AAAA records: 1 – 15.
Valid values for CNAME records: 1 – 255.
- string
publish — Indicates whether or not the changes will be published immediately.
Y — Service will be published on creation
N — Service will be published when zone changes are published.
- string
notes — A custom note field. All content in the string is added to the Zone Notes for the zones attached to this service when the zone is published. Only used when publish = Y
- string
automation — Defines how eligible can be changed in response to monitoring.
Valid values:
auto — Sets the serve_mode field to ‘Monitor & Obey’. Default.
auto_down — Sets the serve_mode field to ‘Monitor & Remove’.
manual — Couples with eligible value to determine other serve_mode field values.
- array
endpoints — The individual address(es) for a record. Multiple addresses are added as an array [ addr, addr ]. Endpoints are monitored if automation is set to auto or auto_down and there is a monitor attached to the service.
- string
endpoint_up_count — Number of endpoints that must be up for the Record status to be ‘up’.
- string
eligible — Indicates whether or not the Record can be served.
Valid values:
false — When automation is set to manual, sets the serve_mode field to ‘Do Not Serve’.
true — Default. When automation is set to manual, sets the serve_mode field to ‘Always Serve’.
- string
master_line — Required. RData to define the record. Use EITHER master_line OR rdata, only one is required.
EXAMPLE: string master_line Example, A Record
{“label”:”generic_a_record”, “master_line”:”1.2.3.4″}
– OR –
|
Response — Click for More Info
|
Example Request — Click for More Info
{
'service_id' => '0bi5k...', # ID shortened...
'dsf_record_id' => 'ab32f...', # ID shortened...
'label' => 'Example Record',
'weight' => '1',
'automation' => 'auto',
'endpoints' => ['192.168.1.1','192.168.2.1'],
'endpoint_up_count' => '1',
'master_line' => '127.0.0.1',
// or
'rdata' => {
'a_rdata' => {
'address' => '127.0.0.1'
}
}
'token' => 'asdlj34ot879834cdzjklfK',
}
|
DNS API Knowledge Base