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

tencentcloud.getDayuL7Rules

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 7 rules

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const domainTest = tencentcloud.getDayuL7Rules({
        resourceType: tencentcloud_dayu_l7_rule.test_rule.resource_type,
        resourceId: tencentcloud_dayu_l7_rule.test_rule.resource_id,
        domain: tencentcloud_dayu_l7_rule.test_rule.domain,
    });
    const idTest = tencentcloud.getDayuL7Rules({
        resourceType: tencentcloud_dayu_l7_rule.test_rule.resource_type,
        resourceId: tencentcloud_dayu_l7_rule.test_rule.resource_id,
        ruleId: tencentcloud_dayu_l7_rule.test_rule.rule_id,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    domain_test = tencentcloud.get_dayu_l7_rules(resource_type=tencentcloud_dayu_l7_rule["test_rule"]["resource_type"],
        resource_id=tencentcloud_dayu_l7_rule["test_rule"]["resource_id"],
        domain=tencentcloud_dayu_l7_rule["test_rule"]["domain"])
    id_test = tencentcloud.get_dayu_l7_rules(resource_type=tencentcloud_dayu_l7_rule["test_rule"]["resource_type"],
        resource_id=tencentcloud_dayu_l7_rule["test_rule"]["resource_id"],
        rule_id=tencentcloud_dayu_l7_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.GetDayuL7Rules(ctx, &tencentcloud.GetDayuL7RulesArgs{
    			ResourceType: tencentcloud_dayu_l7_rule.Test_rule.Resource_type,
    			ResourceId:   tencentcloud_dayu_l7_rule.Test_rule.Resource_id,
    			Domain:       pulumi.StringRef(tencentcloud_dayu_l7_rule.Test_rule.Domain),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.GetDayuL7Rules(ctx, &tencentcloud.GetDayuL7RulesArgs{
    			ResourceType: tencentcloud_dayu_l7_rule.Test_rule.Resource_type,
    			ResourceId:   tencentcloud_dayu_l7_rule.Test_rule.Resource_id,
    			RuleId:       pulumi.StringRef(tencentcloud_dayu_l7_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 domainTest = Tencentcloud.GetDayuL7Rules.Invoke(new()
        {
            ResourceType = tencentcloud_dayu_l7_rule.Test_rule.Resource_type,
            ResourceId = tencentcloud_dayu_l7_rule.Test_rule.Resource_id,
            Domain = tencentcloud_dayu_l7_rule.Test_rule.Domain,
        });
    
        var idTest = Tencentcloud.GetDayuL7Rules.Invoke(new()
        {
            ResourceType = tencentcloud_dayu_l7_rule.Test_rule.Resource_type,
            ResourceId = tencentcloud_dayu_l7_rule.Test_rule.Resource_id,
            RuleId = tencentcloud_dayu_l7_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.GetDayuL7RulesArgs;
    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 domainTest = TencentcloudFunctions.getDayuL7Rules(GetDayuL7RulesArgs.builder()
                .resourceType(tencentcloud_dayu_l7_rule.test_rule().resource_type())
                .resourceId(tencentcloud_dayu_l7_rule.test_rule().resource_id())
                .domain(tencentcloud_dayu_l7_rule.test_rule().domain())
                .build());
    
            final var idTest = TencentcloudFunctions.getDayuL7Rules(GetDayuL7RulesArgs.builder()
                .resourceType(tencentcloud_dayu_l7_rule.test_rule().resource_type())
                .resourceId(tencentcloud_dayu_l7_rule.test_rule().resource_id())
                .ruleId(tencentcloud_dayu_l7_rule.test_rule().rule_id())
                .build());
    
        }
    }
    
    variables:
      domainTest:
        fn::invoke:
          function: tencentcloud:getDayuL7Rules
          arguments:
            resourceType: ${tencentcloud_dayu_l7_rule.test_rule.resource_type}
            resourceId: ${tencentcloud_dayu_l7_rule.test_rule.resource_id}
            domain: ${tencentcloud_dayu_l7_rule.test_rule.domain}
      idTest:
        fn::invoke:
          function: tencentcloud:getDayuL7Rules
          arguments:
            resourceType: ${tencentcloud_dayu_l7_rule.test_rule.resource_type}
            resourceId: ${tencentcloud_dayu_l7_rule.test_rule.resource_id}
            ruleId: ${tencentcloud_dayu_l7_rule.test_rule.rule_id}
    

    Using getDayuL7Rules

    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 getDayuL7Rules(args: GetDayuL7RulesArgs, opts?: InvokeOptions): Promise<GetDayuL7RulesResult>
    function getDayuL7RulesOutput(args: GetDayuL7RulesOutputArgs, opts?: InvokeOptions): Output<GetDayuL7RulesResult>
    def get_dayu_l7_rules(domain: Optional[str] = None,
                          id: 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) -> GetDayuL7RulesResult
    def get_dayu_l7_rules_output(domain: Optional[pulumi.Input[str]] = None,
                          id: 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[GetDayuL7RulesResult]
    func GetDayuL7Rules(ctx *Context, args *GetDayuL7RulesArgs, opts ...InvokeOption) (*GetDayuL7RulesResult, error)
    func GetDayuL7RulesOutput(ctx *Context, args *GetDayuL7RulesOutputArgs, opts ...InvokeOption) GetDayuL7RulesResultOutput

    > Note: This function is named GetDayuL7Rules in the Go SDK.

    public static class GetDayuL7Rules 
    {
        public static Task<GetDayuL7RulesResult> InvokeAsync(GetDayuL7RulesArgs args, InvokeOptions? opts = null)
        public static Output<GetDayuL7RulesResult> Invoke(GetDayuL7RulesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDayuL7RulesResult> getDayuL7Rules(GetDayuL7RulesArgs args, InvokeOptions options)
    public static Output<GetDayuL7RulesResult> getDayuL7Rules(GetDayuL7RulesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getDayuL7Rules:getDayuL7Rules
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ResourceId string
    Id of the resource that the layer 7 rule works for.
    ResourceType string
    Type of the resource that the layer 7 rule works for, valid value is bgpip.
    Domain string
    Domain of the layer 7 rule to be queried.
    Id string
    ResultOutputFile string
    Used to save results.
    RuleId string
    Id of the layer 7 rule to be queried.
    ResourceId string
    Id of the resource that the layer 7 rule works for.
    ResourceType string
    Type of the resource that the layer 7 rule works for, valid value is bgpip.
    Domain string
    Domain of the layer 7 rule to be queried.
    Id string
    ResultOutputFile string
    Used to save results.
    RuleId string
    Id of the layer 7 rule to be queried.
    resourceId String
    Id of the resource that the layer 7 rule works for.
    resourceType String
    Type of the resource that the layer 7 rule works for, valid value is bgpip.
    domain String
    Domain of the layer 7 rule to be queried.
    id String
    resultOutputFile String
    Used to save results.
    ruleId String
    Id of the layer 7 rule to be queried.
    resourceId string
    Id of the resource that the layer 7 rule works for.
    resourceType string
    Type of the resource that the layer 7 rule works for, valid value is bgpip.
    domain string
    Domain of the layer 7 rule to be queried.
    id string
    resultOutputFile string
    Used to save results.
    ruleId string
    Id of the layer 7 rule to be queried.
    resource_id str
    Id 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.
    domain str
    Domain of the layer 7 rule to be queried.
    id str
    result_output_file str
    Used to save results.
    rule_id str
    Id of the layer 7 rule to be queried.
    resourceId String
    Id of the resource that the layer 7 rule works for.
    resourceType String
    Type of the resource that the layer 7 rule works for, valid value is bgpip.
    domain String
    Domain of the layer 7 rule to be queried.
    id String
    resultOutputFile String
    Used to save results.
    ruleId String
    Id of the layer 7 rule to be queried.

    getDayuL7Rules Result

    The following output properties are available:

    Id string
    Lists List<GetDayuL7RulesList>
    A list of layer 7 rules. Each element contains the following attributes:
    ResourceId string
    ResourceType string
    Domain string
    Domain that the 7 layer rule works for.
    ResultOutputFile string
    RuleId string
    Id of the 7 layer rule.
    Id string
    Lists []GetDayuL7RulesList
    A list of layer 7 rules. Each element contains the following attributes:
    ResourceId string
    ResourceType string
    Domain string
    Domain that the 7 layer rule works for.
    ResultOutputFile string
    RuleId string
    Id of the 7 layer rule.
    id String
    lists List<GetDayuL7RulesList>
    A list of layer 7 rules. Each element contains the following attributes:
    resourceId String
    resourceType String
    domain String
    Domain that the 7 layer rule works for.
    resultOutputFile String
    ruleId String
    Id of the 7 layer rule.
    id string
    lists GetDayuL7RulesList[]
    A list of layer 7 rules. Each element contains the following attributes:
    resourceId string
    resourceType string
    domain string
    Domain that the 7 layer rule works for.
    resultOutputFile string
    ruleId string
    Id of the 7 layer rule.
    id str
    lists Sequence[GetDayuL7RulesList]
    A list of layer 7 rules. Each element contains the following attributes:
    resource_id str
    resource_type str
    domain str
    Domain that the 7 layer rule works for.
    result_output_file str
    rule_id str
    Id of the 7 layer rule.
    id String
    lists List<Property Map>
    A list of layer 7 rules. Each element contains the following attributes:
    resourceId String
    resourceType String
    domain String
    Domain that the 7 layer rule works for.
    resultOutputFile String
    ruleId String
    Id of the 7 layer rule.

    Supporting Types

    GetDayuL7RulesList

    Domain string
    Domain of the layer 7 rule to be queried.
    HealthCheckCode 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.
    HealthCheckHealthNum double
    Health threshold of health check.
    HealthCheckInterval double
    Interval time of health check.
    HealthCheckMethod string
    Methods of health check.
    HealthCheckPath string
    Path of health check.
    HealthCheckSwitch bool
    Indicates whether health check is enabled.
    HealthCheckUnhealthNum double
    Unhealthy threshold of health check.
    Name string
    Name of the rule.
    Protocol string
    Protocol of the rule.
    RuleId string
    Id of the layer 7 rule to be queried.
    SourceLists List<string>
    Source list of the rule.
    SourceType double
    Source type, 1 for source of host, 2 for source of ip.
    SslId string
    SSL id.
    Status double
    Status of the rule. 0 for create/modify success, 2 for create/modify fail, 3 for delete success, 5 for waiting to be created/modified, 7 for waiting to be deleted and 8 for waiting to get SSL id.
    Switch bool
    Indicate the rule will take effect or not.
    Threshold double
    Threshold of the rule.
    Domain string
    Domain of the layer 7 rule to be queried.
    HealthCheckCode 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.
    HealthCheckHealthNum float64
    Health threshold of health check.
    HealthCheckInterval float64
    Interval time of health check.
    HealthCheckMethod string
    Methods of health check.
    HealthCheckPath string
    Path of health check.
    HealthCheckSwitch bool
    Indicates whether health check is enabled.
    HealthCheckUnhealthNum float64
    Unhealthy threshold of health check.
    Name string
    Name of the rule.
    Protocol string
    Protocol of the rule.
    RuleId string
    Id of the layer 7 rule to be queried.
    SourceLists []string
    Source list of the rule.
    SourceType float64
    Source type, 1 for source of host, 2 for source of ip.
    SslId string
    SSL id.
    Status float64
    Status of the rule. 0 for create/modify success, 2 for create/modify fail, 3 for delete success, 5 for waiting to be created/modified, 7 for waiting to be deleted and 8 for waiting to get SSL id.
    Switch bool
    Indicate the rule will take effect or not.
    Threshold float64
    Threshold of the rule.
    domain String
    Domain of the layer 7 rule to be queried.
    healthCheckCode 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.
    healthCheckHealthNum Double
    Health threshold of health check.
    healthCheckInterval Double
    Interval time of health check.
    healthCheckMethod String
    Methods of health check.
    healthCheckPath String
    Path of health check.
    healthCheckSwitch Boolean
    Indicates whether health check is enabled.
    healthCheckUnhealthNum Double
    Unhealthy threshold of health check.
    name String
    Name of the rule.
    protocol String
    Protocol of the rule.
    ruleId String
    Id of the layer 7 rule to be queried.
    sourceLists List<String>
    Source list of the rule.
    sourceType Double
    Source type, 1 for source of host, 2 for source of ip.
    sslId String
    SSL id.
    status Double
    Status of the rule. 0 for create/modify success, 2 for create/modify fail, 3 for delete success, 5 for waiting to be created/modified, 7 for waiting to be deleted and 8 for waiting to get SSL id.
    switch_ Boolean
    Indicate the rule will take effect or not.
    threshold Double
    Threshold of the rule.
    domain string
    Domain of the layer 7 rule to be queried.
    healthCheckCode 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.
    healthCheckHealthNum number
    Health threshold of health check.
    healthCheckInterval number
    Interval time of health check.
    healthCheckMethod string
    Methods of health check.
    healthCheckPath string
    Path of health check.
    healthCheckSwitch boolean
    Indicates whether health check is enabled.
    healthCheckUnhealthNum number
    Unhealthy threshold of health check.
    name string
    Name of the rule.
    protocol string
    Protocol of the rule.
    ruleId string
    Id of the layer 7 rule to be queried.
    sourceLists string[]
    Source list of the rule.
    sourceType number
    Source type, 1 for source of host, 2 for source of ip.
    sslId string
    SSL id.
    status number
    Status of the rule. 0 for create/modify success, 2 for create/modify fail, 3 for delete success, 5 for waiting to be created/modified, 7 for waiting to be deleted and 8 for waiting to get SSL id.
    switch boolean
    Indicate the rule will take effect or not.
    threshold number
    Threshold of the rule.
    domain str
    Domain of the layer 7 rule to be queried.
    health_check_code 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_health_num float
    Health threshold of health check.
    health_check_interval float
    Interval time of health check.
    health_check_method str
    Methods of health check.
    health_check_path str
    Path of health check.
    health_check_switch bool
    Indicates whether health check is enabled.
    health_check_unhealth_num float
    Unhealthy threshold of health check.
    name str
    Name of the rule.
    protocol str
    Protocol of the rule.
    rule_id str
    Id of the layer 7 rule to be queried.
    source_lists Sequence[str]
    Source list of the rule.
    source_type float
    Source type, 1 for source of host, 2 for source of ip.
    ssl_id str
    SSL id.
    status float
    Status of the rule. 0 for create/modify success, 2 for create/modify fail, 3 for delete success, 5 for waiting to be created/modified, 7 for waiting to be deleted and 8 for waiting to get SSL id.
    switch bool
    Indicate the rule will take effect or not.
    threshold float
    Threshold of the rule.
    domain String
    Domain of the layer 7 rule to be queried.
    healthCheckCode 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.
    healthCheckHealthNum Number
    Health threshold of health check.
    healthCheckInterval Number
    Interval time of health check.
    healthCheckMethod String
    Methods of health check.
    healthCheckPath String
    Path of health check.
    healthCheckSwitch Boolean
    Indicates whether health check is enabled.
    healthCheckUnhealthNum Number
    Unhealthy threshold of health check.
    name String
    Name of the rule.
    protocol String
    Protocol of the rule.
    ruleId String
    Id of the layer 7 rule to be queried.
    sourceLists List<String>
    Source list of the rule.
    sourceType Number
    Source type, 1 for source of host, 2 for source of ip.
    sslId String
    SSL id.
    status Number
    Status of the rule. 0 for create/modify success, 2 for create/modify fail, 3 for delete success, 5 for waiting to be created/modified, 7 for waiting to be deleted and 8 for waiting to get SSL id.
    switch Boolean
    Indicate the rule will take effect or not.
    threshold Number
    Threshold of the rule.

    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