Skip to content
Start here

Magic Network Monitoring

Magic Network MonitoringVPC Flows

Magic Network MonitoringVPC FlowsTokens

Generate authentication token for VPC flow logs export.
client.magicNetworkMonitoring.vpcFlows.tokens.create(TokenCreateParams { account_id } params, RequestOptionsoptions?): TokenCreateResponse
POST/accounts/{account_id}/mnm/vpc-flows/token
ModelsExpand Collapse
TokenCreateResponse = string

Authentication token to be used for VPC Flows export authentication.

Magic Network MonitoringConfigs

List account configuration
client.magicNetworkMonitoring.configs.get(ConfigGetParams { account_id } params, RequestOptionsoptions?): Configuration { default_sampling, name, router_ips, warp_devices }
GET/accounts/{account_id}/mnm/config
Create account configuration
client.magicNetworkMonitoring.configs.create(ConfigCreateParams { account_id, default_sampling, name, 2 more } params, RequestOptionsoptions?): Configuration { default_sampling, name, router_ips, warp_devices }
POST/accounts/{account_id}/mnm/config
Update an entire account configuration
client.magicNetworkMonitoring.configs.update(ConfigUpdateParams { account_id, default_sampling, name, 2 more } params, RequestOptionsoptions?): Configuration { default_sampling, name, router_ips, warp_devices }
PUT/accounts/{account_id}/mnm/config
Update account configuration fields
client.magicNetworkMonitoring.configs.edit(ConfigEditParams { account_id, default_sampling, name, 2 more } params, RequestOptionsoptions?): Configuration { default_sampling, name, router_ips, warp_devices }
PATCH/accounts/{account_id}/mnm/config
Delete account configuration
client.magicNetworkMonitoring.configs.delete(ConfigDeleteParams { account_id } params, RequestOptionsoptions?): Configuration { default_sampling, name, router_ips, warp_devices }
DELETE/accounts/{account_id}/mnm/config
ModelsExpand Collapse
Configuration { default_sampling, name, router_ips, warp_devices }
default_sampling: number

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: string

The account name.

router_ips: Array<string>
warp_devices: Array<WARPDevice>
id: string

Unique identifier for the warp device.

name: string

Name of the warp device.

router_ip: string

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
client.magicNetworkMonitoring.configs.full.get(FullGetParams { account_id } params, RequestOptionsoptions?): Configuration { default_sampling, name, router_ips, warp_devices }
GET/accounts/{account_id}/mnm/config/full

Magic Network MonitoringRules

List rules
client.magicNetworkMonitoring.rules.list(RuleListParams { account_id } params, RequestOptionsoptions?): SinglePage<MagicNetworkMonitoringRule { automatic_advertisement, name, prefixes, 8 more } | null>
GET/accounts/{account_id}/mnm/rules
Get rule
client.magicNetworkMonitoring.rules.get(stringruleId, RuleGetParams { account_id } params, RequestOptionsoptions?): MagicNetworkMonitoringRule { automatic_advertisement, name, prefixes, 8 more } | null
GET/accounts/{account_id}/mnm/rules/{rule_id}
Create rules
client.magicNetworkMonitoring.rules.create(RuleCreateParams { account_id, duration, name, 4 more } params, RequestOptionsoptions?): MagicNetworkMonitoringRule { automatic_advertisement, name, prefixes, 8 more } | null
POST/accounts/{account_id}/mnm/rules
Update rules
client.magicNetworkMonitoring.rules.update(RuleUpdateParams { account_id, duration, name, 5 more } params, RequestOptionsoptions?): MagicNetworkMonitoringRule { automatic_advertisement, name, prefixes, 8 more } | null
PUT/accounts/{account_id}/mnm/rules
Update rule
client.magicNetworkMonitoring.rules.edit(stringruleId, RuleEditParams { account_id, automatic_advertisement, bandwidth, 4 more } params, RequestOptionsoptions?): MagicNetworkMonitoringRule { automatic_advertisement, name, prefixes, 8 more } | null
PATCH/accounts/{account_id}/mnm/rules/{rule_id}
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}
ModelsExpand Collapse
MagicNetworkMonitoringRule { automatic_advertisement, name, prefixes, 8 more }
automatic_advertisement: boolean | null

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: string

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: Array<string>
type: "threshold" | "zscore" | "advanced_ddos"

MNM rule type.

One of the following:
"threshold"
"zscore"
"advanced_ddos"
id?: string

The id of the rule. Must be unique.

bandwidth_threshold?: number

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?: "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?: number

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?: "exact" | "subnet" | "supernet" | null

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?: "low" | "medium" | "high" | null

Level of sensitivity set for zscore rules.

One of the following:
"low"
"medium"
"high"
zscore_target?: "bits" | "packets" | null

Target of the zscore rule analysis.

One of the following:
"bits"
"packets"

Magic Network MonitoringRulesAdvertisements

Update advertisement for rule
client.magicNetworkMonitoring.rules.advertisements.edit(stringruleId, AdvertisementEditParams { account_id, body } params, RequestOptionsoptions?): Advertisement { automatic_advertisement } | null
PATCH/accounts/{account_id}/mnm/rules/{rule_id}/advertisement
ModelsExpand Collapse