<reponame>Dwonczykj/gember_deploy<gh_stars>0// *** 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.Clb
{
    public static class GetRedirections
    {
        /// <summary>
        /// Use this data source to query detailed information of CLB redirections
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var foo = Output.Create(Tencentcloud.Clb.GetRedirections.InvokeAsync(new Tencentcloud.Clb.GetRedirectionsArgs
        ///         {
        ///             ClbId = "lb-p7olt9e5",
        ///             ResultOutputFile = "mytestpath",
        ///             SourceListenerId = "lbl-jc1dx6ju",
        ///             SourceRuleId = "loc-ft8fmngv",
        ///             TargetListenerId = "lbl-asj1hzuo",
        ///             TargetRuleId = "loc-4xxr2cy7",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetRedirectionsResult> InvokeAsync(GetRedirectionsArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetRedirectionsResult>("tencentcloud:Clb/getRedirections:getRedirections", args ?? new GetRedirectionsArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to query detailed information of CLB redirections
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var foo = Output.Create(Tencentcloud.Clb.GetRedirections.InvokeAsync(new Tencentcloud.Clb.GetRedirectionsArgs
        ///         {
        ///             ClbId = "lb-p7olt9e5",
        ///             ResultOutputFile = "mytestpath",
        ///             SourceListenerId = "lbl-jc1dx6ju",
        ///             SourceRuleId = "loc-ft8fmngv",
        ///             TargetListenerId = "lbl-asj1hzuo",
        ///             TargetRuleId = "loc-4xxr2cy7",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetRedirectionsResult> Invoke(GetRedirectionsInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetRedirectionsResult>("tencentcloud:Clb/getRedirections:getRedirections", args ?? new GetRedirectionsInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetRedirectionsArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// ID of the CLB to be queried.
        /// </summary>
        [Input("clbId", required: true)]
        public string ClbId { get; set; } = null!;

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

        /// <summary>
        /// ID of source listener to be queried.
        /// </summary>
        [Input("sourceListenerId", required: true)]
        public string SourceListenerId { get; set; } = null!;

        /// <summary>
        /// Rule ID of source listener to be queried.
        /// </summary>
        [Input("sourceRuleId", required: true)]
        public string SourceRuleId { get; set; } = null!;

        /// <summary>
        /// ID of target listener to be queried.
        /// </summary>
        [Input("targetListenerId")]
        public string? TargetListenerId { get; set; }

        /// <summary>
        /// Rule ID of target listener to be queried.
        /// </summary>
        [Input("targetRuleId")]
        public string? TargetRuleId { get; set; }

        public GetRedirectionsArgs()
        {
        }
    }

    public sealed class GetRedirectionsInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// ID of the CLB to be queried.
        /// </summary>
        [Input("clbId", required: true)]
        public Input<string> ClbId { get; set; } = null!;

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

        /// <summary>
        /// ID of source listener to be queried.
        /// </summary>
        [Input("sourceListenerId", required: true)]
        public Input<string> SourceListenerId { get; set; } = null!;

        /// <summary>
        /// Rule ID of source listener to be queried.
        /// </summary>
        [Input("sourceRuleId", required: true)]
        public Input<string> SourceRuleId { get; set; } = null!;

        /// <summary>
        /// ID of target listener to be queried.
        /// </summary>
        [Input("targetListenerId")]
        public Input<string>? TargetListenerId { get; set; }

        /// <summary>
        /// Rule ID of target listener to be queried.
        /// </summary>
        [Input("targetRuleId")]
        public Input<string>? TargetRuleId { get; set; }

        public GetRedirectionsInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetRedirectionsResult
    {
        /// <summary>
        /// ID of the CLB.
        /// </summary>
        public readonly string ClbId;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// A list of cloud load balancer redirection configurations. Each element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetRedirectionsRedirectionListResult> RedirectionLists;
        public readonly string? ResultOutputFile;
        /// <summary>
        /// ID of source listener.
        /// </summary>
        public readonly string SourceListenerId;
        /// <summary>
        /// Rule ID of source listener.
        /// </summary>
        public readonly string SourceRuleId;
        /// <summary>
        /// ID of target listener.
        /// </summary>
        public readonly string? TargetListenerId;
        /// <summary>
        /// Rule ID of target listener.
        /// </summary>
        public readonly string? TargetRuleId;

        [OutputConstructor]
        private GetRedirectionsResult(
            string clbId,

            string id,

            ImmutableArray<Outputs.GetRedirectionsRedirectionListResult> redirectionLists,

            string? resultOutputFile,

            string sourceListenerId,

            string sourceRuleId,

            string? targetListenerId,

            string? targetRuleId)
        {
            ClbId = clbId;
            Id = id;
            RedirectionLists = redirectionLists;
            ResultOutputFile = resultOutputFile;
            SourceListenerId = sourceListenerId;
            SourceRuleId = sourceRuleId;
            TargetListenerId = targetListenerId;
            TargetRuleId = targetRuleId;
        }
    }
}
