<filename>sdk/dotnet/GetRdbDatabase.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 luxifer.Scaleway
{
    public static class GetRdbDatabase
    {
        /// <summary>
        /// Gets information about a RDB database.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Scaleway = Pulumi.Scaleway;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var myDb = Scaleway.GetRdbDatabase.Invoke(new()
        ///     {
        ///         InstanceId = "11111111-1111-1111-1111-111111111111",
        ///         Name = "foobar",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetRdbDatabaseResult> InvokeAsync(GetRdbDatabaseArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetRdbDatabaseResult>("scaleway:index/getRdbDatabase:getRdbDatabase", args ?? new GetRdbDatabaseArgs(), options.WithDefaults());

        /// <summary>
        /// Gets information about a RDB database.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Scaleway = Pulumi.Scaleway;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var myDb = Scaleway.GetRdbDatabase.Invoke(new()
        ///     {
        ///         InstanceId = "11111111-1111-1111-1111-111111111111",
        ///         Name = "foobar",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetRdbDatabaseResult> Invoke(GetRdbDatabaseInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetRdbDatabaseResult>("scaleway:index/getRdbDatabase:getRdbDatabase", args ?? new GetRdbDatabaseInvokeArgs(), options.WithDefaults());
    }


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

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

        [Input("region")]
        public string? Region { get; set; }

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

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

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

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

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


    [OutputType]
    public sealed class GetRdbDatabaseResult
    {
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly string InstanceId;
        /// <summary>
        /// Whether the database is managed or not.
        /// </summary>
        public readonly bool Managed;
        public readonly string Name;
        /// <summary>
        /// The name of the owner of the database.
        /// </summary>
        public readonly string Owner;
        public readonly string? Region;
        /// <summary>
        /// Size of the database (in bytes).
        /// </summary>
        public readonly string Size;

        [OutputConstructor]
        private GetRdbDatabaseResult(
            string id,

            string instanceId,

            bool managed,

            string name,

            string owner,

            string? region,

            string size)
        {
            Id = id;
            InstanceId = instanceId;
            Managed = managed;
            Name = name;
            Owner = owner;
            Region = region;
            Size = size;
        }
    }
}
