cloudflare
Version:
The official TypeScript library for the Cloudflare API
24 lines • 932 B
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflare/resource';
export class Statuses extends APIResource {
/**
* Advertise or withdraw BGP route for a prefix.
*/
edit(prefixId, params, options) {
const { account_id, ...body } = params;
return this._client.patch(`/accounts/${account_id}/addressing/prefixes/${prefixId}/bgp/status`, {
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
/**
* List the current advertisement state for a prefix.
*/
get(prefixId, params, options) {
const { account_id } = params;
return this._client.get(`/accounts/${account_id}/addressing/prefixes/${prefixId}/bgp/status`, options)._thenUnwrap((obj) => obj.result);
}
}
(function (Statuses) {
})(Statuses || (Statuses = {}));
//# sourceMappingURL=statuses.mjs.map