Magic Network Monitoring Rule Args
data class MagicNetworkMonitoringRuleArgs(val accountId: Output<String>? = null, val automaticAdvertisement: Output<Boolean>? = null, val bandwidth: Output<Double>? = null, val duration: Output<String>? = null, val name: Output<String>? = null, val packetThreshold: Output<Double>? = null, val prefixes: Output<List<String>>? = null) : ConvertibleToJava<MagicNetworkMonitoringRuleArgs>
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"],
});
Content copied to clipboard
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"])
Content copied to clipboard
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",
},
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
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
Content copied to clipboard
Import
$ pulumi import cloudflare:index/magicNetworkMonitoringRule:MagicNetworkMonitoringRule example '<account_id>/<rule_id>'
Content copied to clipboard
Properties
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
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
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.