1. Packages
  2. Exoscale
  3. API Docs
  4. getDatabaseUri
Exoscale v0.62.7 published on Tuesday, Dec 10, 2024 by Pulumiverse

exoscale.getDatabaseUri

Explore with Pulumi AI

Exoscale v0.62.7 published on Tuesday, Dec 10, 2024 by Pulumiverse

Example Usage

Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.exoscale.Database;
import com.pulumi.exoscale.DatabaseArgs;
import com.pulumi.exoscale.ExoscaleFunctions;
import com.pulumi.exoscale.inputs.GetDatabaseUriArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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) {
        var myDatabaseDatabase = new Database("myDatabaseDatabase", DatabaseArgs.builder()
            .zone("ch-gva-2")
            .type("pg")
            .plan("startup-4")
            .maintenanceDow("sunday")
            .maintenanceTime("23:00:00")
            .terminationProtection(true)
            .pg(DatabasePgArgs.builder()
                .version("13")
                .backupSchedule("04:00")
                .ipFilters(                
                    "1.2.3.4/32",
                    "5.6.7.8/32")
                .pgSettings(serializeJson(
                    jsonObject(
                        jsonProperty("timezone", "Europe/Zurich")
                    )))
                .build())
            .build());

        final var myDatabaseDatabaseUri = ExoscaleFunctions.getDatabaseUri(GetDatabaseUriArgs.builder()
            .name("my-database")
            .type("pg")
            .zone("ch-gva-2")
            .build());

        ctx.export("myDatabaseUri", myDatabaseDatabaseUri.applyValue(getDatabaseUriResult -> getDatabaseUriResult.uri()));
    }
}
Copy
resources:
  myDatabaseDatabase:
    type: exoscale:Database
    properties:
      zone: ch-gva-2
      type: pg
      plan: startup-4
      maintenanceDow: sunday
      maintenanceTime: 23:00:00
      terminationProtection: true
      pg:
        - version: '13'
          backupSchedule: 04:00
          ipFilters:
            - 1.2.3.4/32
            - 5.6.7.8/32
          pgSettings:
            fn::toJSON:
              timezone: Europe/Zurich
variables:
  myDatabaseDatabaseUri:
    fn::invoke:
      function: exoscale:getDatabaseUri
      arguments:
        name: my-database
        type: pg
        zone: ch-gva-2
outputs:
  myDatabaseUri: ${myDatabaseDatabaseUri.uri}
Copy

Using getDatabaseUri

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 getDatabaseUri(args: GetDatabaseUriArgs, opts?: InvokeOptions): Promise<GetDatabaseUriResult>
function getDatabaseUriOutput(args: GetDatabaseUriOutputArgs, opts?: InvokeOptions): Output<GetDatabaseUriResult>
Copy
def get_database_uri(name: Optional[str] = None,
                     timeouts: Optional[GetDatabaseUriTimeouts] = None,
                     type: Optional[str] = None,
                     zone: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetDatabaseUriResult
def get_database_uri_output(name: Optional[pulumi.Input[str]] = None,
                     timeouts: Optional[pulumi.Input[GetDatabaseUriTimeoutsArgs]] = None,
                     type: Optional[pulumi.Input[str]] = None,
                     zone: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseUriResult]
Copy
func GetDatabaseUri(ctx *Context, args *GetDatabaseUriArgs, opts ...InvokeOption) (*GetDatabaseUriResult, error)
func GetDatabaseUriOutput(ctx *Context, args *GetDatabaseUriOutputArgs, opts ...InvokeOption) GetDatabaseUriResultOutput
Copy

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

public static class GetDatabaseUri 
{
    public static Task<GetDatabaseUriResult> InvokeAsync(GetDatabaseUriArgs args, InvokeOptions? opts = null)
    public static Output<GetDatabaseUriResult> Invoke(GetDatabaseUriInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDatabaseUriResult> getDatabaseUri(GetDatabaseUriArgs args, InvokeOptions options)
public static Output<GetDatabaseUriResult> getDatabaseUri(GetDatabaseUriArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: exoscale:index/getDatabaseUri:getDatabaseUri
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
Name of database service to match.
Type This property is required. string
The type of the database service (kafka, mysql, opensearch, pg, redis).
Zone This property is required. string
The Exoscale Zone name.
Timeouts Pulumiverse.Exoscale.Inputs.GetDatabaseUriTimeouts
Name This property is required. string
Name of database service to match.
Type This property is required. string
The type of the database service (kafka, mysql, opensearch, pg, redis).
Zone This property is required. string
The Exoscale Zone name.
Timeouts GetDatabaseUriTimeouts
name This property is required. String
Name of database service to match.
type This property is required. String
The type of the database service (kafka, mysql, opensearch, pg, redis).
zone This property is required. String
The Exoscale Zone name.
timeouts GetDatabaseUriTimeouts
name This property is required. string
Name of database service to match.
type This property is required. string
The type of the database service (kafka, mysql, opensearch, pg, redis).
zone This property is required. string
The Exoscale Zone name.
timeouts GetDatabaseUriTimeouts
name This property is required. str
Name of database service to match.
type This property is required. str
The type of the database service (kafka, mysql, opensearch, pg, redis).
zone This property is required. str
The Exoscale Zone name.
timeouts GetDatabaseUriTimeouts
name This property is required. String
Name of database service to match.
type This property is required. String
The type of the database service (kafka, mysql, opensearch, pg, redis).
zone This property is required. String
The Exoscale Zone name.
timeouts Property Map

getDatabaseUri Result

The following output properties are available:

DbName string
Default database name
Host string
Database service hostname
Id string
The ID of this resource.
Name string
Name of database service to match.
Password string
Admin user password
Port int
Database service port
Schema string
Database service connection schema
Type string
The type of the database service (kafka, mysql, opensearch, pg, redis).
Uri string
Database service connection URI.
Username string
Admin user username
Zone string
The Exoscale Zone name.
Timeouts Pulumiverse.Exoscale.Outputs.GetDatabaseUriTimeouts
DbName string
Default database name
Host string
Database service hostname
Id string
The ID of this resource.
Name string
Name of database service to match.
Password string
Admin user password
Port int
Database service port
Schema string
Database service connection schema
Type string
The type of the database service (kafka, mysql, opensearch, pg, redis).
Uri string
Database service connection URI.
Username string
Admin user username
Zone string
The Exoscale Zone name.
Timeouts GetDatabaseUriTimeouts
dbName String
Default database name
host String
Database service hostname
id String
The ID of this resource.
name String
Name of database service to match.
password String
Admin user password
port Integer
Database service port
schema String
Database service connection schema
type String
The type of the database service (kafka, mysql, opensearch, pg, redis).
uri String
Database service connection URI.
username String
Admin user username
zone String
The Exoscale Zone name.
timeouts GetDatabaseUriTimeouts
dbName string
Default database name
host string
Database service hostname
id string
The ID of this resource.
name string
Name of database service to match.
password string
Admin user password
port number
Database service port
schema string
Database service connection schema
type string
The type of the database service (kafka, mysql, opensearch, pg, redis).
uri string
Database service connection URI.
username string
Admin user username
zone string
The Exoscale Zone name.
timeouts GetDatabaseUriTimeouts
db_name str
Default database name
host str
Database service hostname
id str
The ID of this resource.
name str
Name of database service to match.
password str
Admin user password
port int
Database service port
schema str
Database service connection schema
type str
The type of the database service (kafka, mysql, opensearch, pg, redis).
uri str
Database service connection URI.
username str
Admin user username
zone str
The Exoscale Zone name.
timeouts GetDatabaseUriTimeouts
dbName String
Default database name
host String
Database service hostname
id String
The ID of this resource.
name String
Name of database service to match.
password String
Admin user password
port Number
Database service port
schema String
Database service connection schema
type String
The type of the database service (kafka, mysql, opensearch, pg, redis).
uri String
Database service connection URI.
username String
Admin user username
zone String
The Exoscale Zone name.
timeouts Property Map

Supporting Types

GetDatabaseUriTimeouts

Read string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
Read string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
read String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
read string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
read str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
read String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.

Package Details

Repository
exoscale pulumiverse/pulumi-exoscale
License
Apache-2.0
Notes
This Pulumi package is based on the exoscale Terraform Provider.
Exoscale v0.62.7 published on Tuesday, Dec 10, 2024 by Pulumiverse