Delete rule
client.magicNetworkMonitoring.rules.delete(stringruleId, RuleDeleteParams { account_id } params, RequestOptionsoptions?): MagicNetworkMonitoringRule { automatic_advertisement, name, prefixes, 8 more } | null
DELETE/accounts/{account_id}/mnm/rules/{rule_id}
Delete a network monitoring rule for account.
Security
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Delete rule
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted
apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted
});
const magicNetworkMonitoringRule = await client.magicNetworkMonitoring.rules.delete(
'2890e6fa406311ed9b5a23f70f6fb8cf',
{ account_id: '6f91088a406011ed95aed352566e8d4c' },
);
console.log(magicNetworkMonitoringRule.id);{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": {
"automatic_advertisement": true,
"name": "my_rule_1",
"prefixes": [
"203.0.113.1/32"
],
"type": "zscore",
"id": "2890e6fa406311ed9b5a23f70f6fb8cf",
"bandwidth_threshold": 1000,
"duration": "1m",
"packet_threshold": 10000,
"prefix_match": "exact",
"zscore_sensitivity": "high",
"zscore_target": "bits"
},
"success": true
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": {
"automatic_advertisement": true,
"name": "my_rule_1",
"prefixes": [
"203.0.113.1/32"
],
"type": "zscore",
"id": "2890e6fa406311ed9b5a23f70f6fb8cf",
"bandwidth_threshold": 1000,
"duration": "1m",
"packet_threshold": 10000,
"prefix_match": "exact",
"zscore_sensitivity": "high",
"zscore_target": "bits"
},
"success": true
}