# DNS # DNSSEC ## DNSSEC Details `dns.dnssec.get(DNSSECGetParams**kwargs) -> DNSSEC` **get** `/zones/{zone_id}/dnssec` Details about DNSSEC status and configuration. ### Parameters - `zone_id: str` Identifier. ### Returns - `class DNSSEC: …` - `algorithm: Optional[str]` Algorithm key code. - `digest: Optional[str]` Digest hash. - `digest_algorithm: Optional[str]` Type of digest algorithm. - `digest_type: Optional[str]` Coded type for digest algorithm. - `dnssec_multi_signer: Optional[bool]` If true, multi-signer DNSSEC is enabled on the zone, allowing multiple providers to serve a DNSSEC-signed zone at the same time. This is required for DNSKEY records (except those automatically generated by Cloudflare) to be added to the zone. See [Multi-signer DNSSEC](https://developers.cloudflare.com/dns/dnssec/multi-signer-dnssec/) for details. - `dnssec_presigned: Optional[bool]` If true, allows Cloudflare to transfer in a DNSSEC-signed zone including signatures from an external provider, without requiring Cloudflare to sign any records on the fly. Note that this feature has some limitations. See [Cloudflare as Secondary](https://developers.cloudflare.com/dns/zone-setups/zone-transfers/cloudflare-as-secondary/setup/#dnssec) for details. - `dnssec_use_nsec3: Optional[bool]` If true, enables the use of NSEC3 together with DNSSEC on the zone. Combined with setting dnssec_presigned to true, this enables the use of NSEC3 records when transferring in from an external provider. If dnssec_presigned is instead set to false (default), NSEC3 records will be generated and signed at request time. See [DNSSEC with NSEC3](https://developers.cloudflare.com/dns/dnssec/enable-nsec3/) for details. - `ds: Optional[str]` Full DS record. - `flags: Optional[float]` Flag for DNSSEC record. - `key_tag: Optional[float]` Code for key tag. - `key_type: Optional[str]` Algorithm key type. - `modified_on: Optional[datetime]` When DNSSEC was last modified. - `public_key: Optional[str]` Public key for DS record. - `status: Optional[Literal["active", "pending", "disabled", 2 more]]` Status of DNSSEC, based on user-desired state and presence of necessary records. - `"active"` - `"pending"` - `"disabled"` - `"pending-disabled"` - `"error"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) dnssec = client.dns.dnssec.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(dnssec.algorithm) ``` #### 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": { "algorithm": "13", "digest": "48E939042E82C22542CB377B580DFDC52A361CEFDC72E7F9107E2B6BD9306A45", "digest_algorithm": "SHA256", "digest_type": "2", "dnssec_multi_signer": false, "dnssec_presigned": true, "dnssec_use_nsec3": false, "ds": "example.com. 3600 IN DS 16953 13 2 48E939042E82C22542CB377B580DFDC52A361CEFDC72E7F9107E2B6BD9306A45", "flags": 257, "key_tag": 42, "key_type": "ECDSAP256SHA256", "modified_on": "2014-01-01T05:20:00Z", "public_key": "oXiGYrSTO+LSCJ3mohc8EP+CzF9KxBj8/ydXJ22pKuZP3VAC3/Md/k7xZfz470CoRyZJ6gV6vml07IC3d8xqhA==", "status": "active" } } ``` ## Edit DNSSEC Status `dns.dnssec.edit(DNSSECEditParams**kwargs) -> DNSSEC` **patch** `/zones/{zone_id}/dnssec` Enable or disable DNSSEC. ### Parameters - `zone_id: str` Identifier. - `dnssec_multi_signer: Optional[bool]` If true, multi-signer DNSSEC is enabled on the zone, allowing multiple providers to serve a DNSSEC-signed zone at the same time. This is required for DNSKEY records (except those automatically generated by Cloudflare) to be added to the zone. See [Multi-signer DNSSEC](https://developers.cloudflare.com/dns/dnssec/multi-signer-dnssec/) for details. - `dnssec_presigned: Optional[bool]` If true, allows Cloudflare to transfer in a DNSSEC-signed zone including signatures from an external provider, without requiring Cloudflare to sign any records on the fly. Note that this feature has some limitations. See [Cloudflare as Secondary](https://developers.cloudflare.com/dns/zone-setups/zone-transfers/cloudflare-as-secondary/setup/#dnssec) for details. - `dnssec_use_nsec3: Optional[bool]` If true, enables the use of NSEC3 together with DNSSEC on the zone. Combined with setting dnssec_presigned to true, this enables the use of NSEC3 records when transferring in from an external provider. If dnssec_presigned is instead set to false (default), NSEC3 records will be generated and signed at request time. See [DNSSEC with NSEC3](https://developers.cloudflare.com/dns/dnssec/enable-nsec3/) for details. - `status: Optional[Literal["active", "disabled"]]` Status of DNSSEC, based on user-desired state and presence of necessary records. - `"active"` - `"disabled"` ### Returns - `class DNSSEC: …` - `algorithm: Optional[str]` Algorithm key code. - `digest: Optional[str]` Digest hash. - `digest_algorithm: Optional[str]` Type of digest algorithm. - `digest_type: Optional[str]` Coded type for digest algorithm. - `dnssec_multi_signer: Optional[bool]` If true, multi-signer DNSSEC is enabled on the zone, allowing multiple providers to serve a DNSSEC-signed zone at the same time. This is required for DNSKEY records (except those automatically generated by Cloudflare) to be added to the zone. See [Multi-signer DNSSEC](https://developers.cloudflare.com/dns/dnssec/multi-signer-dnssec/) for details. - `dnssec_presigned: Optional[bool]` If true, allows Cloudflare to transfer in a DNSSEC-signed zone including signatures from an external provider, without requiring Cloudflare to sign any records on the fly. Note that this feature has some limitations. See [Cloudflare as Secondary](https://developers.cloudflare.com/dns/zone-setups/zone-transfers/cloudflare-as-secondary/setup/#dnssec) for details. - `dnssec_use_nsec3: Optional[bool]` If true, enables the use of NSEC3 together with DNSSEC on the zone. Combined with setting dnssec_presigned to true, this enables the use of NSEC3 records when transferring in from an external provider. If dnssec_presigned is instead set to false (default), NSEC3 records will be generated and signed at request time. See [DNSSEC with NSEC3](https://developers.cloudflare.com/dns/dnssec/enable-nsec3/) for details. - `ds: Optional[str]` Full DS record. - `flags: Optional[float]` Flag for DNSSEC record. - `key_tag: Optional[float]` Code for key tag. - `key_type: Optional[str]` Algorithm key type. - `modified_on: Optional[datetime]` When DNSSEC was last modified. - `public_key: Optional[str]` Public key for DS record. - `status: Optional[Literal["active", "pending", "disabled", 2 more]]` Status of DNSSEC, based on user-desired state and presence of necessary records. - `"active"` - `"pending"` - `"disabled"` - `"pending-disabled"` - `"error"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) dnssec = client.dns.dnssec.edit( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(dnssec.algorithm) ``` #### 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": { "algorithm": "13", "digest": "48E939042E82C22542CB377B580DFDC52A361CEFDC72E7F9107E2B6BD9306A45", "digest_algorithm": "SHA256", "digest_type": "2", "dnssec_multi_signer": false, "dnssec_presigned": true, "dnssec_use_nsec3": false, "ds": "example.com. 3600 IN DS 16953 13 2 48E939042E82C22542CB377B580DFDC52A361CEFDC72E7F9107E2B6BD9306A45", "flags": 257, "key_tag": 42, "key_type": "ECDSAP256SHA256", "modified_on": "2014-01-01T05:20:00Z", "public_key": "oXiGYrSTO+LSCJ3mohc8EP+CzF9KxBj8/ydXJ22pKuZP3VAC3/Md/k7xZfz470CoRyZJ6gV6vml07IC3d8xqhA==", "status": "active" } } ``` ## Delete DNSSEC records `dns.dnssec.delete(DNSSECDeleteParams**kwargs) -> DNSSECDeleteResponse` **delete** `/zones/{zone_id}/dnssec` Delete DNSSEC. ### Parameters - `zone_id: str` Identifier. ### Returns - `str` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) dnssec = client.dns.dnssec.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(dnssec) ``` #### 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": "" } ``` ## Domain Types ### DNSSEC - `class DNSSEC: …` - `algorithm: Optional[str]` Algorithm key code. - `digest: Optional[str]` Digest hash. - `digest_algorithm: Optional[str]` Type of digest algorithm. - `digest_type: Optional[str]` Coded type for digest algorithm. - `dnssec_multi_signer: Optional[bool]` If true, multi-signer DNSSEC is enabled on the zone, allowing multiple providers to serve a DNSSEC-signed zone at the same time. This is required for DNSKEY records (except those automatically generated by Cloudflare) to be added to the zone. See [Multi-signer DNSSEC](https://developers.cloudflare.com/dns/dnssec/multi-signer-dnssec/) for details. - `dnssec_presigned: Optional[bool]` If true, allows Cloudflare to transfer in a DNSSEC-signed zone including signatures from an external provider, without requiring Cloudflare to sign any records on the fly. Note that this feature has some limitations. See [Cloudflare as Secondary](https://developers.cloudflare.com/dns/zone-setups/zone-transfers/cloudflare-as-secondary/setup/#dnssec) for details. - `dnssec_use_nsec3: Optional[bool]` If true, enables the use of NSEC3 together with DNSSEC on the zone. Combined with setting dnssec_presigned to true, this enables the use of NSEC3 records when transferring in from an external provider. If dnssec_presigned is instead set to false (default), NSEC3 records will be generated and signed at request time. See [DNSSEC with NSEC3](https://developers.cloudflare.com/dns/dnssec/enable-nsec3/) for details. - `ds: Optional[str]` Full DS record. - `flags: Optional[float]` Flag for DNSSEC record. - `key_tag: Optional[float]` Code for key tag. - `key_type: Optional[str]` Algorithm key type. - `modified_on: Optional[datetime]` When DNSSEC was last modified. - `public_key: Optional[str]` Public key for DS record. - `status: Optional[Literal["active", "pending", "disabled", 2 more]]` Status of DNSSEC, based on user-desired state and presence of necessary records. - `"active"` - `"pending"` - `"disabled"` - `"pending-disabled"` - `"error"` ### DNSSEC Delete Response - `str` # Records ## List DNS Records `dns.records.list(RecordListParams**kwargs) -> SyncV4PagePaginationArray[RecordResponse]` **get** `/zones/{zone_id}/dns_records` List, search, sort, and filter a zones' DNS records. ### Parameters - `zone_id: str` Identifier. - `comment: Optional[Comment]` - `absent: Optional[str]` If this parameter is present, only records *without* a comment are returned. - `contains: Optional[str]` Substring of the DNS record comment. Comment filters are case-insensitive. - `endswith: Optional[str]` Suffix of the DNS record comment. Comment filters are case-insensitive. - `exact: Optional[str]` Exact value of the DNS record comment. Comment filters are case-insensitive. - `present: Optional[str]` If this parameter is present, only records *with* a comment are returned. - `startswith: Optional[str]` Prefix of the DNS record comment. Comment filters are case-insensitive. - `content: Optional[Content]` - `contains: Optional[str]` Substring of the DNS record content. Content filters are case-insensitive. - `endswith: Optional[str]` Suffix of the DNS record content. Content filters are case-insensitive. - `exact: Optional[str]` Exact value of the DNS record content. Content filters are case-insensitive. - `startswith: Optional[str]` Prefix of the DNS record content. Content filters are case-insensitive. - `direction: Optional[SortDirection]` Direction to order DNS records in. - `"asc"` - `"desc"` - `match: Optional[Literal["any", "all"]]` 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. - `"any"` - `"all"` - `name: Optional[Name]` - `contains: Optional[str]` Substring of the DNS record name. Name filters are case-insensitive. - `endswith: Optional[str]` Suffix of the DNS record name. Name filters are case-insensitive. - `exact: Optional[str]` Exact value of the DNS record name. Name filters are case-insensitive. - `startswith: Optional[str]` Prefix of the DNS record name. Name filters are case-insensitive. - `order: Optional[Literal["type", "name", "content", 2 more]]` Field to order DNS records by. - `"type"` - `"name"` - `"content"` - `"ttl"` - `"proxied"` - `page: Optional[float]` Page number of paginated results. - `per_page: Optional[float]` Number of DNS records per page. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `search: Optional[str]` 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: Optional[Tag]` - `absent: Optional[str]` Name of a tag which must *not* be present on the DNS record. Tag filters are case-insensitive. - `contains: Optional[str]` 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: Optional[str]` 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: Optional[str]` 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: Optional[str]` Name of a tag which must be present on the DNS record. Tag filters are case-insensitive. - `startswith: Optional[str]` 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. - `tag_match: Optional[Literal["any", "all"]]` 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. - `"any"` - `"all"` - `type: Optional[Literal["A", "AAAA", "CAA", 18 more]]` Record type. - `"A"` - `"AAAA"` - `"CAA"` - `"CERT"` - `"CNAME"` - `"DNSKEY"` - `"DS"` - `"HTTPS"` - `"LOC"` - `"MX"` - `"NAPTR"` - `"NS"` - `"OPENPGPKEY"` - `"PTR"` - `"SMIMEA"` - `"SRV"` - `"SSHFP"` - `"SVCB"` - `"TLSA"` - `"TXT"` - `"URI"` ### Returns - `RecordResponse` - `class A: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class AAAA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CNAME: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class MX: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class NS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class Openpgpkey: …` - `id: str` Identifier. - `comment: str` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: str` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `name: str` 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: OpenpgpkeySettings` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: List[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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["OPENPGPKEY"]` Record type. - `"OPENPGPKEY"` - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class PTR: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class TXT: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CAA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CERT: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class DNSKEY: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class DS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class HTTPS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class LOC: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class NAPTR: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SMIMEA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SRV: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SSHFP: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SVCB: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class TLSA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class URI: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) page = client.dns.records.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) page = page.result[0] print(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 `dns.records.get(strdns_record_id, RecordGetParams**kwargs) -> RecordResponse` **get** `/zones/{zone_id}/dns_records/{dns_record_id}` DNS Record Details ### Parameters - `zone_id: str` Identifier. - `dns_record_id: str` Identifier. ### Returns - `RecordResponse` - `class A: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class AAAA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CNAME: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class MX: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class NS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class Openpgpkey: …` - `id: str` Identifier. - `comment: str` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: str` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `name: str` 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: OpenpgpkeySettings` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: List[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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["OPENPGPKEY"]` Record type. - `"OPENPGPKEY"` - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class PTR: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class TXT: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CAA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CERT: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class DNSKEY: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class DS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class HTTPS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class LOC: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class NAPTR: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SMIMEA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SRV: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SSHFP: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SVCB: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class TLSA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class URI: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) record_response = client.dns.records.get( dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(record_response) ``` #### 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 `dns.records.create(RecordCreateParams**kwargs) -> RecordResponse` **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 - `zone_id: str` Identifier. - `name: str` Complete DNS record name, including the zone name, in Punycode. - `ttl: TTLParam` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["A"]` Record type. - `"A"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A valid IPv4 address. - `private_routing: Optional[bool]` Enables private network routing to the origin. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[ARecordSettings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[SequenceNotStr[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### Returns - `RecordResponse` - `class A: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class AAAA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CNAME: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class MX: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class NS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class Openpgpkey: …` - `id: str` Identifier. - `comment: str` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: str` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `name: str` 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: OpenpgpkeySettings` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: List[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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["OPENPGPKEY"]` Record type. - `"OPENPGPKEY"` - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class PTR: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class TXT: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CAA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CERT: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class DNSKEY: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class DS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class HTTPS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class LOC: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class NAPTR: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SMIMEA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SRV: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SSHFP: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SVCB: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class TLSA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class URI: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) record_response = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", ttl=3600, type="A", ) print(record_response) ``` #### 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 `dns.records.update(strdns_record_id, RecordUpdateParams**kwargs) -> RecordResponse` **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 - `zone_id: str` Identifier. - `dns_record_id: str` Identifier. - `name: str` Complete DNS record name, including the zone name, in Punycode. - `ttl: TTLParam` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["A"]` Record type. - `"A"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A valid IPv4 address. - `private_routing: Optional[bool]` Enables private network routing to the origin. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[ARecordSettings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[SequenceNotStr[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### Returns - `RecordResponse` - `class A: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class AAAA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CNAME: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class MX: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class NS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class Openpgpkey: …` - `id: str` Identifier. - `comment: str` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: str` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `name: str` 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: OpenpgpkeySettings` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: List[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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["OPENPGPKEY"]` Record type. - `"OPENPGPKEY"` - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class PTR: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class TXT: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CAA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CERT: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class DNSKEY: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class DS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class HTTPS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class LOC: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class NAPTR: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SMIMEA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SRV: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SSHFP: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SVCB: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class TLSA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class URI: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) record_response = client.dns.records.update( dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", ttl=3600, type="A", ) print(record_response) ``` #### 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 `dns.records.edit(strdns_record_id, RecordEditParams**kwargs) -> RecordResponse` **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 - `zone_id: str` Identifier. - `dns_record_id: str` Identifier. - `name: str` Complete DNS record name, including the zone name, in Punycode. - `ttl: TTLParam` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["A"]` Record type. - `"A"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A valid IPv4 address. - `private_routing: Optional[bool]` Enables private network routing to the origin. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[ARecordSettings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[SequenceNotStr[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### Returns - `RecordResponse` - `class A: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class AAAA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CNAME: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class MX: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class NS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class Openpgpkey: …` - `id: str` Identifier. - `comment: str` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: str` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `name: str` 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: OpenpgpkeySettings` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: List[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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["OPENPGPKEY"]` Record type. - `"OPENPGPKEY"` - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class PTR: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class TXT: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CAA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CERT: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class DNSKEY: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class DS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class HTTPS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class LOC: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class NAPTR: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SMIMEA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SRV: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SSHFP: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SVCB: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class TLSA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class URI: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) record_response = client.dns.records.edit( dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", ttl=3600, type="A", ) print(record_response) ``` #### 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 `dns.records.delete(strdns_record_id, RecordDeleteParams**kwargs) -> RecordDeleteResponse` **delete** `/zones/{zone_id}/dns_records/{dns_record_id}` Delete DNS Record ### Parameters - `zone_id: str` Identifier. - `dns_record_id: str` Identifier. ### Returns - `class RecordDeleteResponse: …` - `id: Optional[str]` Identifier. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) record = client.dns.records.delete( dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(record.id) ``` #### Response ```json { "result": { "id": "023e105f4ecef8ad9ca31a8372d0c353" } } ``` ## Export DNS Records `dns.records.export(RecordExportParams**kwargs) -> RecordExportResponse` **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 - `zone_id: str` Identifier. ### Returns - `str` Exported BIND zone file. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.dns.records.export( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(response) ``` ## Import DNS Records `dns.records.import_(RecordImportParams**kwargs) -> RecordImportResponse` **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 - `zone_id: str` Identifier. - `file: str` BIND config to import. **Tip:** When using cURL, a file can be uploaded using `--form 'file=@bind_config.txt'`. - `proxied: Optional[str]` Whether or not proxiable records should receive the performance and security benefits of Cloudflare. The value should be either `true` or `false`. ### Returns - `class RecordImportResponse: …` - `recs_added: Optional[float]` Number of DNS records added. - `total_records_parsed: Optional[float]` Total number of DNS records parsed. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.dns.records.import_( zone_id="023e105f4ecef8ad9ca31a8372d0c353", file="www.example.com. 300 IN A 127.0.0.1", ) print(response.recs_added) ``` #### 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 `dns.records.scan(RecordScanParams**kwargs) -> RecordScanResponse` **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 - `zone_id: str` Identifier. - `body: object` ### Returns - `class RecordScanResponse: …` - `recs_added: Optional[float]` Number of DNS records added. - `total_records_parsed: Optional[float]` Total number of DNS records parsed. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.dns.records.scan( zone_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) print(response.recs_added) ``` #### 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 `dns.records.scan_trigger(RecordScanTriggerParams**kwargs) -> RecordScanTriggerResponse` **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 - `zone_id: str` Identifier. ### Returns - `class RecordScanTriggerResponse: …` - `errors: List[Error]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[ErrorSource]` - `pointer: Optional[str]` - `messages: List[Message]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[MessageSource]` - `pointer: Optional[str]` - `success: Literal[true]` Whether the API call was successful. - `true` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.dns.records.scan_trigger( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(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 `dns.records.scan_review(RecordScanReviewParams**kwargs) -> RecordScanReviewResponse` **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 - `zone_id: str` Identifier. - `accepts: Optional[Iterable[Accept]]` - `class ARecord: …` - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["A"]` Record type. - `"A"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A valid IPv4 address. - `private_routing: Optional[bool]` Enables private network routing to the origin. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class AAAARecord: …` - `name: str` 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: Literal["AAAA"]` Record type. - `"AAAA"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A valid IPv6 address. - `private_routing: Optional[bool]` Enables private network routing to the origin. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class CNAMERecord: …` - `name: str` 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: Literal["CNAME"]` Record type. - `"CNAME"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A valid hostname. Must not match the record's name. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `flatten_cname: Optional[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. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class MXRecord: …` - `name: str` 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: Literal["MX"]` Record type. - `"MX"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A valid mail server hostname. - `priority: Optional[float]` 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: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class NSRecord: …` - `name: str` 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: Literal["NS"]` Record type. - `"NS"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A valid name server host name. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class AcceptDNSRecordsOpenpgpkeyRecord: …` - `name: str` Complete DNS record name, including the zone name, in Punycode. - `ttl: TTLParam` 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: Literal["OPENPGPKEY"]` Record type. - `"OPENPGPKEY"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[AcceptDNSRecordsOpenpgpkeyRecordSettings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[SequenceNotStr[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class PTRRecord: …` - `name: str` 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: Literal["PTR"]` Record type. - `"PTR"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Domain name pointing to the address. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class TXTRecord: …` - `name: str` 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: Literal["TXT"]` Record type. - `"TXT"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` 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: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class CAARecord: …` - `name: str` 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: Literal["CAA"]` Record type. - `"CAA"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted CAA content. See 'data' to set CAA properties. - `data: Optional[Data]` Components of a CAA record. - `flags: Optional[float]` Flags for the CAA record. - `tag: Optional[str]` Name of the property controlled by this record (e.g.: issue, issuewild, iodef). - `value: Optional[str]` Value of the record. This field's semantics depend on the chosen tag. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class CERTRecord: …` - `name: str` 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: Literal["CERT"]` Record type. - `"CERT"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted CERT content. See 'data' to set CERT properties. - `data: Optional[Data]` Components of a CERT record. - `algorithm: Optional[float]` Algorithm. - `certificate: Optional[str]` Certificate. - `key_tag: Optional[float]` Key Tag. - `type: Optional[float]` Type. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class DNSKEYRecord: …` - `name: str` 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: Literal["DNSKEY"]` Record type. - `"DNSKEY"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted DNSKEY content. See 'data' to set DNSKEY properties. - `data: Optional[Data]` Components of a DNSKEY record. - `algorithm: Optional[float]` Algorithm. - `flags: Optional[float]` Flags. - `protocol: Optional[float]` Protocol. - `public_key: Optional[str]` Public Key. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class DSRecord: …` - `name: str` 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: Literal["DS"]` Record type. - `"DS"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted DS content. See 'data' to set DS properties. - `data: Optional[Data]` Components of a DS record. - `algorithm: Optional[float]` Algorithm. - `digest: Optional[str]` Digest. - `digest_type: Optional[float]` Digest Type. - `key_tag: Optional[float]` Key Tag. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class HTTPSRecord: …` - `name: str` 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: Literal["HTTPS"]` Record type. - `"HTTPS"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted HTTPS content. See 'data' to set HTTPS properties. - `data: Optional[Data]` Components of a HTTPS record. - `priority: Optional[float]` Priority. - `target: Optional[str]` Target. - `value: Optional[str]` Value. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class LOCRecord: …` - `name: str` 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: Literal["LOC"]` Record type. - `"LOC"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted LOC content. See 'data' to set LOC properties. - `data: Optional[Data]` Components of a LOC record. - `altitude: Optional[float]` Altitude of location in meters. - `lat_degrees: Optional[float]` Degrees of latitude. - `lat_direction: Optional[Literal["N", "S"]]` Latitude direction. - `"N"` - `"S"` - `lat_minutes: Optional[float]` Minutes of latitude. - `lat_seconds: Optional[float]` Seconds of latitude. - `long_degrees: Optional[float]` Degrees of longitude. - `long_direction: Optional[Literal["E", "W"]]` Longitude direction. - `"E"` - `"W"` - `long_minutes: Optional[float]` Minutes of longitude. - `long_seconds: Optional[float]` Seconds of longitude. - `precision_horz: Optional[float]` Horizontal precision of location. - `precision_vert: Optional[float]` Vertical precision of location. - `size: Optional[float]` Size of location in meters. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class NAPTRRecord: …` - `name: str` 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: Literal["NAPTR"]` Record type. - `"NAPTR"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted NAPTR content. See 'data' to set NAPTR properties. - `data: Optional[Data]` Components of a NAPTR record. - `flags: Optional[str]` Flags. - `order: Optional[float]` Order. - `preference: Optional[float]` Preference. - `regex: Optional[str]` Regex. - `replacement: Optional[str]` Replacement. - `service: Optional[str]` Service. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class SMIMEARecord: …` - `name: str` 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: Literal["SMIMEA"]` Record type. - `"SMIMEA"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted SMIMEA content. See 'data' to set SMIMEA properties. - `data: Optional[Data]` Components of a SMIMEA record. - `certificate: Optional[str]` Certificate. - `matching_type: Optional[float]` Matching Type. - `selector: Optional[float]` Selector. - `usage: Optional[float]` Usage. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class SRVRecord: …` - `name: str` 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: Literal["SRV"]` Record type. - `"SRV"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Priority, weight, port, and SRV target. See 'data' for setting the individual component values. - `data: Optional[Data]` Components of a SRV record. - `port: Optional[float]` The port of the service. - `priority: Optional[float]` 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: Optional[str]` A valid hostname. - `weight: Optional[float]` The record weight. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class SSHFPRecord: …` - `name: str` 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: Literal["SSHFP"]` Record type. - `"SSHFP"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted SSHFP content. See 'data' to set SSHFP properties. - `data: Optional[Data]` Components of a SSHFP record. - `algorithm: Optional[float]` Algorithm. - `fingerprint: Optional[str]` Fingerprint. - `type: Optional[float]` Type. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class SVCBRecord: …` - `name: str` 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: Literal["SVCB"]` Record type. - `"SVCB"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted SVCB content. See 'data' to set SVCB properties. - `data: Optional[Data]` Components of a SVCB record. - `priority: Optional[float]` Priority. - `target: Optional[str]` Target. - `value: Optional[str]` Value. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class TLSARecord: …` - `name: str` 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: Literal["TLSA"]` Record type. - `"TLSA"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted TLSA content. See 'data' to set TLSA properties. - `data: Optional[Data]` Components of a TLSA record. - `certificate: Optional[str]` Certificate. - `matching_type: Optional[float]` Matching Type. - `selector: Optional[float]` Selector. - `usage: Optional[float]` Usage. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class URIRecord: …` - `name: str` 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: Literal["URI"]` Record type. - `"URI"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted URI content. See 'data' to set URI properties. - `data: Optional[Data]` Components of a URI record. - `target: Optional[str]` The record content. - `weight: Optional[float]` The record weight. - `priority: Optional[float]` 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: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `rejects: Optional[Iterable[Reject]]` - `id: str` Identifier. ### Returns - `class RecordScanReviewResponse: …` - `accepts: Optional[List[RecordResponse]]` - `class A: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class AAAA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CNAME: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class MX: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class NS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class Openpgpkey: …` - `id: str` Identifier. - `comment: str` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: str` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `name: str` 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: OpenpgpkeySettings` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: List[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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["OPENPGPKEY"]` Record type. - `"OPENPGPKEY"` - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class PTR: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class TXT: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CAA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CERT: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class DNSKEY: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class DS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class HTTPS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class LOC: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class NAPTR: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SMIMEA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SRV: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SSHFP: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SVCB: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class TLSA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class URI: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `rejects: Optional[List[str]]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.dns.records.scan_review( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(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 `dns.records.scan_list(RecordScanListParams**kwargs) -> SyncSinglePage[RecordResponse]` **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 - `zone_id: str` Identifier. ### Returns - `RecordResponse` - `class A: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class AAAA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CNAME: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class MX: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class NS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class Openpgpkey: …` - `id: str` Identifier. - `comment: str` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: str` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `name: str` 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: OpenpgpkeySettings` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: List[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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["OPENPGPKEY"]` Record type. - `"OPENPGPKEY"` - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class PTR: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class TXT: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CAA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CERT: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class DNSKEY: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class DS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class HTTPS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class LOC: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class NAPTR: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SMIMEA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SRV: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SSHFP: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SVCB: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class TLSA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class URI: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) page = client.dns.records.scan_list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) page = page.result[0] print(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 `dns.records.batch(RecordBatchParams**kwargs) -> RecordBatchResponse` **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 - `zone_id: str` Identifier. - `deletes: Optional[Iterable[Delete]]` - `id: str` Identifier. - `patches: Optional[Iterable[BatchPatchParam]]` - `class ARecord: …` - `id: str` Identifier. - `class AAAARecord: …` - `id: str` Identifier. - `class CNAMERecord: …` - `id: str` Identifier. - `class MXRecord: …` - `id: str` Identifier. - `class NSRecord: …` - `id: str` Identifier. - `class OpenpgpkeyRecord: …` - `id: str` Identifier. - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["OPENPGPKEY"]` Record type. - `"OPENPGPKEY"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[OpenpgpkeyRecordSettings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class PTRRecord: …` - `id: str` Identifier. - `class TXTRecord: …` - `id: str` Identifier. - `class CAARecord: …` - `id: str` Identifier. - `class CERTRecord: …` - `id: str` Identifier. - `class DNSKEYRecord: …` - `id: str` Identifier. - `class DSRecord: …` - `id: str` Identifier. - `class HTTPSRecord: …` - `id: str` Identifier. - `class LOCRecord: …` - `id: str` Identifier. - `class NAPTRRecord: …` - `id: str` Identifier. - `class SMIMEARecord: …` - `id: str` Identifier. - `class SRVRecord: …` - `id: str` Identifier. - `class SSHFPRecord: …` - `id: str` Identifier. - `class SVCBRecord: …` - `id: str` Identifier. - `class TLSARecord: …` - `id: str` Identifier. - `class URIRecord: …` - `id: str` Identifier. - `posts: Optional[Iterable[Post]]` - `class ARecord: …` - `name: str` 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: Literal["A"]` Record type. - `"A"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A valid IPv4 address. - `private_routing: Optional[bool]` Enables private network routing to the origin. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class AAAARecord: …` - `name: str` 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: Literal["AAAA"]` Record type. - `"AAAA"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A valid IPv6 address. - `private_routing: Optional[bool]` Enables private network routing to the origin. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class CNAMERecord: …` - `name: str` 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: Literal["CNAME"]` Record type. - `"CNAME"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A valid hostname. Must not match the record's name. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `flatten_cname: Optional[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. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class MXRecord: …` - `name: str` 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: Literal["MX"]` Record type. - `"MX"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A valid mail server hostname. - `priority: Optional[float]` 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: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class NSRecord: …` - `name: str` 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: Literal["NS"]` Record type. - `"NS"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A valid name server host name. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class PostDNSRecordsOpenpgpkeyRecord: …` - `name: str` Complete DNS record name, including the zone name, in Punycode. - `ttl: TTLParam` 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: Literal["OPENPGPKEY"]` Record type. - `"OPENPGPKEY"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[PostDNSRecordsOpenpgpkeyRecordSettings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[SequenceNotStr[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class PTRRecord: …` - `name: str` 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: Literal["PTR"]` Record type. - `"PTR"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Domain name pointing to the address. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class TXTRecord: …` - `name: str` 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: Literal["TXT"]` Record type. - `"TXT"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` 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: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class CAARecord: …` - `name: str` 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: Literal["CAA"]` Record type. - `"CAA"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted CAA content. See 'data' to set CAA properties. - `data: Optional[Data]` Components of a CAA record. - `flags: Optional[float]` Flags for the CAA record. - `tag: Optional[str]` Name of the property controlled by this record (e.g.: issue, issuewild, iodef). - `value: Optional[str]` Value of the record. This field's semantics depend on the chosen tag. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class CERTRecord: …` - `name: str` 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: Literal["CERT"]` Record type. - `"CERT"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted CERT content. See 'data' to set CERT properties. - `data: Optional[Data]` Components of a CERT record. - `algorithm: Optional[float]` Algorithm. - `certificate: Optional[str]` Certificate. - `key_tag: Optional[float]` Key Tag. - `type: Optional[float]` Type. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class DNSKEYRecord: …` - `name: str` 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: Literal["DNSKEY"]` Record type. - `"DNSKEY"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted DNSKEY content. See 'data' to set DNSKEY properties. - `data: Optional[Data]` Components of a DNSKEY record. - `algorithm: Optional[float]` Algorithm. - `flags: Optional[float]` Flags. - `protocol: Optional[float]` Protocol. - `public_key: Optional[str]` Public Key. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class DSRecord: …` - `name: str` 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: Literal["DS"]` Record type. - `"DS"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted DS content. See 'data' to set DS properties. - `data: Optional[Data]` Components of a DS record. - `algorithm: Optional[float]` Algorithm. - `digest: Optional[str]` Digest. - `digest_type: Optional[float]` Digest Type. - `key_tag: Optional[float]` Key Tag. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class HTTPSRecord: …` - `name: str` 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: Literal["HTTPS"]` Record type. - `"HTTPS"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted HTTPS content. See 'data' to set HTTPS properties. - `data: Optional[Data]` Components of a HTTPS record. - `priority: Optional[float]` Priority. - `target: Optional[str]` Target. - `value: Optional[str]` Value. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class LOCRecord: …` - `name: str` 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: Literal["LOC"]` Record type. - `"LOC"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted LOC content. See 'data' to set LOC properties. - `data: Optional[Data]` Components of a LOC record. - `altitude: Optional[float]` Altitude of location in meters. - `lat_degrees: Optional[float]` Degrees of latitude. - `lat_direction: Optional[Literal["N", "S"]]` Latitude direction. - `"N"` - `"S"` - `lat_minutes: Optional[float]` Minutes of latitude. - `lat_seconds: Optional[float]` Seconds of latitude. - `long_degrees: Optional[float]` Degrees of longitude. - `long_direction: Optional[Literal["E", "W"]]` Longitude direction. - `"E"` - `"W"` - `long_minutes: Optional[float]` Minutes of longitude. - `long_seconds: Optional[float]` Seconds of longitude. - `precision_horz: Optional[float]` Horizontal precision of location. - `precision_vert: Optional[float]` Vertical precision of location. - `size: Optional[float]` Size of location in meters. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class NAPTRRecord: …` - `name: str` 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: Literal["NAPTR"]` Record type. - `"NAPTR"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted NAPTR content. See 'data' to set NAPTR properties. - `data: Optional[Data]` Components of a NAPTR record. - `flags: Optional[str]` Flags. - `order: Optional[float]` Order. - `preference: Optional[float]` Preference. - `regex: Optional[str]` Regex. - `replacement: Optional[str]` Replacement. - `service: Optional[str]` Service. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class SMIMEARecord: …` - `name: str` 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: Literal["SMIMEA"]` Record type. - `"SMIMEA"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted SMIMEA content. See 'data' to set SMIMEA properties. - `data: Optional[Data]` Components of a SMIMEA record. - `certificate: Optional[str]` Certificate. - `matching_type: Optional[float]` Matching Type. - `selector: Optional[float]` Selector. - `usage: Optional[float]` Usage. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class SRVRecord: …` - `name: str` 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: Literal["SRV"]` Record type. - `"SRV"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Priority, weight, port, and SRV target. See 'data' for setting the individual component values. - `data: Optional[Data]` Components of a SRV record. - `port: Optional[float]` The port of the service. - `priority: Optional[float]` 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: Optional[str]` A valid hostname. - `weight: Optional[float]` The record weight. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class SSHFPRecord: …` - `name: str` 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: Literal["SSHFP"]` Record type. - `"SSHFP"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted SSHFP content. See 'data' to set SSHFP properties. - `data: Optional[Data]` Components of a SSHFP record. - `algorithm: Optional[float]` Algorithm. - `fingerprint: Optional[str]` Fingerprint. - `type: Optional[float]` Type. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class SVCBRecord: …` - `name: str` 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: Literal["SVCB"]` Record type. - `"SVCB"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted SVCB content. See 'data' to set SVCB properties. - `data: Optional[Data]` Components of a SVCB record. - `priority: Optional[float]` Priority. - `target: Optional[str]` Target. - `value: Optional[str]` Value. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class TLSARecord: …` - `name: str` 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: Literal["TLSA"]` Record type. - `"TLSA"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted TLSA content. See 'data' to set TLSA properties. - `data: Optional[Data]` Components of a TLSA record. - `certificate: Optional[str]` Certificate. - `matching_type: Optional[float]` Matching Type. - `selector: Optional[float]` Selector. - `usage: Optional[float]` Usage. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class URIRecord: …` - `name: str` 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: Literal["URI"]` Record type. - `"URI"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted URI content. See 'data' to set URI properties. - `data: Optional[Data]` Components of a URI record. - `target: Optional[str]` The record content. - `weight: Optional[float]` The record weight. - `priority: Optional[float]` 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: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `puts: Optional[Iterable[BatchPutParam]]` - `class ARecord: …` - `id: str` Identifier. - `class AAAARecord: …` - `id: str` Identifier. - `class CNAMERecord: …` - `id: str` Identifier. - `class MXRecord: …` - `id: str` Identifier. - `class NSRecord: …` - `id: str` Identifier. - `class OpenpgpkeyRecord: …` - `id: str` Identifier. - `name: str` 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: Literal["OPENPGPKEY"]` Record type. - `"OPENPGPKEY"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[OpenpgpkeyRecordSettings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class PTRRecord: …` - `id: str` Identifier. - `class TXTRecord: …` - `id: str` Identifier. - `class CAARecord: …` - `id: str` Identifier. - `class CERTRecord: …` - `id: str` Identifier. - `class DNSKEYRecord: …` - `id: str` Identifier. - `class DSRecord: …` - `id: str` Identifier. - `class HTTPSRecord: …` - `id: str` Identifier. - `class LOCRecord: …` - `id: str` Identifier. - `class NAPTRRecord: …` - `id: str` Identifier. - `class SMIMEARecord: …` - `id: str` Identifier. - `class SRVRecord: …` - `id: str` Identifier. - `class SSHFPRecord: …` - `id: str` Identifier. - `class SVCBRecord: …` - `id: str` Identifier. - `class TLSARecord: …` - `id: str` Identifier. - `class URIRecord: …` - `id: str` Identifier. ### Returns - `class RecordBatchResponse: …` - `deletes: Optional[List[RecordResponse]]` - `class A: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class AAAA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CNAME: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class MX: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class NS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class Openpgpkey: …` - `id: str` Identifier. - `comment: str` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: str` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `name: str` 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: OpenpgpkeySettings` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: List[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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["OPENPGPKEY"]` Record type. - `"OPENPGPKEY"` - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class PTR: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class TXT: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CAA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CERT: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class DNSKEY: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class DS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class HTTPS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class LOC: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class NAPTR: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SMIMEA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SRV: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SSHFP: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SVCB: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class TLSA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class URI: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `patches: Optional[List[RecordResponse]]` - `class A: …` - `class AAAA: …` - `class CNAME: …` - `class MX: …` - `class NS: …` - `class Openpgpkey: …` - `class PTR: …` - `class TXT: …` - `class CAA: …` - `class CERT: …` - `class DNSKEY: …` - `class DS: …` - `class HTTPS: …` - `class LOC: …` - `class NAPTR: …` - `class SMIMEA: …` - `class SRV: …` - `class SSHFP: …` - `class SVCB: …` - `class TLSA: …` - `class URI: …` - `posts: Optional[List[RecordResponse]]` - `class A: …` - `class AAAA: …` - `class CNAME: …` - `class MX: …` - `class NS: …` - `class Openpgpkey: …` - `class PTR: …` - `class TXT: …` - `class CAA: …` - `class CERT: …` - `class DNSKEY: …` - `class DS: …` - `class HTTPS: …` - `class LOC: …` - `class NAPTR: …` - `class SMIMEA: …` - `class SRV: …` - `class SSHFP: …` - `class SVCB: …` - `class TLSA: …` - `class URI: …` - `puts: Optional[List[RecordResponse]]` - `class A: …` - `class AAAA: …` - `class CNAME: …` - `class MX: …` - `class NS: …` - `class Openpgpkey: …` - `class PTR: …` - `class TXT: …` - `class CAA: …` - `class CERT: …` - `class DNSKEY: …` - `class DS: …` - `class HTTPS: …` - `class LOC: …` - `class NAPTR: …` - `class SMIMEA: …` - `class SRV: …` - `class SSHFP: …` - `class SVCB: …` - `class TLSA: …` - `class URI: …` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.dns.records.batch( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(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 - `class ARecord: …` - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["A"]` Record type. - `"A"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A valid IPv4 address. - `private_routing: Optional[bool]` Enables private network routing to the origin. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### AAAA Record - `class AAAARecord: …` - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["AAAA"]` Record type. - `"AAAA"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A valid IPv6 address. - `private_routing: Optional[bool]` Enables private network routing to the origin. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### Batch Patch - `BatchPatch` - `class ARecord: …` - `id: str` Identifier. - `class AAAARecord: …` - `id: str` Identifier. - `class CNAMERecord: …` - `id: str` Identifier. - `class MXRecord: …` - `id: str` Identifier. - `class NSRecord: …` - `id: str` Identifier. - `class OpenpgpkeyRecord: …` - `id: str` Identifier. - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["OPENPGPKEY"]` Record type. - `"OPENPGPKEY"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[OpenpgpkeyRecordSettings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class PTRRecord: …` - `id: str` Identifier. - `class TXTRecord: …` - `id: str` Identifier. - `class CAARecord: …` - `id: str` Identifier. - `class CERTRecord: …` - `id: str` Identifier. - `class DNSKEYRecord: …` - `id: str` Identifier. - `class DSRecord: …` - `id: str` Identifier. - `class HTTPSRecord: …` - `id: str` Identifier. - `class LOCRecord: …` - `id: str` Identifier. - `class NAPTRRecord: …` - `id: str` Identifier. - `class SMIMEARecord: …` - `id: str` Identifier. - `class SRVRecord: …` - `id: str` Identifier. - `class SSHFPRecord: …` - `id: str` Identifier. - `class SVCBRecord: …` - `id: str` Identifier. - `class TLSARecord: …` - `id: str` Identifier. - `class URIRecord: …` - `id: str` Identifier. ### Batch Put - `BatchPut` - `class ARecord: …` - `id: str` Identifier. - `class AAAARecord: …` - `id: str` Identifier. - `class CNAMERecord: …` - `id: str` Identifier. - `class MXRecord: …` - `id: str` Identifier. - `class NSRecord: …` - `id: str` Identifier. - `class OpenpgpkeyRecord: …` - `id: str` Identifier. - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["OPENPGPKEY"]` Record type. - `"OPENPGPKEY"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[OpenpgpkeyRecordSettings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class PTRRecord: …` - `id: str` Identifier. - `class TXTRecord: …` - `id: str` Identifier. - `class CAARecord: …` - `id: str` Identifier. - `class CERTRecord: …` - `id: str` Identifier. - `class DNSKEYRecord: …` - `id: str` Identifier. - `class DSRecord: …` - `id: str` Identifier. - `class HTTPSRecord: …` - `id: str` Identifier. - `class LOCRecord: …` - `id: str` Identifier. - `class NAPTRRecord: …` - `id: str` Identifier. - `class SMIMEARecord: …` - `id: str` Identifier. - `class SRVRecord: …` - `id: str` Identifier. - `class SSHFPRecord: …` - `id: str` Identifier. - `class SVCBRecord: …` - `id: str` Identifier. - `class TLSARecord: …` - `id: str` Identifier. - `class URIRecord: …` - `id: str` Identifier. ### CAA Record - `class CAARecord: …` - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["CAA"]` Record type. - `"CAA"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted CAA content. See 'data' to set CAA properties. - `data: Optional[Data]` Components of a CAA record. - `flags: Optional[float]` Flags for the CAA record. - `tag: Optional[str]` Name of the property controlled by this record (e.g.: issue, issuewild, iodef). - `value: Optional[str]` Value of the record. This field's semantics depend on the chosen tag. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### CERT Record - `class CERTRecord: …` - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["CERT"]` Record type. - `"CERT"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted CERT content. See 'data' to set CERT properties. - `data: Optional[Data]` Components of a CERT record. - `algorithm: Optional[float]` Algorithm. - `certificate: Optional[str]` Certificate. - `key_tag: Optional[float]` Key Tag. - `type: Optional[float]` Type. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### CNAME Record - `class CNAMERecord: …` - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["CNAME"]` Record type. - `"CNAME"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A valid hostname. Must not match the record's name. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `flatten_cname: Optional[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. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### DNSKEY Record - `class DNSKEYRecord: …` - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["DNSKEY"]` Record type. - `"DNSKEY"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted DNSKEY content. See 'data' to set DNSKEY properties. - `data: Optional[Data]` Components of a DNSKEY record. - `algorithm: Optional[float]` Algorithm. - `flags: Optional[float]` Flags. - `protocol: Optional[float]` Protocol. - `public_key: Optional[str]` Public Key. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### DS Record - `class DSRecord: …` - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["DS"]` Record type. - `"DS"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted DS content. See 'data' to set DS properties. - `data: Optional[Data]` Components of a DS record. - `algorithm: Optional[float]` Algorithm. - `digest: Optional[str]` Digest. - `digest_type: Optional[float]` Digest Type. - `key_tag: Optional[float]` Key Tag. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### HTTPS Record - `class HTTPSRecord: …` - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["HTTPS"]` Record type. - `"HTTPS"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted HTTPS content. See 'data' to set HTTPS properties. - `data: Optional[Data]` Components of a HTTPS record. - `priority: Optional[float]` Priority. - `target: Optional[str]` Target. - `value: Optional[str]` Value. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### LOC Record - `class LOCRecord: …` - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["LOC"]` Record type. - `"LOC"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted LOC content. See 'data' to set LOC properties. - `data: Optional[Data]` Components of a LOC record. - `altitude: Optional[float]` Altitude of location in meters. - `lat_degrees: Optional[float]` Degrees of latitude. - `lat_direction: Optional[Literal["N", "S"]]` Latitude direction. - `"N"` - `"S"` - `lat_minutes: Optional[float]` Minutes of latitude. - `lat_seconds: Optional[float]` Seconds of latitude. - `long_degrees: Optional[float]` Degrees of longitude. - `long_direction: Optional[Literal["E", "W"]]` Longitude direction. - `"E"` - `"W"` - `long_minutes: Optional[float]` Minutes of longitude. - `long_seconds: Optional[float]` Seconds of longitude. - `precision_horz: Optional[float]` Horizontal precision of location. - `precision_vert: Optional[float]` Vertical precision of location. - `size: Optional[float]` Size of location in meters. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### MX Record - `class MXRecord: …` - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["MX"]` Record type. - `"MX"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A valid mail server hostname. - `priority: Optional[float]` 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: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### NAPTR Record - `class NAPTRRecord: …` - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["NAPTR"]` Record type. - `"NAPTR"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted NAPTR content. See 'data' to set NAPTR properties. - `data: Optional[Data]` Components of a NAPTR record. - `flags: Optional[str]` Flags. - `order: Optional[float]` Order. - `preference: Optional[float]` Preference. - `regex: Optional[str]` Regex. - `replacement: Optional[str]` Replacement. - `service: Optional[str]` Service. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### NS Record - `class NSRecord: …` - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["NS"]` Record type. - `"NS"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A valid name server host name. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### PTR Record - `class PTRRecord: …` - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["PTR"]` Record type. - `"PTR"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Domain name pointing to the address. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### Record - `Record` - `class ARecord: …` - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["A"]` Record type. - `"A"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A valid IPv4 address. - `private_routing: Optional[bool]` Enables private network routing to the origin. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class AAAARecord: …` - `name: str` 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: Literal["AAAA"]` Record type. - `"AAAA"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A valid IPv6 address. - `private_routing: Optional[bool]` Enables private network routing to the origin. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class CNAMERecord: …` - `name: str` 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: Literal["CNAME"]` Record type. - `"CNAME"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A valid hostname. Must not match the record's name. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `flatten_cname: Optional[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. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class MXRecord: …` - `name: str` 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: Literal["MX"]` Record type. - `"MX"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A valid mail server hostname. - `priority: Optional[float]` 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: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class NSRecord: …` - `name: str` 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: Literal["NS"]` Record type. - `"NS"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A valid name server host name. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class Openpgpkey: …` - `name: str` 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: Literal["OPENPGPKEY"]` Record type. - `"OPENPGPKEY"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[OpenpgpkeySettings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class PTRRecord: …` - `name: str` 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: Literal["PTR"]` Record type. - `"PTR"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Domain name pointing to the address. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class TXTRecord: …` - `name: str` 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: Literal["TXT"]` Record type. - `"TXT"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` 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: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class CAARecord: …` - `name: str` 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: Literal["CAA"]` Record type. - `"CAA"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted CAA content. See 'data' to set CAA properties. - `data: Optional[Data]` Components of a CAA record. - `flags: Optional[float]` Flags for the CAA record. - `tag: Optional[str]` Name of the property controlled by this record (e.g.: issue, issuewild, iodef). - `value: Optional[str]` Value of the record. This field's semantics depend on the chosen tag. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class CERTRecord: …` - `name: str` 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: Literal["CERT"]` Record type. - `"CERT"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted CERT content. See 'data' to set CERT properties. - `data: Optional[Data]` Components of a CERT record. - `algorithm: Optional[float]` Algorithm. - `certificate: Optional[str]` Certificate. - `key_tag: Optional[float]` Key Tag. - `type: Optional[float]` Type. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class DNSKEYRecord: …` - `name: str` 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: Literal["DNSKEY"]` Record type. - `"DNSKEY"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted DNSKEY content. See 'data' to set DNSKEY properties. - `data: Optional[Data]` Components of a DNSKEY record. - `algorithm: Optional[float]` Algorithm. - `flags: Optional[float]` Flags. - `protocol: Optional[float]` Protocol. - `public_key: Optional[str]` Public Key. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class DSRecord: …` - `name: str` 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: Literal["DS"]` Record type. - `"DS"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted DS content. See 'data' to set DS properties. - `data: Optional[Data]` Components of a DS record. - `algorithm: Optional[float]` Algorithm. - `digest: Optional[str]` Digest. - `digest_type: Optional[float]` Digest Type. - `key_tag: Optional[float]` Key Tag. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class HTTPSRecord: …` - `name: str` 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: Literal["HTTPS"]` Record type. - `"HTTPS"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted HTTPS content. See 'data' to set HTTPS properties. - `data: Optional[Data]` Components of a HTTPS record. - `priority: Optional[float]` Priority. - `target: Optional[str]` Target. - `value: Optional[str]` Value. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class LOCRecord: …` - `name: str` 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: Literal["LOC"]` Record type. - `"LOC"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted LOC content. See 'data' to set LOC properties. - `data: Optional[Data]` Components of a LOC record. - `altitude: Optional[float]` Altitude of location in meters. - `lat_degrees: Optional[float]` Degrees of latitude. - `lat_direction: Optional[Literal["N", "S"]]` Latitude direction. - `"N"` - `"S"` - `lat_minutes: Optional[float]` Minutes of latitude. - `lat_seconds: Optional[float]` Seconds of latitude. - `long_degrees: Optional[float]` Degrees of longitude. - `long_direction: Optional[Literal["E", "W"]]` Longitude direction. - `"E"` - `"W"` - `long_minutes: Optional[float]` Minutes of longitude. - `long_seconds: Optional[float]` Seconds of longitude. - `precision_horz: Optional[float]` Horizontal precision of location. - `precision_vert: Optional[float]` Vertical precision of location. - `size: Optional[float]` Size of location in meters. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class NAPTRRecord: …` - `name: str` 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: Literal["NAPTR"]` Record type. - `"NAPTR"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted NAPTR content. See 'data' to set NAPTR properties. - `data: Optional[Data]` Components of a NAPTR record. - `flags: Optional[str]` Flags. - `order: Optional[float]` Order. - `preference: Optional[float]` Preference. - `regex: Optional[str]` Regex. - `replacement: Optional[str]` Replacement. - `service: Optional[str]` Service. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class SMIMEARecord: …` - `name: str` 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: Literal["SMIMEA"]` Record type. - `"SMIMEA"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted SMIMEA content. See 'data' to set SMIMEA properties. - `data: Optional[Data]` Components of a SMIMEA record. - `certificate: Optional[str]` Certificate. - `matching_type: Optional[float]` Matching Type. - `selector: Optional[float]` Selector. - `usage: Optional[float]` Usage. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class SRVRecord: …` - `name: str` 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: Literal["SRV"]` Record type. - `"SRV"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Priority, weight, port, and SRV target. See 'data' for setting the individual component values. - `data: Optional[Data]` Components of a SRV record. - `port: Optional[float]` The port of the service. - `priority: Optional[float]` 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: Optional[str]` A valid hostname. - `weight: Optional[float]` The record weight. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class SSHFPRecord: …` - `name: str` 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: Literal["SSHFP"]` Record type. - `"SSHFP"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted SSHFP content. See 'data' to set SSHFP properties. - `data: Optional[Data]` Components of a SSHFP record. - `algorithm: Optional[float]` Algorithm. - `fingerprint: Optional[str]` Fingerprint. - `type: Optional[float]` Type. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class SVCBRecord: …` - `name: str` 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: Literal["SVCB"]` Record type. - `"SVCB"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted SVCB content. See 'data' to set SVCB properties. - `data: Optional[Data]` Components of a SVCB record. - `priority: Optional[float]` Priority. - `target: Optional[str]` Target. - `value: Optional[str]` Value. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class TLSARecord: …` - `name: str` 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: Literal["TLSA"]` Record type. - `"TLSA"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted TLSA content. See 'data' to set TLSA properties. - `data: Optional[Data]` Components of a TLSA record. - `certificate: Optional[str]` Certificate. - `matching_type: Optional[float]` Matching Type. - `selector: Optional[float]` Selector. - `usage: Optional[float]` Usage. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. - `class URIRecord: …` - `name: str` 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: Literal["URI"]` Record type. - `"URI"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted URI content. See 'data' to set URI properties. - `data: Optional[Data]` Components of a URI record. - `target: Optional[str]` The record content. - `weight: Optional[float]` The record weight. - `priority: Optional[float]` 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: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### Record Response - `RecordResponse` - `class A: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class AAAA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CNAME: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class MX: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class NS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class Openpgpkey: …` - `id: str` Identifier. - `comment: str` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: str` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `name: str` 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: OpenpgpkeySettings` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: List[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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["OPENPGPKEY"]` Record type. - `"OPENPGPKEY"` - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class PTR: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class TXT: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CAA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CERT: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class DNSKEY: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class DS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class HTTPS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class LOC: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class NAPTR: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SMIMEA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SRV: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SSHFP: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SVCB: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class TLSA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class URI: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. ### Record Tags - `str` Individual tag of the form name:value (the name must consist of only letters, numbers, underscores and hyphens) ### SMIMEA Record - `class SMIMEARecord: …` - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["SMIMEA"]` Record type. - `"SMIMEA"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted SMIMEA content. See 'data' to set SMIMEA properties. - `data: Optional[Data]` Components of a SMIMEA record. - `certificate: Optional[str]` Certificate. - `matching_type: Optional[float]` Matching Type. - `selector: Optional[float]` Selector. - `usage: Optional[float]` Usage. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### SRV Record - `class SRVRecord: …` - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["SRV"]` Record type. - `"SRV"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Priority, weight, port, and SRV target. See 'data' for setting the individual component values. - `data: Optional[Data]` Components of a SRV record. - `port: Optional[float]` The port of the service. - `priority: Optional[float]` 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: Optional[str]` A valid hostname. - `weight: Optional[float]` The record weight. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### SSHFP Record - `class SSHFPRecord: …` - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["SSHFP"]` Record type. - `"SSHFP"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted SSHFP content. See 'data' to set SSHFP properties. - `data: Optional[Data]` Components of a SSHFP record. - `algorithm: Optional[float]` Algorithm. - `fingerprint: Optional[str]` Fingerprint. - `type: Optional[float]` Type. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### SVCB Record - `class SVCBRecord: …` - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["SVCB"]` Record type. - `"SVCB"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted SVCB content. See 'data' to set SVCB properties. - `data: Optional[Data]` Components of a SVCB record. - `priority: Optional[float]` Priority. - `target: Optional[str]` Target. - `value: Optional[str]` Value. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### TLSA Record - `class TLSARecord: …` - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["TLSA"]` Record type. - `"TLSA"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted TLSA content. See 'data' to set TLSA properties. - `data: Optional[Data]` Components of a TLSA record. - `certificate: Optional[str]` Certificate. - `matching_type: Optional[float]` Matching Type. - `selector: Optional[float]` Selector. - `usage: Optional[float]` Usage. - `proxied: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### TTL - `Union[float, Literal[1]]` 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. - `float` - `Literal[1]` 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. - `1` ### TXT Record - `class TXTRecord: …` - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["TXT"]` Record type. - `"TXT"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` 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: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### URI Record - `class URIRecord: …` - `name: str` 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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["URI"]` Record type. - `"URI"` - `comment: Optional[str]` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: Optional[str]` Formatted URI content. See 'data' to set URI properties. - `data: Optional[Data]` Components of a URI record. - `target: Optional[str]` The record content. - `weight: Optional[float]` The record weight. - `priority: Optional[float]` 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: Optional[bool]` Whether the record is receiving the performance and security benefits of Cloudflare. - `settings: Optional[Settings]` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: Optional[List[RecordTags]]` Custom tags for the DNS record. This field has no effect on DNS responses. ### Record Delete Response - `class RecordDeleteResponse: …` - `id: Optional[str]` Identifier. ### Record Export Response - `str` Exported BIND zone file. ### Record Import Response - `class RecordImportResponse: …` - `recs_added: Optional[float]` Number of DNS records added. - `total_records_parsed: Optional[float]` Total number of DNS records parsed. ### Record Scan Response - `class RecordScanResponse: …` - `recs_added: Optional[float]` Number of DNS records added. - `total_records_parsed: Optional[float]` Total number of DNS records parsed. ### Record Scan Trigger Response - `class RecordScanTriggerResponse: …` - `errors: List[Error]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[ErrorSource]` - `pointer: Optional[str]` - `messages: List[Message]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[MessageSource]` - `pointer: Optional[str]` - `success: Literal[true]` Whether the API call was successful. - `true` ### Record Scan Review Response - `class RecordScanReviewResponse: …` - `accepts: Optional[List[RecordResponse]]` - `class A: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class AAAA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CNAME: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class MX: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class NS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class Openpgpkey: …` - `id: str` Identifier. - `comment: str` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: str` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `name: str` 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: OpenpgpkeySettings` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: List[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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["OPENPGPKEY"]` Record type. - `"OPENPGPKEY"` - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class PTR: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class TXT: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CAA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CERT: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class DNSKEY: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class DS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class HTTPS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class LOC: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class NAPTR: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SMIMEA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SRV: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SSHFP: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SVCB: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class TLSA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class URI: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `rejects: Optional[List[str]]` ### Record Batch Response - `class RecordBatchResponse: …` - `deletes: Optional[List[RecordResponse]]` - `class A: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class AAAA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CNAME: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class MX: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class NS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class Openpgpkey: …` - `id: str` Identifier. - `comment: str` Comments or notes about the DNS record. This field has no effect on DNS responses. - `content: str` A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1) - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `name: str` 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: OpenpgpkeySettings` Settings for the DNS record. - `ipv4_only: Optional[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. - `ipv6_only: Optional[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: List[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. - `float` - `Literal[1]` 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. - `1` - `type: Literal["OPENPGPKEY"]` Record type. - `"OPENPGPKEY"` - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class PTR: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class TXT: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CAA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class CERT: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class DNSKEY: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class DS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class HTTPS: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class LOC: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class NAPTR: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SMIMEA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SRV: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SSHFP: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class SVCB: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class TLSA: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `class URI: …` - `id: str` Identifier. - `created_on: datetime` When the record was created. - `meta: object` Extra Cloudflare-specific information about the record. - `modified_on: datetime` When the record was last modified. - `proxiable: bool` Whether the record can be proxied by Cloudflare or not. - `comment_modified_on: Optional[datetime]` When the record comment was last modified. Omitted if there is no comment. - `tags_modified_on: Optional[datetime]` When the record tags were last modified. Omitted if there are no tags. - `patches: Optional[List[RecordResponse]]` - `class A: …` - `class AAAA: …` - `class CNAME: …` - `class MX: …` - `class NS: …` - `class Openpgpkey: …` - `class PTR: …` - `class TXT: …` - `class CAA: …` - `class CERT: …` - `class DNSKEY: …` - `class DS: …` - `class HTTPS: …` - `class LOC: …` - `class NAPTR: …` - `class SMIMEA: …` - `class SRV: …` - `class SSHFP: …` - `class SVCB: …` - `class TLSA: …` - `class URI: …` - `posts: Optional[List[RecordResponse]]` - `class A: …` - `class AAAA: …` - `class CNAME: …` - `class MX: …` - `class NS: …` - `class Openpgpkey: …` - `class PTR: …` - `class TXT: …` - `class CAA: …` - `class CERT: …` - `class DNSKEY: …` - `class DS: …` - `class HTTPS: …` - `class LOC: …` - `class NAPTR: …` - `class SMIMEA: …` - `class SRV: …` - `class SSHFP: …` - `class SVCB: …` - `class TLSA: …` - `class URI: …` - `puts: Optional[List[RecordResponse]]` - `class A: …` - `class AAAA: …` - `class CNAME: …` - `class MX: …` - `class NS: …` - `class Openpgpkey: …` - `class PTR: …` - `class TXT: …` - `class CAA: …` - `class CERT: …` - `class DNSKEY: …` - `class DS: …` - `class HTTPS: …` - `class LOC: …` - `class NAPTR: …` - `class SMIMEA: …` - `class SRV: …` - `class SSHFP: …` - `class SVCB: …` - `class TLSA: …` - `class URI: …` # Usage # Zone # Account # Settings # Zone ## Show DNS Settings `dns.settings.zone.get(ZoneGetParams**kwargs) -> ZoneGetResponse` **get** `/zones/{zone_id}/dns_settings` Show DNS settings for a zone ### Parameters - `zone_id: str` Identifier. ### Returns - `class ZoneGetResponse: …` - `flatten_all_cnames: bool` Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened. - `foundation_dns: bool` Whether to enable Foundation DNS Advanced Nameservers on the zone. - `internal_dns: InternalDNS` Settings for this internal zone. - `reference_zone_id: Optional[str]` The ID of the zone to fallback to. - `multi_provider: bool` Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers. - `nameservers: Nameservers` Settings determining the nameservers through which the zone should be available. - `type: Literal["cloudflare.standard", "custom.account", "custom.tenant", "custom.zone"]` Nameserver type - `"cloudflare.standard"` - `"custom.account"` - `"custom.tenant"` - `"custom.zone"` - `ns_set: Optional[int]` Configured nameserver set to be used for this zone - `ns_ttl: float` The time to live (TTL) of the zone's nameserver (NS) records. - `secondary_overrides: bool` Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex. - `soa: SOA` Components of the zone's SOA record. - `expire: Optional[float]` Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone. - `min_ttl: Optional[float]` The time to live (TTL) for negative caching of records within the zone. - `mname: Optional[str]` The primary nameserver, which may be used for outbound zone transfers. If null, a Cloudflare-assigned value will be used. - `refresh: Optional[float]` Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated. - `retry: Optional[float]` Time in seconds after which secondary servers should retry queries after the primary server was unresponsive. - `rname: Optional[str]` The email address of the zone administrator, with the first label representing the local part of the email address. - `ttl: Optional[float]` The time to live (TTL) of the SOA record itself. - `zone_mode: Literal["standard", "cdn_only", "dns_only"]` Whether the zone mode is a regular or CDN/DNS only zone. - `"standard"` - `"cdn_only"` - `"dns_only"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) zone = client.dns.settings.zone.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(zone.multi_provider) ``` #### 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": { "flatten_all_cnames": false, "foundation_dns": false, "internal_dns": { "reference_zone_id": "reference_zone_id" }, "multi_provider": false, "nameservers": { "type": "cloudflare.standard", "ns_set": 1 }, "ns_ttl": 86400, "secondary_overrides": false, "soa": { "expire": 604800, "min_ttl": 1800, "mname": "kristina.ns.cloudflare.com", "refresh": 10000, "retry": 2400, "rname": "admin.example.com", "ttl": 3600 }, "zone_mode": "dns_only" } } ``` ## Update DNS Settings `dns.settings.zone.edit(ZoneEditParams**kwargs) -> ZoneEditResponse` **patch** `/zones/{zone_id}/dns_settings` Update DNS settings for a zone ### Parameters - `zone_id: str` Identifier. - `flatten_all_cnames: Optional[bool]` Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened. - `foundation_dns: Optional[bool]` Whether to enable Foundation DNS Advanced Nameservers on the zone. - `internal_dns: Optional[InternalDNS]` Settings for this internal zone. - `reference_zone_id: Optional[str]` The ID of the zone to fallback to. - `multi_provider: Optional[bool]` Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers. - `nameservers: Optional[Nameservers]` Settings determining the nameservers through which the zone should be available. - `ns_set: Optional[int]` Configured nameserver set to be used for this zone - `type: Optional[Literal["cloudflare.standard", "custom.account", "custom.tenant", "custom.zone"]]` Nameserver type - `"cloudflare.standard"` - `"custom.account"` - `"custom.tenant"` - `"custom.zone"` - `ns_ttl: Optional[float]` The time to live (TTL) of the zone's nameserver (NS) records. - `secondary_overrides: Optional[bool]` Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex. - `soa: Optional[SOA]` Components of the zone's SOA record. - `expire: Optional[float]` Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone. - `min_ttl: Optional[float]` The time to live (TTL) for negative caching of records within the zone. - `mname: Optional[str]` The primary nameserver, which may be used for outbound zone transfers. If null, a Cloudflare-assigned value will be used. - `refresh: Optional[float]` Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated. - `retry: Optional[float]` Time in seconds after which secondary servers should retry queries after the primary server was unresponsive. - `rname: Optional[str]` The email address of the zone administrator, with the first label representing the local part of the email address. - `ttl: Optional[float]` The time to live (TTL) of the SOA record itself. - `zone_mode: Optional[Literal["standard", "cdn_only", "dns_only"]]` Whether the zone mode is a regular or CDN/DNS only zone. - `"standard"` - `"cdn_only"` - `"dns_only"` ### Returns - `class ZoneEditResponse: …` - `flatten_all_cnames: bool` Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened. - `foundation_dns: bool` Whether to enable Foundation DNS Advanced Nameservers on the zone. - `internal_dns: InternalDNS` Settings for this internal zone. - `reference_zone_id: Optional[str]` The ID of the zone to fallback to. - `multi_provider: bool` Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers. - `nameservers: Nameservers` Settings determining the nameservers through which the zone should be available. - `type: Literal["cloudflare.standard", "custom.account", "custom.tenant", "custom.zone"]` Nameserver type - `"cloudflare.standard"` - `"custom.account"` - `"custom.tenant"` - `"custom.zone"` - `ns_set: Optional[int]` Configured nameserver set to be used for this zone - `ns_ttl: float` The time to live (TTL) of the zone's nameserver (NS) records. - `secondary_overrides: bool` Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex. - `soa: SOA` Components of the zone's SOA record. - `expire: Optional[float]` Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone. - `min_ttl: Optional[float]` The time to live (TTL) for negative caching of records within the zone. - `mname: Optional[str]` The primary nameserver, which may be used for outbound zone transfers. If null, a Cloudflare-assigned value will be used. - `refresh: Optional[float]` Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated. - `retry: Optional[float]` Time in seconds after which secondary servers should retry queries after the primary server was unresponsive. - `rname: Optional[str]` The email address of the zone administrator, with the first label representing the local part of the email address. - `ttl: Optional[float]` The time to live (TTL) of the SOA record itself. - `zone_mode: Literal["standard", "cdn_only", "dns_only"]` Whether the zone mode is a regular or CDN/DNS only zone. - `"standard"` - `"cdn_only"` - `"dns_only"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.dns.settings.zone.edit( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(response.multi_provider) ``` #### 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": { "flatten_all_cnames": false, "foundation_dns": false, "internal_dns": { "reference_zone_id": "reference_zone_id" }, "multi_provider": false, "nameservers": { "type": "cloudflare.standard", "ns_set": 1 }, "ns_ttl": 86400, "secondary_overrides": false, "soa": { "expire": 604800, "min_ttl": 1800, "mname": "kristina.ns.cloudflare.com", "refresh": 10000, "retry": 2400, "rname": "admin.example.com", "ttl": 3600 }, "zone_mode": "dns_only" } } ``` ## Domain Types ### Zone Get Response - `class ZoneGetResponse: …` - `flatten_all_cnames: bool` Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened. - `foundation_dns: bool` Whether to enable Foundation DNS Advanced Nameservers on the zone. - `internal_dns: InternalDNS` Settings for this internal zone. - `reference_zone_id: Optional[str]` The ID of the zone to fallback to. - `multi_provider: bool` Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers. - `nameservers: Nameservers` Settings determining the nameservers through which the zone should be available. - `type: Literal["cloudflare.standard", "custom.account", "custom.tenant", "custom.zone"]` Nameserver type - `"cloudflare.standard"` - `"custom.account"` - `"custom.tenant"` - `"custom.zone"` - `ns_set: Optional[int]` Configured nameserver set to be used for this zone - `ns_ttl: float` The time to live (TTL) of the zone's nameserver (NS) records. - `secondary_overrides: bool` Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex. - `soa: SOA` Components of the zone's SOA record. - `expire: Optional[float]` Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone. - `min_ttl: Optional[float]` The time to live (TTL) for negative caching of records within the zone. - `mname: Optional[str]` The primary nameserver, which may be used for outbound zone transfers. If null, a Cloudflare-assigned value will be used. - `refresh: Optional[float]` Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated. - `retry: Optional[float]` Time in seconds after which secondary servers should retry queries after the primary server was unresponsive. - `rname: Optional[str]` The email address of the zone administrator, with the first label representing the local part of the email address. - `ttl: Optional[float]` The time to live (TTL) of the SOA record itself. - `zone_mode: Literal["standard", "cdn_only", "dns_only"]` Whether the zone mode is a regular or CDN/DNS only zone. - `"standard"` - `"cdn_only"` - `"dns_only"` ### Zone Edit Response - `class ZoneEditResponse: …` - `flatten_all_cnames: bool` Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened. - `foundation_dns: bool` Whether to enable Foundation DNS Advanced Nameservers on the zone. - `internal_dns: InternalDNS` Settings for this internal zone. - `reference_zone_id: Optional[str]` The ID of the zone to fallback to. - `multi_provider: bool` Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers. - `nameservers: Nameservers` Settings determining the nameservers through which the zone should be available. - `type: Literal["cloudflare.standard", "custom.account", "custom.tenant", "custom.zone"]` Nameserver type - `"cloudflare.standard"` - `"custom.account"` - `"custom.tenant"` - `"custom.zone"` - `ns_set: Optional[int]` Configured nameserver set to be used for this zone - `ns_ttl: float` The time to live (TTL) of the zone's nameserver (NS) records. - `secondary_overrides: bool` Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex. - `soa: SOA` Components of the zone's SOA record. - `expire: Optional[float]` Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone. - `min_ttl: Optional[float]` The time to live (TTL) for negative caching of records within the zone. - `mname: Optional[str]` The primary nameserver, which may be used for outbound zone transfers. If null, a Cloudflare-assigned value will be used. - `refresh: Optional[float]` Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated. - `retry: Optional[float]` Time in seconds after which secondary servers should retry queries after the primary server was unresponsive. - `rname: Optional[str]` The email address of the zone administrator, with the first label representing the local part of the email address. - `ttl: Optional[float]` The time to live (TTL) of the SOA record itself. - `zone_mode: Literal["standard", "cdn_only", "dns_only"]` Whether the zone mode is a regular or CDN/DNS only zone. - `"standard"` - `"cdn_only"` - `"dns_only"` # Account ## Show DNS Settings `dns.settings.account.get(AccountGetParams**kwargs) -> AccountGetResponse` **get** `/accounts/{account_id}/dns_settings` Show DNS settings for an account ### Parameters - `account_id: str` Identifier. ### Returns - `class AccountGetResponse: …` - `zone_defaults: ZoneDefaults` - `flatten_all_cnames: bool` Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened. - `foundation_dns: bool` Whether to enable Foundation DNS Advanced Nameservers on the zone. - `internal_dns: ZoneDefaultsInternalDNS` Settings for this internal zone. - `reference_zone_id: Optional[str]` The ID of the zone to fallback to. - `multi_provider: bool` Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers. - `nameservers: ZoneDefaultsNameservers` Settings determining the nameservers through which the zone should be available. - `type: Literal["cloudflare.standard", "cloudflare.standard.random", "custom.account", "custom.tenant"]` Nameserver type - `"cloudflare.standard"` - `"cloudflare.standard.random"` - `"custom.account"` - `"custom.tenant"` - `ns_ttl: float` The time to live (TTL) of the zone's nameserver (NS) records. - `secondary_overrides: bool` Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex. - `soa: ZoneDefaultsSOA` Components of the zone's SOA record. - `expire: Optional[float]` Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone. - `min_ttl: Optional[float]` The time to live (TTL) for negative caching of records within the zone. - `mname: Optional[str]` The primary nameserver, which may be used for outbound zone transfers. If null, a Cloudflare-assigned value will be used. - `refresh: Optional[float]` Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated. - `retry: Optional[float]` Time in seconds after which secondary servers should retry queries after the primary server was unresponsive. - `rname: Optional[str]` The email address of the zone administrator, with the first label representing the local part of the email address. - `ttl: Optional[float]` The time to live (TTL) of the SOA record itself. - `zone_mode: Literal["standard", "cdn_only", "dns_only"]` Whether the zone mode is a regular or CDN/DNS only zone. - `"standard"` - `"cdn_only"` - `"dns_only"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) account = client.dns.settings.account.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(account.zone_defaults) ``` #### 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": { "zone_defaults": { "flatten_all_cnames": false, "foundation_dns": false, "internal_dns": { "reference_zone_id": "reference_zone_id" }, "multi_provider": false, "nameservers": { "type": "cloudflare.standard" }, "ns_ttl": 86400, "secondary_overrides": false, "soa": { "expire": 604800, "min_ttl": 1800, "mname": "kristina.ns.cloudflare.com", "refresh": 10000, "retry": 2400, "rname": "admin.example.com", "ttl": 3600 }, "zone_mode": "dns_only" } } } ``` ## Update DNS Settings `dns.settings.account.edit(AccountEditParams**kwargs) -> AccountEditResponse` **patch** `/accounts/{account_id}/dns_settings` Update DNS settings for an account ### Parameters - `account_id: str` Identifier. - `zone_defaults: Optional[ZoneDefaults]` - `flatten_all_cnames: Optional[bool]` Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened. - `foundation_dns: Optional[bool]` Whether to enable Foundation DNS Advanced Nameservers on the zone. - `internal_dns: Optional[ZoneDefaultsInternalDNS]` Settings for this internal zone. - `reference_zone_id: Optional[str]` The ID of the zone to fallback to. - `multi_provider: Optional[bool]` Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers. - `nameservers: Optional[ZoneDefaultsNameservers]` Settings determining the nameservers through which the zone should be available. - `type: Optional[Literal["cloudflare.standard", "cloudflare.standard.random", "custom.account", "custom.tenant"]]` Nameserver type - `"cloudflare.standard"` - `"cloudflare.standard.random"` - `"custom.account"` - `"custom.tenant"` - `ns_ttl: Optional[float]` The time to live (TTL) of the zone's nameserver (NS) records. - `secondary_overrides: Optional[bool]` Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex. - `soa: Optional[ZoneDefaultsSOA]` Components of the zone's SOA record. - `expire: Optional[float]` Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone. - `min_ttl: Optional[float]` The time to live (TTL) for negative caching of records within the zone. - `mname: Optional[str]` The primary nameserver, which may be used for outbound zone transfers. If null, a Cloudflare-assigned value will be used. - `refresh: Optional[float]` Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated. - `retry: Optional[float]` Time in seconds after which secondary servers should retry queries after the primary server was unresponsive. - `rname: Optional[str]` The email address of the zone administrator, with the first label representing the local part of the email address. - `ttl: Optional[float]` The time to live (TTL) of the SOA record itself. - `zone_mode: Optional[Literal["standard", "cdn_only", "dns_only"]]` Whether the zone mode is a regular or CDN/DNS only zone. - `"standard"` - `"cdn_only"` - `"dns_only"` ### Returns - `class AccountEditResponse: …` - `zone_defaults: ZoneDefaults` - `flatten_all_cnames: bool` Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened. - `foundation_dns: bool` Whether to enable Foundation DNS Advanced Nameservers on the zone. - `internal_dns: ZoneDefaultsInternalDNS` Settings for this internal zone. - `reference_zone_id: Optional[str]` The ID of the zone to fallback to. - `multi_provider: bool` Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers. - `nameservers: ZoneDefaultsNameservers` Settings determining the nameservers through which the zone should be available. - `type: Literal["cloudflare.standard", "cloudflare.standard.random", "custom.account", "custom.tenant"]` Nameserver type - `"cloudflare.standard"` - `"cloudflare.standard.random"` - `"custom.account"` - `"custom.tenant"` - `ns_ttl: float` The time to live (TTL) of the zone's nameserver (NS) records. - `secondary_overrides: bool` Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex. - `soa: ZoneDefaultsSOA` Components of the zone's SOA record. - `expire: Optional[float]` Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone. - `min_ttl: Optional[float]` The time to live (TTL) for negative caching of records within the zone. - `mname: Optional[str]` The primary nameserver, which may be used for outbound zone transfers. If null, a Cloudflare-assigned value will be used. - `refresh: Optional[float]` Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated. - `retry: Optional[float]` Time in seconds after which secondary servers should retry queries after the primary server was unresponsive. - `rname: Optional[str]` The email address of the zone administrator, with the first label representing the local part of the email address. - `ttl: Optional[float]` The time to live (TTL) of the SOA record itself. - `zone_mode: Literal["standard", "cdn_only", "dns_only"]` Whether the zone mode is a regular or CDN/DNS only zone. - `"standard"` - `"cdn_only"` - `"dns_only"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.dns.settings.account.edit( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(response.zone_defaults) ``` #### 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": { "zone_defaults": { "flatten_all_cnames": false, "foundation_dns": false, "internal_dns": { "reference_zone_id": "reference_zone_id" }, "multi_provider": false, "nameservers": { "type": "cloudflare.standard" }, "ns_ttl": 86400, "secondary_overrides": false, "soa": { "expire": 604800, "min_ttl": 1800, "mname": "kristina.ns.cloudflare.com", "refresh": 10000, "retry": 2400, "rname": "admin.example.com", "ttl": 3600 }, "zone_mode": "dns_only" } } } ``` ## Domain Types ### Account Get Response - `class AccountGetResponse: …` - `zone_defaults: ZoneDefaults` - `flatten_all_cnames: bool` Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened. - `foundation_dns: bool` Whether to enable Foundation DNS Advanced Nameservers on the zone. - `internal_dns: ZoneDefaultsInternalDNS` Settings for this internal zone. - `reference_zone_id: Optional[str]` The ID of the zone to fallback to. - `multi_provider: bool` Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers. - `nameservers: ZoneDefaultsNameservers` Settings determining the nameservers through which the zone should be available. - `type: Literal["cloudflare.standard", "cloudflare.standard.random", "custom.account", "custom.tenant"]` Nameserver type - `"cloudflare.standard"` - `"cloudflare.standard.random"` - `"custom.account"` - `"custom.tenant"` - `ns_ttl: float` The time to live (TTL) of the zone's nameserver (NS) records. - `secondary_overrides: bool` Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex. - `soa: ZoneDefaultsSOA` Components of the zone's SOA record. - `expire: Optional[float]` Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone. - `min_ttl: Optional[float]` The time to live (TTL) for negative caching of records within the zone. - `mname: Optional[str]` The primary nameserver, which may be used for outbound zone transfers. If null, a Cloudflare-assigned value will be used. - `refresh: Optional[float]` Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated. - `retry: Optional[float]` Time in seconds after which secondary servers should retry queries after the primary server was unresponsive. - `rname: Optional[str]` The email address of the zone administrator, with the first label representing the local part of the email address. - `ttl: Optional[float]` The time to live (TTL) of the SOA record itself. - `zone_mode: Literal["standard", "cdn_only", "dns_only"]` Whether the zone mode is a regular or CDN/DNS only zone. - `"standard"` - `"cdn_only"` - `"dns_only"` ### Account Edit Response - `class AccountEditResponse: …` - `zone_defaults: ZoneDefaults` - `flatten_all_cnames: bool` Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened. - `foundation_dns: bool` Whether to enable Foundation DNS Advanced Nameservers on the zone. - `internal_dns: ZoneDefaultsInternalDNS` Settings for this internal zone. - `reference_zone_id: Optional[str]` The ID of the zone to fallback to. - `multi_provider: bool` Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers. - `nameservers: ZoneDefaultsNameservers` Settings determining the nameservers through which the zone should be available. - `type: Literal["cloudflare.standard", "cloudflare.standard.random", "custom.account", "custom.tenant"]` Nameserver type - `"cloudflare.standard"` - `"cloudflare.standard.random"` - `"custom.account"` - `"custom.tenant"` - `ns_ttl: float` The time to live (TTL) of the zone's nameserver (NS) records. - `secondary_overrides: bool` Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex. - `soa: ZoneDefaultsSOA` Components of the zone's SOA record. - `expire: Optional[float]` Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone. - `min_ttl: Optional[float]` The time to live (TTL) for negative caching of records within the zone. - `mname: Optional[str]` The primary nameserver, which may be used for outbound zone transfers. If null, a Cloudflare-assigned value will be used. - `refresh: Optional[float]` Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated. - `retry: Optional[float]` Time in seconds after which secondary servers should retry queries after the primary server was unresponsive. - `rname: Optional[str]` The email address of the zone administrator, with the first label representing the local part of the email address. - `ttl: Optional[float]` The time to live (TTL) of the SOA record itself. - `zone_mode: Literal["standard", "cdn_only", "dns_only"]` Whether the zone mode is a regular or CDN/DNS only zone. - `"standard"` - `"cdn_only"` - `"dns_only"` # Views ## List Internal DNS Views `dns.settings.account.views.list(ViewListParams**kwargs) -> SyncV4PagePaginationArray[ViewListResponse]` **get** `/accounts/{account_id}/dns_settings/views` List DNS Internal Views for an Account ### Parameters - `account_id: str` Identifier. - `direction: Optional[Literal["asc", "desc"]]` Direction to order DNS views in. - `"asc"` - `"desc"` - `match: Optional[Literal["any", "all"]]` 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. - `"any"` - `"all"` - `name: Optional[Name]` - `contains: Optional[str]` Substring of the DNS view name. - `endswith: Optional[str]` Suffix of the DNS view name. - `exact: Optional[str]` Exact value of the DNS view name. - `startswith: Optional[str]` Prefix of the DNS view name. - `order: Optional[Literal["name", "created_on", "modified_on"]]` Field to order DNS views by. - `"name"` - `"created_on"` - `"modified_on"` - `page: Optional[float]` Page number of paginated results. - `per_page: Optional[float]` Number of DNS views per page. - `zone_id: Optional[str]` A zone ID that exists in the zones list for the view. - `zone_name: Optional[str]` A zone name that exists in the zones list for the view. ### Returns - `class ViewListResponse: …` - `id: str` Identifier. - `created_time: datetime` When the view was created. - `modified_time: datetime` When the view was last modified. - `name: str` The name of the view. - `zones: List[str]` The list of zones linked to this view. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) page = client.dns.settings.account.views.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) page = page.result[0] print(page.id) ``` #### 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": [ { "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_time": "2014-01-01T05:20:00.12345Z", "modified_time": "2014-01-01T05:20:00.12345Z", "name": "my view", "zones": [ "372e67954025e0ba6aaa6d586b9e0b59" ] } ], "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000, "total_pages": 100 } } ``` ## DNS Internal View Details `dns.settings.account.views.get(strview_id, ViewGetParams**kwargs) -> ViewGetResponse` **get** `/accounts/{account_id}/dns_settings/views/{view_id}` Get DNS Internal View ### Parameters - `account_id: str` Identifier. - `view_id: str` Identifier. ### Returns - `class ViewGetResponse: …` - `id: str` Identifier. - `created_time: datetime` When the view was created. - `modified_time: datetime` When the view was last modified. - `name: str` The name of the view. - `zones: List[str]` The list of zones linked to this view. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) view = client.dns.settings.account.views.get( view_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(view.id) ``` #### 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": { "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_time": "2014-01-01T05:20:00.12345Z", "modified_time": "2014-01-01T05:20:00.12345Z", "name": "my view", "zones": [ "372e67954025e0ba6aaa6d586b9e0b59" ] } } ``` ## Create Internal DNS View `dns.settings.account.views.create(ViewCreateParams**kwargs) -> ViewCreateResponse` **post** `/accounts/{account_id}/dns_settings/views` Create Internal DNS View for an account ### Parameters - `account_id: str` Identifier. - `name: str` The name of the view. - `zones: SequenceNotStr[str]` The list of zones linked to this view. ### Returns - `class ViewCreateResponse: …` - `id: str` Identifier. - `created_time: datetime` When the view was created. - `modified_time: datetime` When the view was last modified. - `name: str` The name of the view. - `zones: List[str]` The list of zones linked to this view. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) view = client.dns.settings.account.views.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", name="my view", zones=["372e67954025e0ba6aaa6d586b9e0b59"], ) print(view.id) ``` #### 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": { "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_time": "2014-01-01T05:20:00.12345Z", "modified_time": "2014-01-01T05:20:00.12345Z", "name": "my view", "zones": [ "372e67954025e0ba6aaa6d586b9e0b59" ] } } ``` ## Update Internal DNS View `dns.settings.account.views.edit(strview_id, ViewEditParams**kwargs) -> ViewEditResponse` **patch** `/accounts/{account_id}/dns_settings/views/{view_id}` Update an existing Internal DNS View ### Parameters - `account_id: str` Identifier. - `view_id: str` Identifier. - `name: Optional[str]` The name of the view. - `zones: Optional[SequenceNotStr[str]]` The list of zones linked to this view. ### Returns - `class ViewEditResponse: …` - `id: str` Identifier. - `created_time: datetime` When the view was created. - `modified_time: datetime` When the view was last modified. - `name: str` The name of the view. - `zones: List[str]` The list of zones linked to this view. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.dns.settings.account.views.edit( view_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(response.id) ``` #### 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": { "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_time": "2014-01-01T05:20:00.12345Z", "modified_time": "2014-01-01T05:20:00.12345Z", "name": "my view", "zones": [ "372e67954025e0ba6aaa6d586b9e0b59" ] } } ``` ## Delete Internal DNS View `dns.settings.account.views.delete(strview_id, ViewDeleteParams**kwargs) -> ViewDeleteResponse` **delete** `/accounts/{account_id}/dns_settings/views/{view_id}` Delete an existing Internal DNS View ### Parameters - `account_id: str` Identifier. - `view_id: str` Identifier. ### Returns - `class ViewDeleteResponse: …` - `id: Optional[str]` Identifier. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) view = client.dns.settings.account.views.delete( view_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(view.id) ``` #### Response ```json { "result": { "id": "023e105f4ecef8ad9ca31a8372d0c353" } } ``` ## Domain Types ### View List Response - `class ViewListResponse: …` - `id: str` Identifier. - `created_time: datetime` When the view was created. - `modified_time: datetime` When the view was last modified. - `name: str` The name of the view. - `zones: List[str]` The list of zones linked to this view. ### View Get Response - `class ViewGetResponse: …` - `id: str` Identifier. - `created_time: datetime` When the view was created. - `modified_time: datetime` When the view was last modified. - `name: str` The name of the view. - `zones: List[str]` The list of zones linked to this view. ### View Create Response - `class ViewCreateResponse: …` - `id: str` Identifier. - `created_time: datetime` When the view was created. - `modified_time: datetime` When the view was last modified. - `name: str` The name of the view. - `zones: List[str]` The list of zones linked to this view. ### View Edit Response - `class ViewEditResponse: …` - `id: str` Identifier. - `created_time: datetime` When the view was created. - `modified_time: datetime` When the view was last modified. - `name: str` The name of the view. - `zones: List[str]` The list of zones linked to this view. ### View Delete Response - `class ViewDeleteResponse: …` - `id: Optional[str]` Identifier. # Analytics # Reports ## Table `dns.analytics.reports.get(ReportGetParams**kwargs) -> Report` **get** `/zones/{zone_id}/dns_analytics/report` Retrieves a list of summarised aggregate metrics over a given time period. See [Analytics API properties](https://developers.cloudflare.com/dns/reference/analytics-api-properties/) for detailed information about the available query parameters. ### Parameters - `zone_id: str` Identifier. - `dimensions: Optional[str]` A comma-separated list of dimensions to group results by. - `filters: Optional[str]` Segmentation filter in 'attribute operator value' format. - `limit: Optional[int]` Limit number of returned metrics. - `metrics: Optional[str]` A comma-separated list of metrics to query. - `since: Optional[Union[str, datetime]]` Start date and time of requesting data period in ISO 8601 format. - `sort: Optional[str]` A comma-separated list of dimensions to sort by, where each dimension may be prefixed by - (descending) or + (ascending). - `until: Optional[Union[str, datetime]]` End date and time of requesting data period in ISO 8601 format. ### Returns - `class Report: …` - `data: List[Data]` Array with one row per combination of dimension values. - `dimensions: List[str]` Array of dimension values, representing the combination of dimension values corresponding to this row. - `metrics: List[float]` Array with one item per requested metric. Each item is a single value. - `data_lag: float` Number of seconds between current time and last processed event, in another words how many seconds of data could be missing. - `max: object` Maximum results for each metric (object mapping metric names to values). Currently always an empty object. - `min: object` Minimum results for each metric (object mapping metric names to values). Currently always an empty object. - `query: Query` - `dimensions: List[str]` Array of dimension names. - `limit: int` Limit number of returned metrics. - `metrics: List[str]` Array of metric names. - `since: datetime` Start date and time of requesting data period in ISO 8601 format. - `until: datetime` End date and time of requesting data period in ISO 8601 format. - `filters: Optional[str]` Segmentation filter in 'attribute operator value' format. - `sort: Optional[List[str]]` Array of dimensions to sort by, where each dimension may be prefixed by - (descending) or + (ascending). - `rows: float` Total number of rows in the result. - `totals: object` Total results for metrics across all data (object mapping metric names to values). ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) report = client.dns.analytics.reports.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(report.data) ``` #### 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": { "data": [ { "dimensions": [ "NODATA" ], "metrics": [ 0 ] } ], "data_lag": 60, "max": {}, "min": {}, "query": { "dimensions": [ "responseCode", "queryName" ], "limit": 100, "metrics": [ "queryCount", "responseTimeAvg" ], "since": "2023-11-11T12:00:00Z", "until": "2023-11-11T13:00:00Z", "filters": "responseCode==NOERROR,queryType==A", "sort": [ "+responseCode", "-queryName" ] }, "rows": 100, "totals": {} } } ``` ## Domain Types ### Report - `class Report: …` - `data: List[Data]` Array with one row per combination of dimension values. - `dimensions: List[str]` Array of dimension values, representing the combination of dimension values corresponding to this row. - `metrics: List[float]` Array with one item per requested metric. Each item is a single value. - `data_lag: float` Number of seconds between current time and last processed event, in another words how many seconds of data could be missing. - `max: object` Maximum results for each metric (object mapping metric names to values). Currently always an empty object. - `min: object` Minimum results for each metric (object mapping metric names to values). Currently always an empty object. - `query: Query` - `dimensions: List[str]` Array of dimension names. - `limit: int` Limit number of returned metrics. - `metrics: List[str]` Array of metric names. - `since: datetime` Start date and time of requesting data period in ISO 8601 format. - `until: datetime` End date and time of requesting data period in ISO 8601 format. - `filters: Optional[str]` Segmentation filter in 'attribute operator value' format. - `sort: Optional[List[str]]` Array of dimensions to sort by, where each dimension may be prefixed by - (descending) or + (ascending). - `rows: float` Total number of rows in the result. - `totals: object` Total results for metrics across all data (object mapping metric names to values). # Bytimes ## By Time `dns.analytics.reports.bytimes.get(BytimeGetParams**kwargs) -> ByTime` **get** `/zones/{zone_id}/dns_analytics/report/bytime` Retrieves a list of aggregate metrics grouped by time interval. See [Analytics API properties](https://developers.cloudflare.com/dns/reference/analytics-api-properties/) for detailed information about the available query parameters. ### Parameters - `zone_id: str` Identifier. - `dimensions: Optional[str]` A comma-separated list of dimensions to group results by. - `filters: Optional[str]` Segmentation filter in 'attribute operator value' format. - `limit: Optional[int]` Limit number of returned metrics. - `metrics: Optional[str]` A comma-separated list of metrics to query. - `since: Optional[Union[str, datetime]]` Start date and time of requesting data period in ISO 8601 format. - `sort: Optional[str]` A comma-separated list of dimensions to sort by, where each dimension may be prefixed by - (descending) or + (ascending). - `time_delta: Optional[Literal["all", "auto", "year", 7 more]]` Unit of time to group data by. - `"all"` - `"auto"` - `"year"` - `"quarter"` - `"month"` - `"week"` - `"day"` - `"hour"` - `"dekaminute"` - `"minute"` - `until: Optional[Union[str, datetime]]` End date and time of requesting data period in ISO 8601 format. ### Returns - `class ByTime: …` - `data: List[Data]` Array with one row per combination of dimension values. - `dimensions: List[str]` Array of dimension values, representing the combination of dimension values corresponding to this row. - `metrics: List[List[float]]` Array with one item per requested metric. Each item is an array of values, broken down by time interval. - `data_lag: float` Number of seconds between current time and last processed event, in another words how many seconds of data could be missing. - `max: object` Maximum results for each metric (object mapping metric names to values). Currently always an empty object. - `min: object` Minimum results for each metric (object mapping metric names to values). Currently always an empty object. - `query: Query` - `dimensions: List[str]` Array of dimension names. - `limit: int` Limit number of returned metrics. - `metrics: List[str]` Array of metric names. - `since: datetime` Start date and time of requesting data period in ISO 8601 format. - `time_delta: Literal["all", "auto", "year", 7 more]` Unit of time to group data by. - `"all"` - `"auto"` - `"year"` - `"quarter"` - `"month"` - `"week"` - `"day"` - `"hour"` - `"dekaminute"` - `"minute"` - `until: datetime` End date and time of requesting data period in ISO 8601 format. - `filters: Optional[str]` Segmentation filter in 'attribute operator value' format. - `sort: Optional[List[str]]` Array of dimensions to sort by, where each dimension may be prefixed by - (descending) or + (ascending). - `rows: float` Total number of rows in the result. - `time_intervals: List[List[datetime]]` Array of time intervals in the response data. Each interval is represented as an array containing two values: the start time, and the end time. - `totals: object` Total results for metrics across all data (object mapping metric names to values). ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) by_time = client.dns.analytics.reports.bytimes.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(by_time.data) ``` #### 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": { "data": [ { "dimensions": [ "NODATA" ], "metrics": [ [ 0 ] ] } ], "data_lag": 60, "max": {}, "min": {}, "query": { "dimensions": [ "responseCode", "queryName" ], "limit": 100, "metrics": [ "queryCount", "responseTimeAvg" ], "since": "2023-11-11T12:00:00Z", "time_delta": "hour", "until": "2023-11-11T13:00:00Z", "filters": "responseCode==NOERROR,queryType==A", "sort": [ "+responseCode", "-queryName" ] }, "rows": 100, "time_intervals": [ [ "2023-11-11T12:00:00Z" ] ], "totals": {} } } ``` ## Domain Types ### By Time - `class ByTime: …` - `data: List[Data]` Array with one row per combination of dimension values. - `dimensions: List[str]` Array of dimension values, representing the combination of dimension values corresponding to this row. - `metrics: List[List[float]]` Array with one item per requested metric. Each item is an array of values, broken down by time interval. - `data_lag: float` Number of seconds between current time and last processed event, in another words how many seconds of data could be missing. - `max: object` Maximum results for each metric (object mapping metric names to values). Currently always an empty object. - `min: object` Minimum results for each metric (object mapping metric names to values). Currently always an empty object. - `query: Query` - `dimensions: List[str]` Array of dimension names. - `limit: int` Limit number of returned metrics. - `metrics: List[str]` Array of metric names. - `since: datetime` Start date and time of requesting data period in ISO 8601 format. - `time_delta: Literal["all", "auto", "year", 7 more]` Unit of time to group data by. - `"all"` - `"auto"` - `"year"` - `"quarter"` - `"month"` - `"week"` - `"day"` - `"hour"` - `"dekaminute"` - `"minute"` - `until: datetime` End date and time of requesting data period in ISO 8601 format. - `filters: Optional[str]` Segmentation filter in 'attribute operator value' format. - `sort: Optional[List[str]]` Array of dimensions to sort by, where each dimension may be prefixed by - (descending) or + (ascending). - `rows: float` Total number of rows in the result. - `time_intervals: List[List[datetime]]` Array of time intervals in the response data. Each interval is represented as an array containing two values: the start time, and the end time. - `totals: object` Total results for metrics across all data (object mapping metric names to values). # Zone Transfers # Force AXFR ## Force AXFR `dns.zone_transfers.force_axfr.create(ForceAXFRCreateParams**kwargs) -> ForceAXFR` **post** `/zones/{zone_id}/secondary_dns/force_axfr` Sends AXFR zone transfer request to primary nameserver(s). ### Parameters - `zone_id: str` - `body: object` ### Returns - `str` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) force_axfr = client.dns.zone_transfers.force_axfr.create( zone_id="269d8f4853475ca241c4e730be286b20", body={}, ) print(force_axfr) ``` #### 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": "OK" } ``` ## Domain Types ### Force AXFR - `str` When force_axfr query parameter is set to true, the response is a simple string. # Incoming ## Secondary Zone Configuration Details `dns.zone_transfers.incoming.get(IncomingGetParams**kwargs) -> IncomingGetResponse` **get** `/zones/{zone_id}/secondary_dns/incoming` Get secondary zone configuration for incoming zone transfers. ### Parameters - `zone_id: str` ### Returns - `class IncomingGetResponse: …` - `id: Optional[str]` - `auto_refresh_seconds: Optional[float]` How often should a secondary zone auto refresh regardless of DNS NOTIFY. Not applicable for primary zones. - `checked_time: Optional[str]` The time for a specific event. - `created_time: Optional[str]` The time for a specific event. - `modified_time: Optional[str]` The time for a specific event. - `name: Optional[str]` Zone name. - `peers: Optional[List[str]]` A list of peer tags. - `soa_serial: Optional[float]` The serial number of the SOA for the given zone. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) incoming = client.dns.zone_transfers.incoming.get( zone_id="269d8f4853475ca241c4e730be286b20", ) print(incoming.id) ``` #### 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": { "id": "269d8f4853475ca241c4e730be286b20", "auto_refresh_seconds": 86400, "checked_time": "2019-10-24T17:09:42.883908+01:00", "created_time": "2019-10-24T17:09:42.883908+01:00", "modified_time": "2019-10-24T17:09:42.883908+01:00", "name": "www.example.com.", "peers": [ "23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194" ], "soa_serial": 2019102400 } } ``` ## Create Secondary Zone Configuration `dns.zone_transfers.incoming.create(IncomingCreateParams**kwargs) -> IncomingCreateResponse` **post** `/zones/{zone_id}/secondary_dns/incoming` Create secondary zone configuration for incoming zone transfers. ### Parameters - `zone_id: str` - `auto_refresh_seconds: float` How often should a secondary zone auto refresh regardless of DNS NOTIFY. Not applicable for primary zones. - `name: str` Zone name. - `peers: SequenceNotStr[str]` A list of peer tags. ### Returns - `class IncomingCreateResponse: …` - `id: Optional[str]` - `auto_refresh_seconds: Optional[float]` How often should a secondary zone auto refresh regardless of DNS NOTIFY. Not applicable for primary zones. - `checked_time: Optional[str]` The time for a specific event. - `created_time: Optional[str]` The time for a specific event. - `modified_time: Optional[str]` The time for a specific event. - `name: Optional[str]` Zone name. - `peers: Optional[List[str]]` A list of peer tags. - `soa_serial: Optional[float]` The serial number of the SOA for the given zone. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) incoming = client.dns.zone_transfers.incoming.create( zone_id="269d8f4853475ca241c4e730be286b20", auto_refresh_seconds=86400, name="www.example.com.", peers=["23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"], ) print(incoming.id) ``` #### 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": { "id": "269d8f4853475ca241c4e730be286b20", "auto_refresh_seconds": 86400, "checked_time": "2019-10-24T17:09:42.883908+01:00", "created_time": "2019-10-24T17:09:42.883908+01:00", "modified_time": "2019-10-24T17:09:42.883908+01:00", "name": "www.example.com.", "peers": [ "23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194" ], "soa_serial": 2019102400 } } ``` ## Update Secondary Zone Configuration `dns.zone_transfers.incoming.update(IncomingUpdateParams**kwargs) -> IncomingUpdateResponse` **put** `/zones/{zone_id}/secondary_dns/incoming` Update secondary zone configuration for incoming zone transfers. ### Parameters - `zone_id: str` - `auto_refresh_seconds: float` How often should a secondary zone auto refresh regardless of DNS NOTIFY. Not applicable for primary zones. - `name: str` Zone name. - `peers: SequenceNotStr[str]` A list of peer tags. ### Returns - `class IncomingUpdateResponse: …` - `id: Optional[str]` - `auto_refresh_seconds: Optional[float]` How often should a secondary zone auto refresh regardless of DNS NOTIFY. Not applicable for primary zones. - `checked_time: Optional[str]` The time for a specific event. - `created_time: Optional[str]` The time for a specific event. - `modified_time: Optional[str]` The time for a specific event. - `name: Optional[str]` Zone name. - `peers: Optional[List[str]]` A list of peer tags. - `soa_serial: Optional[float]` The serial number of the SOA for the given zone. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) incoming = client.dns.zone_transfers.incoming.update( zone_id="269d8f4853475ca241c4e730be286b20", auto_refresh_seconds=86400, name="www.example.com.", peers=["23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"], ) print(incoming.id) ``` #### 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": { "id": "269d8f4853475ca241c4e730be286b20", "auto_refresh_seconds": 86400, "checked_time": "2019-10-24T17:09:42.883908+01:00", "created_time": "2019-10-24T17:09:42.883908+01:00", "modified_time": "2019-10-24T17:09:42.883908+01:00", "name": "www.example.com.", "peers": [ "23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194" ], "soa_serial": 2019102400 } } ``` ## Delete Secondary Zone Configuration `dns.zone_transfers.incoming.delete(IncomingDeleteParams**kwargs) -> IncomingDeleteResponse` **delete** `/zones/{zone_id}/secondary_dns/incoming` Delete secondary zone configuration for incoming zone transfers. ### Parameters - `zone_id: str` ### Returns - `class IncomingDeleteResponse: …` - `id: Optional[str]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) incoming = client.dns.zone_transfers.incoming.delete( zone_id="269d8f4853475ca241c4e730be286b20", ) print(incoming.id) ``` #### 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": { "id": "269d8f4853475ca241c4e730be286b20" } } ``` ## Domain Types ### Incoming - `class Incoming: …` - `id: Optional[str]` - `auto_refresh_seconds: Optional[float]` How often should a secondary zone auto refresh regardless of DNS NOTIFY. Not applicable for primary zones. - `checked_time: Optional[str]` The time for a specific event. - `created_time: Optional[str]` The time for a specific event. - `modified_time: Optional[str]` The time for a specific event. - `name: Optional[str]` Zone name. - `peers: Optional[List[str]]` A list of peer tags. - `soa_serial: Optional[float]` The serial number of the SOA for the given zone. ### Incoming Get Response - `class IncomingGetResponse: …` - `id: Optional[str]` - `auto_refresh_seconds: Optional[float]` How often should a secondary zone auto refresh regardless of DNS NOTIFY. Not applicable for primary zones. - `checked_time: Optional[str]` The time for a specific event. - `created_time: Optional[str]` The time for a specific event. - `modified_time: Optional[str]` The time for a specific event. - `name: Optional[str]` Zone name. - `peers: Optional[List[str]]` A list of peer tags. - `soa_serial: Optional[float]` The serial number of the SOA for the given zone. ### Incoming Create Response - `class IncomingCreateResponse: …` - `id: Optional[str]` - `auto_refresh_seconds: Optional[float]` How often should a secondary zone auto refresh regardless of DNS NOTIFY. Not applicable for primary zones. - `checked_time: Optional[str]` The time for a specific event. - `created_time: Optional[str]` The time for a specific event. - `modified_time: Optional[str]` The time for a specific event. - `name: Optional[str]` Zone name. - `peers: Optional[List[str]]` A list of peer tags. - `soa_serial: Optional[float]` The serial number of the SOA for the given zone. ### Incoming Update Response - `class IncomingUpdateResponse: …` - `id: Optional[str]` - `auto_refresh_seconds: Optional[float]` How often should a secondary zone auto refresh regardless of DNS NOTIFY. Not applicable for primary zones. - `checked_time: Optional[str]` The time for a specific event. - `created_time: Optional[str]` The time for a specific event. - `modified_time: Optional[str]` The time for a specific event. - `name: Optional[str]` Zone name. - `peers: Optional[List[str]]` A list of peer tags. - `soa_serial: Optional[float]` The serial number of the SOA for the given zone. ### Incoming Delete Response - `class IncomingDeleteResponse: …` - `id: Optional[str]` # Outgoing ## Primary Zone Configuration Details `dns.zone_transfers.outgoing.get(OutgoingGetParams**kwargs) -> OutgoingGetResponse` **get** `/zones/{zone_id}/secondary_dns/outgoing` Get primary zone configuration for outgoing zone transfers. ### Parameters - `zone_id: str` ### Returns - `class OutgoingGetResponse: …` - `id: Optional[str]` - `checked_time: Optional[str]` The time for a specific event. - `created_time: Optional[str]` The time for a specific event. - `last_transferred_time: Optional[str]` The time for a specific event. - `name: Optional[str]` Zone name. - `peers: Optional[List[str]]` A list of peer tags. - `soa_serial: Optional[float]` The serial number of the SOA for the given zone. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) outgoing = client.dns.zone_transfers.outgoing.get( zone_id="269d8f4853475ca241c4e730be286b20", ) print(outgoing.id) ``` #### 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": { "id": "269d8f4853475ca241c4e730be286b20", "checked_time": "2019-10-24T17:09:42.883908+01:00", "created_time": "2019-10-24T17:09:42.883908+01:00", "last_transferred_time": "2019-10-24T17:09:42.883908+01:00", "name": "www.example.com.", "peers": [ "23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194" ], "soa_serial": 2019102400 } } ``` ## Create Primary Zone Configuration `dns.zone_transfers.outgoing.create(OutgoingCreateParams**kwargs) -> OutgoingCreateResponse` **post** `/zones/{zone_id}/secondary_dns/outgoing` Create primary zone configuration for outgoing zone transfers. ### Parameters - `zone_id: str` - `name: str` Zone name. - `peers: SequenceNotStr[str]` A list of peer tags. ### Returns - `class OutgoingCreateResponse: …` - `id: Optional[str]` - `checked_time: Optional[str]` The time for a specific event. - `created_time: Optional[str]` The time for a specific event. - `last_transferred_time: Optional[str]` The time for a specific event. - `name: Optional[str]` Zone name. - `peers: Optional[List[str]]` A list of peer tags. - `soa_serial: Optional[float]` The serial number of the SOA for the given zone. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) outgoing = client.dns.zone_transfers.outgoing.create( zone_id="269d8f4853475ca241c4e730be286b20", name="www.example.com.", peers=["23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"], ) print(outgoing.id) ``` #### 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": { "id": "269d8f4853475ca241c4e730be286b20", "checked_time": "2019-10-24T17:09:42.883908+01:00", "created_time": "2019-10-24T17:09:42.883908+01:00", "last_transferred_time": "2019-10-24T17:09:42.883908+01:00", "name": "www.example.com.", "peers": [ "23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194" ], "soa_serial": 2019102400 } } ``` ## Update Primary Zone Configuration `dns.zone_transfers.outgoing.update(OutgoingUpdateParams**kwargs) -> OutgoingUpdateResponse` **put** `/zones/{zone_id}/secondary_dns/outgoing` Update primary zone configuration for outgoing zone transfers. ### Parameters - `zone_id: str` - `name: str` Zone name. - `peers: SequenceNotStr[str]` A list of peer tags. ### Returns - `class OutgoingUpdateResponse: …` - `id: Optional[str]` - `checked_time: Optional[str]` The time for a specific event. - `created_time: Optional[str]` The time for a specific event. - `last_transferred_time: Optional[str]` The time for a specific event. - `name: Optional[str]` Zone name. - `peers: Optional[List[str]]` A list of peer tags. - `soa_serial: Optional[float]` The serial number of the SOA for the given zone. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) outgoing = client.dns.zone_transfers.outgoing.update( zone_id="269d8f4853475ca241c4e730be286b20", name="www.example.com.", peers=["23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"], ) print(outgoing.id) ``` #### 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": { "id": "269d8f4853475ca241c4e730be286b20", "checked_time": "2019-10-24T17:09:42.883908+01:00", "created_time": "2019-10-24T17:09:42.883908+01:00", "last_transferred_time": "2019-10-24T17:09:42.883908+01:00", "name": "www.example.com.", "peers": [ "23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194" ], "soa_serial": 2019102400 } } ``` ## Delete Primary Zone Configuration `dns.zone_transfers.outgoing.delete(OutgoingDeleteParams**kwargs) -> OutgoingDeleteResponse` **delete** `/zones/{zone_id}/secondary_dns/outgoing` Delete primary zone configuration for outgoing zone transfers. ### Parameters - `zone_id: str` ### Returns - `class OutgoingDeleteResponse: …` - `id: Optional[str]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) outgoing = client.dns.zone_transfers.outgoing.delete( zone_id="269d8f4853475ca241c4e730be286b20", ) print(outgoing.id) ``` #### 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": { "id": "269d8f4853475ca241c4e730be286b20" } } ``` ## Disable Outgoing Zone Transfers `dns.zone_transfers.outgoing.disable(OutgoingDisableParams**kwargs) -> DisableTransfer` **post** `/zones/{zone_id}/secondary_dns/outgoing/disable` Disable outgoing zone transfers for primary zone and clears IXFR backlog of primary zone. ### Parameters - `zone_id: str` - `body: object` ### Returns - `str` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) disable_transfer = client.dns.zone_transfers.outgoing.disable( zone_id="269d8f4853475ca241c4e730be286b20", body={}, ) print(disable_transfer) ``` #### 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": "Disabled" } ``` ## Enable Outgoing Zone Transfers `dns.zone_transfers.outgoing.enable(OutgoingEnableParams**kwargs) -> EnableTransfer` **post** `/zones/{zone_id}/secondary_dns/outgoing/enable` Enable outgoing zone transfers for primary zone. ### Parameters - `zone_id: str` - `body: object` ### Returns - `str` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) enable_transfer = client.dns.zone_transfers.outgoing.enable( zone_id="269d8f4853475ca241c4e730be286b20", body={}, ) print(enable_transfer) ``` #### 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": "Enabled" } ``` ## Force DNS NOTIFY `dns.zone_transfers.outgoing.force_notify(OutgoingForceNotifyParams**kwargs) -> OutgoingForceNotifyResponse` **post** `/zones/{zone_id}/secondary_dns/outgoing/force_notify` Notifies the secondary nameserver(s) and clears IXFR backlog of primary zone. ### Parameters - `zone_id: str` - `body: object` ### Returns - `str` When force_notify query parameter is set to true, the response is a simple string. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.dns.zone_transfers.outgoing.force_notify( zone_id="269d8f4853475ca241c4e730be286b20", body={}, ) print(response) ``` #### 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": "OK" } ``` ## Domain Types ### Disable Transfer - `str` The zone transfer status of a primary zone. ### Enable Transfer - `str` The zone transfer status of a primary zone. ### Outgoing - `class Outgoing: …` - `id: Optional[str]` - `checked_time: Optional[str]` The time for a specific event. - `created_time: Optional[str]` The time for a specific event. - `last_transferred_time: Optional[str]` The time for a specific event. - `name: Optional[str]` Zone name. - `peers: Optional[List[str]]` A list of peer tags. - `soa_serial: Optional[float]` The serial number of the SOA for the given zone. ### Outgoing Status - `Optional[str]` The zone transfer status of a primary zone. ### Outgoing Get Response - `class OutgoingGetResponse: …` - `id: Optional[str]` - `checked_time: Optional[str]` The time for a specific event. - `created_time: Optional[str]` The time for a specific event. - `last_transferred_time: Optional[str]` The time for a specific event. - `name: Optional[str]` Zone name. - `peers: Optional[List[str]]` A list of peer tags. - `soa_serial: Optional[float]` The serial number of the SOA for the given zone. ### Outgoing Create Response - `class OutgoingCreateResponse: …` - `id: Optional[str]` - `checked_time: Optional[str]` The time for a specific event. - `created_time: Optional[str]` The time for a specific event. - `last_transferred_time: Optional[str]` The time for a specific event. - `name: Optional[str]` Zone name. - `peers: Optional[List[str]]` A list of peer tags. - `soa_serial: Optional[float]` The serial number of the SOA for the given zone. ### Outgoing Update Response - `class OutgoingUpdateResponse: …` - `id: Optional[str]` - `checked_time: Optional[str]` The time for a specific event. - `created_time: Optional[str]` The time for a specific event. - `last_transferred_time: Optional[str]` The time for a specific event. - `name: Optional[str]` Zone name. - `peers: Optional[List[str]]` A list of peer tags. - `soa_serial: Optional[float]` The serial number of the SOA for the given zone. ### Outgoing Delete Response - `class OutgoingDeleteResponse: …` - `id: Optional[str]` ### Outgoing Force Notify Response - `str` When force_notify query parameter is set to true, the response is a simple string. # Status ## Get Outgoing Zone Transfer Status `dns.zone_transfers.outgoing.status.get(StatusGetParams**kwargs) -> EnableTransfer` **get** `/zones/{zone_id}/secondary_dns/outgoing/status` Get primary zone transfer status. ### Parameters - `zone_id: str` ### Returns - `str` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) enable_transfer = client.dns.zone_transfers.outgoing.status.get( zone_id="269d8f4853475ca241c4e730be286b20", ) print(enable_transfer) ``` #### 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": "Enabled" } ``` # ACLs ## List ACLs `dns.zone_transfers.acls.list(ACLListParams**kwargs) -> SyncSinglePage[ACL]` **get** `/accounts/{account_id}/secondary_dns/acls` List ACLs. ### Parameters - `account_id: str` ### Returns - `class ACL: …` - `id: str` - `ip_range: str` Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively. - `name: str` The name of the acl. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) page = client.dns.zone_transfers.acls.list( account_id="01a7362d577a6c3019a474fd6f485823", ) page = page.result[0] print(page.id) ``` #### 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": [ { "id": "23ff594956f20c2a721606e94745a8aa", "ip_range": "192.0.2.53/28", "name": "my-acl-1" } ], "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000, "total_pages": 100 } } ``` ## ACL Details `dns.zone_transfers.acls.get(stracl_id, ACLGetParams**kwargs) -> ACL` **get** `/accounts/{account_id}/secondary_dns/acls/{acl_id}` Get ACL. ### Parameters - `account_id: str` - `acl_id: str` ### Returns - `class ACL: …` - `id: str` - `ip_range: str` Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively. - `name: str` The name of the acl. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) acl = client.dns.zone_transfers.acls.get( acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) print(acl.id) ``` #### 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": { "id": "23ff594956f20c2a721606e94745a8aa", "ip_range": "192.0.2.53/28", "name": "my-acl-1" } } ``` ## Create ACL `dns.zone_transfers.acls.create(ACLCreateParams**kwargs) -> ACL` **post** `/accounts/{account_id}/secondary_dns/acls` Create ACL. ### Parameters - `account_id: str` - `ip_range: str` Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively. - `name: str` The name of the acl. ### Returns - `class ACL: …` - `id: str` - `ip_range: str` Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively. - `name: str` The name of the acl. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) acl = client.dns.zone_transfers.acls.create( account_id="01a7362d577a6c3019a474fd6f485823", ip_range="192.0.2.53/28", name="my-acl-1", ) print(acl.id) ``` #### 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": { "id": "23ff594956f20c2a721606e94745a8aa", "ip_range": "192.0.2.53/28", "name": "my-acl-1" } } ``` ## Update ACL `dns.zone_transfers.acls.update(stracl_id, ACLUpdateParams**kwargs) -> ACL` **put** `/accounts/{account_id}/secondary_dns/acls/{acl_id}` Modify ACL. ### Parameters - `account_id: str` - `acl_id: str` - `ip_range: str` Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively. - `name: str` The name of the acl. ### Returns - `class ACL: …` - `id: str` - `ip_range: str` Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively. - `name: str` The name of the acl. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) acl = client.dns.zone_transfers.acls.update( acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ip_range="192.0.2.53/28", name="my-acl-1", ) print(acl.id) ``` #### 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": { "id": "23ff594956f20c2a721606e94745a8aa", "ip_range": "192.0.2.53/28", "name": "my-acl-1" } } ``` ## Delete ACL `dns.zone_transfers.acls.delete(stracl_id, ACLDeleteParams**kwargs) -> ACLDeleteResponse` **delete** `/accounts/{account_id}/secondary_dns/acls/{acl_id}` Delete ACL. ### Parameters - `account_id: str` - `acl_id: str` ### Returns - `class ACLDeleteResponse: …` - `id: Optional[str]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) acl = client.dns.zone_transfers.acls.delete( acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) print(acl.id) ``` #### 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": { "id": "23ff594956f20c2a721606e94745a8aa" } } ``` ## Domain Types ### ACL - `class ACL: …` - `id: str` - `ip_range: str` Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively. - `name: str` The name of the acl. ### ACL Delete Response - `class ACLDeleteResponse: …` - `id: Optional[str]` # Peers ## List Peers `dns.zone_transfers.peers.list(PeerListParams**kwargs) -> SyncSinglePage[Peer]` **get** `/accounts/{account_id}/secondary_dns/peers` List Peers. ### Parameters - `account_id: str` ### Returns - `class Peer: …` - `id: str` - `name: str` The name of the peer. - `ip: Optional[str]` IPv4/IPv6 address of primary or secondary nameserver, depending on what zone this peer is linked to. For primary zones this IP defines the IP of the secondary nameserver Cloudflare will NOTIFY upon zone changes. For secondary zones this IP defines the IP of the primary nameserver Cloudflare will send AXFR/IXFR requests to. - `ixfr_enable: Optional[bool]` Enable IXFR transfer protocol, default is AXFR. Only applicable to secondary zones. - `port: Optional[float]` DNS port of primary or secondary nameserver, depending on what zone this peer is linked to. - `tsig_id: Optional[str]` TSIG authentication will be used for zone transfer if configured. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) page = client.dns.zone_transfers.peers.list( account_id="01a7362d577a6c3019a474fd6f485823", ) page = page.result[0] print(page.id) ``` #### 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": [ { "id": "23ff594956f20c2a721606e94745a8aa", "name": "my-peer-1", "ip": "192.0.2.53", "ixfr_enable": false, "port": 53, "tsig_id": "69cd1e104af3e6ed3cb344f263fd0d5a" } ], "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000, "total_pages": 100 } } ``` ## Peer Details `dns.zone_transfers.peers.get(strpeer_id, PeerGetParams**kwargs) -> Peer` **get** `/accounts/{account_id}/secondary_dns/peers/{peer_id}` Get Peer. ### Parameters - `account_id: str` - `peer_id: str` ### Returns - `class Peer: …` - `id: str` - `name: str` The name of the peer. - `ip: Optional[str]` IPv4/IPv6 address of primary or secondary nameserver, depending on what zone this peer is linked to. For primary zones this IP defines the IP of the secondary nameserver Cloudflare will NOTIFY upon zone changes. For secondary zones this IP defines the IP of the primary nameserver Cloudflare will send AXFR/IXFR requests to. - `ixfr_enable: Optional[bool]` Enable IXFR transfer protocol, default is AXFR. Only applicable to secondary zones. - `port: Optional[float]` DNS port of primary or secondary nameserver, depending on what zone this peer is linked to. - `tsig_id: Optional[str]` TSIG authentication will be used for zone transfer if configured. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) peer = client.dns.zone_transfers.peers.get( peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) print(peer.id) ``` #### 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": { "id": "23ff594956f20c2a721606e94745a8aa", "name": "my-peer-1", "ip": "192.0.2.53", "ixfr_enable": false, "port": 53, "tsig_id": "69cd1e104af3e6ed3cb344f263fd0d5a" } } ``` ## Create Peer `dns.zone_transfers.peers.create(PeerCreateParams**kwargs) -> Peer` **post** `/accounts/{account_id}/secondary_dns/peers` Create Peer. ### Parameters - `account_id: str` - `name: str` The name of the peer. ### Returns - `class Peer: …` - `id: str` - `name: str` The name of the peer. - `ip: Optional[str]` IPv4/IPv6 address of primary or secondary nameserver, depending on what zone this peer is linked to. For primary zones this IP defines the IP of the secondary nameserver Cloudflare will NOTIFY upon zone changes. For secondary zones this IP defines the IP of the primary nameserver Cloudflare will send AXFR/IXFR requests to. - `ixfr_enable: Optional[bool]` Enable IXFR transfer protocol, default is AXFR. Only applicable to secondary zones. - `port: Optional[float]` DNS port of primary or secondary nameserver, depending on what zone this peer is linked to. - `tsig_id: Optional[str]` TSIG authentication will be used for zone transfer if configured. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) peer = client.dns.zone_transfers.peers.create( account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ) print(peer.id) ``` #### 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": { "id": "23ff594956f20c2a721606e94745a8aa", "name": "my-peer-1", "ip": "192.0.2.53", "ixfr_enable": false, "port": 53, "tsig_id": "69cd1e104af3e6ed3cb344f263fd0d5a" } } ``` ## Update Peer `dns.zone_transfers.peers.update(strpeer_id, PeerUpdateParams**kwargs) -> Peer` **put** `/accounts/{account_id}/secondary_dns/peers/{peer_id}` Modify Peer. ### Parameters - `account_id: str` - `peer_id: str` - `name: str` The name of the peer. - `ip: Optional[str]` IPv4/IPv6 address of primary or secondary nameserver, depending on what zone this peer is linked to. For primary zones this IP defines the IP of the secondary nameserver Cloudflare will NOTIFY upon zone changes. For secondary zones this IP defines the IP of the primary nameserver Cloudflare will send AXFR/IXFR requests to. - `ixfr_enable: Optional[bool]` Enable IXFR transfer protocol, default is AXFR. Only applicable to secondary zones. - `port: Optional[float]` DNS port of primary or secondary nameserver, depending on what zone this peer is linked to. - `tsig_id: Optional[str]` TSIG authentication will be used for zone transfer if configured. ### Returns - `class Peer: …` - `id: str` - `name: str` The name of the peer. - `ip: Optional[str]` IPv4/IPv6 address of primary or secondary nameserver, depending on what zone this peer is linked to. For primary zones this IP defines the IP of the secondary nameserver Cloudflare will NOTIFY upon zone changes. For secondary zones this IP defines the IP of the primary nameserver Cloudflare will send AXFR/IXFR requests to. - `ixfr_enable: Optional[bool]` Enable IXFR transfer protocol, default is AXFR. Only applicable to secondary zones. - `port: Optional[float]` DNS port of primary or secondary nameserver, depending on what zone this peer is linked to. - `tsig_id: Optional[str]` TSIG authentication will be used for zone transfer if configured. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) peer = client.dns.zone_transfers.peers.update( peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ) print(peer.id) ``` #### 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": { "id": "23ff594956f20c2a721606e94745a8aa", "name": "my-peer-1", "ip": "192.0.2.53", "ixfr_enable": false, "port": 53, "tsig_id": "69cd1e104af3e6ed3cb344f263fd0d5a" } } ``` ## Delete Peer `dns.zone_transfers.peers.delete(strpeer_id, PeerDeleteParams**kwargs) -> PeerDeleteResponse` **delete** `/accounts/{account_id}/secondary_dns/peers/{peer_id}` Delete Peer. ### Parameters - `account_id: str` - `peer_id: str` ### Returns - `class PeerDeleteResponse: …` - `id: Optional[str]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) peer = client.dns.zone_transfers.peers.delete( peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) print(peer.id) ``` #### 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": { "id": "23ff594956f20c2a721606e94745a8aa" } } ``` ## Domain Types ### Peer - `class Peer: …` - `id: str` - `name: str` The name of the peer. - `ip: Optional[str]` IPv4/IPv6 address of primary or secondary nameserver, depending on what zone this peer is linked to. For primary zones this IP defines the IP of the secondary nameserver Cloudflare will NOTIFY upon zone changes. For secondary zones this IP defines the IP of the primary nameserver Cloudflare will send AXFR/IXFR requests to. - `ixfr_enable: Optional[bool]` Enable IXFR transfer protocol, default is AXFR. Only applicable to secondary zones. - `port: Optional[float]` DNS port of primary or secondary nameserver, depending on what zone this peer is linked to. - `tsig_id: Optional[str]` TSIG authentication will be used for zone transfer if configured. ### Peer Delete Response - `class PeerDeleteResponse: …` - `id: Optional[str]` # TSIGs ## List TSIGs `dns.zone_transfers.tsigs.list(TSIGListParams**kwargs) -> SyncSinglePage[TSIG]` **get** `/accounts/{account_id}/secondary_dns/tsigs` List TSIGs. ### Parameters - `account_id: str` ### Returns - `class TSIG: …` - `id: str` - `algo: str` TSIG algorithm. - `name: str` TSIG key name. - `secret: str` TSIG secret. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) page = client.dns.zone_transfers.tsigs.list( account_id="01a7362d577a6c3019a474fd6f485823", ) page = page.result[0] print(page.id) ``` #### 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": [ { "id": "69cd1e104af3e6ed3cb344f263fd0d5a", "algo": "hmac-sha512.", "name": "tsig.customer.cf.", "secret": "caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c" } ], "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000, "total_pages": 100 } } ``` ## TSIG Details `dns.zone_transfers.tsigs.get(strtsig_id, TSIGGetParams**kwargs) -> TSIG` **get** `/accounts/{account_id}/secondary_dns/tsigs/{tsig_id}` Get TSIG. ### Parameters - `account_id: str` - `tsig_id: str` ### Returns - `class TSIG: …` - `id: str` - `algo: str` TSIG algorithm. - `name: str` TSIG key name. - `secret: str` TSIG secret. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) tsig = client.dns.zone_transfers.tsigs.get( tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) print(tsig.id) ``` #### 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": { "id": "69cd1e104af3e6ed3cb344f263fd0d5a", "algo": "hmac-sha512.", "name": "tsig.customer.cf.", "secret": "caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c" } } ``` ## Create TSIG `dns.zone_transfers.tsigs.create(TSIGCreateParams**kwargs) -> TSIG` **post** `/accounts/{account_id}/secondary_dns/tsigs` Create TSIG. ### Parameters - `account_id: str` - `algo: str` TSIG algorithm. - `name: str` TSIG key name. - `secret: str` TSIG secret. ### Returns - `class TSIG: …` - `id: str` - `algo: str` TSIG algorithm. - `name: str` TSIG key name. - `secret: str` TSIG secret. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) tsig = client.dns.zone_transfers.tsigs.create( account_id="01a7362d577a6c3019a474fd6f485823", algo="hmac-sha512.", name="tsig.customer.cf.", secret="caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c", ) print(tsig.id) ``` #### 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": { "id": "69cd1e104af3e6ed3cb344f263fd0d5a", "algo": "hmac-sha512.", "name": "tsig.customer.cf.", "secret": "caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c" } } ``` ## Update TSIG `dns.zone_transfers.tsigs.update(strtsig_id, TSIGUpdateParams**kwargs) -> TSIG` **put** `/accounts/{account_id}/secondary_dns/tsigs/{tsig_id}` Modify TSIG. ### Parameters - `account_id: str` - `tsig_id: str` - `algo: str` TSIG algorithm. - `name: str` TSIG key name. - `secret: str` TSIG secret. ### Returns - `class TSIG: …` - `id: str` - `algo: str` TSIG algorithm. - `name: str` TSIG key name. - `secret: str` TSIG secret. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) tsig = client.dns.zone_transfers.tsigs.update( tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", algo="hmac-sha512.", name="tsig.customer.cf.", secret="caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c", ) print(tsig.id) ``` #### 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": { "id": "69cd1e104af3e6ed3cb344f263fd0d5a", "algo": "hmac-sha512.", "name": "tsig.customer.cf.", "secret": "caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c" } } ``` ## Delete TSIG `dns.zone_transfers.tsigs.delete(strtsig_id, TSIGDeleteParams**kwargs) -> TSIGDeleteResponse` **delete** `/accounts/{account_id}/secondary_dns/tsigs/{tsig_id}` Delete TSIG. ### Parameters - `account_id: str` - `tsig_id: str` ### Returns - `class TSIGDeleteResponse: …` - `id: Optional[str]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) tsig = client.dns.zone_transfers.tsigs.delete( tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) print(tsig.id) ``` #### 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": { "id": "69cd1e104af3e6ed3cb344f263fd0d5a" } } ``` ## Domain Types ### TSIG - `class TSIG: …` - `id: str` - `algo: str` TSIG algorithm. - `name: str` TSIG key name. - `secret: str` TSIG secret. ### TSIG Delete Response - `class TSIGDeleteResponse: …` - `id: Optional[str]`