1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getSqlserverBackups
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.getSqlserverBackups

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Use this data source to query the list of SQL Server backups.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const foo = tencentcloud.getSqlserverBackups({
        endTime: "2020-06-22 00:00:00",
        instanceId: "mssql-3cdq7kx5",
        startTime: "2020-06-17 00:00:00",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    foo = tencentcloud.get_sqlserver_backups(end_time="2020-06-22 00:00:00",
        instance_id="mssql-3cdq7kx5",
        start_time="2020-06-17 00:00:00")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.GetSqlserverBackups(ctx, &tencentcloud.GetSqlserverBackupsArgs{
    			EndTime:    "2020-06-22 00:00:00",
    			InstanceId: "mssql-3cdq7kx5",
    			StartTime:  "2020-06-17 00:00:00",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = Tencentcloud.GetSqlserverBackups.Invoke(new()
        {
            EndTime = "2020-06-22 00:00:00",
            InstanceId = "mssql-3cdq7kx5",
            StartTime = "2020-06-17 00:00:00",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetSqlserverBackupsArgs;
    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 foo = TencentcloudFunctions.getSqlserverBackups(GetSqlserverBackupsArgs.builder()
                .endTime("2020-06-22 00:00:00")
                .instanceId("mssql-3cdq7kx5")
                .startTime("2020-06-17 00:00:00")
                .build());
    
        }
    }
    
    variables:
      foo:
        fn::invoke:
          function: tencentcloud:getSqlserverBackups
          arguments:
            endTime: 2020-06-22 00:00:00
            instanceId: mssql-3cdq7kx5
            startTime: 2020-06-17 00:00:00
    

    Using getSqlserverBackups

    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 getSqlserverBackups(args: GetSqlserverBackupsArgs, opts?: InvokeOptions): Promise<GetSqlserverBackupsResult>
    function getSqlserverBackupsOutput(args: GetSqlserverBackupsOutputArgs, opts?: InvokeOptions): Output<GetSqlserverBackupsResult>
    def get_sqlserver_backups(backup_name: Optional[str] = None,
                              end_time: Optional[str] = None,
                              id: Optional[str] = None,
                              instance_id: Optional[str] = None,
                              result_output_file: Optional[str] = None,
                              start_time: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetSqlserverBackupsResult
    def get_sqlserver_backups_output(backup_name: Optional[pulumi.Input[str]] = None,
                              end_time: Optional[pulumi.Input[str]] = None,
                              id: Optional[pulumi.Input[str]] = None,
                              instance_id: Optional[pulumi.Input[str]] = None,
                              result_output_file: Optional[pulumi.Input[str]] = None,
                              start_time: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetSqlserverBackupsResult]
    func GetSqlserverBackups(ctx *Context, args *GetSqlserverBackupsArgs, opts ...InvokeOption) (*GetSqlserverBackupsResult, error)
    func GetSqlserverBackupsOutput(ctx *Context, args *GetSqlserverBackupsOutputArgs, opts ...InvokeOption) GetSqlserverBackupsResultOutput

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

    public static class GetSqlserverBackups 
    {
        public static Task<GetSqlserverBackupsResult> InvokeAsync(GetSqlserverBackupsArgs args, InvokeOptions? opts = null)
        public static Output<GetSqlserverBackupsResult> Invoke(GetSqlserverBackupsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSqlserverBackupsResult> getSqlserverBackups(GetSqlserverBackupsArgs args, InvokeOptions options)
    public static Output<GetSqlserverBackupsResult> getSqlserverBackups(GetSqlserverBackupsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getSqlserverBackups:getSqlserverBackups
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EndTime string
    End time of the instance list, like yyyy-MM-dd HH:mm:ss.
    InstanceId string
    Instance ID.
    StartTime string
    Start time of the instance list, like yyyy-MM-dd HH:mm:ss.
    BackupName string
    Id string
    ID of the backup.
    ResultOutputFile string
    Used to store results.
    EndTime string
    End time of the instance list, like yyyy-MM-dd HH:mm:ss.
    InstanceId string
    Instance ID.
    StartTime string
    Start time of the instance list, like yyyy-MM-dd HH:mm:ss.
    BackupName string
    Id string
    ID of the backup.
    ResultOutputFile string
    Used to store results.
    endTime String
    End time of the instance list, like yyyy-MM-dd HH:mm:ss.
    instanceId String
    Instance ID.
    startTime String
    Start time of the instance list, like yyyy-MM-dd HH:mm:ss.
    backupName String
    id String
    ID of the backup.
    resultOutputFile String
    Used to store results.
    endTime string
    End time of the instance list, like yyyy-MM-dd HH:mm:ss.
    instanceId string
    Instance ID.
    startTime string
    Start time of the instance list, like yyyy-MM-dd HH:mm:ss.
    backupName string
    id string
    ID of the backup.
    resultOutputFile string
    Used to store results.
    end_time str
    End time of the instance list, like yyyy-MM-dd HH:mm:ss.
    instance_id str
    Instance ID.
    start_time str
    Start time of the instance list, like yyyy-MM-dd HH:mm:ss.
    backup_name str
    id str
    ID of the backup.
    result_output_file str
    Used to store results.
    endTime String
    End time of the instance list, like yyyy-MM-dd HH:mm:ss.
    instanceId String
    Instance ID.
    startTime String
    Start time of the instance list, like yyyy-MM-dd HH:mm:ss.
    backupName String
    id String
    ID of the backup.
    resultOutputFile String
    Used to store results.

    getSqlserverBackups Result

    The following output properties are available:

    EndTime string
    End time of the backup.
    Id string
    ID of the backup.
    InstanceId string
    Instance ID.
    Lists List<GetSqlserverBackupsList>
    A list of SQL Server backup. Each element contains the following attributes:
    StartTime string
    Start time of the backup.
    BackupName string
    ResultOutputFile string
    EndTime string
    End time of the backup.
    Id string
    ID of the backup.
    InstanceId string
    Instance ID.
    Lists []GetSqlserverBackupsList
    A list of SQL Server backup. Each element contains the following attributes:
    StartTime string
    Start time of the backup.
    BackupName string
    ResultOutputFile string
    endTime String
    End time of the backup.
    id String
    ID of the backup.
    instanceId String
    Instance ID.
    lists List<GetSqlserverBackupsList>
    A list of SQL Server backup. Each element contains the following attributes:
    startTime String
    Start time of the backup.
    backupName String
    resultOutputFile String
    endTime string
    End time of the backup.
    id string
    ID of the backup.
    instanceId string
    Instance ID.
    lists GetSqlserverBackupsList[]
    A list of SQL Server backup. Each element contains the following attributes:
    startTime string
    Start time of the backup.
    backupName string
    resultOutputFile string
    end_time str
    End time of the backup.
    id str
    ID of the backup.
    instance_id str
    Instance ID.
    lists Sequence[GetSqlserverBackupsList]
    A list of SQL Server backup. Each element contains the following attributes:
    start_time str
    Start time of the backup.
    backup_name str
    result_output_file str
    endTime String
    End time of the backup.
    id String
    ID of the backup.
    instanceId String
    Instance ID.
    lists List<Property Map>
    A list of SQL Server backup. Each element contains the following attributes:
    startTime String
    Start time of the backup.
    backupName String
    resultOutputFile String

    Supporting Types

    GetSqlserverBackupsList

    DbLists List<string>
    Database name list of the backup.
    EndTime string
    End time of the instance list, like yyyy-MM-dd HH:mm:ss.
    FileName string
    File name of the backup.
    Id string
    ID of the backup.
    InstanceId string
    Instance ID.
    InternetUrl string
    URL for downloads externally.
    IntranetUrl string
    URL for downloads internally.
    Size double
    The size of backup file. Unit is KB.
    StartTime string
    Start time of the instance list, like yyyy-MM-dd HH:mm:ss.
    Status double
    Status of the backup. 1 for creating, 2 for successfully created, 3 for failed.
    Strategy double
    Strategy of the backup. 0 for instance backup, 1 for multi-databases backup.
    TriggerModel double
    The way to trigger backup. 0 for timed trigger, 1 for manual trigger.
    DbLists []string
    Database name list of the backup.
    EndTime string
    End time of the instance list, like yyyy-MM-dd HH:mm:ss.
    FileName string
    File name of the backup.
    Id string
    ID of the backup.
    InstanceId string
    Instance ID.
    InternetUrl string
    URL for downloads externally.
    IntranetUrl string
    URL for downloads internally.
    Size float64
    The size of backup file. Unit is KB.
    StartTime string
    Start time of the instance list, like yyyy-MM-dd HH:mm:ss.
    Status float64
    Status of the backup. 1 for creating, 2 for successfully created, 3 for failed.
    Strategy float64
    Strategy of the backup. 0 for instance backup, 1 for multi-databases backup.
    TriggerModel float64
    The way to trigger backup. 0 for timed trigger, 1 for manual trigger.
    dbLists List<String>
    Database name list of the backup.
    endTime String
    End time of the instance list, like yyyy-MM-dd HH:mm:ss.
    fileName String
    File name of the backup.
    id String
    ID of the backup.
    instanceId String
    Instance ID.
    internetUrl String
    URL for downloads externally.
    intranetUrl String
    URL for downloads internally.
    size Double
    The size of backup file. Unit is KB.
    startTime String
    Start time of the instance list, like yyyy-MM-dd HH:mm:ss.
    status Double
    Status of the backup. 1 for creating, 2 for successfully created, 3 for failed.
    strategy Double
    Strategy of the backup. 0 for instance backup, 1 for multi-databases backup.
    triggerModel Double
    The way to trigger backup. 0 for timed trigger, 1 for manual trigger.
    dbLists string[]
    Database name list of the backup.
    endTime string
    End time of the instance list, like yyyy-MM-dd HH:mm:ss.
    fileName string
    File name of the backup.
    id string
    ID of the backup.
    instanceId string
    Instance ID.
    internetUrl string
    URL for downloads externally.
    intranetUrl string
    URL for downloads internally.
    size number
    The size of backup file. Unit is KB.
    startTime string
    Start time of the instance list, like yyyy-MM-dd HH:mm:ss.
    status number
    Status of the backup. 1 for creating, 2 for successfully created, 3 for failed.
    strategy number
    Strategy of the backup. 0 for instance backup, 1 for multi-databases backup.
    triggerModel number
    The way to trigger backup. 0 for timed trigger, 1 for manual trigger.
    db_lists Sequence[str]
    Database name list of the backup.
    end_time str
    End time of the instance list, like yyyy-MM-dd HH:mm:ss.
    file_name str
    File name of the backup.
    id str
    ID of the backup.
    instance_id str
    Instance ID.
    internet_url str
    URL for downloads externally.
    intranet_url str
    URL for downloads internally.
    size float
    The size of backup file. Unit is KB.
    start_time str
    Start time of the instance list, like yyyy-MM-dd HH:mm:ss.
    status float
    Status of the backup. 1 for creating, 2 for successfully created, 3 for failed.
    strategy float
    Strategy of the backup. 0 for instance backup, 1 for multi-databases backup.
    trigger_model float
    The way to trigger backup. 0 for timed trigger, 1 for manual trigger.
    dbLists List<String>
    Database name list of the backup.
    endTime String
    End time of the instance list, like yyyy-MM-dd HH:mm:ss.
    fileName String
    File name of the backup.
    id String
    ID of the backup.
    instanceId String
    Instance ID.
    internetUrl String
    URL for downloads externally.
    intranetUrl String
    URL for downloads internally.
    size Number
    The size of backup file. Unit is KB.
    startTime String
    Start time of the instance list, like yyyy-MM-dd HH:mm:ss.
    status Number
    Status of the backup. 1 for creating, 2 for successfully created, 3 for failed.
    strategy Number
    Strategy of the backup. 0 for instance backup, 1 for multi-databases backup.
    triggerModel Number
    The way to trigger backup. 0 for timed trigger, 1 for manual trigger.

    Package Details

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