cloudflare
Version:
The official TypeScript library for the Cloudflare API
1,606 lines • 330 kB
TypeScript
import { APIResource } from "../../resource.js";
import * as Core from "../../core.js";
import * as RecordsAPI from "./records.js";
import * as Shared from "../shared.js";
import { SinglePage, V4PagePaginationArray, type V4PagePaginationArrayParams } from "../../pagination.js";
export declare class Records extends APIResource {
/**
* 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.
*
* @example
* ```ts
* const recordResponse = await client.dns.records.create({
* zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
* name: 'example.com',
* ttl: 3600,
* type: 'A',
* });
* ```
*/
create(params: RecordCreateParams, options?: Core.RequestOptions): Core.APIPromise<RecordResponse>;
/**
* 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.
*
* @example
* ```ts
* const recordResponse = await client.dns.records.update(
* '023e105f4ecef8ad9ca31a8372d0c353',
* {
* zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
* name: 'example.com',
* ttl: 3600,
* type: 'A',
* },
* );
* ```
*/
update(dnsRecordId: string, params: RecordUpdateParams, options?: Core.RequestOptions): Core.APIPromise<RecordResponse>;
/**
* List, search, sort, and filter a zones' DNS records.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const recordResponse of client.dns.records.list({
* zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
* })) {
* // ...
* }
* ```
*/
list(params: RecordListParams, options?: Core.RequestOptions): Core.PagePromise<RecordResponsesV4PagePaginationArray, RecordResponse>;
/**
* Delete DNS Record
*
* @example
* ```ts
* const record = await client.dns.records.delete(
* '023e105f4ecef8ad9ca31a8372d0c353',
* { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
*/
delete(dnsRecordId: string, params: RecordDeleteParams, options?: Core.RequestOptions): Core.APIPromise<RecordDeleteResponse>;
/**
* 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
*
* @example
* ```ts
* const response = await client.dns.records.batch({
* zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
* });
* ```
*/
batch(params: RecordBatchParams, options?: Core.RequestOptions): Core.APIPromise<RecordBatchResponse>;
/**
* 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.
*
* @example
* ```ts
* const recordResponse = await client.dns.records.edit(
* '023e105f4ecef8ad9ca31a8372d0c353',
* {
* zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
* name: 'example.com',
* ttl: 3600,
* type: 'A',
* },
* );
* ```
*/
edit(dnsRecordId: string, params: RecordEditParams, options?: Core.RequestOptions): Core.APIPromise<RecordResponse>;
/**
* 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.
*
* @example
* ```ts
* const response = await client.dns.records.export({
* zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
* });
* ```
*/
export(params: RecordExportParams, options?: Core.RequestOptions): Core.APIPromise<string>;
/**
* DNS Record Details
*
* @example
* ```ts
* const recordResponse = await client.dns.records.get(
* '023e105f4ecef8ad9ca31a8372d0c353',
* { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
*/
get(dnsRecordId: string, params: RecordGetParams, options?: Core.RequestOptions): Core.APIPromise<RecordResponse>;
/**
* 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.
*
* @example
* ```ts
* const response = await client.dns.records.import({
* zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
* file: 'www.example.com. 300 IN A 127.0.0.1',
* });
* ```
*/
import(params: RecordImportParams, options?: Core.RequestOptions): Core.APIPromise<RecordImportResponse>;
/**
* Scan for common DNS records on your domain and automatically add them to your
* zone. Useful if you haven't updated your nameservers yet.
*
* @deprecated This endpoint is deprecated in favor of a new asynchronous version. Please use the [/scan/trigger](https://developers.cloudflare.com/api/resources/dns/subresources/records/methods/scan/trigger) and [/scan/review](https://developers.cloudflare.com/api/resources/dns/subresources/records/methods/scan/review) endpoints instead.
*/
scan(params: RecordScanParams, options?: Core.RequestOptions): Core.APIPromise<RecordScanResponse>;
/**
* 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.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const recordResponse of client.dns.records.scanList(
* { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* )) {
* // ...
* }
* ```
*/
scanList(params: RecordScanListParams, options?: Core.RequestOptions): Core.PagePromise<RecordResponsesSinglePage, RecordResponse>;
/**
* 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.
*
* @example
* ```ts
* const response = await client.dns.records.scanReview({
* zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
* });
* ```
*/
scanReview(params: RecordScanReviewParams, options?: Core.RequestOptions): Core.APIPromise<RecordScanReviewResponse>;
/**
* 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.
*
* @example
* ```ts
* const response = await client.dns.records.scanTrigger({
* zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
* });
* ```
*/
scanTrigger(params: RecordScanTriggerParams, options?: Core.RequestOptions): Core.APIPromise<RecordScanTriggerResponse>;
}
export declare class RecordResponsesV4PagePaginationArray extends V4PagePaginationArray<RecordResponse> {
}
export declare class RecordResponsesSinglePage extends SinglePage<RecordResponse> {
}
export interface ARecord {
/**
* Complete DNS record name, including the zone name, in Punycode.
*/
name: string;
/**
* Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
* Value must be between 60 and 86400, with the minimum reduced to 30 for
* Enterprise zones.
*/
ttl: TTL;
/**
* Record type.
*/
type: 'A';
/**
* Comments or notes about the DNS record. This field has no effect on DNS
* responses.
*/
comment?: string;
/**
* A valid IPv4 address.
*/
content?: string;
/**
* Whether the record is receiving the performance and security benefits of
* Cloudflare.
*/
proxied?: boolean;
/**
* Settings for the DNS record.
*/
settings?: ARecord.Settings;
/**
* Custom tags for the DNS record. This field has no effect on DNS responses.
*/
tags?: Array<RecordTags>;
}
export declare namespace ARecord {
/**
* Settings for the DNS record.
*/
interface Settings {
/**
* 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.
*/
ipv4_only?: boolean;
/**
* 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.
*/
ipv6_only?: boolean;
}
}
export interface ARecordParam {
/**
* Complete DNS record name, including the zone name, in Punycode.
*/
name: string;
/**
* Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
* Value must be between 60 and 86400, with the minimum reduced to 30 for
* Enterprise zones.
*/
ttl: TTLParam;
/**
* Record type.
*/
type: 'A';
/**
* Comments or notes about the DNS record. This field has no effect on DNS
* responses.
*/
comment?: string;
/**
* A valid IPv4 address.
*/
content?: string;
/**
* Whether the record is receiving the performance and security benefits of
* Cloudflare.
*/
proxied?: boolean;
/**
* Settings for the DNS record.
*/
settings?: ARecordParam.Settings;
/**
* Custom tags for the DNS record. This field has no effect on DNS responses.
*/
tags?: Array<RecordTagsParam>;
}
export declare namespace ARecordParam {
/**
* Settings for the DNS record.
*/
interface Settings {
/**
* 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.
*/
ipv4_only?: boolean;
/**
* 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.
*/
ipv6_only?: boolean;
}
}
export interface AAAARecord {
/**
* Complete DNS record name, including the zone name, in Punycode.
*/
name: string;
/**
* Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
* Value must be between 60 and 86400, with the minimum reduced to 30 for
* Enterprise zones.
*/
ttl: TTL;
/**
* Record type.
*/
type: 'AAAA';
/**
* Comments or notes about the DNS record. This field has no effect on DNS
* responses.
*/
comment?: string;
/**
* A valid IPv6 address.
*/
content?: string;
/**
* Whether the record is receiving the performance and security benefits of
* Cloudflare.
*/
proxied?: boolean;
/**
* Settings for the DNS record.
*/
settings?: AAAARecord.Settings;
/**
* Custom tags for the DNS record. This field has no effect on DNS responses.
*/
tags?: Array<RecordTags>;
}
export declare namespace AAAARecord {
/**
* Settings for the DNS record.
*/
interface Settings {
/**
* 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.
*/
ipv4_only?: boolean;
/**
* 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.
*/
ipv6_only?: boolean;
}
}
export interface AAAARecordParam {
/**
* Complete DNS record name, including the zone name, in Punycode.
*/
name: string;
/**
* Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
* Value must be between 60 and 86400, with the minimum reduced to 30 for
* Enterprise zones.
*/
ttl: TTLParam;
/**
* Record type.
*/
type: 'AAAA';
/**
* Comments or notes about the DNS record. This field has no effect on DNS
* responses.
*/
comment?: string;
/**
* A valid IPv6 address.
*/
content?: string;
/**
* Whether the record is receiving the performance and security benefits of
* Cloudflare.
*/
proxied?: boolean;
/**
* Settings for the DNS record.
*/
settings?: AAAARecordParam.Settings;
/**
* Custom tags for the DNS record. This field has no effect on DNS responses.
*/
tags?: Array<RecordTagsParam>;
}
export declare namespace AAAARecordParam {
/**
* Settings for the DNS record.
*/
interface Settings {
/**
* 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.
*/
ipv4_only?: boolean;
/**
* 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.
*/
ipv6_only?: boolean;
}
}
export type BatchPatch = BatchPatch.ARecord | BatchPatch.AAAARecord | BatchPatch.CNAMERecord | BatchPatch.MXRecord | BatchPatch.NSRecord | BatchPatch.OpenpgpkeyRecord | BatchPatch.PTRRecord | BatchPatch.TXTRecord | BatchPatch.CAARecord | BatchPatch.CERTRecord | BatchPatch.DNSKEYRecord | BatchPatch.DSRecord | BatchPatch.HTTPSRecord | BatchPatch.LOCRecord | BatchPatch.NAPTRRecord | BatchPatch.SMIMEARecord | BatchPatch.SRVRecord | BatchPatch.SSHFPRecord | BatchPatch.SVCBRecord | BatchPatch.TLSARecord | BatchPatch.URIRecord;
export declare namespace BatchPatch {
interface ARecord extends RecordsAPI.ARecord {
/**
* Identifier.
*/
id: string;
}
interface AAAARecord extends RecordsAPI.AAAARecord {
/**
* Identifier.
*/
id: string;
}
interface CNAMERecord extends RecordsAPI.CNAMERecord {
/**
* Identifier.
*/
id: string;
}
interface MXRecord extends RecordsAPI.MXRecord {
/**
* Identifier.
*/
id: string;
}
interface NSRecord extends RecordsAPI.NSRecord {
/**
* Identifier.
*/
id: string;
}
interface OpenpgpkeyRecord {
/**
* Identifier.
*/
id: string;
/**
* Complete DNS record name, including the zone name, in Punycode.
*/
name: string;
/**
* Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
* Value must be between 60 and 86400, with the minimum reduced to 30 for
* Enterprise zones.
*/
ttl: RecordsAPI.TTL;
/**
* Record type.
*/
type: 'OPENPGPKEY';
/**
* Comments or notes about the DNS record. This field has no effect on DNS
* responses.
*/
comment?: string;
/**
* A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1)
*/
content?: string;
/**
* Whether the record is receiving the performance and security benefits of
* Cloudflare.
*/
proxied?: boolean;
/**
* Settings for the DNS record.
*/
settings?: OpenpgpkeyRecord.Settings;
/**
* Custom tags for the DNS record. This field has no effect on DNS responses.
*/
tags?: Array<RecordsAPI.RecordTags>;
}
namespace OpenpgpkeyRecord {
/**
* Settings for the DNS record.
*/
interface Settings {
/**
* 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.
*/
ipv4_only?: boolean;
/**
* 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.
*/
ipv6_only?: boolean;
}
}
interface PTRRecord extends RecordsAPI.PTRRecord {
/**
* Identifier.
*/
id: string;
}
interface TXTRecord extends RecordsAPI.TXTRecord {
/**
* Identifier.
*/
id: string;
}
interface CAARecord extends RecordsAPI.CAARecord {
/**
* Identifier.
*/
id: string;
}
interface CERTRecord extends RecordsAPI.CERTRecord {
/**
* Identifier.
*/
id: string;
}
interface DNSKEYRecord extends RecordsAPI.DNSKEYRecord {
/**
* Identifier.
*/
id: string;
}
interface DSRecord extends RecordsAPI.DSRecord {
/**
* Identifier.
*/
id: string;
}
interface HTTPSRecord extends RecordsAPI.HTTPSRecord {
/**
* Identifier.
*/
id: string;
}
interface LOCRecord extends RecordsAPI.LOCRecord {
/**
* Identifier.
*/
id: string;
}
interface NAPTRRecord extends RecordsAPI.NAPTRRecord {
/**
* Identifier.
*/
id: string;
}
interface SMIMEARecord extends RecordsAPI.SMIMEARecord {
/**
* Identifier.
*/
id: string;
}
interface SRVRecord extends RecordsAPI.SRVRecord {
/**
* Identifier.
*/
id: string;
}
interface SSHFPRecord extends RecordsAPI.SSHFPRecord {
/**
* Identifier.
*/
id: string;
}
interface SVCBRecord extends RecordsAPI.SVCBRecord {
/**
* Identifier.
*/
id: string;
}
interface TLSARecord extends RecordsAPI.TLSARecord {
/**
* Identifier.
*/
id: string;
}
interface URIRecord extends RecordsAPI.URIRecord {
/**
* Identifier.
*/
id: string;
}
}
export type BatchPatchParam = BatchPatchParam.ARecord | BatchPatchParam.AAAARecord | BatchPatchParam.CNAMERecord | BatchPatchParam.MXRecord | BatchPatchParam.NSRecord | BatchPatchParam.OpenpgpkeyRecord | BatchPatchParam.PTRRecord | BatchPatchParam.TXTRecord | BatchPatchParam.CAARecord | BatchPatchParam.CERTRecord | BatchPatchParam.DNSKEYRecord | BatchPatchParam.DSRecord | BatchPatchParam.HTTPSRecord | BatchPatchParam.LOCRecord | BatchPatchParam.NAPTRRecord | BatchPatchParam.SMIMEARecord | BatchPatchParam.SRVRecord | BatchPatchParam.SSHFPRecord | BatchPatchParam.SVCBRecord | BatchPatchParam.TLSARecord | BatchPatchParam.URIRecord;
export declare namespace BatchPatchParam {
interface ARecord extends RecordsAPI.ARecordParam {
/**
* Identifier.
*/
id: string;
}
interface AAAARecord extends RecordsAPI.AAAARecordParam {
/**
* Identifier.
*/
id: string;
}
interface CNAMERecord extends RecordsAPI.CNAMERecordParam {
/**
* Identifier.
*/
id: string;
}
interface MXRecord extends RecordsAPI.MXRecordParam {
/**
* Identifier.
*/
id: string;
}
interface NSRecord extends RecordsAPI.NSRecordParam {
/**
* Identifier.
*/
id: string;
}
interface OpenpgpkeyRecord {
/**
* Identifier.
*/
id: string;
/**
* Complete DNS record name, including the zone name, in Punycode.
*/
name: string;
/**
* Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
* Value must be between 60 and 86400, with the minimum reduced to 30 for
* Enterprise zones.
*/
ttl: RecordsAPI.TTLParam;
/**
* Record type.
*/
type: 'OPENPGPKEY';
/**
* Comments or notes about the DNS record. This field has no effect on DNS
* responses.
*/
comment?: string;
/**
* A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1)
*/
content?: string;
/**
* Whether the record is receiving the performance and security benefits of
* Cloudflare.
*/
proxied?: boolean;
/**
* Settings for the DNS record.
*/
settings?: OpenpgpkeyRecord.Settings;
/**
* Custom tags for the DNS record. This field has no effect on DNS responses.
*/
tags?: Array<RecordsAPI.RecordTagsParam>;
}
namespace OpenpgpkeyRecord {
/**
* Settings for the DNS record.
*/
interface Settings {
/**
* 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.
*/
ipv4_only?: boolean;
/**
* 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.
*/
ipv6_only?: boolean;
}
}
interface PTRRecord extends RecordsAPI.PTRRecordParam {
/**
* Identifier.
*/
id: string;
}
interface TXTRecord extends RecordsAPI.TXTRecordParam {
/**
* Identifier.
*/
id: string;
}
interface CAARecord extends RecordsAPI.CAARecordParam {
/**
* Identifier.
*/
id: string;
}
interface CERTRecord extends RecordsAPI.CERTRecordParam {
/**
* Identifier.
*/
id: string;
}
interface DNSKEYRecord extends RecordsAPI.DNSKEYRecordParam {
/**
* Identifier.
*/
id: string;
}
interface DSRecord extends RecordsAPI.DSRecordParam {
/**
* Identifier.
*/
id: string;
}
interface HTTPSRecord extends RecordsAPI.HTTPSRecordParam {
/**
* Identifier.
*/
id: string;
}
interface LOCRecord extends RecordsAPI.LOCRecordParam {
/**
* Identifier.
*/
id: string;
}
interface NAPTRRecord extends RecordsAPI.NAPTRRecordParam {
/**
* Identifier.
*/
id: string;
}
interface SMIMEARecord extends RecordsAPI.SMIMEARecordParam {
/**
* Identifier.
*/
id: string;
}
interface SRVRecord extends RecordsAPI.SRVRecordParam {
/**
* Identifier.
*/
id: string;
}
interface SSHFPRecord extends RecordsAPI.SSHFPRecordParam {
/**
* Identifier.
*/
id: string;
}
interface SVCBRecord extends RecordsAPI.SVCBRecordParam {
/**
* Identifier.
*/
id: string;
}
interface TLSARecord extends RecordsAPI.TLSARecordParam {
/**
* Identifier.
*/
id: string;
}
interface URIRecord extends RecordsAPI.URIRecordParam {
/**
* Identifier.
*/
id: string;
}
}
export type BatchPut = BatchPut.ARecord | BatchPut.AAAARecord | BatchPut.CNAMERecord | BatchPut.MXRecord | BatchPut.NSRecord | BatchPut.OpenpgpkeyRecord | BatchPut.PTRRecord | BatchPut.TXTRecord | BatchPut.CAARecord | BatchPut.CERTRecord | BatchPut.DNSKEYRecord | BatchPut.DSRecord | BatchPut.HTTPSRecord | BatchPut.LOCRecord | BatchPut.NAPTRRecord | BatchPut.SMIMEARecord | BatchPut.SRVRecord | BatchPut.SSHFPRecord | BatchPut.SVCBRecord | BatchPut.TLSARecord | BatchPut.URIRecord;
export declare namespace BatchPut {
interface ARecord extends RecordsAPI.ARecord {
/**
* Identifier.
*/
id: string;
}
interface AAAARecord extends RecordsAPI.AAAARecord {
/**
* Identifier.
*/
id: string;
}
interface CNAMERecord extends RecordsAPI.CNAMERecord {
/**
* Identifier.
*/
id: string;
}
interface MXRecord extends RecordsAPI.MXRecord {
/**
* Identifier.
*/
id: string;
}
interface NSRecord extends RecordsAPI.NSRecord {
/**
* Identifier.
*/
id: string;
}
interface OpenpgpkeyRecord {
/**
* Identifier.
*/
id: string;
/**
* Complete DNS record name, including the zone name, in Punycode.
*/
name: string;
/**
* Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
* Value must be between 60 and 86400, with the minimum reduced to 30 for
* Enterprise zones.
*/
ttl: RecordsAPI.TTL;
/**
* Record type.
*/
type: 'OPENPGPKEY';
/**
* Comments or notes about the DNS record. This field has no effect on DNS
* responses.
*/
comment?: string;
/**
* A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1)
*/
content?: string;
/**
* Whether the record is receiving the performance and security benefits of
* Cloudflare.
*/
proxied?: boolean;
/**
* Settings for the DNS record.
*/
settings?: OpenpgpkeyRecord.Settings;
/**
* Custom tags for the DNS record. This field has no effect on DNS responses.
*/
tags?: Array<RecordsAPI.RecordTags>;
}
namespace OpenpgpkeyRecord {
/**
* Settings for the DNS record.
*/
interface Settings {
/**
* 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.
*/
ipv4_only?: boolean;
/**
* 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.
*/
ipv6_only?: boolean;
}
}
interface PTRRecord extends RecordsAPI.PTRRecord {
/**
* Identifier.
*/
id: string;
}
interface TXTRecord extends RecordsAPI.TXTRecord {
/**
* Identifier.
*/
id: string;
}
interface CAARecord extends RecordsAPI.CAARecord {
/**
* Identifier.
*/
id: string;
}
interface CERTRecord extends RecordsAPI.CERTRecord {
/**
* Identifier.
*/
id: string;
}
interface DNSKEYRecord extends RecordsAPI.DNSKEYRecord {
/**
* Identifier.
*/
id: string;
}
interface DSRecord extends RecordsAPI.DSRecord {
/**
* Identifier.
*/
id: string;
}
interface HTTPSRecord extends RecordsAPI.HTTPSRecord {
/**
* Identifier.
*/
id: string;
}
interface LOCRecord extends RecordsAPI.LOCRecord {
/**
* Identifier.
*/
id: string;
}
interface NAPTRRecord extends RecordsAPI.NAPTRRecord {
/**
* Identifier.
*/
id: string;
}
interface SMIMEARecord extends RecordsAPI.SMIMEARecord {
/**
* Identifier.
*/
id: string;
}
interface SRVRecord extends RecordsAPI.SRVRecord {
/**
* Identifier.
*/
id: string;
}
interface SSHFPRecord extends RecordsAPI.SSHFPRecord {
/**
* Identifier.
*/
id: string;
}
interface SVCBRecord extends RecordsAPI.SVCBRecord {
/**
* Identifier.
*/
id: string;
}
interface TLSARecord extends RecordsAPI.TLSARecord {
/**
* Identifier.
*/
id: string;
}
interface URIRecord extends RecordsAPI.URIRecord {
/**
* Identifier.
*/
id: string;
}
}
export type BatchPutParam = BatchPutParam.ARecord | BatchPutParam.AAAARecord | BatchPutParam.CNAMERecord | BatchPutParam.MXRecord | BatchPutParam.NSRecord | BatchPutParam.OpenpgpkeyRecord | BatchPutParam.PTRRecord | BatchPutParam.TXTRecord | BatchPutParam.CAARecord | BatchPutParam.CERTRecord | BatchPutParam.DNSKEYRecord | BatchPutParam.DSRecord | BatchPutParam.HTTPSRecord | BatchPutParam.LOCRecord | BatchPutParam.NAPTRRecord | BatchPutParam.SMIMEARecord | BatchPutParam.SRVRecord | BatchPutParam.SSHFPRecord | BatchPutParam.SVCBRecord | BatchPutParam.TLSARecord | BatchPutParam.URIRecord;
export declare namespace BatchPutParam {
interface ARecord extends RecordsAPI.ARecordParam {
/**
* Identifier.
*/
id: string;
}
interface AAAARecord extends RecordsAPI.AAAARecordParam {
/**
* Identifier.
*/
id: string;
}
interface CNAMERecord extends RecordsAPI.CNAMERecordParam {
/**
* Identifier.
*/
id: string;
}
interface MXRecord extends RecordsAPI.MXRecordParam {
/**
* Identifier.
*/
id: string;
}
interface NSRecord extends RecordsAPI.NSRecordParam {
/**
* Identifier.
*/
id: string;
}
interface OpenpgpkeyRecord {
/**
* Identifier.
*/
id: string;
/**
* Complete DNS record name, including the zone name, in Punycode.
*/
name: string;
/**
* Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
* Value must be between 60 and 86400, with the minimum reduced to 30 for
* Enterprise zones.
*/
ttl: RecordsAPI.TTLParam;
/**
* Record type.
*/
type: 'OPENPGPKEY';
/**
* Comments or notes about the DNS record. This field has no effect on DNS
* responses.
*/
comment?: string;
/**
* A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1)
*/
content?: string;
/**
* Whether the record is receiving the performance and security benefits of
* Cloudflare.
*/
proxied?: boolean;
/**
* Settings for the DNS record.
*/
settings?: OpenpgpkeyRecord.Settings;
/**
* Custom tags for the DNS record. This field has no effect on DNS responses.
*/
tags?: Array<RecordsAPI.RecordTagsParam>;
}
namespace OpenpgpkeyRecord {
/**
* Settings for the DNS record.
*/
interface Settings {
/**
* 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.
*/
ipv4_only?: boolean;
/**
* 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.
*/
ipv6_only?: boolean;
}
}
interface PTRRecord extends RecordsAPI.PTRRecordParam {
/**
* Identifier.
*/
id: string;
}
interface TXTRecord extends RecordsAPI.TXTRecordParam {
/**
* Identifier.
*/
id: string;
}
interface CAARecord extends RecordsAPI.CAARecordParam {
/**
* Identifier.
*/
id: string;
}
interface CERTRecord extends RecordsAPI.CERTRecordParam {
/**
* Identifier.
*/
id: string;
}
interface DNSKEYRecord extends RecordsAPI.DNSKEYRecordParam {
/**
* Identifier.
*/
id: string;
}
interface DSRecord extends RecordsAPI.DSRecordParam {
/**
* Identifier.
*/
id: string;
}
interface HTTPSRecord extends RecordsAPI.HTTPSRecordParam {
/**
* Identifier.
*/
id: string;
}
interface LOCRecord extends RecordsAPI.LOCRecordParam {
/**
* Identifier.
*/
id: string;
}
interface NAPTRRecord extends RecordsAPI.NAPTRRecordParam {
/**
* Identifier.
*/
id: string;
}
interface SMIMEARecord extends RecordsAPI.SMIMEARecordParam {
/**
* Identifier.
*/
id: string;
}
interface SRVRecord extends RecordsAPI.SRVRecordParam {
/**
* Identifier.
*/
id: string;
}
interface SSHFPRecord extends RecordsAPI.SSHFPRecordParam {
/**
* Identifier.
*/
id: string;
}
interface SVCBRecord extends RecordsAPI.SVCBRecordParam {
/**
* Identifier.
*/
id: string;
}
interface TLSARecord extends RecordsAPI.TLSARecordParam {
/**
* Identifier.
*/
id: string;
}
interface URIRecord extends RecordsAPI.URIRecordParam {
/**
* Identifier.
*/
id: string;
}
}
export interface CAARecord {
/**
* Complete DNS record name, including the zone name, in Punycode.
*/
name: string;
/**
* Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
* Value must be between 60 and 86400, with the minimum reduced to 30 for
* Enterprise zones.
*/
ttl: TTL;
/**
* Record type.
*/
type: 'CAA';
/**
* Comments or notes about the DNS record. This field has no effect on DNS
* responses.
*/
comment?: string;
/**
* Formatted CAA content. See 'data' to set CAA properties.
*/
content?: string;
/**
* Components of a CAA record.
*/
data?: CAARecord.Data;
/**
* Whether the record is receiving the performance and security benefits of
* Cloudflare.
*/
proxied?: boolean;
/**
* Settings for the DNS record.
*/
settings?: CAARecord.Settings;
/**
* Custom tags for the DNS record. This field has no effect on DNS responses.
*/
tags?: Array<RecordTags>;
}
export declare namespace CAARecord {
/**
* Components of a CAA record.
*/
interface Data {
/**
* Flags for the CAA record.
*/
flags?: number;
/**
* Name of the property controlled by this record (e.g.: issue, issuewild, iodef).
*/
tag?: string;
/**
* Value of the record. This field's semantics depend on the chosen tag.
*/
value?: string;
}
/**
* Settings for the DNS record.
*/
interface Settings {
/**
* 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.
*/
ipv4_only?: boolean;
/**
* 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.
*/
ipv6_only?: boolean;
}
}
export interface CAARecordParam {
/**
* Complete DNS record name, including the zone name, in Punycode.
*/
name: string;
/**
* Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
* Value must be between 60 and 86400, with the minimum reduced to 30 for
* Enterprise zones.
*/
ttl: TTLParam;
/**
* Record type.
*/
type: 'CAA';
/**
* Comments or notes about the DNS record. This field has no effect on DNS
* responses.
*/
comment?: string;
/**
* Components of a CAA record.
*/
data?: CAARecordParam.Data;
/**
* Whether the record is receiving the performance and security benefits of
* Cloudflare.
*/
proxied?: boolean;
/**
* Settings for the DNS record.
*/
settings?: CAARecordParam.Settings;
/**
* Custom tags for the DNS record. This field has no effect on DNS responses.
*/
tags?: Array<RecordTagsParam>;
}
export declare namespace CAARecordParam {
/**
* Components of a CAA record.
*/
interface Data {
/**
* Flags for the CAA record.
*/
flags?: number;
/**
* Name of the property controlled by this record (e.g.: issue, issuewild, iodef).
*/
tag?: string;
/**
* Value of the record. This field's semantics depend on the chosen tag.
*/
value?: string;
}
/**
* Settings for the DNS record.
*/
interface Settings {
/**
* 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.
*/
ipv4_only?: boolean;
/**
* 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.
*/
ipv6_only?: boolean;
}
}
export interface CERTRecord {
/**
* Complete DNS record name, including the zone name, in Punycode.
*/
name: string;
/**
* Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
* Value must be between 60 and 86400, with the minimum reduced to 30 for
* Enterprise zones.
*/
ttl: TTL;
/**
* Record type.
*/
type: 'CERT';
/**
* Comments or notes about the DNS record. This field has no effect on DNS
* responses.
*/
comment?: string;
/**
* Formatted CERT content. See 'data' to set CERT properties.
*/
content?: string;
/**
* Components of a CERT record.
*/
data?: CERTRecord.Data;
/**
* Whether the record is receiving the performance and security benefits of
* Cloudflare.
*/
proxied?: boolean;
/**
* Settings for the DNS record.
*/
settings?: CERTRecord.Settings;
/**
* Custom tags for the DNS record. This field has no effect on DNS responses.
*/
tags?: Array<RecordTags>;
}
export declare namespace CERTRecord {
/**
* Components of a CERT record.
*/
interface Data {
/**
* Algorithm.
*/
algorithm?: number;
/**
* Certificate.
*/
certificate?: string;
/**
* Key Tag.
*/
key_tag?: number;
/**
* Type.
*/
type?: number;
}
/**
* Settings for the DNS record.
*/
interface Settings {
/**
* 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.
*/
ipv4_only?: boolean;
/**
* 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.
*/
ipv6_only?: boolean;
}
}
export interface CERTRecordParam {
/**
* Complete DNS record name, including the zone name, in Punycode.
*/
name: string;
/**
* Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
* Value must be between 60 and 86400, with the minimum reduced to 30 for
* Enterprise zones.
*/
ttl: TTLParam;
/**
* Record type.
*/
type: 'CERT';
/**
* Comments or notes about the DNS record. This field has no effect on DNS
* responses.
*/
comment?: string;
/**
* Components of a CERT record.
*/
data?: CERTRecordParam.Data;
/**
* Whether the record is receiving the performance and security benefits of
* Cloudflare.
*/
proxied?: boolean;
/**
* Settings for the DNS record.
*/
settings?: CERTRecordParam.Settings;
/**
* Custom tags for the DNS record. This field has no effect on DNS responses.
*/
tags?: Array<RecordTagsParam>;
}
export declare namespace CERTRecordParam {
/**
* Components of a CERT record.
*/
interface Data {
/**
* Algorithm.
*/
algorithm?: number;
/**
* Certificate.
*/
certificate?: string;
/**
* Key Tag.
*/
key_tag?: number;
/**
* Type.
*/
type?: number;
}
/**
* Settings for the DNS record.
*/
interface Settings {
/**
* 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.
*/
ipv4_only?: boolean;
/**
* 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.
*/
ipv6_only?: boolean;
}
}
export interface CNAMERecord {
/**
* Complete DNS record name, including the zone name, in Punycode.
*/
name: string;
/**
* Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
* Value must be between 60 and 86400, with the minimum reduced to 30 for
* Enterprise zones.
*/
ttl: TTL;
/**
* Record type.
*/
type: 'CNAME';
/**
* Comments or notes about the DNS record. This field has no effect on DNS
* responses.
*/
comment?: string;
/**
* A valid hostname. Must not match the record's name.
*/
content?: string;
/**
* Whether the record is receiving the performance and security benefits of
* Cloudflare.
*/
proxied?: boolean;
/**
* Settings for the DNS record.
*/
settings?: CNAMERecord.Settings;
/**
* Custom tags for the DNS record. This field has no effect on DNS responses.
*/
tags?: Array<RecordTags>;
}
export declare namespace CNAMERecord {
/**
* Settings for the DNS record.
*/
interface Settings {
/**
* 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.
*/
flatten_cname?: boolean;
/**
* 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.
*/
ipv4_only?: boolean;
/**
* 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.
*/
ipv6_only?: boolean;
}
}
export interface CNAMERecordParam {
/**
* Complete DNS record name, including the zone name, in Punycode.
*/
name: string;
/**
* Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
* Value must be betwe