<filename>sdk/dotnet/Ovh/CloudProject/GetUser.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 Lbrlabs.PulumiPackage.Ovh.CloudProject
{
    public static class GetUser
    {
        /// <summary>
        /// Get the user details of a previously created public cloud project user.
        /// </summary>
        public static Task<GetUserResult> InvokeAsync(GetUserArgs args, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.InvokeAsync<GetUserResult>("ovh:CloudProject/getUser:getUser", args ?? new GetUserArgs(), options.WithDefaults());

        /// <summary>
        /// Get the user details of a previously created public cloud project user.
        /// </summary>
        public static Output<GetUserResult> Invoke(GetUserInvokeArgs args, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.Invoke<GetUserResult>("ovh:CloudProject/getUser:getUser", args ?? new GetUserInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetUserArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The ID of the public cloud project. If omitted,
        /// the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
        /// </summary>
        [Input("serviceName", required: true)]
        public string ServiceName { get; set; } = null!;

        /// <summary>
        /// The ID of a public cloud project's user.
        /// </summary>
        [Input("userId", required: true)]
        public string UserId { get; set; } = null!;

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

    public sealed class GetUserInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The ID of the public cloud project. If omitted,
        /// the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
        /// </summary>
        [Input("serviceName", required: true)]
        public Input<string> ServiceName { get; set; } = null!;

        /// <summary>
        /// The ID of a public cloud project's user.
        /// </summary>
        [Input("userId", required: true)]
        public Input<string> UserId { get; set; } = null!;

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


    [OutputType]
    public sealed class GetUserResult
    {
        /// <summary>
        /// the date the user was created.
        /// </summary>
        public readonly string CreationDate;
        /// <summary>
        /// description of the role
        /// </summary>
        public readonly string Description;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// A list of roles associated with the user.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetUserRoleResult> Roles;
        public readonly string ServiceName;
        /// <summary>
        /// the status of the user. should be normally set to 'ok'.
        /// </summary>
        public readonly string Status;
        public readonly string UserId;
        /// <summary>
        /// the username generated for the user. This username can be used with
        /// the Openstack API.
        /// </summary>
        public readonly string Username;

        [OutputConstructor]
        private GetUserResult(
            string creationDate,

            string description,

            string id,

            ImmutableArray<Outputs.GetUserRoleResult> roles,

            string serviceName,

            string status,

            string userId,

            string username)
        {
            CreationDate = creationDate;
            Description = description;
            Id = id;
            Roles = roles;
            ServiceName = serviceName;
            Status = status;
            UserId = userId;
            Username = username;
        }
    }
}
