// *** 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.Availability
{
    public static class GetZonesByProduct
    {
        /// <summary>
        /// Use this data source to get the available zones in current region. Must set product param to fetch the product infomations(e.g. =&gt; cvm, vpc). By default only `AVAILABLE` zones will be returned, but `UNAVAILABLE` zones can also be fetched when `include_unavailable` is specified.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var all = Output.Create(Tencentcloud.Availability.GetZonesByProduct.InvokeAsync(new Tencentcloud.Availability.GetZonesByProductArgs
        ///         {
        ///             Product = "cvm",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetZonesByProductResult> InvokeAsync(GetZonesByProductArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetZonesByProductResult>("tencentcloud:Availability/getZonesByProduct:getZonesByProduct", args ?? new GetZonesByProductArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to get the available zones in current region. Must set product param to fetch the product infomations(e.g. =&gt; cvm, vpc). By default only `AVAILABLE` zones will be returned, but `UNAVAILABLE` zones can also be fetched when `include_unavailable` is specified.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var all = Output.Create(Tencentcloud.Availability.GetZonesByProduct.InvokeAsync(new Tencentcloud.Availability.GetZonesByProductArgs
        ///         {
        ///             Product = "cvm",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetZonesByProductResult> Invoke(GetZonesByProductInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetZonesByProductResult>("tencentcloud:Availability/getZonesByProduct:getZonesByProduct", args ?? new GetZonesByProductInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetZonesByProductArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// A bool variable indicates that the query will include `UNAVAILABLE` zones.
        /// </summary>
        [Input("includeUnavailable")]
        public bool? IncludeUnavailable { get; set; }

        /// <summary>
        /// When specified, only the zone with the exactly name match will be returned.
        /// </summary>
        [Input("name")]
        public string? Name { get; set; }

        /// <summary>
        /// A string variable indicates that the query will use product information.
        /// </summary>
        [Input("product", required: true)]
        public string Product { get; set; } = null!;

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

        public GetZonesByProductArgs()
        {
        }
    }

    public sealed class GetZonesByProductInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// A bool variable indicates that the query will include `UNAVAILABLE` zones.
        /// </summary>
        [Input("includeUnavailable")]
        public Input<bool>? IncludeUnavailable { get; set; }

        /// <summary>
        /// When specified, only the zone with the exactly name match will be returned.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// A string variable indicates that the query will use product information.
        /// </summary>
        [Input("product", required: true)]
        public Input<string> Product { get; set; } = null!;

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

        public GetZonesByProductInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetZonesByProductResult
    {
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly bool? IncludeUnavailable;
        /// <summary>
        /// The name of the zone, like `ap-guangzhou-3`.
        /// </summary>
        public readonly string? Name;
        public readonly string Product;
        public readonly string? ResultOutputFile;
        /// <summary>
        /// A list of zones will be exported and its every element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetZonesByProductZoneResult> Zones;

        [OutputConstructor]
        private GetZonesByProductResult(
            string id,

            bool? includeUnavailable,

            string? name,

            string product,

            string? resultOutputFile,

            ImmutableArray<Outputs.GetZonesByProductZoneResult> zones)
        {
            Id = id;
            IncludeUnavailable = includeUnavailable;
            Name = name;
            Product = product;
            ResultOutputFile = resultOutputFile;
            Zones = zones;
        }
    }
}
