records
Creates, updates, deletes, gets or lists a records resource.
Overview
| Name | records |
| Type | Resource |
| Id | godaddy.domains.records |
Fields
The following fields are returned by SELECT queries:
- record_get
Request was successful
| Name | Datatype | Description |
|---|---|---|
name | string (domain) | |
data | string | |
port | integer | Service port (SRV only) |
priority | integer (integer-positive) | Record priority (MX and SRV only) |
protocol | string | Service protocol (SRV only) |
service | string | Service type (SRV only) |
ttl | integer (integer-positive) | |
type | string | |
weight | integer (integer-positive) | Record weight (SRV only) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
record_get | select | domain, type | X-Shopper-Id, offset, limit | Retrieve DNS Records for the specified Domain, optionally with the specified Type and/or Name |
record_add | exec | domain | X-Shopper-Id | Add the specified DNS Records to the specified Domain |
record_replace | exec | domain | X-Shopper-Id | Replace all DNS Records for the specified Domain |
record_replace_type | exec | domain, type | X-Shopper-Id | Replace all DNS Records for the specified Domain with the specified Type |
record_replace_type_name | exec | domain, type, name | X-Shopper-Id | Replace all DNS Records for the specified Domain with the specified Type and Name |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
domain | string | Domain whose DNS Records are to be replaced |
name | string | DNS Record Name for which DNS Records are to be replaced |
type | string | DNS Record Type for which DNS Records are to be replaced |
X-Shopper-Id | string | Shopper ID which owns the domain. NOTE: This is only required if you are a Reseller managing a domain purchased outside the scope of your reseller account. For instance, if you're a Reseller, but purchased a Domain via http://www.godaddy.com |
limit | integer | Maximum number of items to return |
offset | integer | Number of results to skip for pagination |
SELECT examples
- record_get
Retrieve DNS Records for the specified Domain, optionally with the specified Type and/or Name
SELECT
name,
data,
port,
priority,
protocol,
service,
ttl,
type,
weight
FROM godaddy.domains.records
WHERE domain = '{{ domain }}' -- required
AND type = '{{ type }}' -- required
AND X-Shopper-Id = '{{ X-Shopper-Id }}'
AND offset = '{{ offset }}'
AND limit = '{{ limit }}'
;
Lifecycle Methods
- record_add
- record_replace
- record_replace_type
- record_replace_type_name
Add the specified DNS Records to the specified Domain
EXEC godaddy.domains.records.record_add
@domain='{{ domain }}' --required,
@X-Shopper-Id='{{ X-Shopper-Id }}'
;
Replace all DNS Records for the specified Domain
EXEC godaddy.domains.records.record_replace
@domain='{{ domain }}' --required,
@X-Shopper-Id='{{ X-Shopper-Id }}'
;
Replace all DNS Records for the specified Domain with the specified Type
EXEC godaddy.domains.records.record_replace_type
@domain='{{ domain }}' --required,
@type='{{ type }}' --required,
@X-Shopper-Id='{{ X-Shopper-Id }}'
;
Replace all DNS Records for the specified Domain with the specified Type and Name
EXEC godaddy.domains.records.record_replace_type_name
@domain='{{ domain }}' --required,
@type='{{ type }}' --required,
@name='{{ name }}' --required,
@X-Shopper-Id='{{ X-Shopper-Id }}'
;