Scaleway

v1.1.0 published on Saturday, Sep 17, 2022 by lbrlabs

getDatabase

Gets information about a RDB database.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Scaleway = Pulumi.Scaleway;

return await Deployment.RunAsync(() => 
{
    var myDb = Scaleway.GetDatabase.Invoke(new()
    {
        InstanceId = "11111111-1111-1111-1111-111111111111",
        Name = "foobar",
    });

});
package main

import (
	"github.com/lbrlabs/pulumi-scaleway/sdk/go/scaleway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := scaleway.LookupDatabase(ctx, &GetDatabaseArgs{
			InstanceId: "11111111-1111-1111-1111-111111111111",
			Name:       "foobar",
		}, 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.scaleway.ScalewayFunctions;
import com.pulumi.scaleway.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 myDb = ScalewayFunctions.getDatabase(GetDatabaseArgs.builder()
            .instanceId("11111111-1111-1111-1111-111111111111")
            .name("foobar")
            .build());

    }
}
import pulumi
import pulumi_scaleway as scaleway

my_db = scaleway.get_database(instance_id="11111111-1111-1111-1111-111111111111",
    name="foobar")
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";

// Get the database foobar hosted on instance id 11111111-1111-1111-1111-111111111111
const myDb = pulumi.output(scaleway.getDatabase({
    instanceId: "11111111-1111-1111-1111-111111111111",
    name: "foobar",
}));
variables:
  myDb:
    Fn::Invoke:
      Function: scaleway:getDatabase
      Arguments:
        instanceId: 11111111-1111-1111-1111-111111111111
        name: foobar

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(instance_id: Optional[str] = None,
                 name: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetDatabaseResult
def get_database_output(instance_id: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = 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: scaleway:index/getDatabase:getDatabase
  Arguments:
    # Arguments dictionary

The following arguments are supported:

InstanceId string

The RDB instance ID.

Name string

The name of the RDB instance.

InstanceId string

The RDB instance ID.

Name string

The name of the RDB instance.

instanceId String

The RDB instance ID.

name String

The name of the RDB instance.

instanceId string

The RDB instance ID.

name string

The name of the RDB instance.

instance_id str

The RDB instance ID.

name str

The name of the RDB instance.

instanceId String

The RDB instance ID.

name String

The name of the RDB instance.

getDatabase Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

InstanceId string
Managed bool

Whether or not the database is managed or not.

Name string
Owner string

The name of the owner of the database.

Size string

Size of the database (in bytes).

Id string

The provider-assigned unique ID for this managed resource.

InstanceId string
Managed bool

Whether or not the database is managed or not.

Name string
Owner string

The name of the owner of the database.

Size string

Size of the database (in bytes).

id String

The provider-assigned unique ID for this managed resource.

instanceId String
managed Boolean

Whether or not the database is managed or not.

name String
owner String

The name of the owner of the database.

size String

Size of the database (in bytes).

id string

The provider-assigned unique ID for this managed resource.

instanceId string
managed boolean

Whether or not the database is managed or not.

name string
owner string

The name of the owner of the database.

size string

Size of the database (in bytes).

id str

The provider-assigned unique ID for this managed resource.

instance_id str
managed bool

Whether or not the database is managed or not.

name str
owner str

The name of the owner of the database.

size str

Size of the database (in bytes).

id String

The provider-assigned unique ID for this managed resource.

instanceId String
managed Boolean

Whether or not the database is managed or not.

name String
owner String

The name of the owner of the database.

size String

Size of the database (in bytes).

Package Details

Repository
https://github.com/lbrlabs/pulumi-scaleway
License
Apache-2.0
Notes

This Pulumi package is based on the scaleway Terraform Provider.