<filename>sdk/dotnet/KVStore/GetZones.cs<gh_stars>0// *** 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.KVStore
{
    public static class GetZones
    {
        /// <summary>
        /// This data source provides availability zones for KVStore that can be accessed by an Alibaba Cloud account within the region configured in the provider.
        /// 
        /// &gt; **NOTE:** Available in v1.73.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var zonesIds = AliCloud.KVStore.GetZones.Invoke();
        /// 
        ///     // Create an KVStore instance with the first matched zone
        ///     var kvstore = new AliCloud.KVStore.Instance("kvstore", new()
        ///     {
        ///         AvailabilityZone = zonesIds.Apply(getZonesResult =&gt; getZonesResult.Zones[0]?.Id),
        ///     });
        /// 
        ///     // Other properties...
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetZonesResult> InvokeAsync(GetZonesArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetZonesResult>("alicloud:kvstore/getZones:getZones", args ?? new GetZonesArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides availability zones for KVStore that can be accessed by an Alibaba Cloud account within the region configured in the provider.
        /// 
        /// &gt; **NOTE:** Available in v1.73.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var zonesIds = AliCloud.KVStore.GetZones.Invoke();
        /// 
        ///     // Create an KVStore instance with the first matched zone
        ///     var kvstore = new AliCloud.KVStore.Instance("kvstore", new()
        ///     {
        ///         AvailabilityZone = zonesIds.Apply(getZonesResult =&gt; getZonesResult.Zones[0]?.Id),
        ///     });
        /// 
        ///     // Other properties...
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetZonesResult> Invoke(GetZonesInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetZonesResult>("alicloud:kvstore/getZones:getZones", args ?? new GetZonesInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetZonesArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Database type. Options are `Redis`, `Memcache`. Default to `Redis`.
        /// * product_type - (Optional, Available in v1.130.0+) The type of the service. Valid values:
        /// * Local: an ApsaraDB for Redis instance with a local disk.
        /// * OnECS: an ApsaraDB for Redis instance with a standard disk. This type is available only on the Alibaba Cloud China site.
        /// </summary>
        [Input("engine")]
        public string? Engine { get; set; }

        /// <summary>
        /// Filter the results by a specific instance charge type. Valid values: `PrePaid` and `PostPaid`. Default to `PostPaid`.
        /// </summary>
        [Input("instanceChargeType")]
        public string? InstanceChargeType { get; set; }

        /// <summary>
        /// Indicate whether the zones can be used in a multi AZ configuration. Default to `false`. Multi AZ is usually used to launch KVStore instances.
        /// </summary>
        [Input("multi")]
        public bool? Multi { get; set; }

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

        [Input("productType")]
        public string? ProductType { get; set; }

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

    public sealed class GetZonesInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Database type. Options are `Redis`, `Memcache`. Default to `Redis`.
        /// * product_type - (Optional, Available in v1.130.0+) The type of the service. Valid values:
        /// * Local: an ApsaraDB for Redis instance with a local disk.
        /// * OnECS: an ApsaraDB for Redis instance with a standard disk. This type is available only on the Alibaba Cloud China site.
        /// </summary>
        [Input("engine")]
        public Input<string>? Engine { get; set; }

        /// <summary>
        /// Filter the results by a specific instance charge type. Valid values: `PrePaid` and `PostPaid`. Default to `PostPaid`.
        /// </summary>
        [Input("instanceChargeType")]
        public Input<string>? InstanceChargeType { get; set; }

        /// <summary>
        /// Indicate whether the zones can be used in a multi AZ configuration. Default to `false`. Multi AZ is usually used to launch KVStore instances.
        /// </summary>
        [Input("multi")]
        public Input<bool>? Multi { get; set; }

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

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

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


    [OutputType]
    public sealed class GetZonesResult
    {
        public readonly string? Engine;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// A list of zone IDs.
        /// </summary>
        public readonly ImmutableArray<string> Ids;
        public readonly string? InstanceChargeType;
        public readonly bool? Multi;
        public readonly string? OutputFile;
        public readonly string? ProductType;
        /// <summary>
        /// A list of availability zones. Each element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetZonesZoneResult> Zones;

        [OutputConstructor]
        private GetZonesResult(
            string? engine,

            string id,

            ImmutableArray<string> ids,

            string? instanceChargeType,

            bool? multi,

            string? outputFile,

            string? productType,

            ImmutableArray<Outputs.GetZonesZoneResult> zones)
        {
            Engine = engine;
            Id = id;
            Ids = ids;
            InstanceChargeType = instanceChargeType;
            Multi = multi;
            OutputFile = outputFile;
            ProductType = productType;
            Zones = zones;
        }
    }
}
