godo.Domains.RecordsByTypeAndName()
Generated on 5 Nov 2026
from godo version
v1.236.0
Usage
client.Domains.RecordsByTypeAndName(ctx context.Context, domain string, ofType string, name string, opt *godo.ListOptions) ([]godo.DomainRecord, *godo.Response, error)Description
RecordsByTypeAndName returns a slice of DomainRecord for a domain matched by record type and name.
This method sends a GET request to /v2/domains/{}/records.
Parameters
domainstring requiredofTypestring requirednamestring requiredopt*godo.ListOptions
Fields of godo.ListOptions
ListOptions specifies the optional parameters to various List methods that
support pagination.
PageintFor paginated result sets, page of results to retrieve.
PerPageintFor paginated result sets, the number of results to include per page.
WithProjectsboolWhether App responses should include project_id fields. The field will be empty if false or if omitted. (ListApps)
DeployedboolThis parameter is used to only list agents that are deployed in the response.
PublicOnlyboolThis parameter is used to include models that are publicly available.
Usecases[]stringThis parameter is used to include models according to the use cases.
Returns
- []godo.DomainRecord
- *godo.Response
The HTTP response, with pagination
Links,Meta, andRatelimit information.- error
Non-nil when the request fails. API errors are returned as
*godo.ErrorResponse.
Fields of godo.DomainRecord
DomainRecord represents a DigitalOcean DomainRecord
IDintTypestringNamestringDatastringPriorityintPortintTTLintWeightintFlagsintTagstring
Request Sample
Pagination
This method returns one page of results. Response.Links carries the pagination state; loop until IsLastPage reports true.
Response Example
More Information
See GET /v2/domains/{}/records in the API reference for additional detail on responses, headers, parameters, and more.
See the Go package documentation for the source of this method.