// *** 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 Pulumiverse.Fortios
{
    public static class GetSystemApiuser
    {
        /// <summary>
        /// Use this data source to get information on an fortios system apiuser
        /// </summary>
        public static Task<GetSystemApiuserResult> InvokeAsync(GetSystemApiuserArgs args, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.InvokeAsync<GetSystemApiuserResult>("fortios:index/getSystemApiuser:getSystemApiuser", args ?? new GetSystemApiuserArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to get information on an fortios system apiuser
        /// </summary>
        public static Output<GetSystemApiuserResult> Invoke(GetSystemApiuserInvokeArgs args, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.Invoke<GetSystemApiuserResult>("fortios:index/getSystemApiuser:getSystemApiuser", args ?? new GetSystemApiuserInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetSystemApiuserArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Specify the name of the desired system apiuser.
        /// </summary>
        [Input("name", required: true)]
        public string Name { get; set; } = null!;

        /// <summary>
        /// Specifies the vdom to which the data source will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
        /// </summary>
        [Input("vdomparam")]
        public string? Vdomparam { get; set; }

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

    public sealed class GetSystemApiuserInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Specify the name of the desired system apiuser.
        /// </summary>
        [Input("name", required: true)]
        public Input<string> Name { get; set; } = null!;

        /// <summary>
        /// Specifies the vdom to which the data source will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
        /// </summary>
        [Input("vdomparam")]
        public Input<string>? Vdomparam { get; set; }

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


    [OutputType]
    public sealed class GetSystemApiuserResult
    {
        /// <summary>
        /// Admin user access profile.
        /// </summary>
        public readonly string Accprofile;
        /// <summary>
        /// Admin user password.
        /// </summary>
        public readonly string ApiKey;
        /// <summary>
        /// Comment.
        /// </summary>
        public readonly string Comments;
        /// <summary>
        /// Value for Access-Control-Allow-Origin on API responses. Avoid using '*' if possible.
        /// </summary>
        public readonly string CorsAllowOrigin;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// Virtual domain name.
        /// </summary>
        public readonly string Name;
        /// <summary>
        /// Enable/disable peer authentication.
        /// </summary>
        public readonly string PeerAuth;
        /// <summary>
        /// Peer group name.
        /// </summary>
        public readonly string PeerGroup;
        /// <summary>
        /// Schedule name.
        /// </summary>
        public readonly string Schedule;
        /// <summary>
        /// Trusthost. The structure of `trusthost` block is documented below.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetSystemApiuserTrusthostResult> Trusthosts;
        public readonly string? Vdomparam;
        /// <summary>
        /// Virtual domains. The structure of `vdom` block is documented below.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetSystemApiuserVdomResult> Vdoms;

        [OutputConstructor]
        private GetSystemApiuserResult(
            string accprofile,

            string apiKey,

            string comments,

            string corsAllowOrigin,

            string id,

            string name,

            string peerAuth,

            string peerGroup,

            string schedule,

            ImmutableArray<Outputs.GetSystemApiuserTrusthostResult> trusthosts,

            string? vdomparam,

            ImmutableArray<Outputs.GetSystemApiuserVdomResult> vdoms)
        {
            Accprofile = accprofile;
            ApiKey = apiKey;
            Comments = comments;
            CorsAllowOrigin = corsAllowOrigin;
            Id = id;
            Name = name;
            PeerAuth = peerAuth;
            PeerGroup = peerGroup;
            Schedule = schedule;
            Trusthosts = trusthosts;
            Vdomparam = vdomparam;
            Vdoms = vdoms;
        }
    }
}
