// *** 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.PolarDB
{
    public static class GetNodeClasses
    {
        /// <summary>
        /// This data source provides the PolarDB node classes resource available info of Alibaba Cloud.
        /// 
        /// &gt; **NOTE:** Available in v1.81.0+
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var resources = AliCloud.PolarDB.GetNodeClasses.Invoke(new()
        ///     {
        ///         PayType = "PostPaid",
        ///         DbType = "MySQL",
        ///         DbVersion = "5.6",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["polardbNodeClasses"] = resources.Apply(getNodeClassesResult =&gt; getNodeClassesResult.Classes),
        ///         ["polardbAvailableZoneId"] = resources.Apply(getNodeClassesResult =&gt; getNodeClassesResult.Classes[0]?.ZoneId),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetNodeClassesResult> InvokeAsync(GetNodeClassesArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetNodeClassesResult>("alicloud:polardb/getNodeClasses:getNodeClasses", args ?? new GetNodeClassesArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides the PolarDB node classes resource available info of Alibaba Cloud.
        /// 
        /// &gt; **NOTE:** Available in v1.81.0+
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var resources = AliCloud.PolarDB.GetNodeClasses.Invoke(new()
        ///     {
        ///         PayType = "PostPaid",
        ///         DbType = "MySQL",
        ///         DbVersion = "5.6",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["polardbNodeClasses"] = resources.Apply(getNodeClassesResult =&gt; getNodeClassesResult.Classes),
        ///         ["polardbAvailableZoneId"] = resources.Apply(getNodeClassesResult =&gt; getNodeClassesResult.Classes[0]?.ZoneId),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetNodeClassesResult> Invoke(GetNodeClassesInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetNodeClassesResult>("alicloud:polardb/getNodeClasses:getNodeClasses", args ?? new GetNodeClassesInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetNodeClassesArgs : global::Pulumi.InvokeArgs
    {
        [Input("category")]
        public string? Category { get; set; }

        /// <summary>
        /// The PolarDB node class type by the user.
        /// </summary>
        [Input("dbNodeClass")]
        public string? DbNodeClass { get; set; }

        /// <summary>
        /// Database type. Options are `MySQL`, `PostgreSQL`, `Oracle`. If db_type is set, db_version also needs to be set.
        /// </summary>
        [Input("dbType")]
        public string? DbType { get; set; }

        /// <summary>
        /// Database version required by the user. Value options can refer to the latest docs [detail info](https://www.alibabacloud.com/help/doc-detail/98169.htm) `DBVersion`. If db_version is set, db_type also needs to be set.
        /// </summary>
        [Input("dbVersion")]
        public string? DbVersion { get; set; }

        [Input("outputFile")]
        public string? OutputFile { get; set; }

        /// <summary>
        /// Filter the results by charge type. Valid values: `PrePaid` and `PostPaid`.
        /// </summary>
        [Input("payType", required: true)]
        public string PayType { get; set; } = null!;

        /// <summary>
        /// The Region to launch the PolarDB cluster.
        /// </summary>
        [Input("regionId")]
        public string? RegionId { get; set; }

        /// <summary>
        /// The Zone to launch the PolarDB cluster.
        /// </summary>
        [Input("zoneId")]
        public string? ZoneId { get; set; }

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

    public sealed class GetNodeClassesInvokeArgs : global::Pulumi.InvokeArgs
    {
        [Input("category")]
        public Input<string>? Category { get; set; }

        /// <summary>
        /// The PolarDB node class type by the user.
        /// </summary>
        [Input("dbNodeClass")]
        public Input<string>? DbNodeClass { get; set; }

        /// <summary>
        /// Database type. Options are `MySQL`, `PostgreSQL`, `Oracle`. If db_type is set, db_version also needs to be set.
        /// </summary>
        [Input("dbType")]
        public Input<string>? DbType { get; set; }

        /// <summary>
        /// Database version required by the user. Value options can refer to the latest docs [detail info](https://www.alibabacloud.com/help/doc-detail/98169.htm) `DBVersion`. If db_version is set, db_type also needs to be set.
        /// </summary>
        [Input("dbVersion")]
        public Input<string>? DbVersion { get; set; }

        [Input("outputFile")]
        public Input<string>? OutputFile { get; set; }

        /// <summary>
        /// Filter the results by charge type. Valid values: `PrePaid` and `PostPaid`.
        /// </summary>
        [Input("payType", required: true)]
        public Input<string> PayType { get; set; } = null!;

        /// <summary>
        /// The Region to launch the PolarDB cluster.
        /// </summary>
        [Input("regionId")]
        public Input<string>? RegionId { get; set; }

        /// <summary>
        /// The Zone to launch the PolarDB cluster.
        /// </summary>
        [Input("zoneId")]
        public Input<string>? ZoneId { get; set; }

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


    [OutputType]
    public sealed class GetNodeClassesResult
    {
        public readonly string? Category;
        /// <summary>
        /// A list of PolarDB node classes. Each element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetNodeClassesClassResult> Classes;
        /// <summary>
        /// PolarDB node available class.
        /// </summary>
        public readonly string? DbNodeClass;
        public readonly string? DbType;
        public readonly string? DbVersion;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly string? OutputFile;
        public readonly string PayType;
        public readonly string? RegionId;
        /// <summary>
        /// The Zone to launch the PolarDB cluster.
        /// </summary>
        public readonly string? ZoneId;

        [OutputConstructor]
        private GetNodeClassesResult(
            string? category,

            ImmutableArray<Outputs.GetNodeClassesClassResult> classes,

            string? dbNodeClass,

            string? dbType,

            string? dbVersion,

            string id,

            string? outputFile,

            string payType,

            string? regionId,

            string? zoneId)
        {
            Category = category;
            Classes = classes;
            DbNodeClass = dbNodeClass;
            DbType = dbType;
            DbVersion = dbVersion;
            Id = id;
            OutputFile = outputFile;
            PayType = payType;
            RegionId = regionId;
            ZoneId = zoneId;
        }
    }
}
