// *** 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 luxifer.Scaleway
{
    public static class GetRdbPrivilege
    {
        /// <summary>
        /// Gets information about the privilege on RDB database.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Scaleway = Pulumi.Scaleway;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var main = Scaleway.GetRdbPrivilege.Invoke(new()
        ///     {
        ///         DatabaseName = "my-database",
        ///         InstanceId = "11111111-1111-111111111111",
        ///         UserName = "my-user",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetRdbPrivilegeResult> InvokeAsync(GetRdbPrivilegeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetRdbPrivilegeResult>("scaleway:index/getRdbPrivilege:getRdbPrivilege", args ?? new GetRdbPrivilegeArgs(), options.WithDefaults());

        /// <summary>
        /// Gets information about the privilege on RDB database.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Scaleway = Pulumi.Scaleway;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var main = Scaleway.GetRdbPrivilege.Invoke(new()
        ///     {
        ///         DatabaseName = "my-database",
        ///         InstanceId = "11111111-1111-111111111111",
        ///         UserName = "my-user",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetRdbPrivilegeResult> Invoke(GetRdbPrivilegeInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetRdbPrivilegeResult>("scaleway:index/getRdbPrivilege:getRdbPrivilege", args ?? new GetRdbPrivilegeInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetRdbPrivilegeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The database name.
        /// </summary>
        [Input("databaseName", required: true)]
        public string DatabaseName { get; set; } = null!;

        /// <summary>
        /// The RDB instance ID.
        /// </summary>
        [Input("instanceId", required: true)]
        public string InstanceId { get; set; } = null!;

        /// <summary>
        /// `region`) The region in which the resource exists.
        /// </summary>
        [Input("region")]
        public string? Region { get; set; }

        /// <summary>
        /// The user name.
        /// </summary>
        [Input("userName", required: true)]
        public string UserName { get; set; } = null!;

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

    public sealed class GetRdbPrivilegeInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The database name.
        /// </summary>
        [Input("databaseName", required: true)]
        public Input<string> DatabaseName { get; set; } = null!;

        /// <summary>
        /// The RDB instance ID.
        /// </summary>
        [Input("instanceId", required: true)]
        public Input<string> InstanceId { get; set; } = null!;

        /// <summary>
        /// `region`) The region in which the resource exists.
        /// </summary>
        [Input("region")]
        public Input<string>? Region { get; set; }

        /// <summary>
        /// The user name.
        /// </summary>
        [Input("userName", required: true)]
        public Input<string> UserName { get; set; } = null!;

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


    [OutputType]
    public sealed class GetRdbPrivilegeResult
    {
        public readonly string DatabaseName;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly string InstanceId;
        /// <summary>
        /// The permission for this user on the database. Possible values are `readonly`, `readwrite`, `all`
        /// , `custom` and `none`.
        /// </summary>
        public readonly string Permission;
        public readonly string? Region;
        public readonly string UserName;

        [OutputConstructor]
        private GetRdbPrivilegeResult(
            string databaseName,

            string id,

            string instanceId,

            string permission,

            string? region,

            string userName)
        {
            DatabaseName = databaseName;
            Id = id;
            InstanceId = instanceId;
            Permission = permission;
            Region = region;
            UserName = userName;
        }
    }
}
