tencentcloud.DayuL7RuleV2
Explore with Pulumi AI
Use this resource to create dayu new layer 7 rule
NOTE: This resource only support resource Anti-DDoS of type
bgpip
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const tencentcloudDayuL7RuleV2 = new tencentcloud.DayuL7RuleV2("tencentcloudDayuL7RuleV2", {
resourceId: "bgpip-000004xe",
resourceIp: "119.28.217.162",
resourceType: "bgpip",
rule: {
domain: "github.com",
keepEnable: false,
keeptime: 0,
lbType: 1,
protocol: "http",
sourceLists: [
{
source: "1.2.3.5",
weight: 100,
},
{
source: "1.2.3.6",
weight: 100,
},
],
sourceType: 2,
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
tencentcloud_dayu_l7_rule_v2 = tencentcloud.DayuL7RuleV2("tencentcloudDayuL7RuleV2",
resource_id="bgpip-000004xe",
resource_ip="119.28.217.162",
resource_type="bgpip",
rule={
"domain": "github.com",
"keep_enable": False,
"keeptime": 0,
"lb_type": 1,
"protocol": "http",
"source_lists": [
{
"source": "1.2.3.5",
"weight": 100,
},
{
"source": "1.2.3.6",
"weight": 100,
},
],
"source_type": 2,
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewDayuL7RuleV2(ctx, "tencentcloudDayuL7RuleV2", &tencentcloud.DayuL7RuleV2Args{
ResourceId: pulumi.String("bgpip-000004xe"),
ResourceIp: pulumi.String("119.28.217.162"),
ResourceType: pulumi.String("bgpip"),
Rule: &tencentcloud.DayuL7RuleV2RuleArgs{
Domain: pulumi.String("github.com"),
KeepEnable: pulumi.Float64(false),
Keeptime: pulumi.Float64(0),
LbType: pulumi.Float64(1),
Protocol: pulumi.String("http"),
SourceLists: tencentcloud.DayuL7RuleV2RuleSourceListArray{
&tencentcloud.DayuL7RuleV2RuleSourceListArgs{
Source: pulumi.String("1.2.3.5"),
Weight: pulumi.Float64(100),
},
&tencentcloud.DayuL7RuleV2RuleSourceListArgs{
Source: pulumi.String("1.2.3.6"),
Weight: pulumi.Float64(100),
},
},
SourceType: pulumi.Float64(2),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var tencentcloudDayuL7RuleV2 = new Tencentcloud.DayuL7RuleV2("tencentcloudDayuL7RuleV2", new()
{
ResourceId = "bgpip-000004xe",
ResourceIp = "119.28.217.162",
ResourceType = "bgpip",
Rule = new Tencentcloud.Inputs.DayuL7RuleV2RuleArgs
{
Domain = "github.com",
KeepEnable = false,
Keeptime = 0,
LbType = 1,
Protocol = "http",
SourceLists = new[]
{
new Tencentcloud.Inputs.DayuL7RuleV2RuleSourceListArgs
{
Source = "1.2.3.5",
Weight = 100,
},
new Tencentcloud.Inputs.DayuL7RuleV2RuleSourceListArgs
{
Source = "1.2.3.6",
Weight = 100,
},
},
SourceType = 2,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.DayuL7RuleV2;
import com.pulumi.tencentcloud.DayuL7RuleV2Args;
import com.pulumi.tencentcloud.inputs.DayuL7RuleV2RuleArgs;
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 tencentcloudDayuL7RuleV2 = new DayuL7RuleV2("tencentcloudDayuL7RuleV2", DayuL7RuleV2Args.builder()
.resourceId("bgpip-000004xe")
.resourceIp("119.28.217.162")
.resourceType("bgpip")
.rule(DayuL7RuleV2RuleArgs.builder()
.domain("github.com")
.keepEnable(false)
.keeptime(0)
.lbType(1)
.protocol("http")
.sourceLists(
DayuL7RuleV2RuleSourceListArgs.builder()
.source("1.2.3.5")
.weight(100)
.build(),
DayuL7RuleV2RuleSourceListArgs.builder()
.source("1.2.3.6")
.weight(100)
.build())
.sourceType(2)
.build())
.build());
}
}
resources:
tencentcloudDayuL7RuleV2:
type: tencentcloud:DayuL7RuleV2
properties:
resourceId: bgpip-000004xe
resourceIp: 119.28.217.162
resourceType: bgpip
rule:
domain: github.com
keepEnable: false
keeptime: 0
lbType: 1
protocol: http
sourceLists:
- source: 1.2.3.5
weight: 100
- source: 1.2.3.6
weight: 100
sourceType: 2
Create DayuL7RuleV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DayuL7RuleV2(name: string, args: DayuL7RuleV2Args, opts?: CustomResourceOptions);
@overload
def DayuL7RuleV2(resource_name: str,
args: DayuL7RuleV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def DayuL7RuleV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_id: Optional[str] = None,
resource_ip: Optional[str] = None,
resource_type: Optional[str] = None,
rule: Optional[DayuL7RuleV2RuleArgs] = None,
dayu_l7_rule_v2_id: Optional[str] = None)
func NewDayuL7RuleV2(ctx *Context, name string, args DayuL7RuleV2Args, opts ...ResourceOption) (*DayuL7RuleV2, error)
public DayuL7RuleV2(string name, DayuL7RuleV2Args args, CustomResourceOptions? opts = null)
public DayuL7RuleV2(String name, DayuL7RuleV2Args args)
public DayuL7RuleV2(String name, DayuL7RuleV2Args args, CustomResourceOptions options)
type: tencentcloud:DayuL7RuleV2
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 DayuL7RuleV2Args
- 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 DayuL7RuleV2Args
- 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 DayuL7RuleV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DayuL7RuleV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DayuL7RuleV2Args
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
DayuL7RuleV2 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 DayuL7RuleV2 resource accepts the following input properties:
- Resource
Id string - ID of the resource that the layer 7 rule works for.
- Resource
Ip string - Ip of the resource that the layer 7 rule works for.
- Resource
Type string - Type of the resource that the layer 7 rule works for, valid value is
bgpip
. - Rule
Dayu
L7Rule V2Rule - A list of layer 7 rules. Each element contains the following attributes:
- Dayu
L7Rule stringV2Id - ID of the resource.
- Resource
Id string - ID of the resource that the layer 7 rule works for.
- Resource
Ip string - Ip of the resource that the layer 7 rule works for.
- Resource
Type string - Type of the resource that the layer 7 rule works for, valid value is
bgpip
. - Rule
Dayu
L7Rule V2Rule Args - A list of layer 7 rules. Each element contains the following attributes:
- Dayu
L7Rule stringV2Id - ID of the resource.
- resource
Id String - ID of the resource that the layer 7 rule works for.
- resource
Ip String - Ip of the resource that the layer 7 rule works for.
- resource
Type String - Type of the resource that the layer 7 rule works for, valid value is
bgpip
. - rule
Dayu
L7Rule V2Rule - A list of layer 7 rules. Each element contains the following attributes:
- dayu
L7Rule StringV2Id - ID of the resource.
- resource
Id string - ID of the resource that the layer 7 rule works for.
- resource
Ip string - Ip of the resource that the layer 7 rule works for.
- resource
Type string - Type of the resource that the layer 7 rule works for, valid value is
bgpip
. - rule
Dayu
L7Rule V2Rule - A list of layer 7 rules. Each element contains the following attributes:
- dayu
L7Rule stringV2Id - ID of the resource.
- resource_
id str - ID of the resource that the layer 7 rule works for.
- resource_
ip str - Ip of the resource that the layer 7 rule works for.
- resource_
type str - Type of the resource that the layer 7 rule works for, valid value is
bgpip
. - rule
Dayu
L7Rule V2Rule Args - A list of layer 7 rules. Each element contains the following attributes:
- dayu_
l7_ strrule_ v2_ id - ID of the resource.
- resource
Id String - ID of the resource that the layer 7 rule works for.
- resource
Ip String - Ip of the resource that the layer 7 rule works for.
- resource
Type String - Type of the resource that the layer 7 rule works for, valid value is
bgpip
. - rule Property Map
- A list of layer 7 rules. Each element contains the following attributes:
- dayu
L7Rule StringV2Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the DayuL7RuleV2 resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing DayuL7RuleV2 Resource
Get an existing DayuL7RuleV2 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?: DayuL7RuleV2State, opts?: CustomResourceOptions): DayuL7RuleV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
dayu_l7_rule_v2_id: Optional[str] = None,
resource_id: Optional[str] = None,
resource_ip: Optional[str] = None,
resource_type: Optional[str] = None,
rule: Optional[DayuL7RuleV2RuleArgs] = None) -> DayuL7RuleV2
func GetDayuL7RuleV2(ctx *Context, name string, id IDInput, state *DayuL7RuleV2State, opts ...ResourceOption) (*DayuL7RuleV2, error)
public static DayuL7RuleV2 Get(string name, Input<string> id, DayuL7RuleV2State? state, CustomResourceOptions? opts = null)
public static DayuL7RuleV2 get(String name, Output<String> id, DayuL7RuleV2State state, CustomResourceOptions options)
resources: _: type: tencentcloud:DayuL7RuleV2 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.
- Dayu
L7Rule stringV2Id - ID of the resource.
- Resource
Id string - ID of the resource that the layer 7 rule works for.
- Resource
Ip string - Ip of the resource that the layer 7 rule works for.
- Resource
Type string - Type of the resource that the layer 7 rule works for, valid value is
bgpip
. - Rule
Dayu
L7Rule V2Rule - A list of layer 7 rules. Each element contains the following attributes:
- Dayu
L7Rule stringV2Id - ID of the resource.
- Resource
Id string - ID of the resource that the layer 7 rule works for.
- Resource
Ip string - Ip of the resource that the layer 7 rule works for.
- Resource
Type string - Type of the resource that the layer 7 rule works for, valid value is
bgpip
. - Rule
Dayu
L7Rule V2Rule Args - A list of layer 7 rules. Each element contains the following attributes:
- dayu
L7Rule StringV2Id - ID of the resource.
- resource
Id String - ID of the resource that the layer 7 rule works for.
- resource
Ip String - Ip of the resource that the layer 7 rule works for.
- resource
Type String - Type of the resource that the layer 7 rule works for, valid value is
bgpip
. - rule
Dayu
L7Rule V2Rule - A list of layer 7 rules. Each element contains the following attributes:
- dayu
L7Rule stringV2Id - ID of the resource.
- resource
Id string - ID of the resource that the layer 7 rule works for.
- resource
Ip string - Ip of the resource that the layer 7 rule works for.
- resource
Type string - Type of the resource that the layer 7 rule works for, valid value is
bgpip
. - rule
Dayu
L7Rule V2Rule - A list of layer 7 rules. Each element contains the following attributes:
- dayu_
l7_ strrule_ v2_ id - ID of the resource.
- resource_
id str - ID of the resource that the layer 7 rule works for.
- resource_
ip str - Ip of the resource that the layer 7 rule works for.
- resource_
type str - Type of the resource that the layer 7 rule works for, valid value is
bgpip
. - rule
Dayu
L7Rule V2Rule Args - A list of layer 7 rules. Each element contains the following attributes:
- dayu
L7Rule StringV2Id - ID of the resource.
- resource
Id String - ID of the resource that the layer 7 rule works for.
- resource
Ip String - Ip of the resource that the layer 7 rule works for.
- resource
Type String - Type of the resource that the layer 7 rule works for, valid value is
bgpip
. - rule Property Map
- A list of layer 7 rules. Each element contains the following attributes:
Supporting Types
DayuL7RuleV2Rule, DayuL7RuleV2RuleArgs
- Domain string
- Domain of the rule.
- Keep
Enable double - session hold switch.
- Keeptime double
- The keeptime of the layer 4 rule.
- Lb
Type double - LB type of the rule,
1
for weight cycling and2
for IP hash. - Protocol string
- Protocol of the rule.
- Source
Lists List<DayuL7Rule V2Rule Source List> - Source
Type double - Source type,
1
for source of host,2
for source of IP. - Cc
Enable double - HTTPS protocol CC protection status, value [0 (off), 1 (on)], defaule is 0.
- Cert
Type double - The source of the certificate must be filled in when the forwarding protocol is https, the value [2 (Tencent Cloud Hosting Certificate)], and 0 when the forwarding protocol is http.
- Https
To doubleHttp Enable - Whether to enable the Https protocol to use Http back-to-source, take the value [0 (off), 1 (on)], do not fill in the default is off, defaule is 0.
- Ssl
Id string - When the certificate source is a Tencent Cloud managed certificate, this field must be filled in with the managed certificate ID.
- Domain string
- Domain of the rule.
- Keep
Enable float64 - session hold switch.
- Keeptime float64
- The keeptime of the layer 4 rule.
- Lb
Type float64 - LB type of the rule,
1
for weight cycling and2
for IP hash. - Protocol string
- Protocol of the rule.
- Source
Lists []DayuL7Rule V2Rule Source List - Source
Type float64 - Source type,
1
for source of host,2
for source of IP. - Cc
Enable float64 - HTTPS protocol CC protection status, value [0 (off), 1 (on)], defaule is 0.
- Cert
Type float64 - The source of the certificate must be filled in when the forwarding protocol is https, the value [2 (Tencent Cloud Hosting Certificate)], and 0 when the forwarding protocol is http.
- Https
To float64Http Enable - Whether to enable the Https protocol to use Http back-to-source, take the value [0 (off), 1 (on)], do not fill in the default is off, defaule is 0.
- Ssl
Id string - When the certificate source is a Tencent Cloud managed certificate, this field must be filled in with the managed certificate ID.
- domain String
- Domain of the rule.
- keep
Enable Double - session hold switch.
- keeptime Double
- The keeptime of the layer 4 rule.
- lb
Type Double - LB type of the rule,
1
for weight cycling and2
for IP hash. - protocol String
- Protocol of the rule.
- source
Lists List<DayuL7Rule V2Rule Source List> - source
Type Double - Source type,
1
for source of host,2
for source of IP. - cc
Enable Double - HTTPS protocol CC protection status, value [0 (off), 1 (on)], defaule is 0.
- cert
Type Double - The source of the certificate must be filled in when the forwarding protocol is https, the value [2 (Tencent Cloud Hosting Certificate)], and 0 when the forwarding protocol is http.
- https
To DoubleHttp Enable - Whether to enable the Https protocol to use Http back-to-source, take the value [0 (off), 1 (on)], do not fill in the default is off, defaule is 0.
- ssl
Id String - When the certificate source is a Tencent Cloud managed certificate, this field must be filled in with the managed certificate ID.
- domain string
- Domain of the rule.
- keep
Enable number - session hold switch.
- keeptime number
- The keeptime of the layer 4 rule.
- lb
Type number - LB type of the rule,
1
for weight cycling and2
for IP hash. - protocol string
- Protocol of the rule.
- source
Lists DayuL7Rule V2Rule Source List[] - source
Type number - Source type,
1
for source of host,2
for source of IP. - cc
Enable number - HTTPS protocol CC protection status, value [0 (off), 1 (on)], defaule is 0.
- cert
Type number - The source of the certificate must be filled in when the forwarding protocol is https, the value [2 (Tencent Cloud Hosting Certificate)], and 0 when the forwarding protocol is http.
- https
To numberHttp Enable - Whether to enable the Https protocol to use Http back-to-source, take the value [0 (off), 1 (on)], do not fill in the default is off, defaule is 0.
- ssl
Id string - When the certificate source is a Tencent Cloud managed certificate, this field must be filled in with the managed certificate ID.
- domain str
- Domain of the rule.
- keep_
enable float - session hold switch.
- keeptime float
- The keeptime of the layer 4 rule.
- lb_
type float - LB type of the rule,
1
for weight cycling and2
for IP hash. - protocol str
- Protocol of the rule.
- source_
lists Sequence[DayuL7Rule V2Rule Source List] - source_
type float - Source type,
1
for source of host,2
for source of IP. - cc_
enable float - HTTPS protocol CC protection status, value [0 (off), 1 (on)], defaule is 0.
- cert_
type float - The source of the certificate must be filled in when the forwarding protocol is https, the value [2 (Tencent Cloud Hosting Certificate)], and 0 when the forwarding protocol is http.
- https_
to_ floathttp_ enable - Whether to enable the Https protocol to use Http back-to-source, take the value [0 (off), 1 (on)], do not fill in the default is off, defaule is 0.
- ssl_
id str - When the certificate source is a Tencent Cloud managed certificate, this field must be filled in with the managed certificate ID.
- domain String
- Domain of the rule.
- keep
Enable Number - session hold switch.
- keeptime Number
- The keeptime of the layer 4 rule.
- lb
Type Number - LB type of the rule,
1
for weight cycling and2
for IP hash. - protocol String
- Protocol of the rule.
- source
Lists List<Property Map> - source
Type Number - Source type,
1
for source of host,2
for source of IP. - cc
Enable Number - HTTPS protocol CC protection status, value [0 (off), 1 (on)], defaule is 0.
- cert
Type Number - The source of the certificate must be filled in when the forwarding protocol is https, the value [2 (Tencent Cloud Hosting Certificate)], and 0 when the forwarding protocol is http.
- https
To NumberHttp Enable - Whether to enable the Https protocol to use Http back-to-source, take the value [0 (off), 1 (on)], do not fill in the default is off, defaule is 0.
- ssl
Id String - When the certificate source is a Tencent Cloud managed certificate, this field must be filled in with the managed certificate ID.
DayuL7RuleV2RuleSourceList, DayuL7RuleV2RuleSourceListArgs
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.