1. Registry
  2. Packages
  3. Scaleway
  4. API Docs
  5. databases
  6. getInstanceLogs
Viewing docs for Scaleway v1.60.0
published on Saturday, Oct 24, 2026 by pulumiverse
scaleway logo
Viewing docs for Scaleway v1.60.0
published on Saturday, Oct 24, 2026 by pulumiverse

    Gets information about available logs for a Scaleway Managed Database Instance.

    Refer to the Managed Databases for PostgreSQL and MySQL documentation and API documentation for more information.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const main = new scaleway.databases.Instance("main", {
        name: "rdb-instance-logs",
        nodeType: "db-dev-s",
        engine: "PostgreSQL-15",
        isHaCluster: false,
        disableBackup: true,
        userName: "my_initial_user",
        password: "thiZ_is_v&ry_s3cret",
    });
    const logs = scaleway.databases.getInstanceLogsOutput({
        instanceId: main.id,
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    import pulumiverse_scaleway as scaleway
    
    main = scaleway.databases.Instance("main",
        name="rdb-instance-logs",
        node_type="db-dev-s",
        engine="PostgreSQL-15",
        is_ha_cluster=False,
        disable_backup=True,
        user_name="my_initial_user",
        password="thiZ_is_v&ry_s3cret")
    logs = scaleway.databases.get_instance_logs_output(instance_id=main.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/databases"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		main, err := databases.NewInstance(ctx, "main", &databases.InstanceArgs{
    			Name:          pulumi.String("rdb-instance-logs"),
    			NodeType:      pulumi.String("db-dev-s"),
    			Engine:        pulumi.String("PostgreSQL-15"),
    			IsHaCluster:   pulumi.Bool(false),
    			DisableBackup: pulumi.Bool(true),
    			UserName:      pulumi.String("my_initial_user"),
    			Password:      pulumi.String("thiZ_is_v&ry_s3cret"),
    		})
    		if err != nil {
    			return err
    		}
    		_ = databases.GetInstanceLogsOutput(ctx, databases.GetInstanceLogsOutputArgs{
    			InstanceId: main.ID().ToIDOutput().ToStringOutput(),
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var main = new Scaleway.Databases.Instance("main", new()
        {
            Name = "rdb-instance-logs",
            NodeType = "db-dev-s",
            Engine = "PostgreSQL-15",
            IsHaCluster = false,
            DisableBackup = true,
            UserName = "my_initial_user",
            Password = "thiZ_is_v&ry_s3cret",
        });
    
        var logs = Scaleway.Databases.GetInstanceLogs.Invoke(new()
        {
            InstanceId = main.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.databases.Instance;
    import com.pulumi.scaleway.databases.InstanceArgs;
    import com.pulumi.scaleway.databases.DatabasesFunctions;
    import com.pulumi.scaleway.databases.inputs.GetInstanceLogsArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 main = new Instance("main", InstanceArgs.builder()
                .name("rdb-instance-logs")
                .nodeType("db-dev-s")
                .engine("PostgreSQL-15")
                .isHaCluster(false)
                .disableBackup(true)
                .userName("my_initial_user")
                .password("thiZ_is_v&ry_s3cret")
                .build());
    
            final var logs = DatabasesFunctions.getInstanceLogs(GetInstanceLogsArgs.builder()
                .instanceId(main.id())
                .build());
    
        }
    }
    
    resources:
      main:
        type: scaleway:databases:Instance
        properties:
          name: rdb-instance-logs
          nodeType: db-dev-s
          engine: PostgreSQL-15
          isHaCluster: false
          disableBackup: true
          userName: my_initial_user
          password: thiZ_is_v&ry_s3cret
    variables:
      logs:
        fn::invoke:
          function: scaleway:databases:getInstanceLogs
          arguments:
            instanceId: ${main.id}
    
    pulumi {
      required_providers {
        scaleway = {
          source = "pulumi/scaleway"
        }
      }
    }
    
    data "scaleway_databases_getinstancelogs" "logs" {
      instance_id = scaleway_databases_instance.main.id
    }
    
    resource "scaleway_databases_instance" "main" {
      name           = "rdb-instance-logs"
      node_type      = "db-dev-s"
      engine         = "PostgreSQL-15"
      is_ha_cluster  = false
      disable_backup = true
      user_name      = "my_initial_user"
      password       = "thiZ_is_v&ry_s3cret"
    }
    

    Using getInstanceLogs

    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 getInstanceLogs(args: GetInstanceLogsArgs, opts?: InvokeOptions): Promise<GetInstanceLogsResult>
    function getInstanceLogsOutput(args: GetInstanceLogsOutputArgs, opts?: InvokeOutputOptions): Output<GetInstanceLogsResult>
    def get_instance_logs(instance_id: Optional[str] = None,
                          order_by: Optional[str] = None,
                          region: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetInstanceLogsResult
    def get_instance_logs_output(instance_id: pulumi.Input[Optional[str]] = None,
                          order_by: pulumi.Input[Optional[str]] = None,
                          region: pulumi.Input[Optional[str]] = None,
                          opts: Optional[InvokeOutputOptions] = None) -> Output[GetInstanceLogsResult]
    func GetInstanceLogs(ctx *Context, args *GetInstanceLogsArgs, opts ...InvokeOption) (*GetInstanceLogsResult, error)
    func GetInstanceLogsOutput(ctx *Context, args *GetInstanceLogsOutputArgs, opts ...InvokeOption) GetInstanceLogsResultOutput

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

    public static class GetInstanceLogs 
    {
        public static Task<GetInstanceLogsResult> InvokeAsync(GetInstanceLogsArgs args, InvokeOptions? opts = null)
        public static Output<GetInstanceLogsResult> Invoke(GetInstanceLogsInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetInstanceLogsResult> Invoke(GetInstanceLogsInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetInstanceLogsResult> getInstanceLogs(GetInstanceLogsArgs args, InvokeOptions options)
    public static Output<GetInstanceLogsResult> getInstanceLogs(GetInstanceLogsArgs args, InvokeOptions options)
    public static Output<GetInstanceLogsResult> getInstanceLogs(GetInstanceLogsArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: scaleway:databases/getInstanceLogs:getInstanceLogs
      arguments:
        # arguments dictionary
    data "scaleway_databases_get_instance_logs" "name" {
        # arguments
    }

    The following arguments are supported:

    InstanceId string
    The ID of the Database Instance. Can be a plain UUID or a regional ID ({region}/{id}).
    OrderBy string
    Criteria to use when ordering Database Instance logs listing. Possible values are createdAtAsc and createdAtDesc.
    Region string
    region) The region in which the Database Instance exists.
    InstanceId string
    The ID of the Database Instance. Can be a plain UUID or a regional ID ({region}/{id}).
    OrderBy string
    Criteria to use when ordering Database Instance logs listing. Possible values are createdAtAsc and createdAtDesc.
    Region string
    region) The region in which the Database Instance exists.
    instance_id string
    The ID of the Database Instance. Can be a plain UUID or a regional ID ({region}/{id}).
    order_by string
    Criteria to use when ordering Database Instance logs listing. Possible values are createdAtAsc and createdAtDesc.
    region string
    region) The region in which the Database Instance exists.
    instanceId String
    The ID of the Database Instance. Can be a plain UUID or a regional ID ({region}/{id}).
    orderBy String
    Criteria to use when ordering Database Instance logs listing. Possible values are createdAtAsc and createdAtDesc.
    region String
    region) The region in which the Database Instance exists.
    instanceId string
    The ID of the Database Instance. Can be a plain UUID or a regional ID ({region}/{id}).
    orderBy string
    Criteria to use when ordering Database Instance logs listing. Possible values are createdAtAsc and createdAtDesc.
    region string
    region) The region in which the Database Instance exists.
    instance_id str
    The ID of the Database Instance. Can be a plain UUID or a regional ID ({region}/{id}).
    order_by str
    Criteria to use when ordering Database Instance logs listing. Possible values are createdAtAsc and createdAtDesc.
    region str
    region) The region in which the Database Instance exists.
    instanceId String
    The ID of the Database Instance. Can be a plain UUID or a regional ID ({region}/{id}).
    orderBy String
    Criteria to use when ordering Database Instance logs listing. Possible values are createdAtAsc and createdAtDesc.
    region String
    region) The region in which the Database Instance exists.

    getInstanceLogs Result

    The following output properties are available:

    Id string
    UUID of the Database Instance log, in the {region}/{id} format.
    InstanceId string
    InstanceLogs List<Pulumiverse.Scaleway.Databases.Outputs.GetInstanceLogsInstanceLog>
    List of available logs for the Database Instance.
    Region string
    Region the Database Instance is in.
    OrderBy string
    Id string
    UUID of the Database Instance log, in the {region}/{id} format.
    InstanceId string
    InstanceLogs []GetInstanceLogsInstanceLog
    List of available logs for the Database Instance.
    Region string
    Region the Database Instance is in.
    OrderBy string
    id string
    UUID of the Database Instance log, in the {region}/{id} format.
    instance_id string
    instance_logs list(object)
    List of available logs for the Database Instance.
    region string
    Region the Database Instance is in.
    order_by string
    id String
    UUID of the Database Instance log, in the {region}/{id} format.
    instanceId String
    instanceLogs List<GetInstanceLogsInstanceLog>
    List of available logs for the Database Instance.
    region String
    Region the Database Instance is in.
    orderBy String
    id string
    UUID of the Database Instance log, in the {region}/{id} format.
    instanceId string
    instanceLogs GetInstanceLogsInstanceLog[]
    List of available logs for the Database Instance.
    region string
    Region the Database Instance is in.
    orderBy string
    id str
    UUID of the Database Instance log, in the {region}/{id} format.
    instance_id str
    instance_logs Sequence[GetInstanceLogsInstanceLog]
    List of available logs for the Database Instance.
    region str
    Region the Database Instance is in.
    order_by str
    id String
    UUID of the Database Instance log, in the {region}/{id} format.
    instanceId String
    instanceLogs List<Property Map>
    List of available logs for the Database Instance.
    region String
    Region the Database Instance is in.
    orderBy String

    Supporting Types

    GetInstanceLogsInstanceLog

    CreatedAt string
    Creation date of the log (RFC 3339 format).
    DownloadUrl string
    (Sensitive) Presigned Object Storage URL to download the log file.
    ExpiresAt string
    Expiration date of the log (RFC 3339 format).
    Id string
    UUID of the Database Instance log, in the {region}/{id} format.
    NodeName string
    Name of the underlying node.
    Region string
    region) The region in which the Database Instance exists.
    Status string
    Status of the log (unknown, ready, creating, error).
    CreatedAt string
    Creation date of the log (RFC 3339 format).
    DownloadUrl string
    (Sensitive) Presigned Object Storage URL to download the log file.
    ExpiresAt string
    Expiration date of the log (RFC 3339 format).
    Id string
    UUID of the Database Instance log, in the {region}/{id} format.
    NodeName string
    Name of the underlying node.
    Region string
    region) The region in which the Database Instance exists.
    Status string
    Status of the log (unknown, ready, creating, error).
    created_at string
    Creation date of the log (RFC 3339 format).
    download_url string
    (Sensitive) Presigned Object Storage URL to download the log file.
    expires_at string
    Expiration date of the log (RFC 3339 format).
    id string
    UUID of the Database Instance log, in the {region}/{id} format.
    node_name string
    Name of the underlying node.
    region string
    region) The region in which the Database Instance exists.
    status string
    Status of the log (unknown, ready, creating, error).
    createdAt String
    Creation date of the log (RFC 3339 format).
    downloadUrl String
    (Sensitive) Presigned Object Storage URL to download the log file.
    expiresAt String
    Expiration date of the log (RFC 3339 format).
    id String
    UUID of the Database Instance log, in the {region}/{id} format.
    nodeName String
    Name of the underlying node.
    region String
    region) The region in which the Database Instance exists.
    status String
    Status of the log (unknown, ready, creating, error).
    createdAt string
    Creation date of the log (RFC 3339 format).
    downloadUrl string
    (Sensitive) Presigned Object Storage URL to download the log file.
    expiresAt string
    Expiration date of the log (RFC 3339 format).
    id string
    UUID of the Database Instance log, in the {region}/{id} format.
    nodeName string
    Name of the underlying node.
    region string
    region) The region in which the Database Instance exists.
    status string
    Status of the log (unknown, ready, creating, error).
    created_at str
    Creation date of the log (RFC 3339 format).
    download_url str
    (Sensitive) Presigned Object Storage URL to download the log file.
    expires_at str
    Expiration date of the log (RFC 3339 format).
    id str
    UUID of the Database Instance log, in the {region}/{id} format.
    node_name str
    Name of the underlying node.
    region str
    region) The region in which the Database Instance exists.
    status str
    Status of the log (unknown, ready, creating, error).
    createdAt String
    Creation date of the log (RFC 3339 format).
    downloadUrl String
    (Sensitive) Presigned Object Storage URL to download the log file.
    expiresAt String
    Expiration date of the log (RFC 3339 format).
    id String
    UUID of the Database Instance log, in the {region}/{id} format.
    nodeName String
    Name of the underlying node.
    region String
    region) The region in which the Database Instance exists.
    status String
    Status of the log (unknown, ready, creating, error).

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Viewing docs for Scaleway v1.60.0
    published on Saturday, Oct 24, 2026 by pulumiverse

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial