cloudflare
Version:
The official TypeScript library for the Cloudflare API
48 lines • 2.04 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AdvertisementStatus = exports.BaseAdvertisementStatus = void 0;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
const resource_1 = require("../../../core/resource.js");
const path_1 = require("../../../internal/utils/path.js");
var BaseAdvertisementStatus = /* @__PURE__ */ (() => {
class BaseAdvertisementStatus extends resource_1.APIResource {
/**
* Advertise or withdraw the BGP route for a prefix.
*
* **Deprecated:** Prefer the BGP Prefixes endpoints, which additionally allow for
* advertising and withdrawing subnets of an IP prefix.
*
* @deprecated
*/
edit(prefixID, params, options) {
const { account_id, ...body } = params;
return this._client.patch((0, path_1.path) `/accounts/${account_id}/addressing/prefixes/${prefixID}/bgp/status`, {
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
/**
* View the current advertisement state for a prefix.
*
* **Deprecated:** Prefer the BGP Prefixes endpoints, which additionally allow for
* advertising and withdrawing subnets of an IP prefix.
*
* @deprecated
*/
get(prefixID, params, options) {
const { account_id } = params;
return this._client.get((0, path_1.path) `/accounts/${account_id}/addressing/prefixes/${prefixID}/bgp/status`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseAdvertisementStatus._key = Object.freeze([
'addressing',
'prefixes',
'advertisementStatus',
]);
return BaseAdvertisementStatus;
})();
exports.BaseAdvertisementStatus = BaseAdvertisementStatus;
class AdvertisementStatus extends BaseAdvertisementStatus {
}
exports.AdvertisementStatus = AdvertisementStatus;
//# sourceMappingURL=advertisement-status.js.map