records
Overview
Name | records |
Type | Resource |
Id | digitalocean.domains.records |
Fields
Name | Datatype | Description |
---|---|---|
id | integer | A unique identifier for each domain record. |
name | string | The host name, alias, or service being defined by the record. |
priority | integer | The priority for SRV and MX records. |
data | string | Variable 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. |
type | string | The type of the DNS record. For example: A, CNAME, TXT, ... |
flags | integer | An unsigned integer between 0-255 used for CAA records. |
ttl | integer | This 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. |
tag | string | The parameter tag for CAA records. Valid values are "issue", "issuewild", or "iodef" |
weight | integer | The weight for SRV records. |
port | integer | The port for SRV records. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get_record | SELECT | domain_name, domain_record_id | To retrieve a specific domain record, send a GET request to /v2/domains/$DOMAIN_NAME/records/$RECORD_ID . |
list_records | SELECT | domain_name | To 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_record | INSERT | domain_name | To 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_record | DELETE | domain_name, domain_record_id | To 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_record | EXEC | domain_name, domain_record_id | To retrieve a specific domain record, send a GET request to /v2/domains/$DOMAIN_NAME/records/$RECORD_ID . |
_list_records | EXEC | domain_name | To 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_record | EXEC | domain_name, domain_record_id, data__type | To update an existing record, send a PATCH request to/v2/domains/$DOMAIN_NAME/records/$DOMAIN_RECORD_ID . Any attribute valid forthe 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_record | EXEC | domain_name, domain_record_id, data__type | To update an existing record, send a PUT request to/v2/domains/$DOMAIN_NAME/records/$DOMAIN_RECORD_ID . Any attribute valid forthe 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. |