# Records ## List DNS Records `client.DNS.Records.List(ctx, params) (*V4PagePaginationArray[RecordResponse], error)` **get** `/zones/{zone_id}/dns_records` List, search, sort, and filter a zones' DNS records. ### Parameters - `params RecordListParams` - `ZoneID param.Field[string]` Path param: Identifier. - `Comment param.Field[RecordListParamsComment]` Query param - `Absent string` If this parameter is present, only records *without* a comment are returned. - `Contains string` Substring of the DNS record comment. Comment filters are case-insensitive. - `Endswith string` Suffix of the DNS record comment. Comment filters are case-insensitive. - `Exact string` Exact value of the DNS record comment. Comment filters are case-insensitive. - `Present string` If this parameter is present, only records *with* a comment are returned. - `Startswith string` Prefix of the DNS record comment. Comment filters are case-insensitive. - `Content param.Field[RecordListParamsContent]` Query param - `Contains string` Substring of the DNS record content. Content filters are case-insensitive. - `Endswith string` Suffix of the DNS record content. Content filters are case-insensitive. - `Exact string` Exact value of the DNS record content. Content filters are case-insensitive. - `Startswith string` Prefix of the DNS record content. Content filters are case-insensitive. - `Direction param.Field[SortDirection]` Query param: Direction to order DNS records in. - `Match param.Field[RecordListParamsMatch]` Query param: Whether to match all search requirements or at least one (any). If set to `all`, acts like a logical AND between filters. If set to `any`, acts like a logical OR instead. Note that the interaction between tag filters is controlled by the `tag-match` parameter instead. - `const RecordListParamsMatchAny RecordListParamsMatch = "any"` - `const RecordListParamsMatchAll RecordListParamsMatch = "all"` - `Name param.Field[RecordListParamsName]` Query param - `Contains string` Substring of the DNS record name. Name filters are case-insensitive. - `Endswith string` Suffix of the DNS record name. Name filters are case-insensitive. - `Exact string` Exact value of the DNS record name. Name filters are case-insensitive. - `Startswith string` Prefix of the DNS record name. Name filters are case-insensitive. - `Order param.Field[RecordListParamsOrder]` Query param: Field to order DNS records by. - `const RecordListParamsOrderType RecordListParamsOrder = "type"` - `const RecordListParamsOrderName RecordListParamsOrder = "name"` - `const RecordListParamsOrderContent RecordListParamsOrder = "content"` - `const RecordListParamsOrderTTL RecordListParamsOrder = "ttl"` - `const RecordListParamsOrderProxied RecordListParamsOrder = "proxied"` - `Page param.Field[float64]` Query param: Page number of paginated results. - `PerPage param.Field[float64]` Query param: Number of DNS records per page. - `Proxied param.Field[bool]` Query param: Whether the record is receiving the performance and security benefits of Cloudflare. - `Search param.Field[string]` Query param: Allows searching in multiple properties of a DNS record simultaneously. This parameter is intended for human users, not automation. Its exact behavior is intentionally left unspecified and is subject to change in the future. This parameter works independently of the `match` setting. For automated searches, please use the other available parameters. - `Tag param.Field[RecordListParamsTag]` Query param - `Absent string` Name of a tag which must *not* be present on the DNS record. Tag filters are case-insensitive. - `Contains string` A tag and value, of the form `:`. The API will only return DNS records that have a tag named `` whose value contains ``. Tag filters are case-insensitive. - `Endswith string` A tag and value, of the form `:`. The API will only return DNS records that have a tag named `` whose value ends with ``. Tag filters are case-insensitive. - `Exact string` A tag and value, of the form `:`. The API will only return DNS records that have a tag named `` whose value is ``. Tag filters are case-insensitive. - `Present string` Name of a tag which must be present on the DNS record. Tag filters are case-insensitive. - `Startswith string` A tag and value, of the form `:`. The API will only return DNS records that have a tag named `` whose value starts with ``. Tag filters are case-insensitive. - `TagMatch param.Field[RecordListParamsTagMatch]` Query param: Whether to match all tag search requirements or at least one (any). If set to `all`, acts like a logical AND between tag filters. If set to `any`, acts like a logical OR instead. Note that the regular `match` parameter is still used to combine the resulting condition with other filters that aren't related to tags. - `const RecordListParamsTagMatchAny RecordListParamsTagMatch = "any"` - `const RecordListParamsTagMatchAll RecordListParamsTagMatch = "all"` - `Type param.Field[RecordListParamsType]` Query param: Record type. - `const RecordListParamsTypeA RecordListParamsType = "A"` - `const RecordListParamsTypeAAAA RecordListParamsType = "AAAA"` - `const RecordListParamsTypeCAA RecordListParamsType = "CAA"` - `const RecordListParamsTypeCERT RecordListParamsType = "CERT"` - `const RecordListParamsTypeCNAME RecordListParamsType = "CNAME"` - `const RecordListParamsTypeDNSKEY RecordListParamsType = "DNSKEY"` - `const RecordListParamsTypeDS RecordListParamsType = "DS"` - `const RecordListParamsTypeHTTPS RecordListParamsType = "HTTPS"` - `const RecordListParamsTypeLOC RecordListParamsType = "LOC"` - `const RecordListParamsTypeMX RecordListParamsType = "MX"` - `const RecordListParamsTypeNAPTR RecordListParamsType = "NAPTR"` - `const RecordListParamsTypeNS RecordListParamsType = "NS"` - `const RecordListParamsTypeOpenpgpkey RecordListParamsType = "OPENPGPKEY"` - `const RecordListParamsTypePTR RecordListParamsType = "PTR"` - `const RecordListParamsTypeSMIMEA RecordListParamsType = "SMIMEA"` - `const RecordListParamsTypeSRV RecordListParamsType = "SRV"` - `const RecordListParamsTypeSSHFP RecordListParamsType = "SSHFP"` - `const RecordListParamsTypeSVCB RecordListParamsType = "SVCB"` - `const RecordListParamsTypeTLSA RecordListParamsType = "TLSA"` - `const RecordListParamsTypeTXT RecordListParamsType = "TXT"` - `const RecordListParamsTypeURI RecordListParamsType = "URI"` ### Returns - `type RecordResponse interface{…}` - `type RecordResponseA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseAAAA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCNAME struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseMX struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseNS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseOpenpgpkey struct{…}` - `ID string` Identifier. - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Name string` Complete DNS record name, including the zone name, in Punycode. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings RecordResponseOpenpgpkeySettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type RecordResponseOpenpgpkeyType` Record type. - `const RecordResponseOpenpgpkeyTypeOpenpgpkey RecordResponseOpenpgpkeyType = "OPENPGPKEY"` - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponsePTR struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseTXT struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCAA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCERT struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseDNSKEY struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseDS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseHTTPS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseLOC struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseNAPTR struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSMIMEA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSRV struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSSHFP struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSVCB struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseTLSA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseURI struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/dns" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) page, err := client.DNS.Records.List(context.TODO(), dns.RecordListParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": [ { "name": "example.com", "ttl": 3600, "type": "A", "comment": "Domain verification record", "content": "198.51.100.4", "private_routing": true, "proxied": true, "settings": { "ipv4_only": true, "ipv6_only": true }, "tags": [ "owner:dns-team" ], "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2014-01-01T05:20:00.12345Z", "meta": {}, "modified_on": "2014-01-01T05:20:00.12345Z", "proxiable": true, "comment_modified_on": "2024-01-01T05:20:00.12345Z", "tags_modified_on": "2025-01-01T05:20:00.12345Z" } ], "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000, "total_pages": 100 } } ``` ## DNS Record Details `client.DNS.Records.Get(ctx, dnsRecordID, query) (*RecordResponse, error)` **get** `/zones/{zone_id}/dns_records/{dns_record_id}` DNS Record Details ### Parameters - `dnsRecordID string` Identifier. - `query RecordGetParams` - `ZoneID param.Field[string]` Identifier. ### Returns - `type RecordResponse interface{…}` - `type RecordResponseA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseAAAA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCNAME struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseMX struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseNS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseOpenpgpkey struct{…}` - `ID string` Identifier. - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Name string` Complete DNS record name, including the zone name, in Punycode. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings RecordResponseOpenpgpkeySettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type RecordResponseOpenpgpkeyType` Record type. - `const RecordResponseOpenpgpkeyTypeOpenpgpkey RecordResponseOpenpgpkeyType = "OPENPGPKEY"` - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponsePTR struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseTXT struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCAA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCERT struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseDNSKEY struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseDS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseHTTPS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseLOC struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseNAPTR struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSMIMEA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSRV struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSSHFP struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSVCB struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseTLSA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseURI struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/dns" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) recordResponse, err := client.DNS.Records.Get( context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353", dns.RecordGetParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", recordResponse) } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "name": "example.com", "ttl": 3600, "type": "A", "comment": "Domain verification record", "content": "198.51.100.4", "private_routing": true, "proxied": true, "settings": { "ipv4_only": true, "ipv6_only": true }, "tags": [ "owner:dns-team" ], "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2014-01-01T05:20:00.12345Z", "meta": {}, "modified_on": "2014-01-01T05:20:00.12345Z", "proxiable": true, "comment_modified_on": "2024-01-01T05:20:00.12345Z", "tags_modified_on": "2025-01-01T05:20:00.12345Z" } } ``` ## Create DNS Record `client.DNS.Records.New(ctx, params) (*RecordResponse, error)` **post** `/zones/{zone_id}/dns_records` Create a new DNS record for a zone. Notes: - A/AAAA records cannot exist on the same name as CNAME records. - NS records cannot exist on the same name as any other record type. - Domain names are always represented in Punycode, even if Unicode characters were used when creating the record. ### Parameters - `params RecordNewParams` - `ZoneID param.Field[string]` Path param: Identifier. - `ARecord param.Field[ARecord]` Body param ### Returns - `type RecordResponse interface{…}` - `type RecordResponseA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseAAAA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCNAME struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseMX struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseNS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseOpenpgpkey struct{…}` - `ID string` Identifier. - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Name string` Complete DNS record name, including the zone name, in Punycode. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings RecordResponseOpenpgpkeySettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type RecordResponseOpenpgpkeyType` Record type. - `const RecordResponseOpenpgpkeyTypeOpenpgpkey RecordResponseOpenpgpkeyType = "OPENPGPKEY"` - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponsePTR struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseTXT struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCAA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCERT struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseDNSKEY struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseDS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseHTTPS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseLOC struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseNAPTR struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSMIMEA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSRV struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSSHFP struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSVCB struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseTLSA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseURI struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/dns" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) recordResponse, err := client.DNS.Records.New(context.TODO(), dns.RecordNewParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Body: dns.ARecordParam{ Name: cloudflare.F("example.com"), TTL: cloudflare.F(dns.TTL1), Type: cloudflare.F(dns.ARecordTypeA), }, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", recordResponse) } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "name": "example.com", "ttl": 3600, "type": "A", "comment": "Domain verification record", "content": "198.51.100.4", "private_routing": true, "proxied": true, "settings": { "ipv4_only": true, "ipv6_only": true }, "tags": [ "owner:dns-team" ], "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2014-01-01T05:20:00.12345Z", "meta": {}, "modified_on": "2014-01-01T05:20:00.12345Z", "proxiable": true, "comment_modified_on": "2024-01-01T05:20:00.12345Z", "tags_modified_on": "2025-01-01T05:20:00.12345Z" } } ``` ## Overwrite DNS Record `client.DNS.Records.Update(ctx, dnsRecordID, params) (*RecordResponse, error)` **put** `/zones/{zone_id}/dns_records/{dns_record_id}` Overwrite an existing DNS record. Notes: - A/AAAA records cannot exist on the same name as CNAME records. - NS records cannot exist on the same name as any other record type. - Domain names are always represented in Punycode, even if Unicode characters were used when creating the record. ### Parameters - `dnsRecordID string` Identifier. - `params RecordUpdateParams` - `ZoneID param.Field[string]` Path param: Identifier. - `ARecord param.Field[ARecord]` Body param ### Returns - `type RecordResponse interface{…}` - `type RecordResponseA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseAAAA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCNAME struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseMX struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseNS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseOpenpgpkey struct{…}` - `ID string` Identifier. - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Name string` Complete DNS record name, including the zone name, in Punycode. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings RecordResponseOpenpgpkeySettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type RecordResponseOpenpgpkeyType` Record type. - `const RecordResponseOpenpgpkeyTypeOpenpgpkey RecordResponseOpenpgpkeyType = "OPENPGPKEY"` - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponsePTR struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseTXT struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCAA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCERT struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseDNSKEY struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseDS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseHTTPS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseLOC struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseNAPTR struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSMIMEA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSRV struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSSHFP struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSVCB struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseTLSA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseURI struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/dns" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) recordResponse, err := client.DNS.Records.Update( context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353", dns.RecordUpdateParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Body: dns.ARecordParam{ Name: cloudflare.F("example.com"), TTL: cloudflare.F(dns.TTL1), Type: cloudflare.F(dns.ARecordTypeA), }, }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", recordResponse) } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "name": "example.com", "ttl": 3600, "type": "A", "comment": "Domain verification record", "content": "198.51.100.4", "private_routing": true, "proxied": true, "settings": { "ipv4_only": true, "ipv6_only": true }, "tags": [ "owner:dns-team" ], "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2014-01-01T05:20:00.12345Z", "meta": {}, "modified_on": "2014-01-01T05:20:00.12345Z", "proxiable": true, "comment_modified_on": "2024-01-01T05:20:00.12345Z", "tags_modified_on": "2025-01-01T05:20:00.12345Z" } } ``` ## Update DNS Record `client.DNS.Records.Edit(ctx, dnsRecordID, params) (*RecordResponse, error)` **patch** `/zones/{zone_id}/dns_records/{dns_record_id}` Update an existing DNS record. Notes: - A/AAAA records cannot exist on the same name as CNAME records. - NS records cannot exist on the same name as any other record type. - Domain names are always represented in Punycode, even if Unicode characters were used when creating the record. ### Parameters - `dnsRecordID string` Identifier. - `params RecordEditParams` - `ZoneID param.Field[string]` Path param: Identifier. - `ARecord param.Field[ARecord]` Body param ### Returns - `type RecordResponse interface{…}` - `type RecordResponseA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseAAAA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCNAME struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseMX struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseNS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseOpenpgpkey struct{…}` - `ID string` Identifier. - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Name string` Complete DNS record name, including the zone name, in Punycode. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings RecordResponseOpenpgpkeySettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type RecordResponseOpenpgpkeyType` Record type. - `const RecordResponseOpenpgpkeyTypeOpenpgpkey RecordResponseOpenpgpkeyType = "OPENPGPKEY"` - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponsePTR struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseTXT struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCAA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCERT struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseDNSKEY struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseDS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseHTTPS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseLOC struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseNAPTR struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSMIMEA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSRV struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSSHFP struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSVCB struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseTLSA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseURI struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/dns" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) recordResponse, err := client.DNS.Records.Edit( context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353", dns.RecordEditParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Body: dns.ARecordParam{ Name: cloudflare.F("example.com"), TTL: cloudflare.F(dns.TTL1), Type: cloudflare.F(dns.ARecordTypeA), }, }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", recordResponse) } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "name": "example.com", "ttl": 3600, "type": "A", "comment": "Domain verification record", "content": "198.51.100.4", "private_routing": true, "proxied": true, "settings": { "ipv4_only": true, "ipv6_only": true }, "tags": [ "owner:dns-team" ], "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2014-01-01T05:20:00.12345Z", "meta": {}, "modified_on": "2014-01-01T05:20:00.12345Z", "proxiable": true, "comment_modified_on": "2024-01-01T05:20:00.12345Z", "tags_modified_on": "2025-01-01T05:20:00.12345Z" } } ``` ## Delete DNS Record `client.DNS.Records.Delete(ctx, dnsRecordID, body) (*RecordDeleteResponse, error)` **delete** `/zones/{zone_id}/dns_records/{dns_record_id}` Delete DNS Record ### Parameters - `dnsRecordID string` Identifier. - `body RecordDeleteParams` - `ZoneID param.Field[string]` Identifier. ### Returns - `type RecordDeleteResponse struct{…}` - `ID string` Identifier. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/dns" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) record, err := client.DNS.Records.Delete( context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353", dns.RecordDeleteParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", record.ID) } ``` #### Response ```json { "result": { "id": "023e105f4ecef8ad9ca31a8372d0c353" } } ``` ## Export DNS Records `client.DNS.Records.Export(ctx, query) (*string, error)` **get** `/zones/{zone_id}/dns_records/export` You can export your [BIND config](https://en.wikipedia.org/wiki/Zone_file "Zone file") through this endpoint. See [the documentation](https://developers.cloudflare.com/dns/manage-dns-records/how-to/import-and-export/ "Import and export records") for more information. ### Parameters - `query RecordExportParams` - `ZoneID param.Field[string]` Identifier. ### Returns - `type RecordExportResponse string` Exported BIND zone file. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/dns" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) response, err := client.DNS.Records.Export(context.TODO(), dns.RecordExportParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` ## Import DNS Records `client.DNS.Records.Import(ctx, params) (*RecordImportResponse, error)` **post** `/zones/{zone_id}/dns_records/import` You can upload your [BIND config](https://en.wikipedia.org/wiki/Zone_file "Zone file") through this endpoint. It assumes that cURL is called from a location with bind_config.txt (valid BIND config) present. See [the documentation](https://developers.cloudflare.com/dns/manage-dns-records/how-to/import-and-export/ "Import and export records") for more information. ### Parameters - `params RecordImportParams` - `ZoneID param.Field[string]` Path param: Identifier. - `File param.Field[string]` Body param: BIND config to import. **Tip:** When using cURL, a file can be uploaded using `--form 'file=@bind_config.txt'`. - `Proxied param.Field[string]` Body param: Whether or not proxiable records should receive the performance and security benefits of Cloudflare. The value should be either `true` or `false`. ### Returns - `type RecordImportResponse struct{…}` - `RecsAdded float64` Number of DNS records added. - `TotalRecordsParsed float64` Total number of DNS records parsed. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/dns" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) response, err := client.DNS.Records.Import(context.TODO(), dns.RecordImportParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), File: cloudflare.F("www.example.com. 300 IN A 127.0.0.1"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.RecsAdded) } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "recs_added": 5, "total_records_parsed": 5 } } ``` ## Scan DNS Records `client.DNS.Records.Scan(ctx, params) (*RecordScanResponse, error)` **post** `/zones/{zone_id}/dns_records/scan` Scan for common DNS records on your domain and automatically add them to your zone. Useful if you haven't updated your nameservers yet. ### Parameters - `params RecordScanParams` - `ZoneID param.Field[string]` Path param: Identifier. - `Body param.Field[unknown]` Body param ### Returns - `type RecordScanResponse struct{…}` - `RecsAdded float64` Number of DNS records added. - `TotalRecordsParsed float64` Total number of DNS records parsed. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/dns" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) response, err := client.DNS.Records.Scan(context.TODO(), dns.RecordScanParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Body: map[string]interface{}{ }, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.RecsAdded) } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "recs_added": 5, "total_records_parsed": 5 } } ``` ## Trigger DNS Record Scan `client.DNS.Records.ScanTrigger(ctx, body) (*RecordScanTriggerResponse, error)` **post** `/zones/{zone_id}/dns_records/scan/trigger` Initiates an asynchronous scan for common DNS records on your domain. Note that this **does not** automatically add records to your zone. The scan runs in the background, and results can be reviewed later using the `/scan/review` endpoints. Useful if you haven't updated your nameservers yet. ### Parameters - `body RecordScanTriggerParams` - `ZoneID param.Field[string]` Identifier. ### Returns - `type RecordScanTriggerResponse struct{…}` - `Errors []RecordScanTriggerResponseError` - `Code int64` - `Message string` - `DocumentationURL string` - `Source RecordScanTriggerResponseErrorsSource` - `Pointer string` - `Messages []RecordScanTriggerResponseMessage` - `Code int64` - `Message string` - `DocumentationURL string` - `Source RecordScanTriggerResponseMessagesSource` - `Pointer string` - `Success RecordScanTriggerResponseSuccess` Whether the API call was successful. - `const RecordScanTriggerResponseSuccessTrue RecordScanTriggerResponseSuccess = true` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/dns" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) response, err := client.DNS.Records.ScanTrigger(context.TODO(), dns.RecordScanTriggerParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Errors) } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true } ``` ## Review Scanned DNS Records `client.DNS.Records.ScanReview(ctx, params) (*RecordScanReviewResponse, error)` **post** `/zones/{zone_id}/dns_records/scan/review` Accept or reject DNS records found by the DNS records scan. Accepted records will be permanently added to the zone, while rejected records will be permanently deleted. ### Parameters - `params RecordScanReviewParams` - `ZoneID param.Field[string]` Path param: Identifier. - `Accepts param.Field[[]RecordScanReviewParamsAccept]` Body param - `type ARecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type ARecordType` Record type. - `const ARecordTypeA ARecordType = "A"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A valid IPv4 address. - `PrivateRouting bool` Enables private network routing to the origin. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings ARecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type AAAARecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type AAAARecordType` Record type. - `const AAAARecordTypeAAAA AAAARecordType = "AAAA"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A valid IPv6 address. - `PrivateRouting bool` Enables private network routing to the origin. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings AAAARecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type CNAMERecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type CNAMERecordType` Record type. - `const CNAMERecordTypeCNAME CNAMERecordType = "CNAME"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A valid hostname. Must not match the record's name. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings CNAMERecordSettings` Settings for the DNS record. - `FlattenCNAME bool` If enabled, causes the CNAME record to be resolved externally and the resulting address records (e.g., A and AAAA) to be returned instead of the CNAME record itself. This setting is unavailable for proxied records, since they are always flattened. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type MXRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type MXRecordType` Record type. - `const MXRecordTypeMX MXRecordType = "MX"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A valid mail server hostname. - `Priority float64` Required for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings MXRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type NSRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type NSRecordType` Record type. - `const NSRecordTypeNS NSRecordType = "NS"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A valid name server host name. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings NSRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type RecordScanReviewParamsAcceptsDNSRecordsOpenpgpkeyRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type RecordScanReviewParamsAcceptsDNSRecordsOpenpgpkeyRecordType` Record type. - `const RecordScanReviewParamsAcceptsDNSRecordsOpenpgpkeyRecordTypeOpenpgpkey RecordScanReviewParamsAcceptsDNSRecordsOpenpgpkeyRecordType = "OPENPGPKEY"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings RecordScanReviewParamsAcceptsDNSRecordsOpenpgpkeyRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type PTRRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type PTRRecordType` Record type. - `const PTRRecordTypePTR PTRRecordType = "PTR"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Domain name pointing to the address. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings PTRRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type TXTRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type TXTRecordType` Record type. - `const TXTRecordTypeTXT TXTRecordType = "TXT"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Text content for the record. The content must consist of quoted "character strings" (RFC 1035), each with a length of up to 255 bytes. Strings exceeding this allowed maximum length are automatically split. Learn more at . - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings TXTRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type CAARecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type CAARecordType` Record type. - `const CAARecordTypeCAA CAARecordType = "CAA"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted CAA content. See 'data' to set CAA properties. - `Data CAARecordData` Components of a CAA record. - `Flags float64` Flags for the CAA record. - `Tag string` Name of the property controlled by this record (e.g.: issue, issuewild, iodef). - `Value string` Value of the record. This field's semantics depend on the chosen tag. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings CAARecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type CERTRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type CERTRecordType` Record type. - `const CERTRecordTypeCERT CERTRecordType = "CERT"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted CERT content. See 'data' to set CERT properties. - `Data CERTRecordData` Components of a CERT record. - `Algorithm float64` Algorithm. - `Certificate string` Certificate. - `KeyTag float64` Key Tag. - `Type float64` Type. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings CERTRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type DNSKEYRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type DNSKEYRecordType` Record type. - `const DNSKEYRecordTypeDNSKEY DNSKEYRecordType = "DNSKEY"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted DNSKEY content. See 'data' to set DNSKEY properties. - `Data DNSKEYRecordData` Components of a DNSKEY record. - `Algorithm float64` Algorithm. - `Flags float64` Flags. - `Protocol float64` Protocol. - `PublicKey string` Public Key. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings DNSKEYRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type DSRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type DSRecordType` Record type. - `const DSRecordTypeDS DSRecordType = "DS"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted DS content. See 'data' to set DS properties. - `Data DSRecordData` Components of a DS record. - `Algorithm float64` Algorithm. - `Digest string` Digest. - `DigestType float64` Digest Type. - `KeyTag float64` Key Tag. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings DSRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type HTTPSRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type HTTPSRecordType` Record type. - `const HTTPSRecordTypeHTTPS HTTPSRecordType = "HTTPS"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted HTTPS content. See 'data' to set HTTPS properties. - `Data HTTPSRecordData` Components of a HTTPS record. - `Priority float64` Priority. - `Target string` Target. - `Value string` Value. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings HTTPSRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type LOCRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type LOCRecordType` Record type. - `const LOCRecordTypeLOC LOCRecordType = "LOC"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted LOC content. See 'data' to set LOC properties. - `Data LOCRecordData` Components of a LOC record. - `Altitude float64` Altitude of location in meters. - `LatDegrees float64` Degrees of latitude. - `LatDirection LOCRecordDataLatDirection` Latitude direction. - `const LOCRecordDataLatDirectionN LOCRecordDataLatDirection = "N"` - `const LOCRecordDataLatDirectionS LOCRecordDataLatDirection = "S"` - `LatMinutes float64` Minutes of latitude. - `LatSeconds float64` Seconds of latitude. - `LongDegrees float64` Degrees of longitude. - `LongDirection LOCRecordDataLongDirection` Longitude direction. - `const LOCRecordDataLongDirectionE LOCRecordDataLongDirection = "E"` - `const LOCRecordDataLongDirectionW LOCRecordDataLongDirection = "W"` - `LongMinutes float64` Minutes of longitude. - `LongSeconds float64` Seconds of longitude. - `PrecisionHorz float64` Horizontal precision of location. - `PrecisionVert float64` Vertical precision of location. - `Size float64` Size of location in meters. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings LOCRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type NAPTRRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type NAPTRRecordType` Record type. - `const NAPTRRecordTypeNAPTR NAPTRRecordType = "NAPTR"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted NAPTR content. See 'data' to set NAPTR properties. - `Data NAPTRRecordData` Components of a NAPTR record. - `Flags string` Flags. - `Order float64` Order. - `Preference float64` Preference. - `Regex string` Regex. - `Replacement string` Replacement. - `Service string` Service. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings NAPTRRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type SMIMEARecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type SMIMEARecordType` Record type. - `const SMIMEARecordTypeSMIMEA SMIMEARecordType = "SMIMEA"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted SMIMEA content. See 'data' to set SMIMEA properties. - `Data SMIMEARecordData` Components of a SMIMEA record. - `Certificate string` Certificate. - `MatchingType float64` Matching Type. - `Selector float64` Selector. - `Usage float64` Usage. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings SMIMEARecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type SRVRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type SRVRecordType` Record type. - `const SRVRecordTypeSRV SRVRecordType = "SRV"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Priority, weight, port, and SRV target. See 'data' for setting the individual component values. - `Data SRVRecordData` Components of a SRV record. - `Port float64` The port of the service. - `Priority float64` Required for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map. - `Target string` A valid hostname. - `Weight float64` The record weight. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings SRVRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type SSHFPRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type SSHFPRecordType` Record type. - `const SSHFPRecordTypeSSHFP SSHFPRecordType = "SSHFP"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted SSHFP content. See 'data' to set SSHFP properties. - `Data SSHFPRecordData` Components of a SSHFP record. - `Algorithm float64` Algorithm. - `Fingerprint string` Fingerprint. - `Type float64` Type. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings SSHFPRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type SVCBRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type SVCBRecordType` Record type. - `const SVCBRecordTypeSVCB SVCBRecordType = "SVCB"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted SVCB content. See 'data' to set SVCB properties. - `Data SVCBRecordData` Components of a SVCB record. - `Priority float64` Priority. - `Target string` Target. - `Value string` Value. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings SVCBRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type TLSARecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type TLSARecordType` Record type. - `const TLSARecordTypeTLSA TLSARecordType = "TLSA"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted TLSA content. See 'data' to set TLSA properties. - `Data TLSARecordData` Components of a TLSA record. - `Certificate string` Certificate. - `MatchingType float64` Matching Type. - `Selector float64` Selector. - `Usage float64` Usage. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings TLSARecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type URIRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type URIRecordType` Record type. - `const URIRecordTypeURI URIRecordType = "URI"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted URI content. See 'data' to set URI properties. - `Data URIRecordData` Components of a URI record. - `Target string` The record content. - `Weight float64` The record weight. - `Priority float64` Required for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings URIRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `Rejects param.Field[[]RecordScanReviewParamsReject]` Body param - `ID string` Identifier. ### Returns - `type RecordScanReviewResponse struct{…}` - `Accepts []RecordResponse` - `type RecordResponseA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseAAAA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCNAME struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseMX struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseNS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseOpenpgpkey struct{…}` - `ID string` Identifier. - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Name string` Complete DNS record name, including the zone name, in Punycode. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings RecordResponseOpenpgpkeySettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type RecordResponseOpenpgpkeyType` Record type. - `const RecordResponseOpenpgpkeyTypeOpenpgpkey RecordResponseOpenpgpkeyType = "OPENPGPKEY"` - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponsePTR struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseTXT struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCAA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCERT struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseDNSKEY struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseDS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseHTTPS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseLOC struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseNAPTR struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSMIMEA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSRV struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSSHFP struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSVCB struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseTLSA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseURI struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `Rejects []string` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/dns" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) response, err := client.DNS.Records.ScanReview(context.TODO(), dns.RecordScanReviewParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Accepts) } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "accepts": [ { "name": "example.com", "ttl": 3600, "type": "A", "comment": "Domain verification record", "content": "198.51.100.4", "private_routing": true, "proxied": true, "settings": { "ipv4_only": true, "ipv6_only": true }, "tags": [ "owner:dns-team" ], "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2014-01-01T05:20:00.12345Z", "meta": {}, "modified_on": "2014-01-01T05:20:00.12345Z", "proxiable": true, "comment_modified_on": "2024-01-01T05:20:00.12345Z", "tags_modified_on": "2025-01-01T05:20:00.12345Z" } ], "rejects": [ "023e105f4ecef8ad9ca31a8372d0c353" ] } } ``` ## List Scanned DNS Records `client.DNS.Records.ScanList(ctx, query) (*SinglePage[RecordResponse], error)` **get** `/zones/{zone_id}/dns_records/scan/review` Retrieves the list of DNS records discovered up to this point by the asynchronous scan. These records are temporary until explicitly accepted or rejected via `POST /scan/review`. Additional records may be discovered by the scan later. ### Parameters - `query RecordScanListParams` - `ZoneID param.Field[string]` Identifier. ### Returns - `type RecordResponse interface{…}` - `type RecordResponseA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseAAAA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCNAME struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseMX struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseNS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseOpenpgpkey struct{…}` - `ID string` Identifier. - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Name string` Complete DNS record name, including the zone name, in Punycode. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings RecordResponseOpenpgpkeySettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type RecordResponseOpenpgpkeyType` Record type. - `const RecordResponseOpenpgpkeyTypeOpenpgpkey RecordResponseOpenpgpkeyType = "OPENPGPKEY"` - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponsePTR struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseTXT struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCAA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCERT struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseDNSKEY struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseDS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseHTTPS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseLOC struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseNAPTR struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSMIMEA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSRV struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSSHFP struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSVCB struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseTLSA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseURI struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/dns" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) page, err := client.DNS.Records.ScanList(context.TODO(), dns.RecordScanListParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": [ { "name": "example.com", "ttl": 3600, "type": "A", "comment": "Domain verification record", "content": "198.51.100.4", "private_routing": true, "proxied": true, "settings": { "ipv4_only": true, "ipv6_only": true }, "tags": [ "owner:dns-team" ], "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2014-01-01T05:20:00.12345Z", "meta": {}, "modified_on": "2014-01-01T05:20:00.12345Z", "proxiable": true, "comment_modified_on": "2024-01-01T05:20:00.12345Z", "tags_modified_on": "2025-01-01T05:20:00.12345Z" } ], "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000, "total_pages": 100 } } ``` ## Batch DNS Records `client.DNS.Records.Batch(ctx, params) (*RecordBatchResponse, error)` **post** `/zones/{zone_id}/dns_records/batch` Send a Batch of DNS Record API calls to be executed together. Notes: - Although Cloudflare will execute the batched operations in a single database transaction, Cloudflare's distributed KV store must treat each record change as a single key-value pair. This means that the propagation of changes is not atomic. See [the documentation](https://developers.cloudflare.com/dns/manage-dns-records/how-to/batch-record-changes/ "Batch DNS records") for more information. - The operations you specify within the /batch request body are always executed in the following order: - Deletes - Patches - Puts - Posts ### Parameters - `params RecordBatchParams` - `ZoneID param.Field[string]` Path param: Identifier. - `Deletes param.Field[[]RecordBatchParamsDelete]` Body param - `ID string` Identifier. - `Patches param.Field[[]BatchPatch]` Body param - `BatchPatchARecord` - `ID string` Identifier. - `BatchPatchAAAARecord` - `ID string` Identifier. - `BatchPatchCNAMERecord` - `ID string` Identifier. - `BatchPatchMXRecord` - `ID string` Identifier. - `BatchPatchNSRecord` - `ID string` Identifier. - `BatchPatchOpenpgpkeyRecord` - `ID string` Identifier. - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type BatchPatchOpenpgpkeyRecordType` Record type. - `const BatchPatchOpenpgpkeyRecordTypeOpenpgpkey BatchPatchOpenpgpkeyRecordType = "OPENPGPKEY"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings BatchPatchOpenpgpkeyRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `BatchPatchPTRRecord` - `ID string` Identifier. - `BatchPatchTXTRecord` - `ID string` Identifier. - `BatchPatchCAARecord` - `ID string` Identifier. - `BatchPatchCERTRecord` - `ID string` Identifier. - `BatchPatchDNSKEYRecord` - `ID string` Identifier. - `BatchPatchDSRecord` - `ID string` Identifier. - `BatchPatchHTTPSRecord` - `ID string` Identifier. - `BatchPatchLOCRecord` - `ID string` Identifier. - `BatchPatchNAPTRRecord` - `ID string` Identifier. - `BatchPatchSMIMEARecord` - `ID string` Identifier. - `BatchPatchSRVRecord` - `ID string` Identifier. - `BatchPatchSSHFPRecord` - `ID string` Identifier. - `BatchPatchSVCBRecord` - `ID string` Identifier. - `BatchPatchTLSARecord` - `ID string` Identifier. - `BatchPatchURIRecord` - `ID string` Identifier. - `Posts param.Field[[]RecordBatchParamsPost]` Body param - `type ARecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type ARecordType` Record type. - `const ARecordTypeA ARecordType = "A"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A valid IPv4 address. - `PrivateRouting bool` Enables private network routing to the origin. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings ARecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type AAAARecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type AAAARecordType` Record type. - `const AAAARecordTypeAAAA AAAARecordType = "AAAA"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A valid IPv6 address. - `PrivateRouting bool` Enables private network routing to the origin. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings AAAARecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type CNAMERecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type CNAMERecordType` Record type. - `const CNAMERecordTypeCNAME CNAMERecordType = "CNAME"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A valid hostname. Must not match the record's name. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings CNAMERecordSettings` Settings for the DNS record. - `FlattenCNAME bool` If enabled, causes the CNAME record to be resolved externally and the resulting address records (e.g., A and AAAA) to be returned instead of the CNAME record itself. This setting is unavailable for proxied records, since they are always flattened. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type MXRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type MXRecordType` Record type. - `const MXRecordTypeMX MXRecordType = "MX"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A valid mail server hostname. - `Priority float64` Required for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings MXRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type NSRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type NSRecordType` Record type. - `const NSRecordTypeNS NSRecordType = "NS"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A valid name server host name. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings NSRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type RecordBatchParamsPostsDNSRecordsOpenpgpkeyRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type RecordBatchParamsPostsDNSRecordsOpenpgpkeyRecordType` Record type. - `const RecordBatchParamsPostsDNSRecordsOpenpgpkeyRecordTypeOpenpgpkey RecordBatchParamsPostsDNSRecordsOpenpgpkeyRecordType = "OPENPGPKEY"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings RecordBatchParamsPostsDNSRecordsOpenpgpkeyRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type PTRRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type PTRRecordType` Record type. - `const PTRRecordTypePTR PTRRecordType = "PTR"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Domain name pointing to the address. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings PTRRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type TXTRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type TXTRecordType` Record type. - `const TXTRecordTypeTXT TXTRecordType = "TXT"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Text content for the record. The content must consist of quoted "character strings" (RFC 1035), each with a length of up to 255 bytes. Strings exceeding this allowed maximum length are automatically split. Learn more at . - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings TXTRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type CAARecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type CAARecordType` Record type. - `const CAARecordTypeCAA CAARecordType = "CAA"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted CAA content. See 'data' to set CAA properties. - `Data CAARecordData` Components of a CAA record. - `Flags float64` Flags for the CAA record. - `Tag string` Name of the property controlled by this record (e.g.: issue, issuewild, iodef). - `Value string` Value of the record. This field's semantics depend on the chosen tag. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings CAARecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type CERTRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type CERTRecordType` Record type. - `const CERTRecordTypeCERT CERTRecordType = "CERT"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted CERT content. See 'data' to set CERT properties. - `Data CERTRecordData` Components of a CERT record. - `Algorithm float64` Algorithm. - `Certificate string` Certificate. - `KeyTag float64` Key Tag. - `Type float64` Type. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings CERTRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type DNSKEYRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type DNSKEYRecordType` Record type. - `const DNSKEYRecordTypeDNSKEY DNSKEYRecordType = "DNSKEY"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted DNSKEY content. See 'data' to set DNSKEY properties. - `Data DNSKEYRecordData` Components of a DNSKEY record. - `Algorithm float64` Algorithm. - `Flags float64` Flags. - `Protocol float64` Protocol. - `PublicKey string` Public Key. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings DNSKEYRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type DSRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type DSRecordType` Record type. - `const DSRecordTypeDS DSRecordType = "DS"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted DS content. See 'data' to set DS properties. - `Data DSRecordData` Components of a DS record. - `Algorithm float64` Algorithm. - `Digest string` Digest. - `DigestType float64` Digest Type. - `KeyTag float64` Key Tag. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings DSRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type HTTPSRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type HTTPSRecordType` Record type. - `const HTTPSRecordTypeHTTPS HTTPSRecordType = "HTTPS"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted HTTPS content. See 'data' to set HTTPS properties. - `Data HTTPSRecordData` Components of a HTTPS record. - `Priority float64` Priority. - `Target string` Target. - `Value string` Value. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings HTTPSRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type LOCRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type LOCRecordType` Record type. - `const LOCRecordTypeLOC LOCRecordType = "LOC"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted LOC content. See 'data' to set LOC properties. - `Data LOCRecordData` Components of a LOC record. - `Altitude float64` Altitude of location in meters. - `LatDegrees float64` Degrees of latitude. - `LatDirection LOCRecordDataLatDirection` Latitude direction. - `const LOCRecordDataLatDirectionN LOCRecordDataLatDirection = "N"` - `const LOCRecordDataLatDirectionS LOCRecordDataLatDirection = "S"` - `LatMinutes float64` Minutes of latitude. - `LatSeconds float64` Seconds of latitude. - `LongDegrees float64` Degrees of longitude. - `LongDirection LOCRecordDataLongDirection` Longitude direction. - `const LOCRecordDataLongDirectionE LOCRecordDataLongDirection = "E"` - `const LOCRecordDataLongDirectionW LOCRecordDataLongDirection = "W"` - `LongMinutes float64` Minutes of longitude. - `LongSeconds float64` Seconds of longitude. - `PrecisionHorz float64` Horizontal precision of location. - `PrecisionVert float64` Vertical precision of location. - `Size float64` Size of location in meters. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings LOCRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type NAPTRRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type NAPTRRecordType` Record type. - `const NAPTRRecordTypeNAPTR NAPTRRecordType = "NAPTR"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted NAPTR content. See 'data' to set NAPTR properties. - `Data NAPTRRecordData` Components of a NAPTR record. - `Flags string` Flags. - `Order float64` Order. - `Preference float64` Preference. - `Regex string` Regex. - `Replacement string` Replacement. - `Service string` Service. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings NAPTRRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type SMIMEARecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type SMIMEARecordType` Record type. - `const SMIMEARecordTypeSMIMEA SMIMEARecordType = "SMIMEA"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted SMIMEA content. See 'data' to set SMIMEA properties. - `Data SMIMEARecordData` Components of a SMIMEA record. - `Certificate string` Certificate. - `MatchingType float64` Matching Type. - `Selector float64` Selector. - `Usage float64` Usage. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings SMIMEARecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type SRVRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type SRVRecordType` Record type. - `const SRVRecordTypeSRV SRVRecordType = "SRV"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Priority, weight, port, and SRV target. See 'data' for setting the individual component values. - `Data SRVRecordData` Components of a SRV record. - `Port float64` The port of the service. - `Priority float64` Required for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map. - `Target string` A valid hostname. - `Weight float64` The record weight. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings SRVRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type SSHFPRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type SSHFPRecordType` Record type. - `const SSHFPRecordTypeSSHFP SSHFPRecordType = "SSHFP"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted SSHFP content. See 'data' to set SSHFP properties. - `Data SSHFPRecordData` Components of a SSHFP record. - `Algorithm float64` Algorithm. - `Fingerprint string` Fingerprint. - `Type float64` Type. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings SSHFPRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type SVCBRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type SVCBRecordType` Record type. - `const SVCBRecordTypeSVCB SVCBRecordType = "SVCB"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted SVCB content. See 'data' to set SVCB properties. - `Data SVCBRecordData` Components of a SVCB record. - `Priority float64` Priority. - `Target string` Target. - `Value string` Value. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings SVCBRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type TLSARecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type TLSARecordType` Record type. - `const TLSARecordTypeTLSA TLSARecordType = "TLSA"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted TLSA content. See 'data' to set TLSA properties. - `Data TLSARecordData` Components of a TLSA record. - `Certificate string` Certificate. - `MatchingType float64` Matching Type. - `Selector float64` Selector. - `Usage float64` Usage. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings TLSARecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type URIRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type URIRecordType` Record type. - `const URIRecordTypeURI URIRecordType = "URI"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted URI content. See 'data' to set URI properties. - `Data URIRecordData` Components of a URI record. - `Target string` The record content. - `Weight float64` The record weight. - `Priority float64` Required for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings URIRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `Puts param.Field[[]BatchPut]` Body param - `BatchPutARecord` - `ID string` Identifier. - `BatchPutAAAARecord` - `ID string` Identifier. - `BatchPutCNAMERecord` - `ID string` Identifier. - `BatchPutMXRecord` - `ID string` Identifier. - `BatchPutNSRecord` - `ID string` Identifier. - `BatchPutOpenpgpkeyRecord` - `ID string` Identifier. - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type BatchPutOpenpgpkeyRecordType` Record type. - `const BatchPutOpenpgpkeyRecordTypeOpenpgpkey BatchPutOpenpgpkeyRecordType = "OPENPGPKEY"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings BatchPutOpenpgpkeyRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `BatchPutPTRRecord` - `ID string` Identifier. - `BatchPutTXTRecord` - `ID string` Identifier. - `BatchPutCAARecord` - `ID string` Identifier. - `BatchPutCERTRecord` - `ID string` Identifier. - `BatchPutDNSKEYRecord` - `ID string` Identifier. - `BatchPutDSRecord` - `ID string` Identifier. - `BatchPutHTTPSRecord` - `ID string` Identifier. - `BatchPutLOCRecord` - `ID string` Identifier. - `BatchPutNAPTRRecord` - `ID string` Identifier. - `BatchPutSMIMEARecord` - `ID string` Identifier. - `BatchPutSRVRecord` - `ID string` Identifier. - `BatchPutSSHFPRecord` - `ID string` Identifier. - `BatchPutSVCBRecord` - `ID string` Identifier. - `BatchPutTLSARecord` - `ID string` Identifier. - `BatchPutURIRecord` - `ID string` Identifier. ### Returns - `type RecordBatchResponse struct{…}` - `Deletes []RecordResponse` - `type RecordResponseA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseAAAA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCNAME struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseMX struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseNS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseOpenpgpkey struct{…}` - `ID string` Identifier. - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Name string` Complete DNS record name, including the zone name, in Punycode. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings RecordResponseOpenpgpkeySettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type RecordResponseOpenpgpkeyType` Record type. - `const RecordResponseOpenpgpkeyTypeOpenpgpkey RecordResponseOpenpgpkeyType = "OPENPGPKEY"` - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponsePTR struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseTXT struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCAA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCERT struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseDNSKEY struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseDS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseHTTPS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseLOC struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseNAPTR struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSMIMEA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSRV struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSSHFP struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSVCB struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseTLSA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseURI struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `Patches []RecordResponse` - `type RecordResponseA struct{…}` - `type RecordResponseAAAA struct{…}` - `type RecordResponseCNAME struct{…}` - `type RecordResponseMX struct{…}` - `type RecordResponseNS struct{…}` - `type RecordResponseOpenpgpkey struct{…}` - `type RecordResponsePTR struct{…}` - `type RecordResponseTXT struct{…}` - `type RecordResponseCAA struct{…}` - `type RecordResponseCERT struct{…}` - `type RecordResponseDNSKEY struct{…}` - `type RecordResponseDS struct{…}` - `type RecordResponseHTTPS struct{…}` - `type RecordResponseLOC struct{…}` - `type RecordResponseNAPTR struct{…}` - `type RecordResponseSMIMEA struct{…}` - `type RecordResponseSRV struct{…}` - `type RecordResponseSSHFP struct{…}` - `type RecordResponseSVCB struct{…}` - `type RecordResponseTLSA struct{…}` - `type RecordResponseURI struct{…}` - `Posts []RecordResponse` - `type RecordResponseA struct{…}` - `type RecordResponseAAAA struct{…}` - `type RecordResponseCNAME struct{…}` - `type RecordResponseMX struct{…}` - `type RecordResponseNS struct{…}` - `type RecordResponseOpenpgpkey struct{…}` - `type RecordResponsePTR struct{…}` - `type RecordResponseTXT struct{…}` - `type RecordResponseCAA struct{…}` - `type RecordResponseCERT struct{…}` - `type RecordResponseDNSKEY struct{…}` - `type RecordResponseDS struct{…}` - `type RecordResponseHTTPS struct{…}` - `type RecordResponseLOC struct{…}` - `type RecordResponseNAPTR struct{…}` - `type RecordResponseSMIMEA struct{…}` - `type RecordResponseSRV struct{…}` - `type RecordResponseSSHFP struct{…}` - `type RecordResponseSVCB struct{…}` - `type RecordResponseTLSA struct{…}` - `type RecordResponseURI struct{…}` - `Puts []RecordResponse` - `type RecordResponseA struct{…}` - `type RecordResponseAAAA struct{…}` - `type RecordResponseCNAME struct{…}` - `type RecordResponseMX struct{…}` - `type RecordResponseNS struct{…}` - `type RecordResponseOpenpgpkey struct{…}` - `type RecordResponsePTR struct{…}` - `type RecordResponseTXT struct{…}` - `type RecordResponseCAA struct{…}` - `type RecordResponseCERT struct{…}` - `type RecordResponseDNSKEY struct{…}` - `type RecordResponseDS struct{…}` - `type RecordResponseHTTPS struct{…}` - `type RecordResponseLOC struct{…}` - `type RecordResponseNAPTR struct{…}` - `type RecordResponseSMIMEA struct{…}` - `type RecordResponseSRV struct{…}` - `type RecordResponseSSHFP struct{…}` - `type RecordResponseSVCB struct{…}` - `type RecordResponseTLSA struct{…}` - `type RecordResponseURI struct{…}` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/dns" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) response, err := client.DNS.Records.Batch(context.TODO(), dns.RecordBatchParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Deletes) } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "deletes": [ { "name": "example.com", "ttl": 3600, "type": "A", "comment": "Domain verification record", "content": "198.51.100.4", "private_routing": true, "proxied": true, "settings": { "ipv4_only": true, "ipv6_only": true }, "tags": [ "owner:dns-team" ], "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2014-01-01T05:20:00.12345Z", "meta": {}, "modified_on": "2014-01-01T05:20:00.12345Z", "proxiable": true, "comment_modified_on": "2024-01-01T05:20:00.12345Z", "tags_modified_on": "2025-01-01T05:20:00.12345Z" } ], "patches": [ { "name": "example.com", "ttl": 3600, "type": "A", "comment": "Domain verification record", "content": "198.51.100.4", "private_routing": true, "proxied": true, "settings": { "ipv4_only": true, "ipv6_only": true }, "tags": [ "owner:dns-team" ], "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2014-01-01T05:20:00.12345Z", "meta": {}, "modified_on": "2014-01-01T05:20:00.12345Z", "proxiable": true, "comment_modified_on": "2024-01-01T05:20:00.12345Z", "tags_modified_on": "2025-01-01T05:20:00.12345Z" } ], "posts": [ { "name": "example.com", "ttl": 3600, "type": "A", "comment": "Domain verification record", "content": "198.51.100.4", "private_routing": true, "proxied": true, "settings": { "ipv4_only": true, "ipv6_only": true }, "tags": [ "owner:dns-team" ], "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2014-01-01T05:20:00.12345Z", "meta": {}, "modified_on": "2014-01-01T05:20:00.12345Z", "proxiable": true, "comment_modified_on": "2024-01-01T05:20:00.12345Z", "tags_modified_on": "2025-01-01T05:20:00.12345Z" } ], "puts": [ { "name": "example.com", "ttl": 3600, "type": "A", "comment": "Domain verification record", "content": "198.51.100.4", "private_routing": true, "proxied": true, "settings": { "ipv4_only": true, "ipv6_only": true }, "tags": [ "owner:dns-team" ], "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2014-01-01T05:20:00.12345Z", "meta": {}, "modified_on": "2014-01-01T05:20:00.12345Z", "proxiable": true, "comment_modified_on": "2024-01-01T05:20:00.12345Z", "tags_modified_on": "2025-01-01T05:20:00.12345Z" } ] } } ``` ## Domain Types ### A Record - `type ARecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type ARecordType` Record type. - `const ARecordTypeA ARecordType = "A"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A valid IPv4 address. - `PrivateRouting bool` Enables private network routing to the origin. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings ARecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. ### AAAA Record - `type AAAARecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type AAAARecordType` Record type. - `const AAAARecordTypeAAAA AAAARecordType = "AAAA"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A valid IPv6 address. - `PrivateRouting bool` Enables private network routing to the origin. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings AAAARecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. ### Batch Patch - `type BatchPatch interface{…}` - `BatchPatchARecord` - `ID string` Identifier. - `BatchPatchAAAARecord` - `ID string` Identifier. - `BatchPatchCNAMERecord` - `ID string` Identifier. - `BatchPatchMXRecord` - `ID string` Identifier. - `BatchPatchNSRecord` - `ID string` Identifier. - `BatchPatchOpenpgpkeyRecord` - `ID string` Identifier. - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type BatchPatchOpenpgpkeyRecordType` Record type. - `const BatchPatchOpenpgpkeyRecordTypeOpenpgpkey BatchPatchOpenpgpkeyRecordType = "OPENPGPKEY"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings BatchPatchOpenpgpkeyRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `BatchPatchPTRRecord` - `ID string` Identifier. - `BatchPatchTXTRecord` - `ID string` Identifier. - `BatchPatchCAARecord` - `ID string` Identifier. - `BatchPatchCERTRecord` - `ID string` Identifier. - `BatchPatchDNSKEYRecord` - `ID string` Identifier. - `BatchPatchDSRecord` - `ID string` Identifier. - `BatchPatchHTTPSRecord` - `ID string` Identifier. - `BatchPatchLOCRecord` - `ID string` Identifier. - `BatchPatchNAPTRRecord` - `ID string` Identifier. - `BatchPatchSMIMEARecord` - `ID string` Identifier. - `BatchPatchSRVRecord` - `ID string` Identifier. - `BatchPatchSSHFPRecord` - `ID string` Identifier. - `BatchPatchSVCBRecord` - `ID string` Identifier. - `BatchPatchTLSARecord` - `ID string` Identifier. - `BatchPatchURIRecord` - `ID string` Identifier. ### Batch Put - `type BatchPut interface{…}` - `BatchPutARecord` - `ID string` Identifier. - `BatchPutAAAARecord` - `ID string` Identifier. - `BatchPutCNAMERecord` - `ID string` Identifier. - `BatchPutMXRecord` - `ID string` Identifier. - `BatchPutNSRecord` - `ID string` Identifier. - `BatchPutOpenpgpkeyRecord` - `ID string` Identifier. - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type BatchPutOpenpgpkeyRecordType` Record type. - `const BatchPutOpenpgpkeyRecordTypeOpenpgpkey BatchPutOpenpgpkeyRecordType = "OPENPGPKEY"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings BatchPutOpenpgpkeyRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `BatchPutPTRRecord` - `ID string` Identifier. - `BatchPutTXTRecord` - `ID string` Identifier. - `BatchPutCAARecord` - `ID string` Identifier. - `BatchPutCERTRecord` - `ID string` Identifier. - `BatchPutDNSKEYRecord` - `ID string` Identifier. - `BatchPutDSRecord` - `ID string` Identifier. - `BatchPutHTTPSRecord` - `ID string` Identifier. - `BatchPutLOCRecord` - `ID string` Identifier. - `BatchPutNAPTRRecord` - `ID string` Identifier. - `BatchPutSMIMEARecord` - `ID string` Identifier. - `BatchPutSRVRecord` - `ID string` Identifier. - `BatchPutSSHFPRecord` - `ID string` Identifier. - `BatchPutSVCBRecord` - `ID string` Identifier. - `BatchPutTLSARecord` - `ID string` Identifier. - `BatchPutURIRecord` - `ID string` Identifier. ### CAA Record - `type CAARecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type CAARecordType` Record type. - `const CAARecordTypeCAA CAARecordType = "CAA"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted CAA content. See 'data' to set CAA properties. - `Data CAARecordData` Components of a CAA record. - `Flags float64` Flags for the CAA record. - `Tag string` Name of the property controlled by this record (e.g.: issue, issuewild, iodef). - `Value string` Value of the record. This field's semantics depend on the chosen tag. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings CAARecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. ### CERT Record - `type CERTRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type CERTRecordType` Record type. - `const CERTRecordTypeCERT CERTRecordType = "CERT"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted CERT content. See 'data' to set CERT properties. - `Data CERTRecordData` Components of a CERT record. - `Algorithm float64` Algorithm. - `Certificate string` Certificate. - `KeyTag float64` Key Tag. - `Type float64` Type. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings CERTRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. ### CNAME Record - `type CNAMERecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type CNAMERecordType` Record type. - `const CNAMERecordTypeCNAME CNAMERecordType = "CNAME"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A valid hostname. Must not match the record's name. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings CNAMERecordSettings` Settings for the DNS record. - `FlattenCNAME bool` If enabled, causes the CNAME record to be resolved externally and the resulting address records (e.g., A and AAAA) to be returned instead of the CNAME record itself. This setting is unavailable for proxied records, since they are always flattened. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. ### DNSKEY Record - `type DNSKEYRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type DNSKEYRecordType` Record type. - `const DNSKEYRecordTypeDNSKEY DNSKEYRecordType = "DNSKEY"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted DNSKEY content. See 'data' to set DNSKEY properties. - `Data DNSKEYRecordData` Components of a DNSKEY record. - `Algorithm float64` Algorithm. - `Flags float64` Flags. - `Protocol float64` Protocol. - `PublicKey string` Public Key. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings DNSKEYRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. ### DS Record - `type DSRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type DSRecordType` Record type. - `const DSRecordTypeDS DSRecordType = "DS"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted DS content. See 'data' to set DS properties. - `Data DSRecordData` Components of a DS record. - `Algorithm float64` Algorithm. - `Digest string` Digest. - `DigestType float64` Digest Type. - `KeyTag float64` Key Tag. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings DSRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. ### HTTPS Record - `type HTTPSRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type HTTPSRecordType` Record type. - `const HTTPSRecordTypeHTTPS HTTPSRecordType = "HTTPS"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted HTTPS content. See 'data' to set HTTPS properties. - `Data HTTPSRecordData` Components of a HTTPS record. - `Priority float64` Priority. - `Target string` Target. - `Value string` Value. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings HTTPSRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. ### LOC Record - `type LOCRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type LOCRecordType` Record type. - `const LOCRecordTypeLOC LOCRecordType = "LOC"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted LOC content. See 'data' to set LOC properties. - `Data LOCRecordData` Components of a LOC record. - `Altitude float64` Altitude of location in meters. - `LatDegrees float64` Degrees of latitude. - `LatDirection LOCRecordDataLatDirection` Latitude direction. - `const LOCRecordDataLatDirectionN LOCRecordDataLatDirection = "N"` - `const LOCRecordDataLatDirectionS LOCRecordDataLatDirection = "S"` - `LatMinutes float64` Minutes of latitude. - `LatSeconds float64` Seconds of latitude. - `LongDegrees float64` Degrees of longitude. - `LongDirection LOCRecordDataLongDirection` Longitude direction. - `const LOCRecordDataLongDirectionE LOCRecordDataLongDirection = "E"` - `const LOCRecordDataLongDirectionW LOCRecordDataLongDirection = "W"` - `LongMinutes float64` Minutes of longitude. - `LongSeconds float64` Seconds of longitude. - `PrecisionHorz float64` Horizontal precision of location. - `PrecisionVert float64` Vertical precision of location. - `Size float64` Size of location in meters. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings LOCRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. ### MX Record - `type MXRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type MXRecordType` Record type. - `const MXRecordTypeMX MXRecordType = "MX"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A valid mail server hostname. - `Priority float64` Required for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings MXRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. ### NAPTR Record - `type NAPTRRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type NAPTRRecordType` Record type. - `const NAPTRRecordTypeNAPTR NAPTRRecordType = "NAPTR"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted NAPTR content. See 'data' to set NAPTR properties. - `Data NAPTRRecordData` Components of a NAPTR record. - `Flags string` Flags. - `Order float64` Order. - `Preference float64` Preference. - `Regex string` Regex. - `Replacement string` Replacement. - `Service string` Service. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings NAPTRRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. ### NS Record - `type NSRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type NSRecordType` Record type. - `const NSRecordTypeNS NSRecordType = "NS"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A valid name server host name. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings NSRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. ### PTR Record - `type PTRRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type PTRRecordType` Record type. - `const PTRRecordTypePTR PTRRecordType = "PTR"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Domain name pointing to the address. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings PTRRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. ### Record - `type Record interface{…}` - `type ARecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type ARecordType` Record type. - `const ARecordTypeA ARecordType = "A"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A valid IPv4 address. - `PrivateRouting bool` Enables private network routing to the origin. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings ARecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type AAAARecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type AAAARecordType` Record type. - `const AAAARecordTypeAAAA AAAARecordType = "AAAA"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A valid IPv6 address. - `PrivateRouting bool` Enables private network routing to the origin. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings AAAARecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type CNAMERecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type CNAMERecordType` Record type. - `const CNAMERecordTypeCNAME CNAMERecordType = "CNAME"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A valid hostname. Must not match the record's name. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings CNAMERecordSettings` Settings for the DNS record. - `FlattenCNAME bool` If enabled, causes the CNAME record to be resolved externally and the resulting address records (e.g., A and AAAA) to be returned instead of the CNAME record itself. This setting is unavailable for proxied records, since they are always flattened. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type MXRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type MXRecordType` Record type. - `const MXRecordTypeMX MXRecordType = "MX"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A valid mail server hostname. - `Priority float64` Required for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings MXRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type NSRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type NSRecordType` Record type. - `const NSRecordTypeNS NSRecordType = "NS"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A valid name server host name. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings NSRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `RecordOpenpgpkey` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type RecordOpenpgpkeyType` Record type. - `const RecordOpenpgpkeyTypeOpenpgpkey RecordOpenpgpkeyType = "OPENPGPKEY"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings RecordOpenpgpkeySettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type PTRRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type PTRRecordType` Record type. - `const PTRRecordTypePTR PTRRecordType = "PTR"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Domain name pointing to the address. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings PTRRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type TXTRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type TXTRecordType` Record type. - `const TXTRecordTypeTXT TXTRecordType = "TXT"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Text content for the record. The content must consist of quoted "character strings" (RFC 1035), each with a length of up to 255 bytes. Strings exceeding this allowed maximum length are automatically split. Learn more at . - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings TXTRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type CAARecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type CAARecordType` Record type. - `const CAARecordTypeCAA CAARecordType = "CAA"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted CAA content. See 'data' to set CAA properties. - `Data CAARecordData` Components of a CAA record. - `Flags float64` Flags for the CAA record. - `Tag string` Name of the property controlled by this record (e.g.: issue, issuewild, iodef). - `Value string` Value of the record. This field's semantics depend on the chosen tag. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings CAARecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type CERTRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type CERTRecordType` Record type. - `const CERTRecordTypeCERT CERTRecordType = "CERT"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted CERT content. See 'data' to set CERT properties. - `Data CERTRecordData` Components of a CERT record. - `Algorithm float64` Algorithm. - `Certificate string` Certificate. - `KeyTag float64` Key Tag. - `Type float64` Type. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings CERTRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type DNSKEYRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type DNSKEYRecordType` Record type. - `const DNSKEYRecordTypeDNSKEY DNSKEYRecordType = "DNSKEY"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted DNSKEY content. See 'data' to set DNSKEY properties. - `Data DNSKEYRecordData` Components of a DNSKEY record. - `Algorithm float64` Algorithm. - `Flags float64` Flags. - `Protocol float64` Protocol. - `PublicKey string` Public Key. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings DNSKEYRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type DSRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type DSRecordType` Record type. - `const DSRecordTypeDS DSRecordType = "DS"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted DS content. See 'data' to set DS properties. - `Data DSRecordData` Components of a DS record. - `Algorithm float64` Algorithm. - `Digest string` Digest. - `DigestType float64` Digest Type. - `KeyTag float64` Key Tag. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings DSRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type HTTPSRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type HTTPSRecordType` Record type. - `const HTTPSRecordTypeHTTPS HTTPSRecordType = "HTTPS"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted HTTPS content. See 'data' to set HTTPS properties. - `Data HTTPSRecordData` Components of a HTTPS record. - `Priority float64` Priority. - `Target string` Target. - `Value string` Value. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings HTTPSRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type LOCRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type LOCRecordType` Record type. - `const LOCRecordTypeLOC LOCRecordType = "LOC"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted LOC content. See 'data' to set LOC properties. - `Data LOCRecordData` Components of a LOC record. - `Altitude float64` Altitude of location in meters. - `LatDegrees float64` Degrees of latitude. - `LatDirection LOCRecordDataLatDirection` Latitude direction. - `const LOCRecordDataLatDirectionN LOCRecordDataLatDirection = "N"` - `const LOCRecordDataLatDirectionS LOCRecordDataLatDirection = "S"` - `LatMinutes float64` Minutes of latitude. - `LatSeconds float64` Seconds of latitude. - `LongDegrees float64` Degrees of longitude. - `LongDirection LOCRecordDataLongDirection` Longitude direction. - `const LOCRecordDataLongDirectionE LOCRecordDataLongDirection = "E"` - `const LOCRecordDataLongDirectionW LOCRecordDataLongDirection = "W"` - `LongMinutes float64` Minutes of longitude. - `LongSeconds float64` Seconds of longitude. - `PrecisionHorz float64` Horizontal precision of location. - `PrecisionVert float64` Vertical precision of location. - `Size float64` Size of location in meters. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings LOCRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type NAPTRRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type NAPTRRecordType` Record type. - `const NAPTRRecordTypeNAPTR NAPTRRecordType = "NAPTR"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted NAPTR content. See 'data' to set NAPTR properties. - `Data NAPTRRecordData` Components of a NAPTR record. - `Flags string` Flags. - `Order float64` Order. - `Preference float64` Preference. - `Regex string` Regex. - `Replacement string` Replacement. - `Service string` Service. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings NAPTRRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type SMIMEARecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type SMIMEARecordType` Record type. - `const SMIMEARecordTypeSMIMEA SMIMEARecordType = "SMIMEA"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted SMIMEA content. See 'data' to set SMIMEA properties. - `Data SMIMEARecordData` Components of a SMIMEA record. - `Certificate string` Certificate. - `MatchingType float64` Matching Type. - `Selector float64` Selector. - `Usage float64` Usage. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings SMIMEARecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type SRVRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type SRVRecordType` Record type. - `const SRVRecordTypeSRV SRVRecordType = "SRV"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Priority, weight, port, and SRV target. See 'data' for setting the individual component values. - `Data SRVRecordData` Components of a SRV record. - `Port float64` The port of the service. - `Priority float64` Required for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map. - `Target string` A valid hostname. - `Weight float64` The record weight. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings SRVRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type SSHFPRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type SSHFPRecordType` Record type. - `const SSHFPRecordTypeSSHFP SSHFPRecordType = "SSHFP"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted SSHFP content. See 'data' to set SSHFP properties. - `Data SSHFPRecordData` Components of a SSHFP record. - `Algorithm float64` Algorithm. - `Fingerprint string` Fingerprint. - `Type float64` Type. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings SSHFPRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type SVCBRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type SVCBRecordType` Record type. - `const SVCBRecordTypeSVCB SVCBRecordType = "SVCB"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted SVCB content. See 'data' to set SVCB properties. - `Data SVCBRecordData` Components of a SVCB record. - `Priority float64` Priority. - `Target string` Target. - `Value string` Value. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings SVCBRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type TLSARecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type TLSARecordType` Record type. - `const TLSARecordTypeTLSA TLSARecordType = "TLSA"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted TLSA content. See 'data' to set TLSA properties. - `Data TLSARecordData` Components of a TLSA record. - `Certificate string` Certificate. - `MatchingType float64` Matching Type. - `Selector float64` Selector. - `Usage float64` Usage. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings TLSARecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `type URIRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `Type URIRecordType` Record type. - `const URIRecordTypeURI URIRecordType = "URI"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted URI content. See 'data' to set URI properties. - `Data URIRecordData` Components of a URI record. - `Target string` The record content. - `Weight float64` The record weight. - `Priority float64` Required for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings URIRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. ### Record Response - `type RecordResponse interface{…}` - `type RecordResponseA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseAAAA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCNAME struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseMX struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseNS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseOpenpgpkey struct{…}` - `ID string` Identifier. - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Name string` Complete DNS record name, including the zone name, in Punycode. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings RecordResponseOpenpgpkeySettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type RecordResponseOpenpgpkeyType` Record type. - `const RecordResponseOpenpgpkeyTypeOpenpgpkey RecordResponseOpenpgpkeyType = "OPENPGPKEY"` - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponsePTR struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseTXT struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCAA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseCERT struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseDNSKEY struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseDS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseHTTPS struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseLOC struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseNAPTR struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSMIMEA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSRV struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSSHFP struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseSVCB struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseTLSA struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. - `type RecordResponseURI struct{…}` - `ID string` Identifier. - `CreatedOn Time` When the record was created. - `Meta unknown` Extra Cloudflare-specific information about the record. - `ModifiedOn Time` When the record was last modified. - `Proxiable bool` Whether the record can be proxied by Cloudflare or not. - `CommentModifiedOn Time` When the record comment was last modified. Omitted if there is no comment. - `TagsModifiedOn Time` When the record tags were last modified. Omitted if there are no tags. ### Record Tags - `type RecordTags string` Individual tag of the form name:value (the name must consist of only letters, numbers, underscores and hyphens) ### SMIMEA Record - `type SMIMEARecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type SMIMEARecordType` Record type. - `const SMIMEARecordTypeSMIMEA SMIMEARecordType = "SMIMEA"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted SMIMEA content. See 'data' to set SMIMEA properties. - `Data SMIMEARecordData` Components of a SMIMEA record. - `Certificate string` Certificate. - `MatchingType float64` Matching Type. - `Selector float64` Selector. - `Usage float64` Usage. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings SMIMEARecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. ### SRV Record - `type SRVRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type SRVRecordType` Record type. - `const SRVRecordTypeSRV SRVRecordType = "SRV"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Priority, weight, port, and SRV target. See 'data' for setting the individual component values. - `Data SRVRecordData` Components of a SRV record. - `Port float64` The port of the service. - `Priority float64` Required for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map. - `Target string` A valid hostname. - `Weight float64` The record weight. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings SRVRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. ### SSHFP Record - `type SSHFPRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type SSHFPRecordType` Record type. - `const SSHFPRecordTypeSSHFP SSHFPRecordType = "SSHFP"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted SSHFP content. See 'data' to set SSHFP properties. - `Data SSHFPRecordData` Components of a SSHFP record. - `Algorithm float64` Algorithm. - `Fingerprint string` Fingerprint. - `Type float64` Type. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings SSHFPRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. ### SVCB Record - `type SVCBRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type SVCBRecordType` Record type. - `const SVCBRecordTypeSVCB SVCBRecordType = "SVCB"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted SVCB content. See 'data' to set SVCB properties. - `Data SVCBRecordData` Components of a SVCB record. - `Priority float64` Priority. - `Target string` Target. - `Value string` Value. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings SVCBRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. ### TLSA Record - `type TLSARecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type TLSARecordType` Record type. - `const TLSARecordTypeTLSA TLSARecordType = "TLSA"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted TLSA content. See 'data' to set TLSA properties. - `Data TLSARecordData` Components of a TLSA record. - `Certificate string` Certificate. - `MatchingType float64` Matching Type. - `Selector float64` Selector. - `Usage float64` Usage. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings TLSARecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. ### TTL - `type TTL interface{…}` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` ### TXT Record - `type TXTRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type TXTRecordType` Record type. - `const TXTRecordTypeTXT TXTRecordType = "TXT"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Text content for the record. The content must consist of quoted "character strings" (RFC 1035), each with a length of up to 255 bytes. Strings exceeding this allowed maximum length are automatically split. Learn more at . - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings TXTRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses. ### URI Record - `type URIRecord struct{…}` - `Name string` Complete DNS record name, including the zone name, in Punycode. - `TTL TTL` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `float64` - `type TTL float64` Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - `const TTL1 TTL = 1` - `Type URIRecordType` Record type. - `const URIRecordTypeURI URIRecordType = "URI"` - `Comment string` Comments or notes about the DNS record. This field has no effect on DNS responses. - `Content string` Formatted URI content. See 'data' to set URI properties. - `Data URIRecordData` Components of a URI record. - `Target string` The record content. - `Weight float64` The record weight. - `Priority float64` Required for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map. - `Proxied bool` Whether the record is receiving the performance and security benefits of Cloudflare. - `Settings URIRecordSettings` Settings for the DNS record. - `IPV4Only bool` When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `IPV6Only bool` When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6. - `Tags []RecordTags` Custom tags for the DNS record. This field has no effect on DNS responses.