<reponame>rhysmdnz/pulumi-alicloud-rhys-hacks// *** 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.Dns
{
    public static class GetAlidnsInstances
    {
        /// <summary>
        /// This data source provides a list of Alidns instances in an Alibaba Cloud account according to the specified filters.
        /// 
        /// &gt; **NOTE:**  Available in 1.95.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example = AliCloud.Dns.GetAlidnsInstances.Invoke(new()
        ///     {
        ///         Ids = new[]
        ///         {
        ///             "dns-cn-oew1npk****",
        ///         },
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstInstanceId"] = example.Apply(getAlidnsInstancesResult =&gt; getAlidnsInstancesResult.Instances[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetAlidnsInstancesResult> InvokeAsync(GetAlidnsInstancesArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetAlidnsInstancesResult>("alicloud:dns/getAlidnsInstances:getAlidnsInstances", args ?? new GetAlidnsInstancesArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides a list of Alidns instances in an Alibaba Cloud account according to the specified filters.
        /// 
        /// &gt; **NOTE:**  Available in 1.95.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example = AliCloud.Dns.GetAlidnsInstances.Invoke(new()
        ///     {
        ///         Ids = new[]
        ///         {
        ///             "dns-cn-oew1npk****",
        ///         },
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstInstanceId"] = example.Apply(getAlidnsInstancesResult =&gt; getAlidnsInstancesResult.Instances[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetAlidnsInstancesResult> Invoke(GetAlidnsInstancesInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetAlidnsInstancesResult>("alicloud:dns/getAlidnsInstances:getAlidnsInstances", args ?? new GetAlidnsInstancesInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetAlidnsInstancesArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The type of domain.
        /// </summary>
        [Input("domainType")]
        public string? DomainType { get; set; }

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

        /// <summary>
        /// A list of instance IDs.
        /// </summary>
        public List<string> Ids
        {
            get => _ids ?? (_ids = new List<string>());
            set => _ids = value;
        }

        /// <summary>
        /// Language.
        /// </summary>
        [Input("lang")]
        public string? Lang { get; set; }

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

        /// <summary>
        /// The IP address of the client.
        /// </summary>
        [Input("userClientIp")]
        public string? UserClientIp { get; set; }

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

    public sealed class GetAlidnsInstancesInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The type of domain.
        /// </summary>
        [Input("domainType")]
        public Input<string>? DomainType { get; set; }

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

        /// <summary>
        /// A list of instance IDs.
        /// </summary>
        public InputList<string> Ids
        {
            get => _ids ?? (_ids = new InputList<string>());
            set => _ids = value;
        }

        /// <summary>
        /// Language.
        /// </summary>
        [Input("lang")]
        public Input<string>? Lang { get; set; }

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

        /// <summary>
        /// The IP address of the client.
        /// </summary>
        [Input("userClientIp")]
        public Input<string>? UserClientIp { get; set; }

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


    [OutputType]
    public sealed class GetAlidnsInstancesResult
    {
        public readonly string? DomainType;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// A list of instance IDs.
        /// </summary>
        public readonly ImmutableArray<string> Ids;
        /// <summary>
        /// A list of instances. Each element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetAlidnsInstancesInstanceResult> Instances;
        public readonly string? Lang;
        public readonly string? OutputFile;
        public readonly string? UserClientIp;

        [OutputConstructor]
        private GetAlidnsInstancesResult(
            string? domainType,

            string id,

            ImmutableArray<string> ids,

            ImmutableArray<Outputs.GetAlidnsInstancesInstanceResult> instances,

            string? lang,

            string? outputFile,

            string? userClientIp)
        {
            DomainType = domainType;
            Id = id;
            Ids = ids;
            Instances = instances;
            Lang = lang;
            OutputFile = outputFile;
            UserClientIp = userClientIp;
        }
    }
}
