1. Packages
  2. Volcengine
  3. API Docs
  4. rds_postgresql
  5. InstanceTasks
Volcengine v0.0.43 published on Friday, Jan 16, 2026 by Volcengine
volcengine logo
Volcengine v0.0.43 published on Friday, Jan 16, 2026 by Volcengine
    Deprecated: volcengine.rds_postgresql.InstanceTasks has been deprecated in favor of volcengine.rds_postgresql.getInstanceTasks

    Use this data source to query detailed information of rds postgresql instance tasks

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    
    const example = volcengine.rds_postgresql.getInstanceTasks({
        creationEndTime: "2025-12-15T23:40:00Z",
        creationStartTime: "2025-12-10T21:30:00Z",
        instanceId: "postgres-72715e0d9f58",
        projectName: "default",
        taskAction: "ModifyDBEndpointReadWriteFlag",
        taskStatuses: [
            "Running",
            "Success",
        ],
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    example = volcengine.rds_postgresql.get_instance_tasks(creation_end_time="2025-12-15T23:40:00Z",
        creation_start_time="2025-12-10T21:30:00Z",
        instance_id="postgres-72715e0d9f58",
        project_name="default",
        task_action="ModifyDBEndpointReadWriteFlag",
        task_statuses=[
            "Running",
            "Success",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/rds_postgresql"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := rds_postgresql.GetInstanceTasks(ctx, &rds_postgresql.GetInstanceTasksArgs{
    			CreationEndTime:   pulumi.StringRef("2025-12-15T23:40:00Z"),
    			CreationStartTime: pulumi.StringRef("2025-12-10T21:30:00Z"),
    			InstanceId:        pulumi.StringRef("postgres-72715e0d9f58"),
    			ProjectName:       pulumi.StringRef("default"),
    			TaskAction:        pulumi.StringRef("ModifyDBEndpointReadWriteFlag"),
    			TaskStatuses: []string{
    				"Running",
    				"Success",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Volcengine.Rds_postgresql.GetInstanceTasks.Invoke(new()
        {
            CreationEndTime = "2025-12-15T23:40:00Z",
            CreationStartTime = "2025-12-10T21:30:00Z",
            InstanceId = "postgres-72715e0d9f58",
            ProjectName = "default",
            TaskAction = "ModifyDBEndpointReadWriteFlag",
            TaskStatuses = new[]
            {
                "Running",
                "Success",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.rds_postgresql.Rds_postgresqlFunctions;
    import com.pulumi.volcengine.rds_postgresql.inputs.GetInstanceTasksArgs;
    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 example = Rds_postgresqlFunctions.getInstanceTasks(GetInstanceTasksArgs.builder()
                .creationEndTime("2025-12-15T23:40:00Z")
                .creationStartTime("2025-12-10T21:30:00Z")
                .instanceId("postgres-72715e0d9f58")
                .projectName("default")
                .taskAction("ModifyDBEndpointReadWriteFlag")
                .taskStatuses(            
                    "Running",
                    "Success")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: volcengine:rds_postgresql:getInstanceTasks
          Arguments:
            creationEndTime: 2025-12-15T23:40:00Z
            creationStartTime: 2025-12-10T21:30:00Z
            instanceId: postgres-72715e0d9f58
            projectName: default
            taskAction: ModifyDBEndpointReadWriteFlag
            taskStatuses:
              - Running
              - Success
    

    Using InstanceTasks

    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 instanceTasks(args: InstanceTasksArgs, opts?: InvokeOptions): Promise<InstanceTasksResult>
    function instanceTasksOutput(args: InstanceTasksOutputArgs, opts?: InvokeOptions): Output<InstanceTasksResult>
    def instance_tasks(creation_end_time: Optional[str] = None,
                       creation_start_time: Optional[str] = None,
                       instance_id: Optional[str] = None,
                       output_file: Optional[str] = None,
                       project_name: Optional[str] = None,
                       task_action: Optional[str] = None,
                       task_id: Optional[str] = None,
                       task_statuses: Optional[Sequence[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> InstanceTasksResult
    def instance_tasks_output(creation_end_time: Optional[pulumi.Input[str]] = None,
                       creation_start_time: Optional[pulumi.Input[str]] = None,
                       instance_id: Optional[pulumi.Input[str]] = None,
                       output_file: Optional[pulumi.Input[str]] = None,
                       project_name: Optional[pulumi.Input[str]] = None,
                       task_action: Optional[pulumi.Input[str]] = None,
                       task_id: Optional[pulumi.Input[str]] = None,
                       task_statuses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[InstanceTasksResult]
    func InstanceTasks(ctx *Context, args *InstanceTasksArgs, opts ...InvokeOption) (*InstanceTasksResult, error)
    func InstanceTasksOutput(ctx *Context, args *InstanceTasksOutputArgs, opts ...InvokeOption) InstanceTasksResultOutput
    public static class InstanceTasks 
    {
        public static Task<InstanceTasksResult> InvokeAsync(InstanceTasksArgs args, InvokeOptions? opts = null)
        public static Output<InstanceTasksResult> Invoke(InstanceTasksInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<InstanceTasksResult> instanceTasks(InstanceTasksArgs args, InvokeOptions options)
    public static Output<InstanceTasksResult> instanceTasks(InstanceTasksArgs args, InvokeOptions options)
    
    fn::invoke:
      function: volcengine:rds_postgresql:InstanceTasks
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CreationEndTime string
    Task end time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC). Note: The maximum interval between creation_start_time and creation_end_time cannot exceed 7 days.
    CreationStartTime string
    Task start time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC). Note: One of TaskId or task time (creation_start_time and creation_end_time) must be specified.
    InstanceId string
    The id of the PostgreSQL instance.
    OutputFile string
    File name where to save data source results.
    ProjectName string
    Project name.
    TaskAction string
    Task action.
    TaskId string
    Task ID. Note: One of TaskId or task time (creation_start_time and creation_end_time) must be specified.
    TaskStatuses List<string>
    Task status. Values: Canceled, WaitStart, WaitSwitch, Running, Running_BeforeSwitch, Running_Switching, Running_AfterSwitch, Success, Failed, Timeout, Rollbacking, RollbackFailed, Paused.
    CreationEndTime string
    Task end time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC). Note: The maximum interval between creation_start_time and creation_end_time cannot exceed 7 days.
    CreationStartTime string
    Task start time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC). Note: One of TaskId or task time (creation_start_time and creation_end_time) must be specified.
    InstanceId string
    The id of the PostgreSQL instance.
    OutputFile string
    File name where to save data source results.
    ProjectName string
    Project name.
    TaskAction string
    Task action.
    TaskId string
    Task ID. Note: One of TaskId or task time (creation_start_time and creation_end_time) must be specified.
    TaskStatuses []string
    Task status. Values: Canceled, WaitStart, WaitSwitch, Running, Running_BeforeSwitch, Running_Switching, Running_AfterSwitch, Success, Failed, Timeout, Rollbacking, RollbackFailed, Paused.
    creationEndTime String
    Task end time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC). Note: The maximum interval between creation_start_time and creation_end_time cannot exceed 7 days.
    creationStartTime String
    Task start time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC). Note: One of TaskId or task time (creation_start_time and creation_end_time) must be specified.
    instanceId String
    The id of the PostgreSQL instance.
    outputFile String
    File name where to save data source results.
    projectName String
    Project name.
    taskAction String
    Task action.
    taskId String
    Task ID. Note: One of TaskId or task time (creation_start_time and creation_end_time) must be specified.
    taskStatuses List<String>
    Task status. Values: Canceled, WaitStart, WaitSwitch, Running, Running_BeforeSwitch, Running_Switching, Running_AfterSwitch, Success, Failed, Timeout, Rollbacking, RollbackFailed, Paused.
    creationEndTime string
    Task end time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC). Note: The maximum interval between creation_start_time and creation_end_time cannot exceed 7 days.
    creationStartTime string
    Task start time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC). Note: One of TaskId or task time (creation_start_time and creation_end_time) must be specified.
    instanceId string
    The id of the PostgreSQL instance.
    outputFile string
    File name where to save data source results.
    projectName string
    Project name.
    taskAction string
    Task action.
    taskId string
    Task ID. Note: One of TaskId or task time (creation_start_time and creation_end_time) must be specified.
    taskStatuses string[]
    Task status. Values: Canceled, WaitStart, WaitSwitch, Running, Running_BeforeSwitch, Running_Switching, Running_AfterSwitch, Success, Failed, Timeout, Rollbacking, RollbackFailed, Paused.
    creation_end_time str
    Task end time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC). Note: The maximum interval between creation_start_time and creation_end_time cannot exceed 7 days.
    creation_start_time str
    Task start time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC). Note: One of TaskId or task time (creation_start_time and creation_end_time) must be specified.
    instance_id str
    The id of the PostgreSQL instance.
    output_file str
    File name where to save data source results.
    project_name str
    Project name.
    task_action str
    Task action.
    task_id str
    Task ID. Note: One of TaskId or task time (creation_start_time and creation_end_time) must be specified.
    task_statuses Sequence[str]
    Task status. Values: Canceled, WaitStart, WaitSwitch, Running, Running_BeforeSwitch, Running_Switching, Running_AfterSwitch, Success, Failed, Timeout, Rollbacking, RollbackFailed, Paused.
    creationEndTime String
    Task end time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC). Note: The maximum interval between creation_start_time and creation_end_time cannot exceed 7 days.
    creationStartTime String
    Task start time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC). Note: One of TaskId or task time (creation_start_time and creation_end_time) must be specified.
    instanceId String
    The id of the PostgreSQL instance.
    outputFile String
    File name where to save data source results.
    projectName String
    Project name.
    taskAction String
    Task action.
    taskId String
    Task ID. Note: One of TaskId or task time (creation_start_time and creation_end_time) must be specified.
    taskStatuses List<String>
    Task status. Values: Canceled, WaitStart, WaitSwitch, Running, Running_BeforeSwitch, Running_Switching, Running_AfterSwitch, Success, Failed, Timeout, Rollbacking, RollbackFailed, Paused.

    InstanceTasks Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    TaskInfos List<InstanceTasksTaskInfo>
    Task list.
    TotalCount int
    The total count of query.
    CreationEndTime string
    CreationStartTime string
    InstanceId string
    Instance ID.
    OutputFile string
    ProjectName string
    Project name.
    TaskAction string
    Task action.
    TaskId string
    Task ID.
    TaskStatuses List<string>
    Task status.
    Id string
    The provider-assigned unique ID for this managed resource.
    TaskInfos []InstanceTasksTaskInfo
    Task list.
    TotalCount int
    The total count of query.
    CreationEndTime string
    CreationStartTime string
    InstanceId string
    Instance ID.
    OutputFile string
    ProjectName string
    Project name.
    TaskAction string
    Task action.
    TaskId string
    Task ID.
    TaskStatuses []string
    Task status.
    id String
    The provider-assigned unique ID for this managed resource.
    taskInfos List<InstanceTasksTaskInfo>
    Task list.
    totalCount Integer
    The total count of query.
    creationEndTime String
    creationStartTime String
    instanceId String
    Instance ID.
    outputFile String
    projectName String
    Project name.
    taskAction String
    Task action.
    taskId String
    Task ID.
    taskStatuses List<String>
    Task status.
    id string
    The provider-assigned unique ID for this managed resource.
    taskInfos InstanceTasksTaskInfo[]
    Task list.
    totalCount number
    The total count of query.
    creationEndTime string
    creationStartTime string
    instanceId string
    Instance ID.
    outputFile string
    projectName string
    Project name.
    taskAction string
    Task action.
    taskId string
    Task ID.
    taskStatuses string[]
    Task status.
    id str
    The provider-assigned unique ID for this managed resource.
    task_infos Sequence[InstanceTasksTaskInfo]
    Task list.
    total_count int
    The total count of query.
    creation_end_time str
    creation_start_time str
    instance_id str
    Instance ID.
    output_file str
    project_name str
    Project name.
    task_action str
    Task action.
    task_id str
    Task ID.
    task_statuses Sequence[str]
    Task status.
    id String
    The provider-assigned unique ID for this managed resource.
    taskInfos List<Property Map>
    Task list.
    totalCount Number
    The total count of query.
    creationEndTime String
    creationStartTime String
    instanceId String
    Instance ID.
    outputFile String
    projectName String
    Project name.
    taskAction String
    Task action.
    taskId String
    Task ID.
    taskStatuses List<String>
    Task status.

    Supporting Types

    InstanceTasksTaskInfo

    CostTimeMs int
    Task execution time in milliseconds.
    CreateTime string
    Task creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    FinishTime string
    Task finish time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    InstanceId string
    The id of the PostgreSQL instance.
    ProjectName string
    Project name.
    Region string
    Region.
    ScheduledSwitchEndTime string
    The scheduled end time for the switch. The time format is yyyy-MM-ddTHH:mm:ssZ (UTC time). Note: This field will only be returned for tasks in the "Waiting to Start", "Waiting to Execute", or "Waiting to Switch" states.
    ScheduledSwitchStartTime string
    The start time of the scheduled switch. The time format is yyyy-MM-ddTHH:mm:ssZ (UTC time). Note: This field will only be returned for tasks in the "Waiting to Start", "Waiting to Execute", or "Waiting to Switch" states.
    TaskAction string
    Task action.
    TaskId string
    Task ID. Note: One of TaskId or task time (creation_start_time and creation_end_time) must be specified.
    TaskParams string
    Task parameters in JSON string.
    TaskStatus string
    Task status. Values: Canceled, WaitStart, WaitSwitch, Running, Running_BeforeSwitch, Running_Switching, Running_AfterSwitch, Success, Failed, Timeout, Rollbacking, RollbackFailed, Paused.
    CostTimeMs int
    Task execution time in milliseconds.
    CreateTime string
    Task creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    FinishTime string
    Task finish time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    InstanceId string
    The id of the PostgreSQL instance.
    ProjectName string
    Project name.
    Region string
    Region.
    ScheduledSwitchEndTime string
    The scheduled end time for the switch. The time format is yyyy-MM-ddTHH:mm:ssZ (UTC time). Note: This field will only be returned for tasks in the "Waiting to Start", "Waiting to Execute", or "Waiting to Switch" states.
    ScheduledSwitchStartTime string
    The start time of the scheduled switch. The time format is yyyy-MM-ddTHH:mm:ssZ (UTC time). Note: This field will only be returned for tasks in the "Waiting to Start", "Waiting to Execute", or "Waiting to Switch" states.
    TaskAction string
    Task action.
    TaskId string
    Task ID. Note: One of TaskId or task time (creation_start_time and creation_end_time) must be specified.
    TaskParams string
    Task parameters in JSON string.
    TaskStatus string
    Task status. Values: Canceled, WaitStart, WaitSwitch, Running, Running_BeforeSwitch, Running_Switching, Running_AfterSwitch, Success, Failed, Timeout, Rollbacking, RollbackFailed, Paused.
    costTimeMs Integer
    Task execution time in milliseconds.
    createTime String
    Task creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    finishTime String
    Task finish time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    instanceId String
    The id of the PostgreSQL instance.
    projectName String
    Project name.
    region String
    Region.
    scheduledSwitchEndTime String
    The scheduled end time for the switch. The time format is yyyy-MM-ddTHH:mm:ssZ (UTC time). Note: This field will only be returned for tasks in the "Waiting to Start", "Waiting to Execute", or "Waiting to Switch" states.
    scheduledSwitchStartTime String
    The start time of the scheduled switch. The time format is yyyy-MM-ddTHH:mm:ssZ (UTC time). Note: This field will only be returned for tasks in the "Waiting to Start", "Waiting to Execute", or "Waiting to Switch" states.
    taskAction String
    Task action.
    taskId String
    Task ID. Note: One of TaskId or task time (creation_start_time and creation_end_time) must be specified.
    taskParams String
    Task parameters in JSON string.
    taskStatus String
    Task status. Values: Canceled, WaitStart, WaitSwitch, Running, Running_BeforeSwitch, Running_Switching, Running_AfterSwitch, Success, Failed, Timeout, Rollbacking, RollbackFailed, Paused.
    costTimeMs number
    Task execution time in milliseconds.
    createTime string
    Task creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    finishTime string
    Task finish time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    instanceId string
    The id of the PostgreSQL instance.
    projectName string
    Project name.
    region string
    Region.
    scheduledSwitchEndTime string
    The scheduled end time for the switch. The time format is yyyy-MM-ddTHH:mm:ssZ (UTC time). Note: This field will only be returned for tasks in the "Waiting to Start", "Waiting to Execute", or "Waiting to Switch" states.
    scheduledSwitchStartTime string
    The start time of the scheduled switch. The time format is yyyy-MM-ddTHH:mm:ssZ (UTC time). Note: This field will only be returned for tasks in the "Waiting to Start", "Waiting to Execute", or "Waiting to Switch" states.
    taskAction string
    Task action.
    taskId string
    Task ID. Note: One of TaskId or task time (creation_start_time and creation_end_time) must be specified.
    taskParams string
    Task parameters in JSON string.
    taskStatus string
    Task status. Values: Canceled, WaitStart, WaitSwitch, Running, Running_BeforeSwitch, Running_Switching, Running_AfterSwitch, Success, Failed, Timeout, Rollbacking, RollbackFailed, Paused.
    cost_time_ms int
    Task execution time in milliseconds.
    create_time str
    Task creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    finish_time str
    Task finish time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    instance_id str
    The id of the PostgreSQL instance.
    project_name str
    Project name.
    region str
    Region.
    scheduled_switch_end_time str
    The scheduled end time for the switch. The time format is yyyy-MM-ddTHH:mm:ssZ (UTC time). Note: This field will only be returned for tasks in the "Waiting to Start", "Waiting to Execute", or "Waiting to Switch" states.
    scheduled_switch_start_time str
    The start time of the scheduled switch. The time format is yyyy-MM-ddTHH:mm:ssZ (UTC time). Note: This field will only be returned for tasks in the "Waiting to Start", "Waiting to Execute", or "Waiting to Switch" states.
    task_action str
    Task action.
    task_id str
    Task ID. Note: One of TaskId or task time (creation_start_time and creation_end_time) must be specified.
    task_params str
    Task parameters in JSON string.
    task_status str
    Task status. Values: Canceled, WaitStart, WaitSwitch, Running, Running_BeforeSwitch, Running_Switching, Running_AfterSwitch, Success, Failed, Timeout, Rollbacking, RollbackFailed, Paused.
    costTimeMs Number
    Task execution time in milliseconds.
    createTime String
    Task creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    finishTime String
    Task finish time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    instanceId String
    The id of the PostgreSQL instance.
    projectName String
    Project name.
    region String
    Region.
    scheduledSwitchEndTime String
    The scheduled end time for the switch. The time format is yyyy-MM-ddTHH:mm:ssZ (UTC time). Note: This field will only be returned for tasks in the "Waiting to Start", "Waiting to Execute", or "Waiting to Switch" states.
    scheduledSwitchStartTime String
    The start time of the scheduled switch. The time format is yyyy-MM-ddTHH:mm:ssZ (UTC time). Note: This field will only be returned for tasks in the "Waiting to Start", "Waiting to Execute", or "Waiting to Switch" states.
    taskAction String
    Task action.
    taskId String
    Task ID. Note: One of TaskId or task time (creation_start_time and creation_end_time) must be specified.
    taskParams String
    Task parameters in JSON string.
    taskStatus String
    Task status. Values: Canceled, WaitStart, WaitSwitch, Running, Running_BeforeSwitch, Running_Switching, Running_AfterSwitch, Success, Failed, Timeout, Rollbacking, RollbackFailed, Paused.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.43 published on Friday, Jan 16, 2026 by Volcengine
      Meet Neo: Your AI Platform Teammate