SchedulerRuleArgs

data class SchedulerRuleArgs(val param: Output<String>? = null, val resourceGroupId: Output<String>? = null, val ruleName: Output<String>? = null, val ruleType: Output<Int>? = null, val rules: Output<List<SchedulerRuleRuleArgs>>? = null) : ConvertibleToJava<SchedulerRuleArgs>

Provides a DdosCoo Scheduler Rule resource. For information about DdosCoo Scheduler Rule and how to use it, seeWhat is DdosCoo Scheduler Rule.

NOTE: Available since v1.86.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const example = new alicloud.ddos.SchedulerRule("example", {
ruleName: name,
ruleType: 3,
rules: [
{
priority: 100,
regionId: "cn-hangzhou",
type: "A",
value: "127.0.0.1",
valueType: 3,
},
{
priority: 50,
regionId: "cn-hangzhou",
type: "A",
value: "127.0.0.0",
valueType: 1,
},
],
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-example"
example = alicloud.ddos.SchedulerRule("example",
rule_name=name,
rule_type=3,
rules=[
{
"priority": 100,
"region_id": "cn-hangzhou",
"type": "A",
"value": "127.0.0.1",
"value_type": 3,
},
{
"priority": 50,
"region_id": "cn-hangzhou",
"type": "A",
"value": "127.0.0.0",
"value_type": 1,
},
])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tf-example";
var example = new AliCloud.Ddos.SchedulerRule("example", new()
{
RuleName = name,
RuleType = 3,
Rules = new[]
{
new AliCloud.Ddos.Inputs.SchedulerRuleRuleArgs
{
Priority = 100,
RegionId = "cn-hangzhou",
Type = "A",
Value = "127.0.0.1",
ValueType = 3,
},
new AliCloud.Ddos.Inputs.SchedulerRuleRuleArgs
{
Priority = 50,
RegionId = "cn-hangzhou",
Type = "A",
Value = "127.0.0.0",
ValueType = 1,
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ddos"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "tf-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_, err := ddos.NewSchedulerRule(ctx, "example", &ddos.SchedulerRuleArgs{
RuleName: pulumi.String(name),
RuleType: pulumi.Int(3),
Rules: ddos.SchedulerRuleRuleArray{
&ddos.SchedulerRuleRuleArgs{
Priority: pulumi.Int(100),
RegionId: pulumi.String("cn-hangzhou"),
Type: pulumi.String("A"),
Value: pulumi.String("127.0.0.1"),
ValueType: pulumi.Int(3),
},
&ddos.SchedulerRuleRuleArgs{
Priority: pulumi.Int(50),
RegionId: pulumi.String("cn-hangzhou"),
Type: pulumi.String("A"),
Value: pulumi.String("127.0.0.0"),
ValueType: pulumi.Int(1),
},
},
})
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.alicloud.ddos.SchedulerRule;
import com.pulumi.alicloud.ddos.SchedulerRuleArgs;
import com.pulumi.alicloud.ddos.inputs.SchedulerRuleRuleArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("tf-example");
var example = new SchedulerRule("example", SchedulerRuleArgs.builder()
.ruleName(name)
.ruleType(3)
.rules(
SchedulerRuleRuleArgs.builder()
.priority(100)
.regionId("cn-hangzhou")
.type("A")
.value("127.0.0.1")
.valueType(3)
.build(),
SchedulerRuleRuleArgs.builder()
.priority(50)
.regionId("cn-hangzhou")
.type("A")
.value("127.0.0.0")
.valueType(1)
.build())
.build());
}
}
configuration:
name:
type: string
default: tf-example
resources:
example:
type: alicloud:ddos:SchedulerRule
properties:
ruleName: ${name}
ruleType: 3
rules:
- priority: 100
regionId: cn-hangzhou
type: A
value: 127.0.0.1
valueType: 3
- priority: 50
regionId: cn-hangzhou
type: A
value: 127.0.0.0
valueType: 1

Import

DdosCoo Scheduler Rule can be imported using the id or the rule name, e.g.

$ pulumi import alicloud:ddos/schedulerRule:SchedulerRule example fbb20dc77e8fc******

Constructors

Link copied to clipboard
constructor(param: Output<String>? = null, resourceGroupId: Output<String>? = null, ruleName: Output<String>? = null, ruleType: Output<Int>? = null, rules: Output<List<SchedulerRuleRuleArgs>>? = null)

Properties

Link copied to clipboard
val param: Output<String>? = null

The scheduling rule for the Global Accelerator instance that interacts with Anti-DDoS Pro or Anti-DDoS Premium.

Link copied to clipboard
val resourceGroupId: Output<String>? = null

The ID of the resource group to which the anti-DDoS pro instance belongs in resource management. By default, no value is specified, indicating that the domains in the default resource group are listed.

Link copied to clipboard
val ruleName: Output<String>? = null

The name of the rule.

Link copied to clipboard
val rules: Output<List<SchedulerRuleRuleArgs>>? = null

The information about the scheduling rules. See rules below.

Link copied to clipboard
val ruleType: Output<Int>? = null

The rule type. Valid values: 2: tiered protection. 3: globalization acceleration. 6: Cloud product interaction.

Functions

Link copied to clipboard
open override fun toJava(): SchedulerRuleArgs