cloudflare
Version:
The official TypeScript library for the Cloudflare API
34 lines • 1.22 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflare/resource';
export class FallbackOrigin extends APIResource {
/**
* Update Fallback Origin for Custom Hostnames
*/
update(params, options) {
const { zone_id, ...body } = params;
return this._client.put(`/zones/${zone_id}/custom_hostnames/fallback_origin`, {
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
/**
* Delete Fallback Origin for Custom Hostnames
*/
delete(params, options) {
const { zone_id, body } = params;
return this._client.delete(`/zones/${zone_id}/custom_hostnames/fallback_origin`, {
body: body,
...options,
})._thenUnwrap((obj) => obj.result);
}
/**
* Get Fallback Origin for Custom Hostnames
*/
get(params, options) {
const { zone_id } = params;
return this._client.get(`/zones/${zone_id}/custom_hostnames/fallback_origin`, options)._thenUnwrap((obj) => obj.result);
}
}
(function (FallbackOrigin) {
})(FallbackOrigin || (FallbackOrigin = {}));
//# sourceMappingURL=fallback-origin.mjs.map