// *** 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 GetAccount
    {
        /// <summary>
        /// Accounts are users that have access to strongDM. There are two types of accounts:
        ///  1. **Users:** humans who are authenticated through username and password or SSO.
        ///  2. **Service Accounts:** machines that are authenticated using a service token.
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using System.Linq;
        /// using Pulumi;
        /// using Sdm = Pulumi.Sdm;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var user_queries = Sdm.GetAccount.Invoke(new()
        ///     {
        ///         Email = "envkt@example.com",
        ///         Tags = 
        ///         {
        ///             { "env", "dev" },
        ///             { "region", "us-west" },
        ///         },
        ///         Type = "user",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetAccountResult> InvokeAsync(GetAccountArgs? args = null, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.InvokeAsync<GetAccountResult>("sdm:index/getAccount:getAccount", args ?? new GetAccountArgs(), options.WithDefaults());

        /// <summary>
        /// Accounts are users that have access to strongDM. There are two types of accounts:
        ///  1. **Users:** humans who are authenticated through username and password or SSO.
        ///  2. **Service Accounts:** machines that are authenticated using a service token.
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using System.Linq;
        /// using Pulumi;
        /// using Sdm = Pulumi.Sdm;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var user_queries = Sdm.GetAccount.Invoke(new()
        ///     {
        ///         Email = "envkt@example.com",
        ///         Tags = 
        ///         {
        ///             { "env", "dev" },
        ///             { "region", "us-west" },
        ///         },
        ///         Type = "user",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetAccountResult> Invoke(GetAccountInvokeArgs? args = null, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.Invoke<GetAccountResult>("sdm:index/getAccount:getAccount", args ?? new GetAccountInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetAccountArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The User's email address. Must be unique.
        /// </summary>
        [Input("email")]
        public string? Email { get; set; }

        /// <summary>
        /// External ID is an alternative unique ID this user is represented by within an external service.
        /// </summary>
        [Input("externalId")]
        public string? ExternalId { get; set; }

        /// <summary>
        /// The User's first name.
        /// </summary>
        [Input("firstName")]
        public string? FirstName { get; set; }

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

        /// <summary>
        /// The User's last name.
        /// </summary>
        [Input("lastName")]
        public string? LastName { get; set; }

        /// <summary>
        /// Unique human-readable name of the Service.
        /// </summary>
        [Input("name")]
        public string? Name { get; set; }

        /// <summary>
        /// The User's suspended state.
        /// </summary>
        [Input("suspended")]
        public bool? Suspended { 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 GetAccountArgs()
        {
        }
        public static new GetAccountArgs Empty => new GetAccountArgs();
    }

    public sealed class GetAccountInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The User's email address. Must be unique.
        /// </summary>
        [Input("email")]
        public Input<string>? Email { get; set; }

        /// <summary>
        /// External ID is an alternative unique ID this user is represented by within an external service.
        /// </summary>
        [Input("externalId")]
        public Input<string>? ExternalId { get; set; }

        /// <summary>
        /// The User's first name.
        /// </summary>
        [Input("firstName")]
        public Input<string>? FirstName { get; set; }

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

        /// <summary>
        /// The User's last name.
        /// </summary>
        [Input("lastName")]
        public Input<string>? LastName { get; set; }

        /// <summary>
        /// Unique human-readable name of the Service.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The User's suspended state.
        /// </summary>
        [Input("suspended")]
        public Input<bool>? Suspended { 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 GetAccountInvokeArgs()
        {
        }
        public static new GetAccountInvokeArgs Empty => new GetAccountInvokeArgs();
    }


    [OutputType]
    public sealed class GetAccountResult
    {
        /// <summary>
        /// A single element list containing a map, where each key lists one of the following objects:
        /// * service:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetAccountAccountResult> Accounts;
        /// <summary>
        /// The User's email address. Must be unique.
        /// </summary>
        public readonly string? Email;
        /// <summary>
        /// External ID is an alternative unique ID this user is represented by within an external service.
        /// </summary>
        public readonly string? ExternalId;
        /// <summary>
        /// The User's first name.
        /// </summary>
        public readonly string? FirstName;
        /// <summary>
        /// Unique identifier of the User.
        /// </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 User's last name.
        /// </summary>
        public readonly string? LastName;
        /// <summary>
        /// Unique human-readable name of the Service.
        /// </summary>
        public readonly string? Name;
        /// <summary>
        /// The User's suspended state.
        /// </summary>
        public readonly bool? Suspended;
        /// <summary>
        /// Tags is a map of key, value pairs.
        /// </summary>
        public readonly ImmutableDictionary<string, object>? Tags;
        public readonly string? Type;

        [OutputConstructor]
        private GetAccountResult(
            ImmutableArray<Outputs.GetAccountAccountResult> accounts,

            string? email,

            string? externalId,

            string? firstName,

            string? id,

            ImmutableArray<string> ids,

            string? lastName,

            string? name,

            bool? suspended,

            ImmutableDictionary<string, object>? tags,

            string? type)
        {
            Accounts = accounts;
            Email = email;
            ExternalId = externalId;
            FirstName = firstName;
            Id = id;
            Ids = ids;
            LastName = lastName;
            Name = name;
            Suspended = suspended;
            Tags = tags;
            Type = type;
        }
    }
}
