tencentcloud.TeoL4ProxyRule
Explore with Pulumi AI
Provides a resource to create a teo teo_l4_proxy_rule
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const teoL4ProxyRule = new tencentcloud.TeoL4ProxyRule("teoL4ProxyRule", {
l4ProxyRules: {
clientIpPassThroughMode: "OFF",
originPortRange: "1212",
originType: "IP_DOMAIN",
originValues: ["www.aaa.com"],
portRanges: ["1212"],
protocol: "TCP",
ruleTag: "aaa",
sessionPersist: "off",
sessionPersistTime: 3600,
},
proxyId: "sid-38hbn26osico",
zoneId: "zone-36bjhygh1bxe",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
teo_l4_proxy_rule = tencentcloud.TeoL4ProxyRule("teoL4ProxyRule",
l4_proxy_rules={
"client_ip_pass_through_mode": "OFF",
"origin_port_range": "1212",
"origin_type": "IP_DOMAIN",
"origin_values": ["www.aaa.com"],
"port_ranges": ["1212"],
"protocol": "TCP",
"rule_tag": "aaa",
"session_persist": "off",
"session_persist_time": 3600,
},
proxy_id="sid-38hbn26osico",
zone_id="zone-36bjhygh1bxe")
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.NewTeoL4ProxyRule(ctx, "teoL4ProxyRule", &tencentcloud.TeoL4ProxyRuleArgs{
L4ProxyRules: &tencentcloud.TeoL4ProxyRuleL4ProxyRulesArgs{
ClientIpPassThroughMode: pulumi.String("OFF"),
OriginPortRange: pulumi.String("1212"),
OriginType: pulumi.String("IP_DOMAIN"),
OriginValues: pulumi.StringArray{
pulumi.String("www.aaa.com"),
},
PortRanges: pulumi.StringArray{
pulumi.String("1212"),
},
Protocol: pulumi.String("TCP"),
RuleTag: pulumi.String("aaa"),
SessionPersist: pulumi.String("off"),
SessionPersistTime: pulumi.Float64(3600),
},
ProxyId: pulumi.String("sid-38hbn26osico"),
ZoneId: pulumi.String("zone-36bjhygh1bxe"),
})
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 teoL4ProxyRule = new Tencentcloud.TeoL4ProxyRule("teoL4ProxyRule", new()
{
L4ProxyRules = new Tencentcloud.Inputs.TeoL4ProxyRuleL4ProxyRulesArgs
{
ClientIpPassThroughMode = "OFF",
OriginPortRange = "1212",
OriginType = "IP_DOMAIN",
OriginValues = new[]
{
"www.aaa.com",
},
PortRanges = new[]
{
"1212",
},
Protocol = "TCP",
RuleTag = "aaa",
SessionPersist = "off",
SessionPersistTime = 3600,
},
ProxyId = "sid-38hbn26osico",
ZoneId = "zone-36bjhygh1bxe",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TeoL4ProxyRule;
import com.pulumi.tencentcloud.TeoL4ProxyRuleArgs;
import com.pulumi.tencentcloud.inputs.TeoL4ProxyRuleL4ProxyRulesArgs;
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 teoL4ProxyRule = new TeoL4ProxyRule("teoL4ProxyRule", TeoL4ProxyRuleArgs.builder()
.l4ProxyRules(TeoL4ProxyRuleL4ProxyRulesArgs.builder()
.clientIpPassThroughMode("OFF")
.originPortRange("1212")
.originType("IP_DOMAIN")
.originValues("www.aaa.com")
.portRanges("1212")
.protocol("TCP")
.ruleTag("aaa")
.sessionPersist("off")
.sessionPersistTime(3600)
.build())
.proxyId("sid-38hbn26osico")
.zoneId("zone-36bjhygh1bxe")
.build());
}
}
resources:
teoL4ProxyRule:
type: tencentcloud:TeoL4ProxyRule
properties:
l4ProxyRules:
clientIpPassThroughMode: OFF
originPortRange: '1212'
originType: IP_DOMAIN
originValues:
- www.aaa.com
portRanges:
- '1212'
protocol: TCP
ruleTag: aaa
sessionPersist: off
sessionPersistTime: 3600
proxyId: sid-38hbn26osico
zoneId: zone-36bjhygh1bxe
Create TeoL4ProxyRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TeoL4ProxyRule(name: string, args: TeoL4ProxyRuleArgs, opts?: CustomResourceOptions);
@overload
def TeoL4ProxyRule(resource_name: str,
args: TeoL4ProxyRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TeoL4ProxyRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
l4_proxy_rules: Optional[TeoL4ProxyRuleL4ProxyRulesArgs] = None,
proxy_id: Optional[str] = None,
zone_id: Optional[str] = None,
teo_l4_proxy_rule_id: Optional[str] = None)
func NewTeoL4ProxyRule(ctx *Context, name string, args TeoL4ProxyRuleArgs, opts ...ResourceOption) (*TeoL4ProxyRule, error)
public TeoL4ProxyRule(string name, TeoL4ProxyRuleArgs args, CustomResourceOptions? opts = null)
public TeoL4ProxyRule(String name, TeoL4ProxyRuleArgs args)
public TeoL4ProxyRule(String name, TeoL4ProxyRuleArgs args, CustomResourceOptions options)
type: tencentcloud:TeoL4ProxyRule
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 TeoL4ProxyRuleArgs
- 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 TeoL4ProxyRuleArgs
- 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 TeoL4ProxyRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TeoL4ProxyRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TeoL4ProxyRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TeoL4ProxyRule 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 TeoL4ProxyRule resource accepts the following input properties:
- L4Proxy
Rules TeoL4Proxy Rule L4Proxy Rules - List of forwarding rules. Note: When L4ProxyRule is used here, Protocol, PortRange, OriginType, OriginValue, and OriginPortRange are required fields; ClientIPPassThroughMode, SessionPersist, SessionPersistTime, and RuleTag are optional fields; do not fill in RuleId and Status.
- Proxy
Id string - Layer 4 proxy instance ID.
- Zone
Id string - Zone ID.
- Teo
L4Proxy stringRule Id - ID of the resource.
- L4Proxy
Rules TeoL4Proxy Rule L4Proxy Rules Args - List of forwarding rules. Note: When L4ProxyRule is used here, Protocol, PortRange, OriginType, OriginValue, and OriginPortRange are required fields; ClientIPPassThroughMode, SessionPersist, SessionPersistTime, and RuleTag are optional fields; do not fill in RuleId and Status.
- Proxy
Id string - Layer 4 proxy instance ID.
- Zone
Id string - Zone ID.
- Teo
L4Proxy stringRule Id - ID of the resource.
- l4Proxy
Rules TeoL4Proxy Rule L4Proxy Rules - List of forwarding rules. Note: When L4ProxyRule is used here, Protocol, PortRange, OriginType, OriginValue, and OriginPortRange are required fields; ClientIPPassThroughMode, SessionPersist, SessionPersistTime, and RuleTag are optional fields; do not fill in RuleId and Status.
- proxy
Id String - Layer 4 proxy instance ID.
- zone
Id String - Zone ID.
- teo
L4Proxy StringRule Id - ID of the resource.
- l4Proxy
Rules TeoL4Proxy Rule L4Proxy Rules - List of forwarding rules. Note: When L4ProxyRule is used here, Protocol, PortRange, OriginType, OriginValue, and OriginPortRange are required fields; ClientIPPassThroughMode, SessionPersist, SessionPersistTime, and RuleTag are optional fields; do not fill in RuleId and Status.
- proxy
Id string - Layer 4 proxy instance ID.
- zone
Id string - Zone ID.
- teo
L4Proxy stringRule Id - ID of the resource.
- l4_
proxy_ Teorules L4Proxy Rule L4Proxy Rules Args - List of forwarding rules. Note: When L4ProxyRule is used here, Protocol, PortRange, OriginType, OriginValue, and OriginPortRange are required fields; ClientIPPassThroughMode, SessionPersist, SessionPersistTime, and RuleTag are optional fields; do not fill in RuleId and Status.
- proxy_
id str - Layer 4 proxy instance ID.
- zone_
id str - Zone ID.
- teo_
l4_ strproxy_ rule_ id - ID of the resource.
- l4Proxy
Rules Property Map - List of forwarding rules. Note: When L4ProxyRule is used here, Protocol, PortRange, OriginType, OriginValue, and OriginPortRange are required fields; ClientIPPassThroughMode, SessionPersist, SessionPersistTime, and RuleTag are optional fields; do not fill in RuleId and Status.
- proxy
Id String - Layer 4 proxy instance ID.
- zone
Id String - Zone ID.
- teo
L4Proxy StringRule Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the TeoL4ProxyRule 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 TeoL4ProxyRule Resource
Get an existing TeoL4ProxyRule 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?: TeoL4ProxyRuleState, opts?: CustomResourceOptions): TeoL4ProxyRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
l4_proxy_rules: Optional[TeoL4ProxyRuleL4ProxyRulesArgs] = None,
proxy_id: Optional[str] = None,
teo_l4_proxy_rule_id: Optional[str] = None,
zone_id: Optional[str] = None) -> TeoL4ProxyRule
func GetTeoL4ProxyRule(ctx *Context, name string, id IDInput, state *TeoL4ProxyRuleState, opts ...ResourceOption) (*TeoL4ProxyRule, error)
public static TeoL4ProxyRule Get(string name, Input<string> id, TeoL4ProxyRuleState? state, CustomResourceOptions? opts = null)
public static TeoL4ProxyRule get(String name, Output<String> id, TeoL4ProxyRuleState state, CustomResourceOptions options)
resources: _: type: tencentcloud:TeoL4ProxyRule 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.
- L4Proxy
Rules TeoL4Proxy Rule L4Proxy Rules - List of forwarding rules. Note: When L4ProxyRule is used here, Protocol, PortRange, OriginType, OriginValue, and OriginPortRange are required fields; ClientIPPassThroughMode, SessionPersist, SessionPersistTime, and RuleTag are optional fields; do not fill in RuleId and Status.
- Proxy
Id string - Layer 4 proxy instance ID.
- Teo
L4Proxy stringRule Id - ID of the resource.
- Zone
Id string - Zone ID.
- L4Proxy
Rules TeoL4Proxy Rule L4Proxy Rules Args - List of forwarding rules. Note: When L4ProxyRule is used here, Protocol, PortRange, OriginType, OriginValue, and OriginPortRange are required fields; ClientIPPassThroughMode, SessionPersist, SessionPersistTime, and RuleTag are optional fields; do not fill in RuleId and Status.
- Proxy
Id string - Layer 4 proxy instance ID.
- Teo
L4Proxy stringRule Id - ID of the resource.
- Zone
Id string - Zone ID.
- l4Proxy
Rules TeoL4Proxy Rule L4Proxy Rules - List of forwarding rules. Note: When L4ProxyRule is used here, Protocol, PortRange, OriginType, OriginValue, and OriginPortRange are required fields; ClientIPPassThroughMode, SessionPersist, SessionPersistTime, and RuleTag are optional fields; do not fill in RuleId and Status.
- proxy
Id String - Layer 4 proxy instance ID.
- teo
L4Proxy StringRule Id - ID of the resource.
- zone
Id String - Zone ID.
- l4Proxy
Rules TeoL4Proxy Rule L4Proxy Rules - List of forwarding rules. Note: When L4ProxyRule is used here, Protocol, PortRange, OriginType, OriginValue, and OriginPortRange are required fields; ClientIPPassThroughMode, SessionPersist, SessionPersistTime, and RuleTag are optional fields; do not fill in RuleId and Status.
- proxy
Id string - Layer 4 proxy instance ID.
- teo
L4Proxy stringRule Id - ID of the resource.
- zone
Id string - Zone ID.
- l4_
proxy_ Teorules L4Proxy Rule L4Proxy Rules Args - List of forwarding rules. Note: When L4ProxyRule is used here, Protocol, PortRange, OriginType, OriginValue, and OriginPortRange are required fields; ClientIPPassThroughMode, SessionPersist, SessionPersistTime, and RuleTag are optional fields; do not fill in RuleId and Status.
- proxy_
id str - Layer 4 proxy instance ID.
- teo_
l4_ strproxy_ rule_ id - ID of the resource.
- zone_
id str - Zone ID.
- l4Proxy
Rules Property Map - List of forwarding rules. Note: When L4ProxyRule is used here, Protocol, PortRange, OriginType, OriginValue, and OriginPortRange are required fields; ClientIPPassThroughMode, SessionPersist, SessionPersistTime, and RuleTag are optional fields; do not fill in RuleId and Status.
- proxy
Id String - Layer 4 proxy instance ID.
- teo
L4Proxy StringRule Id - ID of the resource.
- zone
Id String - Zone ID.
Supporting Types
TeoL4ProxyRuleL4ProxyRules, TeoL4ProxyRuleL4ProxyRulesArgs
- Client
Ip stringPass Through Mode - Transmission of the client IP address. Valid values:TOA: Available only when Protocol=TCP;
- Origin
Port stringRange - Origin server port, which can be set as follows:A single port, such as 80;
- Origin
Type string - Origin server type. Valid values:
- Origin
Values List<string> - Origin server address.
- Port
Ranges List<string> - Forwarding port, which can be set as follows:
- Protocol string
- Forwarding protocol. Valid values:
- Rule
Id string - Forwarding rule ID.
- Rule
Tag string - Rule tag. Accepts 1-50 arbitrary characters. Note: This parameter is optional when L4ProxyRule is used as an input parameter in Createl4ProxyRule; it is optional when L4ProxyRule is used as an input parameter in Modifyl4ProxyRule. If not specified, it will retain its existing value.
- Session
Persist string - Specifies whether to enable session persistence. Valid values:
- Session
Persist doubleTime - Session persistence period, with a range of 30-3600, measured in seconds. Note: This parameter is optional when L4ProxyRule is used as an input parameter in Createl4ProxyRule. It is valid only when SessionPersist is set to on and defaults to 3600 if not specified. It is optional when L4ProxyRule is used as an input parameter in Modifyl4ProxyRule. If not specified, it will retain its existing value.
- Status string
- Rule status. Valid values:online: Enabled;
- Client
Ip stringPass Through Mode - Transmission of the client IP address. Valid values:TOA: Available only when Protocol=TCP;
- Origin
Port stringRange - Origin server port, which can be set as follows:A single port, such as 80;
- Origin
Type string - Origin server type. Valid values:
- Origin
Values []string - Origin server address.
- Port
Ranges []string - Forwarding port, which can be set as follows:
- Protocol string
- Forwarding protocol. Valid values:
- Rule
Id string - Forwarding rule ID.
- Rule
Tag string - Rule tag. Accepts 1-50 arbitrary characters. Note: This parameter is optional when L4ProxyRule is used as an input parameter in Createl4ProxyRule; it is optional when L4ProxyRule is used as an input parameter in Modifyl4ProxyRule. If not specified, it will retain its existing value.
- Session
Persist string - Specifies whether to enable session persistence. Valid values:
- Session
Persist float64Time - Session persistence period, with a range of 30-3600, measured in seconds. Note: This parameter is optional when L4ProxyRule is used as an input parameter in Createl4ProxyRule. It is valid only when SessionPersist is set to on and defaults to 3600 if not specified. It is optional when L4ProxyRule is used as an input parameter in Modifyl4ProxyRule. If not specified, it will retain its existing value.
- Status string
- Rule status. Valid values:online: Enabled;
- client
Ip StringPass Through Mode - Transmission of the client IP address. Valid values:TOA: Available only when Protocol=TCP;
- origin
Port StringRange - Origin server port, which can be set as follows:A single port, such as 80;
- origin
Type String - Origin server type. Valid values:
- origin
Values List<String> - Origin server address.
- port
Ranges List<String> - Forwarding port, which can be set as follows:
- protocol String
- Forwarding protocol. Valid values:
- rule
Id String - Forwarding rule ID.
- rule
Tag String - Rule tag. Accepts 1-50 arbitrary characters. Note: This parameter is optional when L4ProxyRule is used as an input parameter in Createl4ProxyRule; it is optional when L4ProxyRule is used as an input parameter in Modifyl4ProxyRule. If not specified, it will retain its existing value.
- session
Persist String - Specifies whether to enable session persistence. Valid values:
- session
Persist DoubleTime - Session persistence period, with a range of 30-3600, measured in seconds. Note: This parameter is optional when L4ProxyRule is used as an input parameter in Createl4ProxyRule. It is valid only when SessionPersist is set to on and defaults to 3600 if not specified. It is optional when L4ProxyRule is used as an input parameter in Modifyl4ProxyRule. If not specified, it will retain its existing value.
- status String
- Rule status. Valid values:online: Enabled;
- client
Ip stringPass Through Mode - Transmission of the client IP address. Valid values:TOA: Available only when Protocol=TCP;
- origin
Port stringRange - Origin server port, which can be set as follows:A single port, such as 80;
- origin
Type string - Origin server type. Valid values:
- origin
Values string[] - Origin server address.
- port
Ranges string[] - Forwarding port, which can be set as follows:
- protocol string
- Forwarding protocol. Valid values:
- rule
Id string - Forwarding rule ID.
- rule
Tag string - Rule tag. Accepts 1-50 arbitrary characters. Note: This parameter is optional when L4ProxyRule is used as an input parameter in Createl4ProxyRule; it is optional when L4ProxyRule is used as an input parameter in Modifyl4ProxyRule. If not specified, it will retain its existing value.
- session
Persist string - Specifies whether to enable session persistence. Valid values:
- session
Persist numberTime - Session persistence period, with a range of 30-3600, measured in seconds. Note: This parameter is optional when L4ProxyRule is used as an input parameter in Createl4ProxyRule. It is valid only when SessionPersist is set to on and defaults to 3600 if not specified. It is optional when L4ProxyRule is used as an input parameter in Modifyl4ProxyRule. If not specified, it will retain its existing value.
- status string
- Rule status. Valid values:online: Enabled;
- client_
ip_ strpass_ through_ mode - Transmission of the client IP address. Valid values:TOA: Available only when Protocol=TCP;
- origin_
port_ strrange - Origin server port, which can be set as follows:A single port, such as 80;
- origin_
type str - Origin server type. Valid values:
- origin_
values Sequence[str] - Origin server address.
- port_
ranges Sequence[str] - Forwarding port, which can be set as follows:
- protocol str
- Forwarding protocol. Valid values:
- rule_
id str - Forwarding rule ID.
- rule_
tag str - Rule tag. Accepts 1-50 arbitrary characters. Note: This parameter is optional when L4ProxyRule is used as an input parameter in Createl4ProxyRule; it is optional when L4ProxyRule is used as an input parameter in Modifyl4ProxyRule. If not specified, it will retain its existing value.
- session_
persist str - Specifies whether to enable session persistence. Valid values:
- session_
persist_ floattime - Session persistence period, with a range of 30-3600, measured in seconds. Note: This parameter is optional when L4ProxyRule is used as an input parameter in Createl4ProxyRule. It is valid only when SessionPersist is set to on and defaults to 3600 if not specified. It is optional when L4ProxyRule is used as an input parameter in Modifyl4ProxyRule. If not specified, it will retain its existing value.
- status str
- Rule status. Valid values:online: Enabled;
- client
Ip StringPass Through Mode - Transmission of the client IP address. Valid values:TOA: Available only when Protocol=TCP;
- origin
Port StringRange - Origin server port, which can be set as follows:A single port, such as 80;
- origin
Type String - Origin server type. Valid values:
- origin
Values List<String> - Origin server address.
- port
Ranges List<String> - Forwarding port, which can be set as follows:
- protocol String
- Forwarding protocol. Valid values:
- rule
Id String - Forwarding rule ID.
- rule
Tag String - Rule tag. Accepts 1-50 arbitrary characters. Note: This parameter is optional when L4ProxyRule is used as an input parameter in Createl4ProxyRule; it is optional when L4ProxyRule is used as an input parameter in Modifyl4ProxyRule. If not specified, it will retain its existing value.
- session
Persist String - Specifies whether to enable session persistence. Valid values:
- session
Persist NumberTime - Session persistence period, with a range of 30-3600, measured in seconds. Note: This parameter is optional when L4ProxyRule is used as an input parameter in Createl4ProxyRule. It is valid only when SessionPersist is set to on and defaults to 3600 if not specified. It is optional when L4ProxyRule is used as an input parameter in Modifyl4ProxyRule. If not specified, it will retain its existing value.
- status String
- Rule status. Valid values:online: Enabled;
Import
teo teo_l4_proxy can be imported using the id, e.g.
$ pulumi import tencentcloud:index/teoL4ProxyRule:TeoL4ProxyRule teo_l4_proxy_rule zoneId#proxyId#ruleId
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.