1. Packages
  2. Exoscale
  3. API Docs
  4. getDatabaseUri
Exoscale v0.57.0 published on Friday, Apr 19, 2024 by Pulumiverse

exoscale.getDatabaseUri

Explore with Pulumi AI

exoscale logo
Exoscale v0.57.0 published on Friday, Apr 19, 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()));
        }
    }
    
    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}
    

    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>
    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]
    func GetDatabaseUri(ctx *Context, args *GetDatabaseUriArgs, opts ...InvokeOption) (*GetDatabaseUriResult, error)
    func GetDatabaseUriOutput(ctx *Context, args *GetDatabaseUriOutputArgs, opts ...InvokeOption) GetDatabaseUriResultOutput

    > 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)
    }
    public static CompletableFuture<GetDatabaseUriResult> getDatabaseUri(GetDatabaseUriArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: exoscale:index/getDatabaseUri:getDatabaseUri
      arguments:
        # arguments dictionary

    The following arguments are supported:

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

    getDatabaseUri Result

    The following output properties are available:

    Id string
    The ID of this resource.
    Name string
    The database name to match.
    Type string
    The type of the database service (kafka, mysql, opensearch, pg, redis).
    Uri string
    The database service connection URI.
    Zone string
    The Exoscale Zone name.
    Timeouts Pulumiverse.Exoscale.Outputs.GetDatabaseUriTimeouts
    Id string
    The ID of this resource.
    Name string
    The database name to match.
    Type string
    The type of the database service (kafka, mysql, opensearch, pg, redis).
    Uri string
    The database service connection URI.
    Zone string
    The Exoscale Zone name.
    Timeouts GetDatabaseUriTimeouts
    id String
    The ID of this resource.
    name String
    The database name to match.
    type String
    The type of the database service (kafka, mysql, opensearch, pg, redis).
    uri String
    The database service connection URI.
    zone String
    The Exoscale Zone name.
    timeouts GetDatabaseUriTimeouts
    id string
    The ID of this resource.
    name string
    The database name to match.
    type string
    The type of the database service (kafka, mysql, opensearch, pg, redis).
    uri string
    The database service connection URI.
    zone string
    The Exoscale Zone name.
    timeouts GetDatabaseUriTimeouts
    id str
    The ID of this resource.
    name str
    The database name to match.
    type str
    The type of the database service (kafka, mysql, opensearch, pg, redis).
    uri str
    The database service connection URI.
    zone str
    The Exoscale Zone name.
    timeouts GetDatabaseUriTimeouts
    id String
    The ID of this resource.
    name String
    The database name to match.
    type String
    The type of the database service (kafka, mysql, opensearch, pg, redis).
    uri String
    The database service connection URI.
    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 logo
    Exoscale v0.57.0 published on Friday, Apr 19, 2024 by Pulumiverse