// *** 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.MongoDB
{
    /// <summary>
    /// Provides a MongoDB Sharding Network Public Address resource.
    /// 
    /// For information about MongoDB Sharding Network Public Address and how to use it, see [What is Sharding Network Public Address](https://www.alibabacloud.com/help/doc-detail/67602.html).
    /// 
    /// &gt; **NOTE:** Available in v1.149.0+.
    /// 
    /// &gt; **NOTE:** This operation supports sharded cluster instances only.
    /// 
    /// ## Import
    /// 
    /// MongoDB Sharding Network Public Address can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:mongodb/shardingNetworkPublicAddress:ShardingNetworkPublicAddress example &lt;db_instance_id&gt;:&lt;node_id&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:mongodb/shardingNetworkPublicAddress:ShardingNetworkPublicAddress")]
    public partial class ShardingNetworkPublicAddress : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The ID of the instance.
        /// </summary>
        [Output("dbInstanceId")]
        public Output<string> DbInstanceId { get; private set; } = null!;

        /// <summary>
        /// The endpoint of the instance.
        /// </summary>
        [Output("networkAddresses")]
        public Output<ImmutableArray<Outputs.ShardingNetworkPublicAddressNetworkAddress>> NetworkAddresses { get; private set; } = null!;

        /// <summary>
        /// The ID of the `mongos`, `shard`, or `Configserver` node in the sharded cluster instance.
        /// </summary>
        [Output("nodeId")]
        public Output<string> NodeId { get; private set; } = null!;


        /// <summary>
        /// Create a ShardingNetworkPublicAddress 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 ShardingNetworkPublicAddress(string name, ShardingNetworkPublicAddressArgs args, CustomResourceOptions? options = null)
            : base("alicloud:mongodb/shardingNetworkPublicAddress:ShardingNetworkPublicAddress", name, args ?? new ShardingNetworkPublicAddressArgs(), MakeResourceOptions(options, ""))
        {
        }

        private ShardingNetworkPublicAddress(string name, Input<string> id, ShardingNetworkPublicAddressState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:mongodb/shardingNetworkPublicAddress:ShardingNetworkPublicAddress", 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 ShardingNetworkPublicAddress 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 ShardingNetworkPublicAddress Get(string name, Input<string> id, ShardingNetworkPublicAddressState? state = null, CustomResourceOptions? options = null)
        {
            return new ShardingNetworkPublicAddress(name, id, state, options);
        }
    }

    public sealed class ShardingNetworkPublicAddressArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The ID of the instance.
        /// </summary>
        [Input("dbInstanceId", required: true)]
        public Input<string> DbInstanceId { get; set; } = null!;

        /// <summary>
        /// The ID of the `mongos`, `shard`, or `Configserver` node in the sharded cluster instance.
        /// </summary>
        [Input("nodeId", required: true)]
        public Input<string> NodeId { get; set; } = null!;

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

    public sealed class ShardingNetworkPublicAddressState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The ID of the instance.
        /// </summary>
        [Input("dbInstanceId")]
        public Input<string>? DbInstanceId { get; set; }

        [Input("networkAddresses")]
        private InputList<Inputs.ShardingNetworkPublicAddressNetworkAddressGetArgs>? _networkAddresses;

        /// <summary>
        /// The endpoint of the instance.
        /// </summary>
        public InputList<Inputs.ShardingNetworkPublicAddressNetworkAddressGetArgs> NetworkAddresses
        {
            get => _networkAddresses ?? (_networkAddresses = new InputList<Inputs.ShardingNetworkPublicAddressNetworkAddressGetArgs>());
            set => _networkAddresses = value;
        }

        /// <summary>
        /// The ID of the `mongos`, `shard`, or `Configserver` node in the sharded cluster instance.
        /// </summary>
        [Input("nodeId")]
        public Input<string>? NodeId { get; set; }

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