// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace TencentCloudIAC.PulumiPackage.Tencentcloud.Dayu
{
    public static class GetL7Rules
    {
        /// <summary>
        /// Use this data source to query dayu layer 7 rules
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var domainTest = Output.Create(Tencentcloud.Dayu.GetL7Rules.InvokeAsync(new Tencentcloud.Dayu.GetL7RulesArgs
        ///         {
        ///             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 = Output.Create(Tencentcloud.Dayu.GetL7Rules.InvokeAsync(new Tencentcloud.Dayu.GetL7RulesArgs
        ///         {
        ///             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,
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetL7RulesResult> InvokeAsync(GetL7RulesArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetL7RulesResult>("tencentcloud:Dayu/getL7Rules:getL7Rules", args ?? new GetL7RulesArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to query dayu layer 7 rules
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var domainTest = Output.Create(Tencentcloud.Dayu.GetL7Rules.InvokeAsync(new Tencentcloud.Dayu.GetL7RulesArgs
        ///         {
        ///             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 = Output.Create(Tencentcloud.Dayu.GetL7Rules.InvokeAsync(new Tencentcloud.Dayu.GetL7RulesArgs
        ///         {
        ///             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,
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetL7RulesResult> Invoke(GetL7RulesInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetL7RulesResult>("tencentcloud:Dayu/getL7Rules:getL7Rules", args ?? new GetL7RulesInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetL7RulesArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Domain of the layer 7 rule to be queried.
        /// </summary>
        [Input("domain")]
        public string? Domain { get; set; }

        /// <summary>
        /// Id of the resource that the layer 7 rule works for.
        /// </summary>
        [Input("resourceId", required: true)]
        public string ResourceId { get; set; } = null!;

        /// <summary>
        /// Type of the resource that the layer 7 rule works for, valid value is `bgpip`.
        /// </summary>
        [Input("resourceType", required: true)]
        public string ResourceType { get; set; } = null!;

        /// <summary>
        /// Used to save results.
        /// </summary>
        [Input("resultOutputFile")]
        public string? ResultOutputFile { get; set; }

        /// <summary>
        /// Id of the layer 7 rule to be queried.
        /// </summary>
        [Input("ruleId")]
        public string? RuleId { get; set; }

        public GetL7RulesArgs()
        {
        }
    }

    public sealed class GetL7RulesInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Domain of the layer 7 rule to be queried.
        /// </summary>
        [Input("domain")]
        public Input<string>? Domain { get; set; }

        /// <summary>
        /// Id of the resource that the layer 7 rule works for.
        /// </summary>
        [Input("resourceId", required: true)]
        public Input<string> ResourceId { get; set; } = null!;

        /// <summary>
        /// Type of the resource that the layer 7 rule works for, valid value is `bgpip`.
        /// </summary>
        [Input("resourceType", required: true)]
        public Input<string> ResourceType { get; set; } = null!;

        /// <summary>
        /// Used to save results.
        /// </summary>
        [Input("resultOutputFile")]
        public Input<string>? ResultOutputFile { get; set; }

        /// <summary>
        /// Id of the layer 7 rule to be queried.
        /// </summary>
        [Input("ruleId")]
        public Input<string>? RuleId { get; set; }

        public GetL7RulesInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetL7RulesResult
    {
        /// <summary>
        /// Domain that the 7 layer rule works for.
        /// </summary>
        public readonly string? Domain;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// A list of layer 7 rules. Each element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetL7RulesListResult> Lists;
        public readonly string ResourceId;
        public readonly string ResourceType;
        public readonly string? ResultOutputFile;
        /// <summary>
        /// Id of the 7 layer rule.
        /// </summary>
        public readonly string? RuleId;

        [OutputConstructor]
        private GetL7RulesResult(
            string? domain,

            string id,

            ImmutableArray<Outputs.GetL7RulesListResult> lists,

            string resourceId,

            string resourceType,

            string? resultOutputFile,

            string? ruleId)
        {
            Domain = domain;
            Id = id;
            Lists = lists;
            ResourceId = resourceId;
            ResourceType = resourceType;
            ResultOutputFile = resultOutputFile;
            RuleId = ruleId;
        }
    }
}
