<filename>sdk/dotnet/Nas/GetProtocols.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;

namespace Pulumi.AliCloud.Nas
{
    public static class GetProtocols
    {
        /// <summary>
        /// Provide  a data source to retrieve the type of protocol used to create NAS file system.
        /// 
        /// &gt; **NOTE:** Available in 1.42.0
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @default = AliCloud.Nas.GetProtocols.Invoke(new()
        ///     {
        ///         OutputFile = "protocols.txt",
        ///         Type = "Performance",
        ///         ZoneId = "cn-beijing-e",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["nasProtocolsProtocol"] = @default.Apply(getProtocolsResult =&gt; getProtocolsResult).Apply(@default =&gt; @default.Apply(getProtocolsResult =&gt; getProtocolsResult.Protocols[0])),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetProtocolsResult> InvokeAsync(GetProtocolsArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetProtocolsResult>("alicloud:nas/getProtocols:getProtocols", args ?? new GetProtocolsArgs(), options.WithDefaults());

        /// <summary>
        /// Provide  a data source to retrieve the type of protocol used to create NAS file system.
        /// 
        /// &gt; **NOTE:** Available in 1.42.0
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @default = AliCloud.Nas.GetProtocols.Invoke(new()
        ///     {
        ///         OutputFile = "protocols.txt",
        ///         Type = "Performance",
        ///         ZoneId = "cn-beijing-e",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["nasProtocolsProtocol"] = @default.Apply(getProtocolsResult =&gt; getProtocolsResult).Apply(@default =&gt; @default.Apply(getProtocolsResult =&gt; getProtocolsResult.Protocols[0])),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetProtocolsResult> Invoke(GetProtocolsInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetProtocolsResult>("alicloud:nas/getProtocols:getProtocols", args ?? new GetProtocolsInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetProtocolsArgs : global::Pulumi.InvokeArgs
    {
        [Input("outputFile")]
        public string? OutputFile { get; set; }

        /// <summary>
        /// The file system type. Valid Values: `Performance` and `Capacity`.
        /// </summary>
        [Input("type", required: true)]
        public string Type { get; set; } = null!;

        /// <summary>
        /// String to filter results by zone id.
        /// </summary>
        [Input("zoneId")]
        public string? ZoneId { get; set; }

        public GetProtocolsArgs()
        {
        }
        public static new GetProtocolsArgs Empty => new GetProtocolsArgs();
    }

    public sealed class GetProtocolsInvokeArgs : global::Pulumi.InvokeArgs
    {
        [Input("outputFile")]
        public Input<string>? OutputFile { get; set; }

        /// <summary>
        /// The file system type. Valid Values: `Performance` and `Capacity`.
        /// </summary>
        [Input("type", required: true)]
        public Input<string> Type { get; set; } = null!;

        /// <summary>
        /// String to filter results by zone id.
        /// </summary>
        [Input("zoneId")]
        public Input<string>? ZoneId { get; set; }

        public GetProtocolsInvokeArgs()
        {
        }
        public static new GetProtocolsInvokeArgs Empty => new GetProtocolsInvokeArgs();
    }


    [OutputType]
    public sealed class GetProtocolsResult
    {
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly string? OutputFile;
        /// <summary>
        /// A list of supported protocol type..
        /// </summary>
        public readonly ImmutableArray<string> Protocols;
        public readonly string Type;
        public readonly string? ZoneId;

        [OutputConstructor]
        private GetProtocolsResult(
            string id,

            string? outputFile,

            ImmutableArray<string> protocols,

            string type,

            string? zoneId)
        {
            Id = id;
            OutputFile = outputFile;
            Protocols = protocols;
            Type = type;
            ZoneId = zoneId;
        }
    }
}
