1. Packages
  2. Ibm Provider
  3. API Docs
  4. getDatabaseTasks
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getDatabaseTasks

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Provides a read-only data source for database_tasks. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const databaseTasks = ibm.getDatabaseTasks({
        deploymentId: data.ibm_database.database.id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    database_tasks = ibm.get_database_tasks(deployment_id=data["ibm_database"]["database"]["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.GetDatabaseTasks(ctx, &ibm.GetDatabaseTasksArgs{
    			DeploymentId: data.Ibm_database.Database.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var databaseTasks = Ibm.GetDatabaseTasks.Invoke(new()
        {
            DeploymentId = data.Ibm_database.Database.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetDatabaseTasksArgs;
    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 databaseTasks = IbmFunctions.getDatabaseTasks(GetDatabaseTasksArgs.builder()
                .deploymentId(data.ibm_database().database().id())
                .build());
    
        }
    }
    
    variables:
      databaseTasks:
        fn::invoke:
          function: ibm:getDatabaseTasks
          arguments:
            deploymentId: ${data.ibm_database.database.id}
    

    Using getDatabaseTasks

    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 getDatabaseTasks(args: GetDatabaseTasksArgs, opts?: InvokeOptions): Promise<GetDatabaseTasksResult>
    function getDatabaseTasksOutput(args: GetDatabaseTasksOutputArgs, opts?: InvokeOptions): Output<GetDatabaseTasksResult>
    def get_database_tasks(deployment_id: Optional[str] = None,
                           id: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetDatabaseTasksResult
    def get_database_tasks_output(deployment_id: Optional[pulumi.Input[str]] = None,
                           id: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseTasksResult]
    func GetDatabaseTasks(ctx *Context, args *GetDatabaseTasksArgs, opts ...InvokeOption) (*GetDatabaseTasksResult, error)
    func GetDatabaseTasksOutput(ctx *Context, args *GetDatabaseTasksOutputArgs, opts ...InvokeOption) GetDatabaseTasksResultOutput

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

    public static class GetDatabaseTasks 
    {
        public static Task<GetDatabaseTasksResult> InvokeAsync(GetDatabaseTasksArgs args, InvokeOptions? opts = null)
        public static Output<GetDatabaseTasksResult> Invoke(GetDatabaseTasksInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDatabaseTasksResult> getDatabaseTasks(GetDatabaseTasksArgs args, InvokeOptions options)
    public static Output<GetDatabaseTasksResult> getDatabaseTasks(GetDatabaseTasksArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getDatabaseTasks:getDatabaseTasks
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DeploymentId string
    Deployment ID.
    Id string
    DeploymentId string
    Deployment ID.
    Id string
    deploymentId String
    Deployment ID.
    id String
    deploymentId string
    Deployment ID.
    id string
    deployment_id str
    Deployment ID.
    id str
    deploymentId String
    Deployment ID.
    id String

    getDatabaseTasks Result

    The following output properties are available:

    DeploymentId string
    (Optional, String) ID of the deployment the task is being performed on.
    Id string
    Tasks List<GetDatabaseTasksTask>
    (Optional, List) Nested scheme for tasks:
    DeploymentId string
    (Optional, String) ID of the deployment the task is being performed on.
    Id string
    Tasks []GetDatabaseTasksTask
    (Optional, List) Nested scheme for tasks:
    deploymentId String
    (Optional, String) ID of the deployment the task is being performed on.
    id String
    tasks List<GetDatabaseTasksTask>
    (Optional, List) Nested scheme for tasks:
    deploymentId string
    (Optional, String) ID of the deployment the task is being performed on.
    id string
    tasks GetDatabaseTasksTask[]
    (Optional, List) Nested scheme for tasks:
    deployment_id str
    (Optional, String) ID of the deployment the task is being performed on.
    id str
    tasks Sequence[GetDatabaseTasksTask]
    (Optional, List) Nested scheme for tasks:
    deploymentId String
    (Optional, String) ID of the deployment the task is being performed on.
    id String
    tasks List<Property Map>
    (Optional, List) Nested scheme for tasks:

    Supporting Types

    GetDatabaseTasksTask

    CreatedAt string
    (Optional, String) Date and time when the task was created.
    DeploymentId string
    Deployment ID.
    Description string
    (Optional, String) Human-readable description of the task.
    ProgressPercent double
    (Optional, Integer) Indicator as percentage of progress of the task.
    Status string
    (Optional, String) The status of the task.

    • Constraints: Allowable values are: running, completed, failed.
    TaskId string
    (Optional, String) ID of the task.
    CreatedAt string
    (Optional, String) Date and time when the task was created.
    DeploymentId string
    Deployment ID.
    Description string
    (Optional, String) Human-readable description of the task.
    ProgressPercent float64
    (Optional, Integer) Indicator as percentage of progress of the task.
    Status string
    (Optional, String) The status of the task.

    • Constraints: Allowable values are: running, completed, failed.
    TaskId string
    (Optional, String) ID of the task.
    createdAt String
    (Optional, String) Date and time when the task was created.
    deploymentId String
    Deployment ID.
    description String
    (Optional, String) Human-readable description of the task.
    progressPercent Double
    (Optional, Integer) Indicator as percentage of progress of the task.
    status String
    (Optional, String) The status of the task.

    • Constraints: Allowable values are: running, completed, failed.
    taskId String
    (Optional, String) ID of the task.
    createdAt string
    (Optional, String) Date and time when the task was created.
    deploymentId string
    Deployment ID.
    description string
    (Optional, String) Human-readable description of the task.
    progressPercent number
    (Optional, Integer) Indicator as percentage of progress of the task.
    status string
    (Optional, String) The status of the task.

    • Constraints: Allowable values are: running, completed, failed.
    taskId string
    (Optional, String) ID of the task.
    created_at str
    (Optional, String) Date and time when the task was created.
    deployment_id str
    Deployment ID.
    description str
    (Optional, String) Human-readable description of the task.
    progress_percent float
    (Optional, Integer) Indicator as percentage of progress of the task.
    status str
    (Optional, String) The status of the task.

    • Constraints: Allowable values are: running, completed, failed.
    task_id str
    (Optional, String) ID of the task.
    createdAt String
    (Optional, String) Date and time when the task was created.
    deploymentId String
    Deployment ID.
    description String
    (Optional, String) Human-readable description of the task.
    progressPercent Number
    (Optional, Integer) Indicator as percentage of progress of the task.
    status String
    (Optional, String) The status of the task.

    • Constraints: Allowable values are: running, completed, failed.
    taskId String
    (Optional, String) ID of the task.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud