tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
tencentcloud.getDayuL4Rules
Explore with Pulumi AI
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
Use this data source to query dayu layer 4 rules
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const nameTest = tencentcloud.getDayuL4Rules({
resourceType: tencentcloud_dayu_l4_rule.test_rule.resource_type,
resourceId: tencentcloud_dayu_l4_rule.test_rule.resource_id,
name: tencentcloud_dayu_l4_rule.test_rule.name,
});
const idTest = tencentcloud.getDayuL4Rules({
resourceType: tencentcloud_dayu_l4_rule.test_rule.resource_type,
resourceId: tencentcloud_dayu_l4_rule.test_rule.resource_id,
ruleId: tencentcloud_dayu_l4_rule.test_rule.rule_id,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
name_test = tencentcloud.get_dayu_l4_rules(resource_type=tencentcloud_dayu_l4_rule["test_rule"]["resource_type"],
resource_id=tencentcloud_dayu_l4_rule["test_rule"]["resource_id"],
name=tencentcloud_dayu_l4_rule["test_rule"]["name"])
id_test = tencentcloud.get_dayu_l4_rules(resource_type=tencentcloud_dayu_l4_rule["test_rule"]["resource_type"],
resource_id=tencentcloud_dayu_l4_rule["test_rule"]["resource_id"],
rule_id=tencentcloud_dayu_l4_rule["test_rule"]["rule_id"])
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.GetDayuL4Rules(ctx, &tencentcloud.GetDayuL4RulesArgs{
ResourceType: tencentcloud_dayu_l4_rule.Test_rule.Resource_type,
ResourceId: tencentcloud_dayu_l4_rule.Test_rule.Resource_id,
Name: pulumi.StringRef(tencentcloud_dayu_l4_rule.Test_rule.Name),
}, nil)
if err != nil {
return err
}
_, err = tencentcloud.GetDayuL4Rules(ctx, &tencentcloud.GetDayuL4RulesArgs{
ResourceType: tencentcloud_dayu_l4_rule.Test_rule.Resource_type,
ResourceId: tencentcloud_dayu_l4_rule.Test_rule.Resource_id,
RuleId: pulumi.StringRef(tencentcloud_dayu_l4_rule.Test_rule.Rule_id),
}, nil)
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 nameTest = Tencentcloud.GetDayuL4Rules.Invoke(new()
{
ResourceType = tencentcloud_dayu_l4_rule.Test_rule.Resource_type,
ResourceId = tencentcloud_dayu_l4_rule.Test_rule.Resource_id,
Name = tencentcloud_dayu_l4_rule.Test_rule.Name,
});
var idTest = Tencentcloud.GetDayuL4Rules.Invoke(new()
{
ResourceType = tencentcloud_dayu_l4_rule.Test_rule.Resource_type,
ResourceId = tencentcloud_dayu_l4_rule.Test_rule.Resource_id,
RuleId = tencentcloud_dayu_l4_rule.Test_rule.Rule_id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetDayuL4RulesArgs;
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 nameTest = TencentcloudFunctions.getDayuL4Rules(GetDayuL4RulesArgs.builder()
.resourceType(tencentcloud_dayu_l4_rule.test_rule().resource_type())
.resourceId(tencentcloud_dayu_l4_rule.test_rule().resource_id())
.name(tencentcloud_dayu_l4_rule.test_rule().name())
.build());
final var idTest = TencentcloudFunctions.getDayuL4Rules(GetDayuL4RulesArgs.builder()
.resourceType(tencentcloud_dayu_l4_rule.test_rule().resource_type())
.resourceId(tencentcloud_dayu_l4_rule.test_rule().resource_id())
.ruleId(tencentcloud_dayu_l4_rule.test_rule().rule_id())
.build());
}
}
variables:
nameTest:
fn::invoke:
function: tencentcloud:getDayuL4Rules
arguments:
resourceType: ${tencentcloud_dayu_l4_rule.test_rule.resource_type}
resourceId: ${tencentcloud_dayu_l4_rule.test_rule.resource_id}
name: ${tencentcloud_dayu_l4_rule.test_rule.name}
idTest:
fn::invoke:
function: tencentcloud:getDayuL4Rules
arguments:
resourceType: ${tencentcloud_dayu_l4_rule.test_rule.resource_type}
resourceId: ${tencentcloud_dayu_l4_rule.test_rule.resource_id}
ruleId: ${tencentcloud_dayu_l4_rule.test_rule.rule_id}
Using getDayuL4Rules
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDayuL4Rules(args: GetDayuL4RulesArgs, opts?: InvokeOptions): Promise<GetDayuL4RulesResult>
function getDayuL4RulesOutput(args: GetDayuL4RulesOutputArgs, opts?: InvokeOptions): Output<GetDayuL4RulesResult>
def get_dayu_l4_rules(id: Optional[str] = None,
name: Optional[str] = None,
resource_id: Optional[str] = None,
resource_type: Optional[str] = None,
result_output_file: Optional[str] = None,
rule_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDayuL4RulesResult
def get_dayu_l4_rules_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
resource_id: Optional[pulumi.Input[str]] = None,
resource_type: Optional[pulumi.Input[str]] = None,
result_output_file: Optional[pulumi.Input[str]] = None,
rule_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDayuL4RulesResult]
func GetDayuL4Rules(ctx *Context, args *GetDayuL4RulesArgs, opts ...InvokeOption) (*GetDayuL4RulesResult, error)
func GetDayuL4RulesOutput(ctx *Context, args *GetDayuL4RulesOutputArgs, opts ...InvokeOption) GetDayuL4RulesResultOutput
> Note: This function is named GetDayuL4Rules
in the Go SDK.
public static class GetDayuL4Rules
{
public static Task<GetDayuL4RulesResult> InvokeAsync(GetDayuL4RulesArgs args, InvokeOptions? opts = null)
public static Output<GetDayuL4RulesResult> Invoke(GetDayuL4RulesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDayuL4RulesResult> getDayuL4Rules(GetDayuL4RulesArgs args, InvokeOptions options)
public static Output<GetDayuL4RulesResult> getDayuL4Rules(GetDayuL4RulesArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getDayuL4Rules:getDayuL4Rules
arguments:
# arguments dictionary
The following arguments are supported:
- Resource
Id string - Id of the resource that the layer 4 rule works for.
- Resource
Type string - Type of the resource that the layer 4 rule works for, valid values are
bgpip
,bgp
,bgp-multip
andnet
. - Id string
- Name string
- Name of the layer 4 rule to be queried.
- Result
Output stringFile - Used to save results.
- Rule
Id string - Id of the layer 4 rule to be queried.
- Resource
Id string - Id of the resource that the layer 4 rule works for.
- Resource
Type string - Type of the resource that the layer 4 rule works for, valid values are
bgpip
,bgp
,bgp-multip
andnet
. - Id string
- Name string
- Name of the layer 4 rule to be queried.
- Result
Output stringFile - Used to save results.
- Rule
Id string - Id of the layer 4 rule to be queried.
- resource
Id String - Id of the resource that the layer 4 rule works for.
- resource
Type String - Type of the resource that the layer 4 rule works for, valid values are
bgpip
,bgp
,bgp-multip
andnet
. - id String
- name String
- Name of the layer 4 rule to be queried.
- result
Output StringFile - Used to save results.
- rule
Id String - Id of the layer 4 rule to be queried.
- resource
Id string - Id of the resource that the layer 4 rule works for.
- resource
Type string - Type of the resource that the layer 4 rule works for, valid values are
bgpip
,bgp
,bgp-multip
andnet
. - id string
- name string
- Name of the layer 4 rule to be queried.
- result
Output stringFile - Used to save results.
- rule
Id string - Id of the layer 4 rule to be queried.
- resource_
id str - Id of the resource that the layer 4 rule works for.
- resource_
type str - Type of the resource that the layer 4 rule works for, valid values are
bgpip
,bgp
,bgp-multip
andnet
. - id str
- name str
- Name of the layer 4 rule to be queried.
- result_
output_ strfile - Used to save results.
- rule_
id str - Id of the layer 4 rule to be queried.
- resource
Id String - Id of the resource that the layer 4 rule works for.
- resource
Type String - Type of the resource that the layer 4 rule works for, valid values are
bgpip
,bgp
,bgp-multip
andnet
. - id String
- name String
- Name of the layer 4 rule to be queried.
- result
Output StringFile - Used to save results.
- rule
Id String - Id of the layer 4 rule to be queried.
getDayuL4Rules Result
The following output properties are available:
- Id string
- Lists
List<Get
Dayu L4Rules List> - A list of layer 4 rules. Each element contains the following attributes:
- Resource
Id string - Resource
Type string - Name string
- Name of the rule.
- Result
Output stringFile - Rule
Id string - ID of the 4 layer rule.
- Id string
- Lists
[]Get
Dayu L4Rules List - A list of layer 4 rules. Each element contains the following attributes:
- Resource
Id string - Resource
Type string - Name string
- Name of the rule.
- Result
Output stringFile - Rule
Id string - ID of the 4 layer rule.
- id String
- lists
List<Get
Dayu L4Rules List> - A list of layer 4 rules. Each element contains the following attributes:
- resource
Id String - resource
Type String - name String
- Name of the rule.
- result
Output StringFile - rule
Id String - ID of the 4 layer rule.
- id string
- lists
Get
Dayu L4Rules List[] - A list of layer 4 rules. Each element contains the following attributes:
- resource
Id string - resource
Type string - name string
- Name of the rule.
- result
Output stringFile - rule
Id string - ID of the 4 layer rule.
- id str
- lists
Sequence[Get
Dayu L4Rules List] - A list of layer 4 rules. Each element contains the following attributes:
- resource_
id str - resource_
type str - name str
- Name of the rule.
- result_
output_ strfile - rule_
id str - ID of the 4 layer rule.
- id String
- lists List<Property Map>
- A list of layer 4 rules. Each element contains the following attributes:
- resource
Id String - resource
Type String - name String
- Name of the rule.
- result
Output StringFile - rule
Id String - ID of the 4 layer rule.
Supporting Types
GetDayuL4RulesList
- DPort double
- The destination port of the layer 4 rule.
- Health
Check doubleHealth Num - Health threshold of health check.
- Health
Check doubleInterval - Interval time of health check.
- Health
Check boolSwitch - Indicates whether health check is enabled.
- Health
Check doubleTimeout - HTTP Status Code.
1
means the return value1xx
is health.2
means the return value2xx
is health.4
means the return value3xx
is health.8
means the return value4xx
is health.16
means the return value5xx
is health. If you want multiple return codes to indicate health, need to add the corresponding values. - Health
Check doubleUnhealth Num - Unhealthy threshold of health check.
- Lb
Type double - LB type of the rule,
1
for weight cycling and2
for IP hash. - Name string
- Name of the layer 4 rule to be queried.
- Protocol string
- Protocol of the rule.
- Rule
Id string - Id of the layer 4 rule to be queried.
- SPort double
- The source port of the layer 4 rule.
- Session
Switch bool - Indicate that the session will keep or not.
- Session
Time double - Session keep time, only valid when
session_switch
is true, the available value ranges from 1 to 300 and unit is second. - Source
Lists List<GetDayu L4Rules List Source List> - Source
Type double - Source type,
1
for source of host,2
for source of IP.
- DPort float64
- The destination port of the layer 4 rule.
- Health
Check float64Health Num - Health threshold of health check.
- Health
Check float64Interval - Interval time of health check.
- Health
Check boolSwitch - Indicates whether health check is enabled.
- Health
Check float64Timeout - HTTP Status Code.
1
means the return value1xx
is health.2
means the return value2xx
is health.4
means the return value3xx
is health.8
means the return value4xx
is health.16
means the return value5xx
is health. If you want multiple return codes to indicate health, need to add the corresponding values. - Health
Check float64Unhealth Num - Unhealthy threshold of health check.
- Lb
Type float64 - LB type of the rule,
1
for weight cycling and2
for IP hash. - Name string
- Name of the layer 4 rule to be queried.
- Protocol string
- Protocol of the rule.
- Rule
Id string - Id of the layer 4 rule to be queried.
- SPort float64
- The source port of the layer 4 rule.
- Session
Switch bool - Indicate that the session will keep or not.
- Session
Time float64 - Session keep time, only valid when
session_switch
is true, the available value ranges from 1 to 300 and unit is second. - Source
Lists []GetDayu L4Rules List Source List - Source
Type float64 - Source type,
1
for source of host,2
for source of IP.
- d
Port Double - The destination port of the layer 4 rule.
- health
Check DoubleHealth Num - Health threshold of health check.
- health
Check DoubleInterval - Interval time of health check.
- health
Check BooleanSwitch - Indicates whether health check is enabled.
- health
Check DoubleTimeout - HTTP Status Code.
1
means the return value1xx
is health.2
means the return value2xx
is health.4
means the return value3xx
is health.8
means the return value4xx
is health.16
means the return value5xx
is health. If you want multiple return codes to indicate health, need to add the corresponding values. - health
Check DoubleUnhealth Num - Unhealthy threshold of health check.
- lb
Type Double - LB type of the rule,
1
for weight cycling and2
for IP hash. - name String
- Name of the layer 4 rule to be queried.
- protocol String
- Protocol of the rule.
- rule
Id String - Id of the layer 4 rule to be queried.
- s
Port Double - The source port of the layer 4 rule.
- session
Switch Boolean - Indicate that the session will keep or not.
- session
Time Double - Session keep time, only valid when
session_switch
is true, the available value ranges from 1 to 300 and unit is second. - source
Lists List<GetDayu L4Rules List Source List> - source
Type Double - Source type,
1
for source of host,2
for source of IP.
- d
Port number - The destination port of the layer 4 rule.
- health
Check numberHealth Num - Health threshold of health check.
- health
Check numberInterval - Interval time of health check.
- health
Check booleanSwitch - Indicates whether health check is enabled.
- health
Check numberTimeout - HTTP Status Code.
1
means the return value1xx
is health.2
means the return value2xx
is health.4
means the return value3xx
is health.8
means the return value4xx
is health.16
means the return value5xx
is health. If you want multiple return codes to indicate health, need to add the corresponding values. - health
Check numberUnhealth Num - Unhealthy threshold of health check.
- lb
Type number - LB type of the rule,
1
for weight cycling and2
for IP hash. - name string
- Name of the layer 4 rule to be queried.
- protocol string
- Protocol of the rule.
- rule
Id string - Id of the layer 4 rule to be queried.
- s
Port number - The source port of the layer 4 rule.
- session
Switch boolean - Indicate that the session will keep or not.
- session
Time number - Session keep time, only valid when
session_switch
is true, the available value ranges from 1 to 300 and unit is second. - source
Lists GetDayu L4Rules List Source List[] - source
Type number - Source type,
1
for source of host,2
for source of IP.
- d_
port float - The destination port of the layer 4 rule.
- health_
check_ floathealth_ num - Health threshold of health check.
- health_
check_ floatinterval - Interval time of health check.
- health_
check_ boolswitch - Indicates whether health check is enabled.
- health_
check_ floattimeout - HTTP Status Code.
1
means the return value1xx
is health.2
means the return value2xx
is health.4
means the return value3xx
is health.8
means the return value4xx
is health.16
means the return value5xx
is health. If you want multiple return codes to indicate health, need to add the corresponding values. - health_
check_ floatunhealth_ num - Unhealthy threshold of health check.
- lb_
type float - LB type of the rule,
1
for weight cycling and2
for IP hash. - name str
- Name of the layer 4 rule to be queried.
- protocol str
- Protocol of the rule.
- rule_
id str - Id of the layer 4 rule to be queried.
- s_
port float - The source port of the layer 4 rule.
- session_
switch bool - Indicate that the session will keep or not.
- session_
time float - Session keep time, only valid when
session_switch
is true, the available value ranges from 1 to 300 and unit is second. - source_
lists Sequence[GetDayu L4Rules List Source List] - source_
type float - Source type,
1
for source of host,2
for source of IP.
- d
Port Number - The destination port of the layer 4 rule.
- health
Check NumberHealth Num - Health threshold of health check.
- health
Check NumberInterval - Interval time of health check.
- health
Check BooleanSwitch - Indicates whether health check is enabled.
- health
Check NumberTimeout - HTTP Status Code.
1
means the return value1xx
is health.2
means the return value2xx
is health.4
means the return value3xx
is health.8
means the return value4xx
is health.16
means the return value5xx
is health. If you want multiple return codes to indicate health, need to add the corresponding values. - health
Check NumberUnhealth Num - Unhealthy threshold of health check.
- lb
Type Number - LB type of the rule,
1
for weight cycling and2
for IP hash. - name String
- Name of the layer 4 rule to be queried.
- protocol String
- Protocol of the rule.
- rule
Id String - Id of the layer 4 rule to be queried.
- s
Port Number - The source port of the layer 4 rule.
- session
Switch Boolean - Indicate that the session will keep or not.
- session
Time Number - Session keep time, only valid when
session_switch
is true, the available value ranges from 1 to 300 and unit is second. - source
Lists List<Property Map> - source
Type Number - Source type,
1
for source of host,2
for source of IP.
GetDayuL4RulesListSourceList
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack