Delete rule
magic_network_monitoring.rules.delete(strrule_id, RuleDeleteParams**kwargs) -> MagicNetworkMonitoringRule
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 os
from cloudflare import Cloudflare
client = Cloudflare(
api_email=os.environ.get("CLOUDFLARE_EMAIL"), # This is the default and can be omitted
api_key=os.environ.get("CLOUDFLARE_API_KEY"), # This is the default and can be omitted
)
magic_network_monitoring_rule = client.magic_network_monitoring.rules.delete(
rule_id="2890e6fa406311ed9b5a23f70f6fb8cf",
account_id="6f91088a406011ed95aed352566e8d4c",
)
print(magic_network_monitoring_rule.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
}