cloudflare
Version:
The official TypeScript library for the Cloudflare API
49 lines • 1.89 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflare/resource';
import * as FullAPI from 'cloudflare/resources/magic-network-monitoring/configs/full';
export class Configs extends APIResource {
constructor() {
super(...arguments);
this.full = new FullAPI.Full(this._client);
}
/**
* Create a new network monitoring configuration.
*/
create(params, options) {
const { account_id } = params;
return this._client.post(`/accounts/${account_id}/mnm/config`, options)._thenUnwrap((obj) => obj.result);
}
/**
* Update an existing network monitoring configuration, requires the entire
* configuration to be updated at once.
*/
update(params, options) {
const { account_id } = params;
return this._client.put(`/accounts/${account_id}/mnm/config`, options)._thenUnwrap((obj) => obj.result);
}
/**
* Delete an existing network monitoring configuration.
*/
delete(params, options) {
const { account_id } = params;
return this._client.delete(`/accounts/${account_id}/mnm/config`, options)._thenUnwrap((obj) => obj.result);
}
/**
* Update fields in an existing network monitoring configuration.
*/
edit(params, options) {
const { account_id } = params;
return this._client.patch(`/accounts/${account_id}/mnm/config`, options)._thenUnwrap((obj) => obj.result);
}
/**
* Lists default sampling and router IPs for account.
*/
get(params, options) {
const { account_id } = params;
return this._client.get(`/accounts/${account_id}/mnm/config`, options)._thenUnwrap((obj) => obj.result);
}
}
(function (Configs) {
Configs.Full = FullAPI.Full;
})(Configs || (Configs = {}));
//# sourceMappingURL=configs.mjs.map