cloudflare
Version:
The official TypeScript library for the Cloudflare API
151 lines • 5.15 kB
text/typescript
import { APIResource } from "../../core/resource.mjs";
import { APIPromise } from "../../core/api-promise.mjs";
import { PagePromise, SinglePage } from "../../core/pagination.mjs";
import { RequestOptions } from "../../internal/request-options.mjs";
export declare class BaseTenantCustomNameservers extends APIResource {
static readonly _key: readonly ['tenantCustomNameservers'];
/**
* Adds a custom nameserver for a tenant.
*
* @example
* ```ts
* const tenantCustomNameserver =
* await client.tenantCustomNameservers.create(
* '699d98642c564d2e855e9661899b7252',
* { ns_name: 'ns1.example.com' },
* );
* ```
*/
create(tenantTag: string, body: TenantCustomNameserverCreateParams, options?: RequestOptions): APIPromise<TenantCustomNameserverCreateResponse>;
/**
* Deletes a tenant's custom nameserver.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const tenantCustomNameserverDeleteResponse of client.tenantCustomNameservers.delete(
* 'ns1.example.com',
* { tenant_tag: '699d98642c564d2e855e9661899b7252' },
* )) {
* // ...
* }
* ```
*/
delete(customNSID: string, params: TenantCustomNameserverDeleteParams, options?: RequestOptions): PagePromise<TenantCustomNameserverDeleteResponsesSinglePage, TenantCustomNameserverDeleteResponse>;
/**
* Lists a tenant's custom nameservers.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const tenantCustomNameserverGetResponse of client.tenantCustomNameservers.get(
* '699d98642c564d2e855e9661899b7252',
* )) {
* // ...
* }
* ```
*/
get(tenantTag: string, options?: RequestOptions): PagePromise<TenantCustomNameserverGetResponsesSinglePage, TenantCustomNameserverGetResponse>;
}
export declare class TenantCustomNameservers extends BaseTenantCustomNameservers {
}
export type TenantCustomNameserverDeleteResponsesSinglePage = SinglePage<TenantCustomNameserverDeleteResponse>;
export type TenantCustomNameserverGetResponsesSinglePage = SinglePage<TenantCustomNameserverGetResponse>;
/**
* A single tenant custom nameserver.
*/
export interface TenantCustomNameserverCreateResponse {
/**
* A and AAAA records associated with the nameserver.
*/
dns_records: Array<TenantCustomNameserverCreateResponse.DNSRecord>;
/**
* The FQDN of the name server.
*/
ns_name: string;
/**
* @deprecated Verification status of the nameserver.
*/
status: 'moved' | 'pending' | 'verified';
/**
* Identifier.
*/
zone_tag: string;
/**
* The number of the set that this name server belongs to.
*/
ns_set?: number;
}
export declare namespace TenantCustomNameserverCreateResponse {
interface DNSRecord {
/**
* DNS record type.
*/
type?: 'A' | 'AAAA';
/**
* DNS record contents (an IPv4 or IPv6 address).
*/
value?: string;
}
}
/**
* Unused.
*/
export type TenantCustomNameserverDeleteResponse = string;
/**
* A single tenant custom nameserver.
*/
export interface TenantCustomNameserverGetResponse {
/**
* A and AAAA records associated with the nameserver.
*/
dns_records: Array<TenantCustomNameserverGetResponse.DNSRecord>;
/**
* The FQDN of the name server.
*/
ns_name: string;
/**
* @deprecated Verification status of the nameserver.
*/
status: 'moved' | 'pending' | 'verified';
/**
* Identifier.
*/
zone_tag: string;
/**
* The number of the set that this name server belongs to.
*/
ns_set?: number;
}
export declare namespace TenantCustomNameserverGetResponse {
interface DNSRecord {
/**
* DNS record type.
*/
type?: 'A' | 'AAAA';
/**
* DNS record contents (an IPv4 or IPv6 address).
*/
value?: string;
}
}
export interface TenantCustomNameserverCreateParams {
/**
* The FQDN of the name server.
*/
ns_name: string;
/**
* The number of the set that this name server belongs to.
*/
ns_set?: number;
}
export interface TenantCustomNameserverDeleteParams {
/**
* Tenant identifier tag.
*/
tenant_tag: string;
}
export declare namespace TenantCustomNameservers {
export { type TenantCustomNameserverCreateResponse as TenantCustomNameserverCreateResponse, type TenantCustomNameserverDeleteResponse as TenantCustomNameserverDeleteResponse, type TenantCustomNameserverGetResponse as TenantCustomNameserverGetResponse, type TenantCustomNameserverDeleteResponsesSinglePage as TenantCustomNameserverDeleteResponsesSinglePage, type TenantCustomNameserverGetResponsesSinglePage as TenantCustomNameserverGetResponsesSinglePage, type TenantCustomNameserverCreateParams as TenantCustomNameserverCreateParams, type TenantCustomNameserverDeleteParams as TenantCustomNameserverDeleteParams, };
}
//# sourceMappingURL=tenant-custom-nameservers.d.mts.map