// *** 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.Hosting
{
    public static class GetPrivateDatabaseDb
    {
        /// <summary>
        /// Use this data source to retrieve information about an hosting privatedatabase.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using System.Linq;
        /// using Pulumi;
        /// using Ovh = Pulumi.Ovh;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var mydatabase = Ovh.Hosting.GetPrivateDatabaseDb.Invoke(new()
        ///     {
        ///         DatabaseName = "XXXXXX",
        ///         ServiceName = "XXXXXX",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetPrivateDatabaseDbResult> InvokeAsync(GetPrivateDatabaseDbArgs args, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.InvokeAsync<GetPrivateDatabaseDbResult>("ovh:Hosting/getPrivateDatabaseDb:getPrivateDatabaseDb", args ?? new GetPrivateDatabaseDbArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to retrieve information about an hosting privatedatabase.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using System.Linq;
        /// using Pulumi;
        /// using Ovh = Pulumi.Ovh;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var mydatabase = Ovh.Hosting.GetPrivateDatabaseDb.Invoke(new()
        ///     {
        ///         DatabaseName = "XXXXXX",
        ///         ServiceName = "XXXXXX",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetPrivateDatabaseDbResult> Invoke(GetPrivateDatabaseDbInvokeArgs args, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.Invoke<GetPrivateDatabaseDbResult>("ovh:Hosting/getPrivateDatabaseDb:getPrivateDatabaseDb", args ?? new GetPrivateDatabaseDbInvokeArgs(), options.WithDefaults());
    }


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

        /// <summary>
        /// The internal name of your private database
        /// </summary>
        [Input("serviceName", required: true)]
        public string ServiceName { get; set; } = null!;

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

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

        /// <summary>
        /// The internal name of your private database
        /// </summary>
        [Input("serviceName", required: true)]
        public Input<string> ServiceName { get; set; } = null!;

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


    [OutputType]
    public sealed class GetPrivateDatabaseDbResult
    {
        /// <summary>
        /// Time of the next backup (every day)
        /// </summary>
        public readonly string BackupTime;
        /// <summary>
        /// Creation date of the database
        /// </summary>
        public readonly string CreationDate;
        public readonly string DatabaseName;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// Space used by the database (in MB)
        /// </summary>
        public readonly int QuotaUsed;
        public readonly string ServiceName;
        /// <summary>
        /// Users granted to this database
        /// </summary>
        public readonly ImmutableArray<Outputs.GetPrivateDatabaseDbUserResult> Users;

        [OutputConstructor]
        private GetPrivateDatabaseDbResult(
            string backupTime,

            string creationDate,

            string databaseName,

            string id,

            int quotaUsed,

            string serviceName,

            ImmutableArray<Outputs.GetPrivateDatabaseDbUserResult> users)
        {
            BackupTime = backupTime;
            CreationDate = creationDate;
            DatabaseName = databaseName;
            Id = id;
            QuotaUsed = quotaUsed;
            ServiceName = serviceName;
            Users = users;
        }
    }
}
