// *** 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
{
    /// <summary>
    /// Provides a Alidns Address Pool resource.
    /// 
    /// For information about Alidns Address Pool and how to use it, see [What is Address Pool](https://www.alibabacloud.com/help/doc-detail/189621.html).
    /// 
    /// &gt; **NOTE:** Available in v1.152.0+.
    /// 
    /// ## Import
    /// 
    /// Alidns Address Pool can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:dns/addressPool:AddressPool example &lt;id&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:dns/addressPool:AddressPool")]
    public partial class AddressPool : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The name of the address pool.
        /// </summary>
        [Output("addressPoolName")]
        public Output<string> AddressPoolName { get; private set; } = null!;

        /// <summary>
        /// The address that you want to add to the address pool.
        /// </summary>
        [Output("addresses")]
        public Output<ImmutableArray<Outputs.AddressPoolAddress>> Addresses { get; private set; } = null!;

        /// <summary>
        /// The ID of the instance.
        /// </summary>
        [Output("instanceId")]
        public Output<string> InstanceId { get; private set; } = null!;

        /// <summary>
        /// The load balancing policy of the address pool. Valid values:`ALL_RR` or `RATIO`. `ALL_RR`: returns all addresses. `RATIO`: returns addresses by weight.
        /// </summary>
        [Output("lbaStrategy")]
        public Output<string> LbaStrategy { get; private set; } = null!;

        /// <summary>
        /// The type of the address pool. Valid values: `IPV4`, `IPV6`, `DOMAIN`.
        /// </summary>
        [Output("type")]
        public Output<string> Type { get; private set; } = null!;


        /// <summary>
        /// Create a AddressPool resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public AddressPool(string name, AddressPoolArgs args, CustomResourceOptions? options = null)
            : base("alicloud:dns/addressPool:AddressPool", name, args ?? new AddressPoolArgs(), MakeResourceOptions(options, ""))
        {
        }

        private AddressPool(string name, Input<string> id, AddressPoolState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:dns/addressPool:AddressPool", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/rhysmdnz/pulumi-alicloud",
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing AddressPool resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static AddressPool Get(string name, Input<string> id, AddressPoolState? state = null, CustomResourceOptions? options = null)
        {
            return new AddressPool(name, id, state, options);
        }
    }

    public sealed class AddressPoolArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The name of the address pool.
        /// </summary>
        [Input("addressPoolName", required: true)]
        public Input<string> AddressPoolName { get; set; } = null!;

        [Input("addresses", required: true)]
        private InputList<Inputs.AddressPoolAddressArgs>? _addresses;

        /// <summary>
        /// The address that you want to add to the address pool.
        /// </summary>
        public InputList<Inputs.AddressPoolAddressArgs> Addresses
        {
            get => _addresses ?? (_addresses = new InputList<Inputs.AddressPoolAddressArgs>());
            set => _addresses = value;
        }

        /// <summary>
        /// The ID of the instance.
        /// </summary>
        [Input("instanceId", required: true)]
        public Input<string> InstanceId { get; set; } = null!;

        /// <summary>
        /// The load balancing policy of the address pool. Valid values:`ALL_RR` or `RATIO`. `ALL_RR`: returns all addresses. `RATIO`: returns addresses by weight.
        /// </summary>
        [Input("lbaStrategy", required: true)]
        public Input<string> LbaStrategy { get; set; } = null!;

        /// <summary>
        /// The type of the address pool. Valid values: `IPV4`, `IPV6`, `DOMAIN`.
        /// </summary>
        [Input("type", required: true)]
        public Input<string> Type { get; set; } = null!;

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

    public sealed class AddressPoolState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The name of the address pool.
        /// </summary>
        [Input("addressPoolName")]
        public Input<string>? AddressPoolName { get; set; }

        [Input("addresses")]
        private InputList<Inputs.AddressPoolAddressGetArgs>? _addresses;

        /// <summary>
        /// The address that you want to add to the address pool.
        /// </summary>
        public InputList<Inputs.AddressPoolAddressGetArgs> Addresses
        {
            get => _addresses ?? (_addresses = new InputList<Inputs.AddressPoolAddressGetArgs>());
            set => _addresses = value;
        }

        /// <summary>
        /// The ID of the instance.
        /// </summary>
        [Input("instanceId")]
        public Input<string>? InstanceId { get; set; }

        /// <summary>
        /// The load balancing policy of the address pool. Valid values:`ALL_RR` or `RATIO`. `ALL_RR`: returns all addresses. `RATIO`: returns addresses by weight.
        /// </summary>
        [Input("lbaStrategy")]
        public Input<string>? LbaStrategy { get; set; }

        /// <summary>
        /// The type of the address pool. Valid values: `IPV4`, `IPV6`, `DOMAIN`.
        /// </summary>
        [Input("type")]
        public Input<string>? Type { get; set; }

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