<gh_stars>0// *** 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.Nutanix
{
    public static class GetUserGroup
    {
        /// <summary>
        /// Provides a datasource to retrieve a user group based on the input parameters.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Nutanix = Pulumi.Nutanix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var usergroup = Output.Create(Nutanix.GetUserGroup.InvokeAsync(new Nutanix.GetUserGroupArgs
        ///         {
        ///             UserGroupId = "dd30a856-8e72-4158-b716-98455ceda220",
        ///         }));
        ///         var usergroupbyname = Output.Create(Nutanix.GetUserGroup.InvokeAsync(new Nutanix.GetUserGroupArgs
        ///         {
        ///             UserGroupName = "example-group-1",
        ///         }));
        ///         var test = Output.Create(Nutanix.GetUserGroup.InvokeAsync(new Nutanix.GetUserGroupArgs
        ///         {
        ///             UserGroupDistinguishedName = "cn=example-group-1,cn=users,dc=ntnxlab,dc=local",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetUserGroupResult> InvokeAsync(GetUserGroupArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetUserGroupResult>("nutanix:index/getUserGroup:getUserGroup", args ?? new GetUserGroupArgs(), options.WithDefaults());

        /// <summary>
        /// Provides a datasource to retrieve a user group based on the input parameters.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Nutanix = Pulumi.Nutanix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var usergroup = Output.Create(Nutanix.GetUserGroup.InvokeAsync(new Nutanix.GetUserGroupArgs
        ///         {
        ///             UserGroupId = "dd30a856-8e72-4158-b716-98455ceda220",
        ///         }));
        ///         var usergroupbyname = Output.Create(Nutanix.GetUserGroup.InvokeAsync(new Nutanix.GetUserGroupArgs
        ///         {
        ///             UserGroupName = "example-group-1",
        ///         }));
        ///         var test = Output.Create(Nutanix.GetUserGroup.InvokeAsync(new Nutanix.GetUserGroupArgs
        ///         {
        ///             UserGroupDistinguishedName = "cn=example-group-1,cn=users,dc=ntnxlab,dc=local",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetUserGroupResult> Invoke(GetUserGroupInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetUserGroupResult>("nutanix:index/getUserGroup:getUserGroup", args ?? new GetUserGroupInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetUserGroupArgs : Pulumi.InvokeArgs
    {
        [Input("categories")]
        private List<Inputs.GetUserGroupCategoryArgs>? _categories;
        public List<Inputs.GetUserGroupCategoryArgs> Categories
        {
            get => _categories ?? (_categories = new List<Inputs.GetUserGroupCategoryArgs>());
            set => _categories = value;
        }

        [Input("ownerReference")]
        private Dictionary<string, string>? _ownerReference;
        public Dictionary<string, string> OwnerReference
        {
            get => _ownerReference ?? (_ownerReference = new Dictionary<string, string>());
            set => _ownerReference = value;
        }

        [Input("projectReference")]
        private Dictionary<string, string>? _projectReference;
        public Dictionary<string, string> ProjectReference
        {
            get => _projectReference ?? (_projectReference = new Dictionary<string, string>());
            set => _projectReference = value;
        }

        /// <summary>
        /// The distinguished name for the user group
        /// </summary>
        [Input("userGroupDistinguishedName")]
        public string? UserGroupDistinguishedName { get; set; }

        [Input("userGroupId")]
        public string? UserGroupId { get; set; }

        [Input("userGroupName")]
        public string? UserGroupName { get; set; }

        public GetUserGroupArgs()
        {
        }
    }

    public sealed class GetUserGroupInvokeArgs : Pulumi.InvokeArgs
    {
        [Input("categories")]
        private InputList<Inputs.GetUserGroupCategoryInputArgs>? _categories;
        public InputList<Inputs.GetUserGroupCategoryInputArgs> Categories
        {
            get => _categories ?? (_categories = new InputList<Inputs.GetUserGroupCategoryInputArgs>());
            set => _categories = value;
        }

        [Input("ownerReference")]
        private InputMap<string>? _ownerReference;
        public InputMap<string> OwnerReference
        {
            get => _ownerReference ?? (_ownerReference = new InputMap<string>());
            set => _ownerReference = value;
        }

        [Input("projectReference")]
        private InputMap<string>? _projectReference;
        public InputMap<string> ProjectReference
        {
            get => _projectReference ?? (_projectReference = new InputMap<string>());
            set => _projectReference = value;
        }

        /// <summary>
        /// The distinguished name for the user group
        /// </summary>
        [Input("userGroupDistinguishedName")]
        public Input<string>? UserGroupDistinguishedName { get; set; }

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

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

        public GetUserGroupInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetUserGroupResult
    {
        public readonly ImmutableArray<Outputs.GetUserGroupAccessControlPolicyReferenceListResult> AccessControlPolicyReferenceLists;
        /// <summary>
        /// The version of the API.
        /// * `metadata`: - The user group kind metadata.
        /// * `categories`: - The Distinguished Categories for the user group.
        /// * `owner_reference`: - The reference to a user.
        /// * `project_reference`: - The Distinguished The reference to a project.
        /// * `user_group_type`: - The type of the user group.
        /// * `display_name`: - The display name of the user group.
        /// * `directory_service_user_group`: - A Directory Service User Group.
        /// * `project_reference_list`: - A list of projects the user is part of. See #reference for more details.
        /// * `access_control_policy_reference_list`: - List of ACP references. See #reference for more details.
        /// * `state`: - The state of the entity.
        /// </summary>
        public readonly string ApiVersion;
        public readonly ImmutableArray<Outputs.GetUserGroupCategoryResult> Categories;
        public readonly ImmutableArray<Outputs.GetUserGroupDirectoryServiceUserGroupResult> DirectoryServiceUserGroups;
        public readonly string DisplayName;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableDictionary<string, string> Metadata;
        public readonly ImmutableDictionary<string, string> OwnerReference;
        public readonly ImmutableDictionary<string, string>? ProjectReference;
        public readonly ImmutableArray<Outputs.GetUserGroupProjectReferenceListResult> ProjectReferenceLists;
        public readonly string State;
        public readonly string? UserGroupDistinguishedName;
        public readonly string? UserGroupId;
        public readonly string? UserGroupName;
        public readonly string UserGroupType;

        [OutputConstructor]
        private GetUserGroupResult(
            ImmutableArray<Outputs.GetUserGroupAccessControlPolicyReferenceListResult> accessControlPolicyReferenceLists,

            string apiVersion,

            ImmutableArray<Outputs.GetUserGroupCategoryResult> categories,

            ImmutableArray<Outputs.GetUserGroupDirectoryServiceUserGroupResult> directoryServiceUserGroups,

            string displayName,

            string id,

            ImmutableDictionary<string, string> metadata,

            ImmutableDictionary<string, string> ownerReference,

            ImmutableDictionary<string, string>? projectReference,

            ImmutableArray<Outputs.GetUserGroupProjectReferenceListResult> projectReferenceLists,

            string state,

            string? userGroupDistinguishedName,

            string? userGroupId,

            string? userGroupName,

            string userGroupType)
        {
            AccessControlPolicyReferenceLists = accessControlPolicyReferenceLists;
            ApiVersion = apiVersion;
            Categories = categories;
            DirectoryServiceUserGroups = directoryServiceUserGroups;
            DisplayName = displayName;
            Id = id;
            Metadata = metadata;
            OwnerReference = ownerReference;
            ProjectReference = projectReference;
            ProjectReferenceLists = projectReferenceLists;
            State = state;
            UserGroupDistinguishedName = userGroupDistinguishedName;
            UserGroupId = userGroupId;
            UserGroupName = userGroupName;
            UserGroupType = userGroupType;
        }
    }
}
