// *** 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.Cen
{
    public static class GetPrivateZones
    {
        /// <summary>
        /// This data source provides CEN Private Zones available to the user.
        /// 
        /// &gt; **NOTE:** Available in v1.88.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = AliCloud.Cen.GetPrivateZones.Invoke(new()
        ///     {
        ///         CenId = "cen-o40h17ll9w********",
        ///         Ids = new[]
        ///         {
        ///             "cn-hangzhou",
        ///         },
        ///         Status = "Active",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstCenPrivateZonesId"] = @this.Apply(getPrivateZonesResult =&gt; getPrivateZonesResult).Apply(@this =&gt; @this.Apply(getPrivateZonesResult =&gt; getPrivateZonesResult.Zones[0]?.Id)),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetPrivateZonesResult> InvokeAsync(GetPrivateZonesArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetPrivateZonesResult>("alicloud:cen/getPrivateZones:getPrivateZones", args ?? new GetPrivateZonesArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides CEN Private Zones available to the user.
        /// 
        /// &gt; **NOTE:** Available in v1.88.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = AliCloud.Cen.GetPrivateZones.Invoke(new()
        ///     {
        ///         CenId = "cen-o40h17ll9w********",
        ///         Ids = new[]
        ///         {
        ///             "cn-hangzhou",
        ///         },
        ///         Status = "Active",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstCenPrivateZonesId"] = @this.Apply(getPrivateZonesResult =&gt; getPrivateZonesResult).Apply(@this =&gt; @this.Apply(getPrivateZonesResult =&gt; getPrivateZonesResult.Zones[0]?.Id)),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetPrivateZonesResult> Invoke(GetPrivateZonesInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetPrivateZonesResult>("alicloud:cen/getPrivateZones:getPrivateZones", args ?? new GetPrivateZonesInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetPrivateZonesArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The ID of the CEN instance.
        /// </summary>
        [Input("cenId", required: true)]
        public string CenId { get; set; } = null!;

        /// <summary>
        /// The service region. The service region is the target region of the PrivateZone service accessed through CEN.
        /// </summary>
        [Input("hostRegionId")]
        public string? HostRegionId { get; set; }

        [Input("ids")]
        private List<string>? _ids;

        /// <summary>
        /// A list of CEN private zone IDs. Each element format as `&lt;cen_id&gt;:&lt;access_region_id&gt;`. 
        /// **NOTE:** Before 1.162.0, each element same as `access_region_id`.
        /// * `host_region_id ` - (Optional) The service region is the target region of the PrivateZone service accessed through CEN.
        /// </summary>
        public List<string> Ids
        {
            get => _ids ?? (_ids = new List<string>());
            set => _ids = value;
        }

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

        /// <summary>
        /// The status of the PrivateZone service, including `Creating`, `Active` and `Deleting`.
        /// </summary>
        [Input("status")]
        public string? Status { get; set; }

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

    public sealed class GetPrivateZonesInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The ID of the CEN instance.
        /// </summary>
        [Input("cenId", required: true)]
        public Input<string> CenId { get; set; } = null!;

        /// <summary>
        /// The service region. The service region is the target region of the PrivateZone service accessed through CEN.
        /// </summary>
        [Input("hostRegionId")]
        public Input<string>? HostRegionId { get; set; }

        [Input("ids")]
        private InputList<string>? _ids;

        /// <summary>
        /// A list of CEN private zone IDs. Each element format as `&lt;cen_id&gt;:&lt;access_region_id&gt;`. 
        /// **NOTE:** Before 1.162.0, each element same as `access_region_id`.
        /// * `host_region_id ` - (Optional) The service region is the target region of the PrivateZone service accessed through CEN.
        /// </summary>
        public InputList<string> Ids
        {
            get => _ids ?? (_ids = new InputList<string>());
            set => _ids = value;
        }

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

        /// <summary>
        /// The status of the PrivateZone service, including `Creating`, `Active` and `Deleting`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

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


    [OutputType]
    public sealed class GetPrivateZonesResult
    {
        /// <summary>
        /// The ID of the CEN instance.
        /// </summary>
        public readonly string CenId;
        /// <summary>
        /// The service region. The service region is the target region of the PrivateZone service accessed through CEN.
        /// </summary>
        public readonly string? HostRegionId;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// A list of CEN private zone IDs. Each element format as `&lt;cen_id&gt;:&lt;access_region_id&gt;`.
        /// **NOTE:** Before 1.162.0, each element same as `access_region_id`.
        /// </summary>
        public readonly ImmutableArray<string> Ids;
        public readonly string? OutputFile;
        /// <summary>
        /// The status of the PrivateZone service.
        /// </summary>
        public readonly string? Status;
        /// <summary>
        /// A list of CEN private zones. Each element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetPrivateZonesZoneResult> Zones;

        [OutputConstructor]
        private GetPrivateZonesResult(
            string cenId,

            string? hostRegionId,

            string id,

            ImmutableArray<string> ids,

            string? outputFile,

            string? status,

            ImmutableArray<Outputs.GetPrivateZonesZoneResult> zones)
        {
            CenId = cenId;
            HostRegionId = hostRegionId;
            Id = id;
            Ids = ids;
            OutputFile = outputFile;
            Status = status;
            Zones = zones;
        }
    }
}
