cloudflare
Version:
The official TypeScript library for the Cloudflare API
46 lines • 1.68 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflare/resource';
export class CustomNameservers extends APIResource {
/**
* Add Account Custom Nameserver
*/
create(params, options) {
const { account_id, ...body } = params;
return this._client.post(`/accounts/${account_id}/custom_ns`, { body, ...options })._thenUnwrap((obj) => obj.result);
}
/**
* Delete Account Custom Nameserver
*/
delete(customNSId, params, options) {
const { account_id, body } = params;
return this._client.delete(`/accounts/${account_id}/custom_ns/${customNSId}`, {
body: body,
...options,
})._thenUnwrap((obj) => obj.result);
}
/**
* Get Eligible Zones for Account Custom Nameservers
*/
availabilty(params, options) {
const { account_id } = params;
return this._client.get(`/accounts/${account_id}/custom_ns/availability`, options)._thenUnwrap((obj) => obj.result);
}
/**
* List an account's custom nameservers.
*/
get(params, options) {
const { account_id } = params;
return this._client.get(`/accounts/${account_id}/custom_ns`, options)._thenUnwrap((obj) => obj.result);
}
/**
* Verify Account Custom Nameserver Glue Records
*/
verify(params, options) {
const { account_id, body } = params;
return this._client.post(`/accounts/${account_id}/custom_ns/verify`, {
body: body,
...options,
})._thenUnwrap((obj) => obj.result);
}
}
//# sourceMappingURL=custom-nameservers.mjs.map