// *** 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
{
    public static class GetShardingNetworkPublicAddresses
    {
        /// <summary>
        /// This data source provides the Mongodb Sharding Network Public Addresses of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.149.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example = AliCloud.MongoDB.GetShardingNetworkPublicAddresses.Invoke(new()
        ///     {
        ///         DbInstanceId = "example_value",
        ///         NodeId = "example_value",
        ///         Role = "Primary",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["mongodbShardingNetworkPublicAddressDbInstanceId1"] = example.Apply(getShardingNetworkPublicAddressesResult =&gt; getShardingNetworkPublicAddressesResult.Addresses[0]?.DbInstanceId),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetShardingNetworkPublicAddressesResult> InvokeAsync(GetShardingNetworkPublicAddressesArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetShardingNetworkPublicAddressesResult>("alicloud:mongodb/getShardingNetworkPublicAddresses:getShardingNetworkPublicAddresses", args ?? new GetShardingNetworkPublicAddressesArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides the Mongodb Sharding Network Public Addresses of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.149.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example = AliCloud.MongoDB.GetShardingNetworkPublicAddresses.Invoke(new()
        ///     {
        ///         DbInstanceId = "example_value",
        ///         NodeId = "example_value",
        ///         Role = "Primary",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["mongodbShardingNetworkPublicAddressDbInstanceId1"] = example.Apply(getShardingNetworkPublicAddressesResult =&gt; getShardingNetworkPublicAddressesResult.Addresses[0]?.DbInstanceId),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetShardingNetworkPublicAddressesResult> Invoke(GetShardingNetworkPublicAddressesInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetShardingNetworkPublicAddressesResult>("alicloud:mongodb/getShardingNetworkPublicAddresses:getShardingNetworkPublicAddresses", args ?? new GetShardingNetworkPublicAddressesInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetShardingNetworkPublicAddressesArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The db instance id.
        /// </summary>
        [Input("dbInstanceId", required: true)]
        public string DbInstanceId { get; set; } = null!;

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

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

        /// <summary>
        /// The role of the node.
        /// </summary>
        [Input("role")]
        public string? Role { get; set; }

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

    public sealed class GetShardingNetworkPublicAddressesInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The db instance id.
        /// </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")]
        public Input<string>? NodeId { get; set; }

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

        /// <summary>
        /// The role of the node.
        /// </summary>
        [Input("role")]
        public Input<string>? Role { get; set; }

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


    [OutputType]
    public sealed class GetShardingNetworkPublicAddressesResult
    {
        public readonly ImmutableArray<Outputs.GetShardingNetworkPublicAddressesAddressResult> Addresses;
        public readonly string DbInstanceId;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly string? NodeId;
        public readonly string? OutputFile;
        public readonly string? Role;

        [OutputConstructor]
        private GetShardingNetworkPublicAddressesResult(
            ImmutableArray<Outputs.GetShardingNetworkPublicAddressesAddressResult> addresses,

            string dbInstanceId,

            string id,

            string? nodeId,

            string? outputFile,

            string? role)
        {
            Addresses = addresses;
            DbInstanceId = dbInstanceId;
            Id = id;
            NodeId = nodeId;
            OutputFile = outputFile;
            Role = role;
        }
    }
}
