MagicNetworkMonitoringRule

class MagicNetworkMonitoringRule : KotlinCustomResource

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleMagicNetworkMonitoringRule = new cloudflare.MagicNetworkMonitoringRule("example_magic_network_monitoring_rule", {
accountId: "6f91088a406011ed95aed352566e8d4c",
duration: "1m",
name: "my_rule_1",
automaticAdvertisement: true,
bandwidth: 1000,
packetThreshold: 10000,
prefixes: ["203.0.113.1/32"],
});
import pulumi
import pulumi_cloudflare as cloudflare
example_magic_network_monitoring_rule = cloudflare.MagicNetworkMonitoringRule("example_magic_network_monitoring_rule",
account_id="6f91088a406011ed95aed352566e8d4c",
duration="1m",
name="my_rule_1",
automatic_advertisement=True,
bandwidth=1000,
packet_threshold=10000,
prefixes=["203.0.113.1/32"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var exampleMagicNetworkMonitoringRule = new Cloudflare.MagicNetworkMonitoringRule("example_magic_network_monitoring_rule", new()
{
AccountId = "6f91088a406011ed95aed352566e8d4c",
Duration = "1m",
Name = "my_rule_1",
AutomaticAdvertisement = true,
Bandwidth = 1000,
PacketThreshold = 10000,
Prefixes = new[]
{
"203.0.113.1/32",
},
});
});
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.NewMagicNetworkMonitoringRule(ctx, "example_magic_network_monitoring_rule", &cloudflare.MagicNetworkMonitoringRuleArgs{
AccountId: pulumi.String("6f91088a406011ed95aed352566e8d4c"),
Duration: pulumi.String("1m"),
Name: pulumi.String("my_rule_1"),
AutomaticAdvertisement: pulumi.Bool(true),
Bandwidth: pulumi.Float64(1000),
PacketThreshold: pulumi.Float64(10000),
Prefixes: pulumi.StringArray{
pulumi.String("203.0.113.1/32"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.MagicNetworkMonitoringRule;
import com.pulumi.cloudflare.MagicNetworkMonitoringRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleMagicNetworkMonitoringRule = new MagicNetworkMonitoringRule("exampleMagicNetworkMonitoringRule", MagicNetworkMonitoringRuleArgs.builder()
.accountId("6f91088a406011ed95aed352566e8d4c")
.duration("1m")
.name("my_rule_1")
.automaticAdvertisement(true)
.bandwidth(1000.0)
.packetThreshold(10000.0)
.prefixes("203.0.113.1/32")
.build());
}
}
resources:
exampleMagicNetworkMonitoringRule:
type: cloudflare:MagicNetworkMonitoringRule
name: example_magic_network_monitoring_rule
properties:
accountId: 6f91088a406011ed95aed352566e8d4c
duration: 1m
name: my_rule_1
automaticAdvertisement: true
bandwidth: 1000
packetThreshold: 10000
prefixes:
- 203.0.113.1/32

Import

$ pulumi import cloudflare:index/magicNetworkMonitoringRule:MagicNetworkMonitoringRule example '<account_id>/<rule_id>'

Properties

Link copied to clipboard
val accountId: Output<String>
Link copied to clipboard

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.

Link copied to clipboard
val bandwidth: Output<Double>?

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.

Link copied to clipboard

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.

Link copied to clipboard
val duration: Output<String>

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". Available values: "1m", "5m", "10m", "15m", "20m", "30m", "45m", "60m".

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<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.

Link copied to clipboard
val packetThreshold: Output<Double>?

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.

Link copied to clipboard
val prefixes: Output<List<String>>?
Link copied to clipboard
val prefixMatch: Output<String>

Prefix match type to be applied for a prefix auto advertisement when using an advanced_ddos rule. Available values: "exact", "subnet", "supernet".

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val type: Output<String>

MNM rule type. Available values: "threshold", "zscore", "advanced_ddos".

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

Level of sensitivity set for zscore rules. Available values: "low", "medium", "high".

Link copied to clipboard
val zscoreTarget: Output<String>

Target of the zscore rule analysis. Available values: "bits", "packets".