1. Packages
  2. Qovery
  3. API Docs
  4. getDatabase
Qovery v0.28.8 published on Sunday, Mar 3, 2024 by dirien

qovery.getDatabase

Explore with Pulumi AI

qovery logo
Qovery v0.28.8 published on Sunday, Mar 3, 2024 by dirien

    # qovery.Database (Data Source)

    Provides a Qovery database resource. This can be used to create and manage Qovery databases.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Qovery = Pulumi.Qovery;
    
    return await Deployment.RunAsync(() => 
    {
        var myDatabase = Qovery.GetDatabase.Invoke(new()
        {
            Id = "<database_id>",
        });
    
    });
    
    package main
    
    import (
    	"github.com/dirien/pulumi-qovery/sdk/go/qovery"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := qovery.LookupDatabase(ctx, &qovery.LookupDatabaseArgs{
    			Id: "<database_id>",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.qovery.QoveryFunctions;
    import com.pulumi.qovery.inputs.GetDatabaseArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var myDatabase = QoveryFunctions.getDatabase(GetDatabaseArgs.builder()
                .id("<database_id>")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_qovery as qovery
    
    my_database = qovery.get_database(id="<database_id>")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as qovery from "@pulumi/qovery";
    
    const myDatabase = qovery.getDatabase({
        id: "<database_id>",
    });
    
    variables:
      myDatabase:
        fn::invoke:
          Function: qovery:getDatabase
          Arguments:
            id: <database_id>
    

    Using getDatabase

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getDatabase(args: GetDatabaseArgs, opts?: InvokeOptions): Promise<GetDatabaseResult>
    function getDatabaseOutput(args: GetDatabaseOutputArgs, opts?: InvokeOptions): Output<GetDatabaseResult>
    def get_database(accessibility: Optional[str] = None,
                     cpu: Optional[int] = None,
                     deployment_stage_id: Optional[str] = None,
                     id: Optional[str] = None,
                     instance_type: Optional[str] = None,
                     memory: Optional[int] = None,
                     storage: Optional[int] = None,
                     opts: Optional[InvokeOptions] = None) -> GetDatabaseResult
    def get_database_output(accessibility: Optional[pulumi.Input[str]] = None,
                     cpu: Optional[pulumi.Input[int]] = None,
                     deployment_stage_id: Optional[pulumi.Input[str]] = None,
                     id: Optional[pulumi.Input[str]] = None,
                     instance_type: Optional[pulumi.Input[str]] = None,
                     memory: Optional[pulumi.Input[int]] = None,
                     storage: Optional[pulumi.Input[int]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseResult]
    func LookupDatabase(ctx *Context, args *LookupDatabaseArgs, opts ...InvokeOption) (*LookupDatabaseResult, error)
    func LookupDatabaseOutput(ctx *Context, args *LookupDatabaseOutputArgs, opts ...InvokeOption) LookupDatabaseResultOutput

    > Note: This function is named LookupDatabase in the Go SDK.

    public static class GetDatabase 
    {
        public static Task<GetDatabaseResult> InvokeAsync(GetDatabaseArgs args, InvokeOptions? opts = null)
        public static Output<GetDatabaseResult> Invoke(GetDatabaseInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDatabaseResult> getDatabase(GetDatabaseArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: qovery:index/getDatabase:getDatabase
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    Accessibility string
    Cpu int
    DeploymentStageId string
    InstanceType string
    Memory int
    Storage int
    Id string
    Accessibility string
    Cpu int
    DeploymentStageId string
    InstanceType string
    Memory int
    Storage int
    id String
    accessibility String
    cpu Integer
    deploymentStageId String
    instanceType String
    memory Integer
    storage Integer
    id string
    accessibility string
    cpu number
    deploymentStageId string
    instanceType string
    memory number
    storage number
    id String
    accessibility String
    cpu Number
    deploymentStageId String
    instanceType String
    memory Number
    storage Number

    getDatabase Result

    The following output properties are available:

    DeploymentStageId string
    EnvironmentId string
    ExternalHost string
    Id string
    InstanceType string
    InternalHost string
    Login string
    Mode string
    Name string
    Password string
    Port int
    Type string
    Version string
    Accessibility string
    Cpu int
    Memory int
    Storage int
    DeploymentStageId string
    EnvironmentId string
    ExternalHost string
    Id string
    InstanceType string
    InternalHost string
    Login string
    Mode string
    Name string
    Password string
    Port int
    Type string
    Version string
    Accessibility string
    Cpu int
    Memory int
    Storage int
    deploymentStageId String
    environmentId String
    externalHost String
    id String
    instanceType String
    internalHost String
    login String
    mode String
    name String
    password String
    port Integer
    type String
    version String
    accessibility String
    cpu Integer
    memory Integer
    storage Integer
    deploymentStageId string
    environmentId string
    externalHost string
    id string
    instanceType string
    internalHost string
    login string
    mode string
    name string
    password string
    port number
    type string
    version string
    accessibility string
    cpu number
    memory number
    storage number
    deploymentStageId String
    environmentId String
    externalHost String
    id String
    instanceType String
    internalHost String
    login String
    mode String
    name String
    password String
    port Number
    type String
    version String
    accessibility String
    cpu Number
    memory Number
    storage Number

    Package Details

    Repository
    qovery dirien/pulumi-qovery
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the qovery Terraform Provider.
    qovery logo
    Qovery v0.28.8 published on Sunday, Mar 3, 2024 by dirien