ucloud.AntiDdosRule
Explore with Pulumi AI
Provides an Anti-DDoS rule resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ucloud from "@pulumi/ucloud";
const fooAntiDdosInstance = new ucloud.AntiDdosInstance("fooAntiDdosInstance", {
area: "EastChina",
bandwidth: 80,
baseDefenceValue: 30,
dataCenter: "Zaozhuang",
maxDefenceValue: 30,
});
const fooAntiDdosAllowedDomain = new ucloud.AntiDdosAllowedDomain("fooAntiDdosAllowedDomain", {
comment: "test-acc-comment",
domain: "ucloud.cn",
instanceId: fooAntiDdosInstance.antiDdosInstanceId,
});
const fooAntiDdosIp = new ucloud.AntiDdosIp("fooAntiDdosIp", {
comment: "test-acc-comment",
instanceId: fooAntiDdosInstance.antiDdosInstanceId,
});
const fooAntiDdosRule = new ucloud.AntiDdosRule("fooAntiDdosRule", {
backupServer: {
ip: "127.0.0.1",
port: "4321",
},
instanceId: fooAntiDdosInstance.antiDdosInstanceId,
ip: fooAntiDdosIp.ip,
port: 4321,
realServerDetection: true,
realServerType: "IP",
realServers: [
{
address: "127.0.0.1",
port: 4321,
},
{
address: "127.0.0.2",
port: 4321,
},
],
toaId: 100,
});
import pulumi
import pulumi_ucloud as ucloud
foo_anti_ddos_instance = ucloud.AntiDdosInstance("fooAntiDdosInstance",
area="EastChina",
bandwidth=80,
base_defence_value=30,
data_center="Zaozhuang",
max_defence_value=30)
foo_anti_ddos_allowed_domain = ucloud.AntiDdosAllowedDomain("fooAntiDdosAllowedDomain",
comment="test-acc-comment",
domain="ucloud.cn",
instance_id=foo_anti_ddos_instance.anti_ddos_instance_id)
foo_anti_ddos_ip = ucloud.AntiDdosIp("fooAntiDdosIp",
comment="test-acc-comment",
instance_id=foo_anti_ddos_instance.anti_ddos_instance_id)
foo_anti_ddos_rule = ucloud.AntiDdosRule("fooAntiDdosRule",
backup_server={
"ip": "127.0.0.1",
"port": "4321",
},
instance_id=foo_anti_ddos_instance.anti_ddos_instance_id,
ip=foo_anti_ddos_ip.ip,
port=4321,
real_server_detection=True,
real_server_type="IP",
real_servers=[
{
"address": "127.0.0.1",
"port": 4321,
},
{
"address": "127.0.0.2",
"port": 4321,
},
],
toa_id=100)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ucloud/ucloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooAntiDdosInstance, err := ucloud.NewAntiDdosInstance(ctx, "fooAntiDdosInstance", &ucloud.AntiDdosInstanceArgs{
Area: pulumi.String("EastChina"),
Bandwidth: pulumi.Float64(80),
BaseDefenceValue: pulumi.Float64(30),
DataCenter: pulumi.String("Zaozhuang"),
MaxDefenceValue: pulumi.Float64(30),
})
if err != nil {
return err
}
_, err = ucloud.NewAntiDdosAllowedDomain(ctx, "fooAntiDdosAllowedDomain", &ucloud.AntiDdosAllowedDomainArgs{
Comment: pulumi.String("test-acc-comment"),
Domain: pulumi.String("ucloud.cn"),
InstanceId: fooAntiDdosInstance.AntiDdosInstanceId,
})
if err != nil {
return err
}
fooAntiDdosIp, err := ucloud.NewAntiDdosIp(ctx, "fooAntiDdosIp", &ucloud.AntiDdosIpArgs{
Comment: pulumi.String("test-acc-comment"),
InstanceId: fooAntiDdosInstance.AntiDdosInstanceId,
})
if err != nil {
return err
}
_, err = ucloud.NewAntiDdosRule(ctx, "fooAntiDdosRule", &ucloud.AntiDdosRuleArgs{
BackupServer: pulumi.StringMap{
"ip": pulumi.String("127.0.0.1"),
"port": pulumi.String("4321"),
},
InstanceId: fooAntiDdosInstance.AntiDdosInstanceId,
Ip: fooAntiDdosIp.Ip,
Port: pulumi.Float64(4321),
RealServerDetection: pulumi.Bool(true),
RealServerType: pulumi.String("IP"),
RealServers: ucloud.AntiDdosRuleRealServerArray{
&ucloud.AntiDdosRuleRealServerArgs{
Address: pulumi.String("127.0.0.1"),
Port: pulumi.Float64(4321),
},
&ucloud.AntiDdosRuleRealServerArgs{
Address: pulumi.String("127.0.0.2"),
Port: pulumi.Float64(4321),
},
},
ToaId: pulumi.Float64(100),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ucloud = Pulumi.Ucloud;
return await Deployment.RunAsync(() =>
{
var fooAntiDdosInstance = new Ucloud.AntiDdosInstance("fooAntiDdosInstance", new()
{
Area = "EastChina",
Bandwidth = 80,
BaseDefenceValue = 30,
DataCenter = "Zaozhuang",
MaxDefenceValue = 30,
});
var fooAntiDdosAllowedDomain = new Ucloud.AntiDdosAllowedDomain("fooAntiDdosAllowedDomain", new()
{
Comment = "test-acc-comment",
Domain = "ucloud.cn",
InstanceId = fooAntiDdosInstance.AntiDdosInstanceId,
});
var fooAntiDdosIp = new Ucloud.AntiDdosIp("fooAntiDdosIp", new()
{
Comment = "test-acc-comment",
InstanceId = fooAntiDdosInstance.AntiDdosInstanceId,
});
var fooAntiDdosRule = new Ucloud.AntiDdosRule("fooAntiDdosRule", new()
{
BackupServer =
{
{ "ip", "127.0.0.1" },
{ "port", "4321" },
},
InstanceId = fooAntiDdosInstance.AntiDdosInstanceId,
Ip = fooAntiDdosIp.Ip,
Port = 4321,
RealServerDetection = true,
RealServerType = "IP",
RealServers = new[]
{
new Ucloud.Inputs.AntiDdosRuleRealServerArgs
{
Address = "127.0.0.1",
Port = 4321,
},
new Ucloud.Inputs.AntiDdosRuleRealServerArgs
{
Address = "127.0.0.2",
Port = 4321,
},
},
ToaId = 100,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ucloud.AntiDdosInstance;
import com.pulumi.ucloud.AntiDdosInstanceArgs;
import com.pulumi.ucloud.AntiDdosAllowedDomain;
import com.pulumi.ucloud.AntiDdosAllowedDomainArgs;
import com.pulumi.ucloud.AntiDdosIp;
import com.pulumi.ucloud.AntiDdosIpArgs;
import com.pulumi.ucloud.AntiDdosRule;
import com.pulumi.ucloud.AntiDdosRuleArgs;
import com.pulumi.ucloud.inputs.AntiDdosRuleRealServerArgs;
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 fooAntiDdosInstance = new AntiDdosInstance("fooAntiDdosInstance", AntiDdosInstanceArgs.builder()
.area("EastChina")
.bandwidth(80)
.baseDefenceValue(30)
.dataCenter("Zaozhuang")
.maxDefenceValue(30)
.build());
var fooAntiDdosAllowedDomain = new AntiDdosAllowedDomain("fooAntiDdosAllowedDomain", AntiDdosAllowedDomainArgs.builder()
.comment("test-acc-comment")
.domain("ucloud.cn")
.instanceId(fooAntiDdosInstance.antiDdosInstanceId())
.build());
var fooAntiDdosIp = new AntiDdosIp("fooAntiDdosIp", AntiDdosIpArgs.builder()
.comment("test-acc-comment")
.instanceId(fooAntiDdosInstance.antiDdosInstanceId())
.build());
var fooAntiDdosRule = new AntiDdosRule("fooAntiDdosRule", AntiDdosRuleArgs.builder()
.backupServer(Map.ofEntries(
Map.entry("ip", "127.0.0.1"),
Map.entry("port", "4321")
))
.instanceId(fooAntiDdosInstance.antiDdosInstanceId())
.ip(fooAntiDdosIp.ip())
.port(4321)
.realServerDetection(true)
.realServerType("IP")
.realServers(
AntiDdosRuleRealServerArgs.builder()
.address("127.0.0.1")
.port(4321)
.build(),
AntiDdosRuleRealServerArgs.builder()
.address("127.0.0.2")
.port(4321)
.build())
.toaId(100)
.build());
}
}
resources:
fooAntiDdosInstance:
type: ucloud:AntiDdosInstance
properties:
area: EastChina
bandwidth: 80
baseDefenceValue: 30
dataCenter: Zaozhuang
maxDefenceValue: 30
fooAntiDdosAllowedDomain:
type: ucloud:AntiDdosAllowedDomain
properties:
comment: test-acc-comment
domain: ucloud.cn
instanceId: ${fooAntiDdosInstance.antiDdosInstanceId}
fooAntiDdosIp:
type: ucloud:AntiDdosIp
properties:
comment: test-acc-comment
instanceId: ${fooAntiDdosInstance.antiDdosInstanceId}
fooAntiDdosRule:
type: ucloud:AntiDdosRule
properties:
backupServer:
ip: 127.0.0.1
port: '4321'
instanceId: ${fooAntiDdosInstance.antiDdosInstanceId}
ip: ${fooAntiDdosIp.ip}
port: 4321
realServerDetection: true
realServerType: IP
realServers:
- address: 127.0.0.1
port: 4321
- address: 127.0.0.2
port: 4321
toaId: 100
Create AntiDdosRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AntiDdosRule(name: string, args: AntiDdosRuleArgs, opts?: CustomResourceOptions);
@overload
def AntiDdosRule(resource_name: str,
args: AntiDdosRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AntiDdosRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
ip: Optional[str] = None,
real_server_type: Optional[str] = None,
real_servers: Optional[Sequence[AntiDdosRuleRealServerArgs]] = None,
anti_ddos_rule_id: Optional[str] = None,
backup_server: Optional[Mapping[str, str]] = None,
comment: Optional[str] = None,
port: Optional[float] = None,
real_server_detection: Optional[bool] = None,
toa_id: Optional[float] = None)
func NewAntiDdosRule(ctx *Context, name string, args AntiDdosRuleArgs, opts ...ResourceOption) (*AntiDdosRule, error)
public AntiDdosRule(string name, AntiDdosRuleArgs args, CustomResourceOptions? opts = null)
public AntiDdosRule(String name, AntiDdosRuleArgs args)
public AntiDdosRule(String name, AntiDdosRuleArgs args, CustomResourceOptions options)
type: ucloud:AntiDdosRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AntiDdosRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AntiDdosRuleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AntiDdosRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AntiDdosRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AntiDdosRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var antiDdosRuleResource = new Ucloud.AntiDdosRule("antiDdosRuleResource", new()
{
InstanceId = "string",
Ip = "string",
RealServerType = "string",
RealServers = new[]
{
new Ucloud.Inputs.AntiDdosRuleRealServerArgs
{
Address = "string",
Port = 0,
},
},
AntiDdosRuleId = "string",
BackupServer =
{
{ "string", "string" },
},
Comment = "string",
Port = 0,
RealServerDetection = false,
ToaId = 0,
});
example, err := ucloud.NewAntiDdosRule(ctx, "antiDdosRuleResource", &ucloud.AntiDdosRuleArgs{
InstanceId: pulumi.String("string"),
Ip: pulumi.String("string"),
RealServerType: pulumi.String("string"),
RealServers: ucloud.AntiDdosRuleRealServerArray{
&ucloud.AntiDdosRuleRealServerArgs{
Address: pulumi.String("string"),
Port: pulumi.Float64(0),
},
},
AntiDdosRuleId: pulumi.String("string"),
BackupServer: pulumi.StringMap{
"string": pulumi.String("string"),
},
Comment: pulumi.String("string"),
Port: pulumi.Float64(0),
RealServerDetection: pulumi.Bool(false),
ToaId: pulumi.Float64(0),
})
var antiDdosRuleResource = new AntiDdosRule("antiDdosRuleResource", AntiDdosRuleArgs.builder()
.instanceId("string")
.ip("string")
.realServerType("string")
.realServers(AntiDdosRuleRealServerArgs.builder()
.address("string")
.port(0)
.build())
.antiDdosRuleId("string")
.backupServer(Map.of("string", "string"))
.comment("string")
.port(0)
.realServerDetection(false)
.toaId(0)
.build());
anti_ddos_rule_resource = ucloud.AntiDdosRule("antiDdosRuleResource",
instance_id="string",
ip="string",
real_server_type="string",
real_servers=[{
"address": "string",
"port": 0,
}],
anti_ddos_rule_id="string",
backup_server={
"string": "string",
},
comment="string",
port=0,
real_server_detection=False,
toa_id=0)
const antiDdosRuleResource = new ucloud.AntiDdosRule("antiDdosRuleResource", {
instanceId: "string",
ip: "string",
realServerType: "string",
realServers: [{
address: "string",
port: 0,
}],
antiDdosRuleId: "string",
backupServer: {
string: "string",
},
comment: "string",
port: 0,
realServerDetection: false,
toaId: 0,
});
type: ucloud:AntiDdosRule
properties:
antiDdosRuleId: string
backupServer:
string: string
comment: string
instanceId: string
ip: string
port: 0
realServerDetection: false
realServerType: string
realServers:
- address: string
port: 0
toaId: 0
AntiDdosRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AntiDdosRule resource accepts the following input properties:
- Instance
Id string - ID of ucloud_anti_ddos_instance.
- Ip string
- IP, where the rule is applied. The value can be got from the IP attribute of ucloud_anti_ddos_ip.
- Real
Server stringType - Type of real server address, whose value can be
IP
orDomain
. - Real
Servers List<AntiDdos Rule Real Server> - Real server list.
- Anti
Ddos stringRule Id - The ID of the resource ucloud_anti_ddos_rule, the format is
<instance_id>/<ip>
for IP protocol rule or<instance_id>/<ip>/<port>
for TCP protocol rule. - Backup
Server Dictionary<string, string> - Backup server, which must be set when
real_server_detection
istrue
. - Comment string
- Comment of the rule.
- Port double
- Port, where the rule is applied. When port is not set or set zero, the Anti-DDoS instance just forwards traffic in layer-3, otherwise it forwards traffic in layer-4.
- Real
Server boolDetection - Whether to detect real server health status. Default is
false
. - Toa
Id double - ID of TOA for getting real client IP. Default is 200.
- Instance
Id string - ID of ucloud_anti_ddos_instance.
- Ip string
- IP, where the rule is applied. The value can be got from the IP attribute of ucloud_anti_ddos_ip.
- Real
Server stringType - Type of real server address, whose value can be
IP
orDomain
. - Real
Servers []AntiDdos Rule Real Server Args - Real server list.
- Anti
Ddos stringRule Id - The ID of the resource ucloud_anti_ddos_rule, the format is
<instance_id>/<ip>
for IP protocol rule or<instance_id>/<ip>/<port>
for TCP protocol rule. - Backup
Server map[string]string - Backup server, which must be set when
real_server_detection
istrue
. - Comment string
- Comment of the rule.
- Port float64
- Port, where the rule is applied. When port is not set or set zero, the Anti-DDoS instance just forwards traffic in layer-3, otherwise it forwards traffic in layer-4.
- Real
Server boolDetection - Whether to detect real server health status. Default is
false
. - Toa
Id float64 - ID of TOA for getting real client IP. Default is 200.
- instance
Id String - ID of ucloud_anti_ddos_instance.
- ip String
- IP, where the rule is applied. The value can be got from the IP attribute of ucloud_anti_ddos_ip.
- real
Server StringType - Type of real server address, whose value can be
IP
orDomain
. - real
Servers List<AntiDdos Rule Real Server> - Real server list.
- anti
Ddos StringRule Id - The ID of the resource ucloud_anti_ddos_rule, the format is
<instance_id>/<ip>
for IP protocol rule or<instance_id>/<ip>/<port>
for TCP protocol rule. - backup
Server Map<String,String> - Backup server, which must be set when
real_server_detection
istrue
. - comment String
- Comment of the rule.
- port Double
- Port, where the rule is applied. When port is not set or set zero, the Anti-DDoS instance just forwards traffic in layer-3, otherwise it forwards traffic in layer-4.
- real
Server BooleanDetection - Whether to detect real server health status. Default is
false
. - toa
Id Double - ID of TOA for getting real client IP. Default is 200.
- instance
Id string - ID of ucloud_anti_ddos_instance.
- ip string
- IP, where the rule is applied. The value can be got from the IP attribute of ucloud_anti_ddos_ip.
- real
Server stringType - Type of real server address, whose value can be
IP
orDomain
. - real
Servers AntiDdos Rule Real Server[] - Real server list.
- anti
Ddos stringRule Id - The ID of the resource ucloud_anti_ddos_rule, the format is
<instance_id>/<ip>
for IP protocol rule or<instance_id>/<ip>/<port>
for TCP protocol rule. - backup
Server {[key: string]: string} - Backup server, which must be set when
real_server_detection
istrue
. - comment string
- Comment of the rule.
- port number
- Port, where the rule is applied. When port is not set or set zero, the Anti-DDoS instance just forwards traffic in layer-3, otherwise it forwards traffic in layer-4.
- real
Server booleanDetection - Whether to detect real server health status. Default is
false
. - toa
Id number - ID of TOA for getting real client IP. Default is 200.
- instance_
id str - ID of ucloud_anti_ddos_instance.
- ip str
- IP, where the rule is applied. The value can be got from the IP attribute of ucloud_anti_ddos_ip.
- real_
server_ strtype - Type of real server address, whose value can be
IP
orDomain
. - real_
servers Sequence[AntiDdos Rule Real Server Args] - Real server list.
- anti_
ddos_ strrule_ id - The ID of the resource ucloud_anti_ddos_rule, the format is
<instance_id>/<ip>
for IP protocol rule or<instance_id>/<ip>/<port>
for TCP protocol rule. - backup_
server Mapping[str, str] - Backup server, which must be set when
real_server_detection
istrue
. - comment str
- Comment of the rule.
- port float
- Port, where the rule is applied. When port is not set or set zero, the Anti-DDoS instance just forwards traffic in layer-3, otherwise it forwards traffic in layer-4.
- real_
server_ booldetection - Whether to detect real server health status. Default is
false
. - toa_
id float - ID of TOA for getting real client IP. Default is 200.
- instance
Id String - ID of ucloud_anti_ddos_instance.
- ip String
- IP, where the rule is applied. The value can be got from the IP attribute of ucloud_anti_ddos_ip.
- real
Server StringType - Type of real server address, whose value can be
IP
orDomain
. - real
Servers List<Property Map> - Real server list.
- anti
Ddos StringRule Id - The ID of the resource ucloud_anti_ddos_rule, the format is
<instance_id>/<ip>
for IP protocol rule or<instance_id>/<ip>/<port>
for TCP protocol rule. - backup
Server Map<String> - Backup server, which must be set when
real_server_detection
istrue
. - comment String
- Comment of the rule.
- port Number
- Port, where the rule is applied. When port is not set or set zero, the Anti-DDoS instance just forwards traffic in layer-3, otherwise it forwards traffic in layer-4.
- real
Server BooleanDetection - Whether to detect real server health status. Default is
false
. - toa
Id Number - ID of TOA for getting real client IP. Default is 200.
Outputs
All input properties are implicitly available as output properties. Additionally, the AntiDdosRule resource produces the following output properties:
- id str
- The provider-assigned unique ID for this managed resource.
- rule_
id str - rule_
index float - status str
- Status of the IP. Possible values are
Pending
,Success
andFailed
.
Look up Existing AntiDdosRule Resource
Get an existing AntiDdosRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AntiDdosRuleState, opts?: CustomResourceOptions): AntiDdosRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
anti_ddos_rule_id: Optional[str] = None,
backup_server: Optional[Mapping[str, str]] = None,
comment: Optional[str] = None,
instance_id: Optional[str] = None,
ip: Optional[str] = None,
port: Optional[float] = None,
real_server_detection: Optional[bool] = None,
real_server_type: Optional[str] = None,
real_servers: Optional[Sequence[AntiDdosRuleRealServerArgs]] = None,
rule_id: Optional[str] = None,
rule_index: Optional[float] = None,
status: Optional[str] = None,
toa_id: Optional[float] = None) -> AntiDdosRule
func GetAntiDdosRule(ctx *Context, name string, id IDInput, state *AntiDdosRuleState, opts ...ResourceOption) (*AntiDdosRule, error)
public static AntiDdosRule Get(string name, Input<string> id, AntiDdosRuleState? state, CustomResourceOptions? opts = null)
public static AntiDdosRule get(String name, Output<String> id, AntiDdosRuleState state, CustomResourceOptions options)
resources: _: type: ucloud:AntiDdosRule get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Anti
Ddos stringRule Id - The ID of the resource ucloud_anti_ddos_rule, the format is
<instance_id>/<ip>
for IP protocol rule or<instance_id>/<ip>/<port>
for TCP protocol rule. - Backup
Server Dictionary<string, string> - Backup server, which must be set when
real_server_detection
istrue
. - Comment string
- Comment of the rule.
- Instance
Id string - ID of ucloud_anti_ddos_instance.
- Ip string
- IP, where the rule is applied. The value can be got from the IP attribute of ucloud_anti_ddos_ip.
- Port double
- Port, where the rule is applied. When port is not set or set zero, the Anti-DDoS instance just forwards traffic in layer-3, otherwise it forwards traffic in layer-4.
- Real
Server boolDetection - Whether to detect real server health status. Default is
false
. - Real
Server stringType - Type of real server address, whose value can be
IP
orDomain
. - Real
Servers List<AntiDdos Rule Real Server> - Real server list.
- Rule
Id string - Rule
Index double - Status string
- Status of the IP. Possible values are
Pending
,Success
andFailed
. - Toa
Id double - ID of TOA for getting real client IP. Default is 200.
- Anti
Ddos stringRule Id - The ID of the resource ucloud_anti_ddos_rule, the format is
<instance_id>/<ip>
for IP protocol rule or<instance_id>/<ip>/<port>
for TCP protocol rule. - Backup
Server map[string]string - Backup server, which must be set when
real_server_detection
istrue
. - Comment string
- Comment of the rule.
- Instance
Id string - ID of ucloud_anti_ddos_instance.
- Ip string
- IP, where the rule is applied. The value can be got from the IP attribute of ucloud_anti_ddos_ip.
- Port float64
- Port, where the rule is applied. When port is not set or set zero, the Anti-DDoS instance just forwards traffic in layer-3, otherwise it forwards traffic in layer-4.
- Real
Server boolDetection - Whether to detect real server health status. Default is
false
. - Real
Server stringType - Type of real server address, whose value can be
IP
orDomain
. - Real
Servers []AntiDdos Rule Real Server Args - Real server list.
- Rule
Id string - Rule
Index float64 - Status string
- Status of the IP. Possible values are
Pending
,Success
andFailed
. - Toa
Id float64 - ID of TOA for getting real client IP. Default is 200.
- anti
Ddos StringRule Id - The ID of the resource ucloud_anti_ddos_rule, the format is
<instance_id>/<ip>
for IP protocol rule or<instance_id>/<ip>/<port>
for TCP protocol rule. - backup
Server Map<String,String> - Backup server, which must be set when
real_server_detection
istrue
. - comment String
- Comment of the rule.
- instance
Id String - ID of ucloud_anti_ddos_instance.
- ip String
- IP, where the rule is applied. The value can be got from the IP attribute of ucloud_anti_ddos_ip.
- port Double
- Port, where the rule is applied. When port is not set or set zero, the Anti-DDoS instance just forwards traffic in layer-3, otherwise it forwards traffic in layer-4.
- real
Server BooleanDetection - Whether to detect real server health status. Default is
false
. - real
Server StringType - Type of real server address, whose value can be
IP
orDomain
. - real
Servers List<AntiDdos Rule Real Server> - Real server list.
- rule
Id String - rule
Index Double - status String
- Status of the IP. Possible values are
Pending
,Success
andFailed
. - toa
Id Double - ID of TOA for getting real client IP. Default is 200.
- anti
Ddos stringRule Id - The ID of the resource ucloud_anti_ddos_rule, the format is
<instance_id>/<ip>
for IP protocol rule or<instance_id>/<ip>/<port>
for TCP protocol rule. - backup
Server {[key: string]: string} - Backup server, which must be set when
real_server_detection
istrue
. - comment string
- Comment of the rule.
- instance
Id string - ID of ucloud_anti_ddos_instance.
- ip string
- IP, where the rule is applied. The value can be got from the IP attribute of ucloud_anti_ddos_ip.
- port number
- Port, where the rule is applied. When port is not set or set zero, the Anti-DDoS instance just forwards traffic in layer-3, otherwise it forwards traffic in layer-4.
- real
Server booleanDetection - Whether to detect real server health status. Default is
false
. - real
Server stringType - Type of real server address, whose value can be
IP
orDomain
. - real
Servers AntiDdos Rule Real Server[] - Real server list.
- rule
Id string - rule
Index number - status string
- Status of the IP. Possible values are
Pending
,Success
andFailed
. - toa
Id number - ID of TOA for getting real client IP. Default is 200.
- anti_
ddos_ strrule_ id - The ID of the resource ucloud_anti_ddos_rule, the format is
<instance_id>/<ip>
for IP protocol rule or<instance_id>/<ip>/<port>
for TCP protocol rule. - backup_
server Mapping[str, str] - Backup server, which must be set when
real_server_detection
istrue
. - comment str
- Comment of the rule.
- instance_
id str - ID of ucloud_anti_ddos_instance.
- ip str
- IP, where the rule is applied. The value can be got from the IP attribute of ucloud_anti_ddos_ip.
- port float
- Port, where the rule is applied. When port is not set or set zero, the Anti-DDoS instance just forwards traffic in layer-3, otherwise it forwards traffic in layer-4.
- real_
server_ booldetection - Whether to detect real server health status. Default is
false
. - real_
server_ strtype - Type of real server address, whose value can be
IP
orDomain
. - real_
servers Sequence[AntiDdos Rule Real Server Args] - Real server list.
- rule_
id str - rule_
index float - status str
- Status of the IP. Possible values are
Pending
,Success
andFailed
. - toa_
id float - ID of TOA for getting real client IP. Default is 200.
- anti
Ddos StringRule Id - The ID of the resource ucloud_anti_ddos_rule, the format is
<instance_id>/<ip>
for IP protocol rule or<instance_id>/<ip>/<port>
for TCP protocol rule. - backup
Server Map<String> - Backup server, which must be set when
real_server_detection
istrue
. - comment String
- Comment of the rule.
- instance
Id String - ID of ucloud_anti_ddos_instance.
- ip String
- IP, where the rule is applied. The value can be got from the IP attribute of ucloud_anti_ddos_ip.
- port Number
- Port, where the rule is applied. When port is not set or set zero, the Anti-DDoS instance just forwards traffic in layer-3, otherwise it forwards traffic in layer-4.
- real
Server BooleanDetection - Whether to detect real server health status. Default is
false
. - real
Server StringType - Type of real server address, whose value can be
IP
orDomain
. - real
Servers List<Property Map> - Real server list.
- rule
Id String - rule
Index Number - status String
- Status of the IP. Possible values are
Pending
,Success
andFailed
. - toa
Id Number - ID of TOA for getting real client IP. Default is 200.
Supporting Types
AntiDdosRuleRealServer, AntiDdosRuleRealServerArgs
Import
Anti-DDoS instance allowed domain can be imported using the <instance_id>/<ip>
or <instance_id>/<ip>/<port>
, e.g.
$ pulumi import ucloud:index/antiDdosRule:AntiDdosRule example usecure_ghp-xxx/10.10.10.10/4321
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ucloud ucloud/terraform-provider-ucloud
- License
- Notes
- This Pulumi package is based on the
ucloud
Terraform Provider.