Skip to main content

records

Overview

Namerecords
TypeResource
Iddigitalocean.domains.records

Fields

NameDatatypeDescription
idintegerA unique identifier for each domain record.
namestringThe host name, alias, or service being defined by the record.
priorityintegerThe priority for SRV and MX records.
datastringVariable data depending on record type. For example, the "data" value for an A record would be the IPv4 address to which the domain will be mapped. For a CAA record, it would contain the domain name of the CA being granted permission to issue certificates.
typestringThe type of the DNS record. For example: A, CNAME, TXT, ...
flagsintegerAn unsigned integer between 0-255 used for CAA records.
ttlintegerThis value is the time to live for the record, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested.
tagstringThe parameter tag for CAA records. Valid values are "issue", "issuewild", or "iodef"
weightintegerThe weight for SRV records.
portintegerThe port for SRV records.

Methods

NameAccessible byRequired ParamsDescription
get_recordSELECTdomain_name, domain_record_idTo retrieve a specific domain record, send a GET request to /v2/domains/$DOMAIN_NAME/records/$RECORD_ID.
list_recordsSELECTdomain_nameTo get a listing of all records configured for a domain, send a GET request to /v2/domains/$DOMAIN_NAME/records.
The list of records returned can be filtered by using the name and type query parameters. For example, to only include A records for a domain, send a GET request to /v2/domains/$DOMAIN_NAME/records?type=A. name must be a fully qualified record name. For example, to only include records matching sub.example.com, send a GET request to /v2/domains/$DOMAIN_NAME/records?name=sub.example.com. Both name and type may be used together.

create_recordINSERTdomain_nameTo create a new record to a domain, send a POST request to
/v2/domains/$DOMAIN_NAME/records.

The request must include all of the required fields for the domain record type
being added.

See the attribute table for details regarding record
types and their respective required attributes.
delete_recordDELETEdomain_name, domain_record_idTo delete a record for a domain, send a DELETE request to
/v2/domains/$DOMAIN_NAME/records/$DOMAIN_RECORD_ID.

The record will be deleted and the response status will be a 204. This
indicates a successful request with no body returned.
_get_recordEXECdomain_name, domain_record_idTo retrieve a specific domain record, send a GET request to /v2/domains/$DOMAIN_NAME/records/$RECORD_ID.
_list_recordsEXECdomain_nameTo get a listing of all records configured for a domain, send a GET request to /v2/domains/$DOMAIN_NAME/records.
The list of records returned can be filtered by using the name and type query parameters. For example, to only include A records for a domain, send a GET request to /v2/domains/$DOMAIN_NAME/records?type=A. name must be a fully qualified record name. For example, to only include records matching sub.example.com, send a GET request to /v2/domains/$DOMAIN_NAME/records?name=sub.example.com. Both name and type may be used together.

patch_recordEXECdomain_name, domain_record_id, data__typeTo update an existing record, send a PATCH request to
/v2/domains/$DOMAIN_NAME/records/$DOMAIN_RECORD_ID. Any attribute valid for
the record type can be set to a new value for the record.

See the attribute table for details regarding record
types and their respective attributes.
update_recordEXECdomain_name, domain_record_id, data__typeTo update an existing record, send a PUT request to
/v2/domains/$DOMAIN_NAME/records/$DOMAIN_RECORD_ID. Any attribute valid for
the record type can be set to a new value for the record.

See the attribute table for details regarding record
types and their respective attributes.