Skip to content
Start here

Magic Network Monitoring

Magic Network MonitoringVPC Flows

Magic Network MonitoringVPC FlowsTokens

Generate authentication token for VPC flow logs export.
magic_network_monitoring.vpc_flows.tokens.create(TokenCreateParams**kwargs) -> TokenCreateResponse
POST/accounts/{account_id}/mnm/vpc-flows/token
ModelsExpand Collapse
str

Authentication token to be used for VPC Flows export authentication.

Magic Network MonitoringConfigs

List account configuration
magic_network_monitoring.configs.get(ConfigGetParams**kwargs) -> Configuration
GET/accounts/{account_id}/mnm/config
Create account configuration
magic_network_monitoring.configs.create(ConfigCreateParams**kwargs) -> Configuration
POST/accounts/{account_id}/mnm/config
Update an entire account configuration
magic_network_monitoring.configs.update(ConfigUpdateParams**kwargs) -> Configuration
PUT/accounts/{account_id}/mnm/config
Update account configuration fields
magic_network_monitoring.configs.edit(ConfigEditParams**kwargs) -> Configuration
PATCH/accounts/{account_id}/mnm/config
Delete account configuration
magic_network_monitoring.configs.delete(ConfigDeleteParams**kwargs) -> Configuration
DELETE/accounts/{account_id}/mnm/config
ModelsExpand Collapse
class Configuration:
default_sampling: float

Fallback sampling rate of flow messages being sent in packets per second. This should match the packet sampling rate configured on the router.

minimum1
name: str

The account name.

router_ips: List[str]
warp_devices: List[WARPDevice]
id: str

Unique identifier for the warp device.

name: str

Name of the warp device.

router_ip: str

IPv4 CIDR of the router sourcing flow data associated with this warp device. Only /32 addresses are currently supported.

Magic Network MonitoringConfigsFull

List rules and account configuration
magic_network_monitoring.configs.full.get(FullGetParams**kwargs) -> Configuration
GET/accounts/{account_id}/mnm/config/full

Magic Network MonitoringRules

List rules
magic_network_monitoring.rules.list(RuleListParams**kwargs) -> SyncSinglePage[Optional[MagicNetworkMonitoringRule]]
GET/accounts/{account_id}/mnm/rules
Get rule
magic_network_monitoring.rules.get(strrule_id, RuleGetParams**kwargs) -> MagicNetworkMonitoringRule
GET/accounts/{account_id}/mnm/rules/{rule_id}
Create rules
magic_network_monitoring.rules.create(RuleCreateParams**kwargs) -> MagicNetworkMonitoringRule
POST/accounts/{account_id}/mnm/rules
Update rules
magic_network_monitoring.rules.update(RuleUpdateParams**kwargs) -> MagicNetworkMonitoringRule
PUT/accounts/{account_id}/mnm/rules
Update rule
magic_network_monitoring.rules.edit(strrule_id, RuleEditParams**kwargs) -> MagicNetworkMonitoringRule
PATCH/accounts/{account_id}/mnm/rules/{rule_id}
Delete rule
magic_network_monitoring.rules.delete(strrule_id, RuleDeleteParams**kwargs) -> MagicNetworkMonitoringRule
DELETE/accounts/{account_id}/mnm/rules/{rule_id}
ModelsExpand Collapse
class MagicNetworkMonitoringRule:
automatic_advertisement: Optional[bool]

Toggle on if you would like Cloudflare to automatically advertise the IP Prefixes within the rule via Magic Transit when the rule is triggered. Only available for users of Magic Transit.

name: str

The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.

prefixes: List[str]
type: Literal["threshold", "zscore", "advanced_ddos"]

MNM rule type.

One of the following:
"threshold"
"zscore"
"advanced_ddos"
id: Optional[str]

The id of the rule. Must be unique.

bandwidth_threshold: Optional[float]

The number of bits per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.

minimum1
duration: Optional[Literal["1m", "5m", "10m", 5 more]]

The amount of time that the rule threshold must be exceeded to send an alert notification. The final value must be equivalent to one of the following 8 values ["1m","5m","10m","15m","20m","30m","45m","60m"].

One of the following:
"1m"
"5m"
"10m"
"15m"
"20m"
"30m"
"45m"
"60m"
packet_threshold: Optional[float]

The number of packets per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.

minimum1
prefix_match: Optional[Literal["exact", "subnet", "supernet"]]

Prefix match type to be applied for a prefix auto advertisement when using an advanced_ddos rule.

One of the following:
"exact"
"subnet"
"supernet"
zscore_sensitivity: Optional[Literal["low", "medium", "high"]]

Level of sensitivity set for zscore rules.

One of the following:
"low"
"medium"
"high"
zscore_target: Optional[Literal["bits", "packets"]]

Target of the zscore rule analysis.

One of the following:
"bits"
"packets"

Magic Network MonitoringRulesAdvertisements

Update advertisement for rule
magic_network_monitoring.rules.advertisements.edit(strrule_id, AdvertisementEditParams**kwargs) -> Advertisement
PATCH/accounts/{account_id}/mnm/rules/{rule_id}/advertisement
ModelsExpand Collapse