// *** 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.Ecs
{
    public static class GetInstanceTypeFamilies
    {
        /// <summary>
        /// This data source provides the ECS instance type families of Alibaba Cloud.
        /// 
        /// &gt; **NOTE:** Available in 1.54.0+
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @default = AliCloud.Ecs.GetInstanceTypeFamilies.Invoke(new()
        ///     {
        ///         InstanceChargeType = "PrePaid",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstInstanceTypeFamilyId"] = @default.Apply(getInstanceTypeFamiliesResult =&gt; getInstanceTypeFamiliesResult).Apply(@default =&gt; @default.Apply(getInstanceTypeFamiliesResult =&gt; getInstanceTypeFamiliesResult.Families[0]?.Id)),
        ///         ["instanceIds"] = @default.Apply(getInstanceTypeFamiliesResult =&gt; getInstanceTypeFamiliesResult).Apply(@default =&gt; @default.Apply(getInstanceTypeFamiliesResult =&gt; getInstanceTypeFamiliesResult.Ids)),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetInstanceTypeFamiliesResult> InvokeAsync(GetInstanceTypeFamiliesArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetInstanceTypeFamiliesResult>("alicloud:ecs/getInstanceTypeFamilies:getInstanceTypeFamilies", args ?? new GetInstanceTypeFamiliesArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides the ECS instance type families of Alibaba Cloud.
        /// 
        /// &gt; **NOTE:** Available in 1.54.0+
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @default = AliCloud.Ecs.GetInstanceTypeFamilies.Invoke(new()
        ///     {
        ///         InstanceChargeType = "PrePaid",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstInstanceTypeFamilyId"] = @default.Apply(getInstanceTypeFamiliesResult =&gt; getInstanceTypeFamiliesResult).Apply(@default =&gt; @default.Apply(getInstanceTypeFamiliesResult =&gt; getInstanceTypeFamiliesResult.Families[0]?.Id)),
        ///         ["instanceIds"] = @default.Apply(getInstanceTypeFamiliesResult =&gt; getInstanceTypeFamiliesResult).Apply(@default =&gt; @default.Apply(getInstanceTypeFamiliesResult =&gt; getInstanceTypeFamiliesResult.Ids)),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetInstanceTypeFamiliesResult> Invoke(GetInstanceTypeFamiliesInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetInstanceTypeFamiliesResult>("alicloud:ecs/getInstanceTypeFamilies:getInstanceTypeFamilies", args ?? new GetInstanceTypeFamiliesInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetInstanceTypeFamiliesArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The generation of the instance type family, Valid values: `ecs-1`, `ecs-2`, `ecs-3`, `ecs-4`, `ecs-5`, `ecs-6`. For more information, see [Instance type families](https://www.alibabacloud.com/help/doc-detail/25378.htm).
        /// </summary>
        [Input("generation")]
        public string? Generation { get; set; }

        /// <summary>
        /// Valid values are `PrePaid`, `PostPaid`, Default to `PostPaid`.
        /// </summary>
        [Input("instanceChargeType")]
        public string? InstanceChargeType { get; set; }

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

        /// <summary>
        /// Filter the results by ECS spot type. Valid values: `NoSpot`, `SpotWithPriceLimit` and `SpotAsPriceGo`. Default to `NoSpot`.
        /// </summary>
        [Input("spotStrategy")]
        public string? SpotStrategy { get; set; }

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

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

    public sealed class GetInstanceTypeFamiliesInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The generation of the instance type family, Valid values: `ecs-1`, `ecs-2`, `ecs-3`, `ecs-4`, `ecs-5`, `ecs-6`. For more information, see [Instance type families](https://www.alibabacloud.com/help/doc-detail/25378.htm).
        /// </summary>
        [Input("generation")]
        public Input<string>? Generation { get; set; }

        /// <summary>
        /// Valid values are `PrePaid`, `PostPaid`, Default to `PostPaid`.
        /// </summary>
        [Input("instanceChargeType")]
        public Input<string>? InstanceChargeType { get; set; }

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

        /// <summary>
        /// Filter the results by ECS spot type. Valid values: `NoSpot`, `SpotWithPriceLimit` and `SpotAsPriceGo`. Default to `NoSpot`.
        /// </summary>
        [Input("spotStrategy")]
        public Input<string>? SpotStrategy { get; set; }

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

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


    [OutputType]
    public sealed class GetInstanceTypeFamiliesResult
    {
        public readonly ImmutableArray<Outputs.GetInstanceTypeFamiliesFamilyResult> Families;
        /// <summary>
        /// The generation of the instance type family.
        /// </summary>
        public readonly string? Generation;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// A list of instance type family IDs.
        /// </summary>
        public readonly ImmutableArray<string> Ids;
        public readonly string? InstanceChargeType;
        public readonly string? OutputFile;
        public readonly string? SpotStrategy;
        public readonly string? ZoneId;

        [OutputConstructor]
        private GetInstanceTypeFamiliesResult(
            ImmutableArray<Outputs.GetInstanceTypeFamiliesFamilyResult> families,

            string? generation,

            string id,

            ImmutableArray<string> ids,

            string? instanceChargeType,

            string? outputFile,

            string? spotStrategy,

            string? zoneId)
        {
            Families = families;
            Generation = generation;
            Id = id;
            Ids = ids;
            InstanceChargeType = instanceChargeType;
            OutputFile = outputFile;
            SpotStrategy = spotStrategy;
            ZoneId = zoneId;
        }
    }
}
