<filename>sdk/dotnet/Zia/AdminRoles/GetAdminRoles.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 zscaler.PulumiPackage.Zia.AdminRoles
{
    public static class GetAdminRoles
    {
        /// <summary>
        /// Use the **zia_admin_roles** data source to get information about an admin role created in the Zscaler Internet Access cloud or via the API. This data source can then be associated with a ZIA administrator account.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Zia = Pulumi.Zia;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example = Zia.AdminRoles.GetAdminRoles.Invoke(new()
        ///     {
        ///         Name = "Super Admin",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetAdminRolesResult> InvokeAsync(GetAdminRolesArgs? args = null, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.InvokeAsync<GetAdminRolesResult>("zia:AdminRoles/getAdminRoles:getAdminRoles", args ?? new GetAdminRolesArgs(), options.WithDefaults());

        /// <summary>
        /// Use the **zia_admin_roles** data source to get information about an admin role created in the Zscaler Internet Access cloud or via the API. This data source can then be associated with a ZIA administrator account.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Zia = Pulumi.Zia;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example = Zia.AdminRoles.GetAdminRoles.Invoke(new()
        ///     {
        ///         Name = "Super Admin",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetAdminRolesResult> Invoke(GetAdminRolesInvokeArgs? args = null, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.Invoke<GetAdminRolesResult>("zia:AdminRoles/getAdminRoles:getAdminRoles", args ?? new GetAdminRolesInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetAdminRolesArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The name of the Admin role to be exported.
        /// </summary>
        [Input("name")]
        public string? Name { get; set; }

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

    public sealed class GetAdminRolesInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The name of the Admin role to be exported.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

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


    [OutputType]
    public sealed class GetAdminRolesResult
    {
        /// <summary>
        /// (String)
        /// </summary>
        public readonly string AdminAcctAccess;
        /// <summary>
        /// (String)
        /// </summary>
        public readonly string AnalysisAccess;
        /// <summary>
        /// (String) Dashboard access permission. Supported values are: `NONE`, `READ_ONLY`
        /// </summary>
        public readonly string DashboardAccess;
        public readonly int Id;
        /// <summary>
        /// (Boolean) Indicates whether this is an auditor role.
        /// </summary>
        public readonly bool IsAuditor;
        /// <summary>
        /// (Boolean) Indicates whether or not this admin user is editable/deletable.
        /// </summary>
        public readonly bool IsNonEditable;
        /// <summary>
        /// (String) Log range limit. Returned values are: `UNRESTRICTED`, `MONTH_1`, `MONTH_2`, `MONTH_3`, `MONTH_4`, `MONTH_5`, `MONTH_6`
        /// </summary>
        public readonly string LogsLimit;
        public readonly string? Name;
        /// <summary>
        /// (List of String) List of functional areas to which this role has access. This attribute is subject to change.
        /// </summary>
        public readonly ImmutableArray<string> Permissions;
        /// <summary>
        /// (String) Policy access permission. Returned values are: `NONE`, `READ_ONLY`,`READ_WRITE`
        /// </summary>
        public readonly string PolicyAccess;
        /// <summary>
        /// (Number) Admin rank of this admin role. This is applicable only when admin rank is enabled in the advanced settings. Default value is 7 (the lowest rank). The assigned admin rank determines the roles or admin users this user can manage, and which rule orders this admin can access.
        /// </summary>
        public readonly int Rank;
        /// <summary>
        /// (String) Report access permission. Returned values are: `NONE`, `READ_ONLY`,`READ_WRITE`
        /// </summary>
        public readonly string ReportAccess;
        /// <summary>
        /// (String) The admin role type. ()This attribute is subject to change.) Supported values are:  `ORG_ADMIN`, `EXEC_INSIGHT`, `EXEC_INSIGHT_AND_ORG_ADMIN`, `SDWAN`
        /// </summary>
        public readonly string RoleType;
        /// <summary>
        /// (String) Username access permission. When set to NONE, the username will be obfuscated. Supported values are: `NONE|READ_ONLY`
        /// </summary>
        public readonly string UsernameAccess;

        [OutputConstructor]
        private GetAdminRolesResult(
            string adminAcctAccess,

            string analysisAccess,

            string dashboardAccess,

            int id,

            bool isAuditor,

            bool isNonEditable,

            string logsLimit,

            string? name,

            ImmutableArray<string> permissions,

            string policyAccess,

            int rank,

            string reportAccess,

            string roleType,

            string usernameAccess)
        {
            AdminAcctAccess = adminAcctAccess;
            AnalysisAccess = analysisAccess;
            DashboardAccess = dashboardAccess;
            Id = id;
            IsAuditor = isAuditor;
            IsNonEditable = isNonEditable;
            LogsLimit = logsLimit;
            Name = name;
            Permissions = permissions;
            PolicyAccess = policyAccess;
            Rank = rank;
            ReportAccess = reportAccess;
            RoleType = roleType;
            UsernameAccess = usernameAccess;
        }
    }
}
