<filename>sdk/dotnet/GetNode.cs// *** 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;
using Pulumi;

namespace PiersKarsenbarg.Sdm
{
    public static class GetNode
    {
        /// <summary>
        /// Nodes make up the strongDM network, and allow your users to connect securely to your resources.
        ///  There are two types of nodes:
        ///  1. **Relay:** creates connectivity to your datasources, while maintaining the egress-only nature of your firewall
        ///  1. **Gateways:** a relay that also listens for connections from strongDM clients
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using System.Linq;
        /// using Pulumi;
        /// using Sdm = Pulumi.Sdm;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var gatewayQuery = Sdm.GetNode.Invoke(new()
        ///     {
        ///         Tags = 
        ///         {
        ///             { "env", "dev" },
        ///             { "region", "us-west" },
        ///         },
        ///         Type = "gateway",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetNodeResult> InvokeAsync(GetNodeArgs? args = null, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.InvokeAsync<GetNodeResult>("sdm:index/getNode:getNode", args ?? new GetNodeArgs(), options.WithDefaults());

        /// <summary>
        /// Nodes make up the strongDM network, and allow your users to connect securely to your resources.
        ///  There are two types of nodes:
        ///  1. **Relay:** creates connectivity to your datasources, while maintaining the egress-only nature of your firewall
        ///  1. **Gateways:** a relay that also listens for connections from strongDM clients
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using System.Linq;
        /// using Pulumi;
        /// using Sdm = Pulumi.Sdm;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var gatewayQuery = Sdm.GetNode.Invoke(new()
        ///     {
        ///         Tags = 
        ///         {
        ///             { "env", "dev" },
        ///             { "region", "us-west" },
        ///         },
        ///         Type = "gateway",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetNodeResult> Invoke(GetNodeInvokeArgs? args = null, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.Invoke<GetNodeResult>("sdm:index/getNode:getNode", args ?? new GetNodeInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetNodeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The hostname/port tuple which the gateway daemon will bind to. If not provided on create, set to "0.0.0.0:listen_address_port".
        /// </summary>
        [Input("bindAddress")]
        public string? BindAddress { get; set; }

        /// <summary>
        /// Unique identifier of the Relay.
        /// </summary>
        [Input("id")]
        public string? Id { get; set; }

        /// <summary>
        /// The public hostname/port tuple at which the gateway will be accessible to clients.
        /// </summary>
        [Input("listenAddress")]
        public string? ListenAddress { get; set; }

        /// <summary>
        /// Unique human-readable name of the Relay. Node names must include only letters, numbers, and hyphens (no spaces, underscores, or other special characters). Generated if not provided on create.
        /// </summary>
        [Input("name")]
        public string? Name { get; set; }

        [Input("tags")]
        private Dictionary<string, object>? _tags;

        /// <summary>
        /// Tags is a map of key, value pairs.
        /// </summary>
        public Dictionary<string, object> Tags
        {
            get => _tags ?? (_tags = new Dictionary<string, object>());
            set => _tags = value;
        }

        /// <summary>
        /// a filter to select all items of a certain subtype. See the [filter documentation](https://www.strongdm.com/docs/automation/getting-started/filters for more information.
        /// </summary>
        [Input("type")]
        public string? Type { get; set; }

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

    public sealed class GetNodeInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The hostname/port tuple which the gateway daemon will bind to. If not provided on create, set to "0.0.0.0:listen_address_port".
        /// </summary>
        [Input("bindAddress")]
        public Input<string>? BindAddress { get; set; }

        /// <summary>
        /// Unique identifier of the Relay.
        /// </summary>
        [Input("id")]
        public Input<string>? Id { get; set; }

        /// <summary>
        /// The public hostname/port tuple at which the gateway will be accessible to clients.
        /// </summary>
        [Input("listenAddress")]
        public Input<string>? ListenAddress { get; set; }

        /// <summary>
        /// Unique human-readable name of the Relay. Node names must include only letters, numbers, and hyphens (no spaces, underscores, or other special characters). Generated if not provided on create.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// Tags is a map of key, value pairs.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// a filter to select all items of a certain subtype. See the [filter documentation](https://www.strongdm.com/docs/automation/getting-started/filters for more information.
        /// </summary>
        [Input("type")]
        public Input<string>? Type { get; set; }

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


    [OutputType]
    public sealed class GetNodeResult
    {
        /// <summary>
        /// The hostname/port tuple which the gateway daemon will bind to. If not provided on create, set to "0.0.0.0:listen_address_port".
        /// </summary>
        public readonly string? BindAddress;
        /// <summary>
        /// Unique identifier of the Relay.
        /// </summary>
        public readonly string? Id;
        /// <summary>
        /// a list of strings of ids of data sources that match the given arguments.
        /// </summary>
        public readonly ImmutableArray<string> Ids;
        /// <summary>
        /// The public hostname/port tuple at which the gateway will be accessible to clients.
        /// </summary>
        public readonly string? ListenAddress;
        /// <summary>
        /// Unique human-readable name of the Relay. Node names must include only letters, numbers, and hyphens (no spaces, underscores, or other special characters). Generated if not provided on create.
        /// </summary>
        public readonly string? Name;
        /// <summary>
        /// A single element list containing a map, where each key lists one of the following objects:
        /// * gateway:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetNodeNodeResult> Nodes;
        /// <summary>
        /// Tags is a map of key, value pairs.
        /// </summary>
        public readonly ImmutableDictionary<string, object>? Tags;
        public readonly string? Type;

        [OutputConstructor]
        private GetNodeResult(
            string? bindAddress,

            string? id,

            ImmutableArray<string> ids,

            string? listenAddress,

            string? name,

            ImmutableArray<Outputs.GetNodeNodeResult> nodes,

            ImmutableDictionary<string, object>? tags,

            string? type)
        {
            BindAddress = bindAddress;
            Id = id;
            Ids = ids;
            ListenAddress = listenAddress;
            Name = name;
            Nodes = nodes;
            Tags = tags;
            Type = type;
        }
    }
}
