1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getDayuL4Rules
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.getDayuL4Rules

Explore with Pulumi AI

tencentcloud logo
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:

    ResourceId string
    Id of the resource that the layer 4 rule works for.
    ResourceType string
    Type of the resource that the layer 4 rule works for, valid values are bgpip, bgp, bgp-multip and net.
    Id string
    Name string
    Name of the layer 4 rule to be queried.
    ResultOutputFile string
    Used to save results.
    RuleId string
    Id of the layer 4 rule to be queried.
    ResourceId string
    Id of the resource that the layer 4 rule works for.
    ResourceType string
    Type of the resource that the layer 4 rule works for, valid values are bgpip, bgp, bgp-multip and net.
    Id string
    Name string
    Name of the layer 4 rule to be queried.
    ResultOutputFile string
    Used to save results.
    RuleId string
    Id of the layer 4 rule to be queried.
    resourceId String
    Id of the resource that the layer 4 rule works for.
    resourceType String
    Type of the resource that the layer 4 rule works for, valid values are bgpip, bgp, bgp-multip and net.
    id String
    name String
    Name of the layer 4 rule to be queried.
    resultOutputFile String
    Used to save results.
    ruleId String
    Id of the layer 4 rule to be queried.
    resourceId string
    Id of the resource that the layer 4 rule works for.
    resourceType string
    Type of the resource that the layer 4 rule works for, valid values are bgpip, bgp, bgp-multip and net.
    id string
    name string
    Name of the layer 4 rule to be queried.
    resultOutputFile string
    Used to save results.
    ruleId 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 and net.
    id str
    name str
    Name of the layer 4 rule to be queried.
    result_output_file str
    Used to save results.
    rule_id str
    Id of the layer 4 rule to be queried.
    resourceId String
    Id of the resource that the layer 4 rule works for.
    resourceType String
    Type of the resource that the layer 4 rule works for, valid values are bgpip, bgp, bgp-multip and net.
    id String
    name String
    Name of the layer 4 rule to be queried.
    resultOutputFile String
    Used to save results.
    ruleId String
    Id of the layer 4 rule to be queried.

    getDayuL4Rules Result

    The following output properties are available:

    Id string
    Lists List<GetDayuL4RulesList>
    A list of layer 4 rules. Each element contains the following attributes:
    ResourceId string
    ResourceType string
    Name string
    Name of the rule.
    ResultOutputFile string
    RuleId string
    ID of the 4 layer rule.
    Id string
    Lists []GetDayuL4RulesList
    A list of layer 4 rules. Each element contains the following attributes:
    ResourceId string
    ResourceType string
    Name string
    Name of the rule.
    ResultOutputFile string
    RuleId string
    ID of the 4 layer rule.
    id String
    lists List<GetDayuL4RulesList>
    A list of layer 4 rules. Each element contains the following attributes:
    resourceId String
    resourceType String
    name String
    Name of the rule.
    resultOutputFile String
    ruleId String
    ID of the 4 layer rule.
    id string
    lists GetDayuL4RulesList[]
    A list of layer 4 rules. Each element contains the following attributes:
    resourceId string
    resourceType string
    name string
    Name of the rule.
    resultOutputFile string
    ruleId string
    ID of the 4 layer rule.
    id str
    lists Sequence[GetDayuL4RulesList]
    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_file str
    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:
    resourceId String
    resourceType String
    name String
    Name of the rule.
    resultOutputFile String
    ruleId String
    ID of the 4 layer rule.

    Supporting Types

    GetDayuL4RulesList

    DPort double
    The destination port of the layer 4 rule.
    HealthCheckHealthNum double
    Health threshold of health check.
    HealthCheckInterval double
    Interval time of health check.
    HealthCheckSwitch bool
    Indicates whether health check is enabled.
    HealthCheckTimeout double
    HTTP Status Code. 1 means the return value 1xx is health. 2 means the return value 2xx is health. 4 means the return value 3xx is health. 8 means the return value 4xx is health. 16 means the return value 5xx is health. If you want multiple return codes to indicate health, need to add the corresponding values.
    HealthCheckUnhealthNum double
    Unhealthy threshold of health check.
    LbType double
    LB type of the rule, 1 for weight cycling and 2 for IP hash.
    Name string
    Name of the layer 4 rule to be queried.
    Protocol string
    Protocol of the rule.
    RuleId string
    Id of the layer 4 rule to be queried.
    SPort double
    The source port of the layer 4 rule.
    SessionSwitch bool
    Indicate that the session will keep or not.
    SessionTime double
    Session keep time, only valid when session_switch is true, the available value ranges from 1 to 300 and unit is second.
    SourceLists List<GetDayuL4RulesListSourceList>
    SourceType double
    Source type, 1 for source of host, 2 for source of IP.
    DPort float64
    The destination port of the layer 4 rule.
    HealthCheckHealthNum float64
    Health threshold of health check.
    HealthCheckInterval float64
    Interval time of health check.
    HealthCheckSwitch bool
    Indicates whether health check is enabled.
    HealthCheckTimeout float64
    HTTP Status Code. 1 means the return value 1xx is health. 2 means the return value 2xx is health. 4 means the return value 3xx is health. 8 means the return value 4xx is health. 16 means the return value 5xx is health. If you want multiple return codes to indicate health, need to add the corresponding values.
    HealthCheckUnhealthNum float64
    Unhealthy threshold of health check.
    LbType float64
    LB type of the rule, 1 for weight cycling and 2 for IP hash.
    Name string
    Name of the layer 4 rule to be queried.
    Protocol string
    Protocol of the rule.
    RuleId string
    Id of the layer 4 rule to be queried.
    SPort float64
    The source port of the layer 4 rule.
    SessionSwitch bool
    Indicate that the session will keep or not.
    SessionTime float64
    Session keep time, only valid when session_switch is true, the available value ranges from 1 to 300 and unit is second.
    SourceLists []GetDayuL4RulesListSourceList
    SourceType float64
    Source type, 1 for source of host, 2 for source of IP.
    dPort Double
    The destination port of the layer 4 rule.
    healthCheckHealthNum Double
    Health threshold of health check.
    healthCheckInterval Double
    Interval time of health check.
    healthCheckSwitch Boolean
    Indicates whether health check is enabled.
    healthCheckTimeout Double
    HTTP Status Code. 1 means the return value 1xx is health. 2 means the return value 2xx is health. 4 means the return value 3xx is health. 8 means the return value 4xx is health. 16 means the return value 5xx is health. If you want multiple return codes to indicate health, need to add the corresponding values.
    healthCheckUnhealthNum Double
    Unhealthy threshold of health check.
    lbType Double
    LB type of the rule, 1 for weight cycling and 2 for IP hash.
    name String
    Name of the layer 4 rule to be queried.
    protocol String
    Protocol of the rule.
    ruleId String
    Id of the layer 4 rule to be queried.
    sPort Double
    The source port of the layer 4 rule.
    sessionSwitch Boolean
    Indicate that the session will keep or not.
    sessionTime Double
    Session keep time, only valid when session_switch is true, the available value ranges from 1 to 300 and unit is second.
    sourceLists List<GetDayuL4RulesListSourceList>
    sourceType Double
    Source type, 1 for source of host, 2 for source of IP.
    dPort number
    The destination port of the layer 4 rule.
    healthCheckHealthNum number
    Health threshold of health check.
    healthCheckInterval number
    Interval time of health check.
    healthCheckSwitch boolean
    Indicates whether health check is enabled.
    healthCheckTimeout number
    HTTP Status Code. 1 means the return value 1xx is health. 2 means the return value 2xx is health. 4 means the return value 3xx is health. 8 means the return value 4xx is health. 16 means the return value 5xx is health. If you want multiple return codes to indicate health, need to add the corresponding values.
    healthCheckUnhealthNum number
    Unhealthy threshold of health check.
    lbType number
    LB type of the rule, 1 for weight cycling and 2 for IP hash.
    name string
    Name of the layer 4 rule to be queried.
    protocol string
    Protocol of the rule.
    ruleId string
    Id of the layer 4 rule to be queried.
    sPort number
    The source port of the layer 4 rule.
    sessionSwitch boolean
    Indicate that the session will keep or not.
    sessionTime number
    Session keep time, only valid when session_switch is true, the available value ranges from 1 to 300 and unit is second.
    sourceLists GetDayuL4RulesListSourceList[]
    sourceType 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_health_num float
    Health threshold of health check.
    health_check_interval float
    Interval time of health check.
    health_check_switch bool
    Indicates whether health check is enabled.
    health_check_timeout float
    HTTP Status Code. 1 means the return value 1xx is health. 2 means the return value 2xx is health. 4 means the return value 3xx is health. 8 means the return value 4xx is health. 16 means the return value 5xx is health. If you want multiple return codes to indicate health, need to add the corresponding values.
    health_check_unhealth_num float
    Unhealthy threshold of health check.
    lb_type float
    LB type of the rule, 1 for weight cycling and 2 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[GetDayuL4RulesListSourceList]
    source_type float
    Source type, 1 for source of host, 2 for source of IP.
    dPort Number
    The destination port of the layer 4 rule.
    healthCheckHealthNum Number
    Health threshold of health check.
    healthCheckInterval Number
    Interval time of health check.
    healthCheckSwitch Boolean
    Indicates whether health check is enabled.
    healthCheckTimeout Number
    HTTP Status Code. 1 means the return value 1xx is health. 2 means the return value 2xx is health. 4 means the return value 3xx is health. 8 means the return value 4xx is health. 16 means the return value 5xx is health. If you want multiple return codes to indicate health, need to add the corresponding values.
    healthCheckUnhealthNum Number
    Unhealthy threshold of health check.
    lbType Number
    LB type of the rule, 1 for weight cycling and 2 for IP hash.
    name String
    Name of the layer 4 rule to be queried.
    protocol String
    Protocol of the rule.
    ruleId String
    Id of the layer 4 rule to be queried.
    sPort Number
    The source port of the layer 4 rule.
    sessionSwitch Boolean
    Indicate that the session will keep or not.
    sessionTime Number
    Session keep time, only valid when session_switch is true, the available value ranges from 1 to 300 and unit is second.
    sourceLists List<Property Map>
    sourceType Number
    Source type, 1 for source of host, 2 for source of IP.

    GetDayuL4RulesListSourceList

    Source string
    Weight double
    Source string
    Weight float64
    source String
    weight Double
    source string
    weight number
    source str
    weight float
    source String
    weight Number

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack