<filename>sdk/dotnet/Tencentcloud/Clb/GetAttachments.cs// *** 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 GetAttachments
    {
        /// <summary>
        /// Use this data source to query detailed information of CLB attachments
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var clblab = Output.Create(Tencentcloud.Clb.GetAttachments.InvokeAsync(new Tencentcloud.Clb.GetAttachmentsArgs
        ///         {
        ///             ClbId = "lb-k2zjp9lv",
        ///             ListenerId = "lbl-hh141sn9",
        ///             RuleId = "loc-4xxr2cy7",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetAttachmentsResult> InvokeAsync(GetAttachmentsArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetAttachmentsResult>("tencentcloud:Clb/getAttachments:getAttachments", args ?? new GetAttachmentsArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to query detailed information of CLB attachments
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var clblab = Output.Create(Tencentcloud.Clb.GetAttachments.InvokeAsync(new Tencentcloud.Clb.GetAttachmentsArgs
        ///         {
        ///             ClbId = "lb-k2zjp9lv",
        ///             ListenerId = "lbl-hh141sn9",
        ///             RuleId = "loc-4xxr2cy7",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetAttachmentsResult> Invoke(GetAttachmentsInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetAttachmentsResult>("tencentcloud:Clb/getAttachments:getAttachments", args ?? new GetAttachmentsInvokeArgs(), options.WithDefaults());
    }


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

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

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

        /// <summary>
        /// ID of the CLB listener rule. If the protocol of listener is `HTTP`/`HTTPS`, this para is required.
        /// </summary>
        [Input("ruleId")]
        public string? RuleId { get; set; }

        public GetAttachmentsArgs()
        {
        }
    }

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

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

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

        /// <summary>
        /// ID of the CLB listener rule. If the protocol of listener is `HTTP`/`HTTPS`, this para is required.
        /// </summary>
        [Input("ruleId")]
        public Input<string>? RuleId { get; set; }

        public GetAttachmentsInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetAttachmentsResult
    {
        /// <summary>
        /// A list of cloud load balancer attachment configurations. Each element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetAttachmentsAttachmentListResult> AttachmentLists;
        /// <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>
        /// ID of the CLB listener.
        /// </summary>
        public readonly string ListenerId;
        public readonly string? ResultOutputFile;
        /// <summary>
        /// ID of the CLB listener rule.
        /// </summary>
        public readonly string? RuleId;

        [OutputConstructor]
        private GetAttachmentsResult(
            ImmutableArray<Outputs.GetAttachmentsAttachmentListResult> attachmentLists,

            string clbId,

            string id,

            string listenerId,

            string? resultOutputFile,

            string? ruleId)
        {
            AttachmentLists = attachmentLists;
            ClbId = clbId;
            Id = id;
            ListenerId = listenerId;
            ResultOutputFile = resultOutputFile;
            RuleId = ruleId;
        }
    }
}
