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

tencentcloud.getRedisBackup

Explore with Pulumi AI

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

    Use this data source to query detailed information of redis backup

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const backup = tencentcloud.getRedisBackup({
        beginTime: "2023-04-07 03:57:30",
        endTime: "2023-04-07 03:57:56",
        instanceId: "crs-c1nl9rpv",
        instanceName: "Keep-terraform",
        statuses: [2],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    backup = tencentcloud.get_redis_backup(begin_time="2023-04-07 03:57:30",
        end_time="2023-04-07 03:57:56",
        instance_id="crs-c1nl9rpv",
        instance_name="Keep-terraform",
        statuses=[2])
    
    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.GetRedisBackup(ctx, &tencentcloud.GetRedisBackupArgs{
    			BeginTime:    pulumi.StringRef("2023-04-07 03:57:30"),
    			EndTime:      pulumi.StringRef("2023-04-07 03:57:56"),
    			InstanceId:   pulumi.StringRef("crs-c1nl9rpv"),
    			InstanceName: pulumi.StringRef("Keep-terraform"),
    			Statuses: []float64{
    				2,
    			},
    		}, 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 backup = Tencentcloud.GetRedisBackup.Invoke(new()
        {
            BeginTime = "2023-04-07 03:57:30",
            EndTime = "2023-04-07 03:57:56",
            InstanceId = "crs-c1nl9rpv",
            InstanceName = "Keep-terraform",
            Statuses = new[]
            {
                2,
            },
        });
    
    });
    
    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.GetRedisBackupArgs;
    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 backup = TencentcloudFunctions.getRedisBackup(GetRedisBackupArgs.builder()
                .beginTime("2023-04-07 03:57:30")
                .endTime("2023-04-07 03:57:56")
                .instanceId("crs-c1nl9rpv")
                .instanceName("Keep-terraform")
                .statuses(2)
                .build());
    
        }
    }
    
    variables:
      backup:
        fn::invoke:
          function: tencentcloud:getRedisBackup
          arguments:
            beginTime: 2023-04-07 03:57:30
            endTime: 2023-04-07 03:57:56
            instanceId: crs-c1nl9rpv
            instanceName: Keep-terraform
            statuses:
              - 2
    

    Using getRedisBackup

    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 getRedisBackup(args: GetRedisBackupArgs, opts?: InvokeOptions): Promise<GetRedisBackupResult>
    function getRedisBackupOutput(args: GetRedisBackupOutputArgs, opts?: InvokeOptions): Output<GetRedisBackupResult>
    def get_redis_backup(begin_time: Optional[str] = None,
                         end_time: Optional[str] = None,
                         id: Optional[str] = None,
                         instance_id: Optional[str] = None,
                         instance_name: Optional[str] = None,
                         result_output_file: Optional[str] = None,
                         statuses: Optional[Sequence[float]] = None,
                         opts: Optional[InvokeOptions] = None) -> GetRedisBackupResult
    def get_redis_backup_output(begin_time: 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,
                         instance_name: Optional[pulumi.Input[str]] = None,
                         result_output_file: Optional[pulumi.Input[str]] = None,
                         statuses: Optional[pulumi.Input[Sequence[pulumi.Input[float]]]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetRedisBackupResult]
    func GetRedisBackup(ctx *Context, args *GetRedisBackupArgs, opts ...InvokeOption) (*GetRedisBackupResult, error)
    func GetRedisBackupOutput(ctx *Context, args *GetRedisBackupOutputArgs, opts ...InvokeOption) GetRedisBackupResultOutput

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

    public static class GetRedisBackup 
    {
        public static Task<GetRedisBackupResult> InvokeAsync(GetRedisBackupArgs args, InvokeOptions? opts = null)
        public static Output<GetRedisBackupResult> Invoke(GetRedisBackupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRedisBackupResult> getRedisBackup(GetRedisBackupArgs args, InvokeOptions options)
    public static Output<GetRedisBackupResult> getRedisBackup(GetRedisBackupArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getRedisBackup:getRedisBackup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    BeginTime string
    start time, such as 2017-02-08 19:09:26.Query the list of backups that the instance started backing up during the [beginTime, endTime] time period.
    EndTime string
    End time, such as 2017-02-08 19:09:26.Query the list of backups that the instance started backing up during the [beginTime, endTime] time period.
    Id string
    InstanceId string
    The ID of instance.
    InstanceName string
    Instance name, which supports fuzzy search based on instance name.
    ResultOutputFile string
    Used to save results.
    Statuses List<double>
    Status of the backup task:1: Backup is in the process.2: The backup is normal.3: Backup to RDB file processing.4: RDB conversion completed.-1: The backup has expired.-2: Backup deleted.
    BeginTime string
    start time, such as 2017-02-08 19:09:26.Query the list of backups that the instance started backing up during the [beginTime, endTime] time period.
    EndTime string
    End time, such as 2017-02-08 19:09:26.Query the list of backups that the instance started backing up during the [beginTime, endTime] time period.
    Id string
    InstanceId string
    The ID of instance.
    InstanceName string
    Instance name, which supports fuzzy search based on instance name.
    ResultOutputFile string
    Used to save results.
    Statuses []float64
    Status of the backup task:1: Backup is in the process.2: The backup is normal.3: Backup to RDB file processing.4: RDB conversion completed.-1: The backup has expired.-2: Backup deleted.
    beginTime String
    start time, such as 2017-02-08 19:09:26.Query the list of backups that the instance started backing up during the [beginTime, endTime] time period.
    endTime String
    End time, such as 2017-02-08 19:09:26.Query the list of backups that the instance started backing up during the [beginTime, endTime] time period.
    id String
    instanceId String
    The ID of instance.
    instanceName String
    Instance name, which supports fuzzy search based on instance name.
    resultOutputFile String
    Used to save results.
    statuses List<Double>
    Status of the backup task:1: Backup is in the process.2: The backup is normal.3: Backup to RDB file processing.4: RDB conversion completed.-1: The backup has expired.-2: Backup deleted.
    beginTime string
    start time, such as 2017-02-08 19:09:26.Query the list of backups that the instance started backing up during the [beginTime, endTime] time period.
    endTime string
    End time, such as 2017-02-08 19:09:26.Query the list of backups that the instance started backing up during the [beginTime, endTime] time period.
    id string
    instanceId string
    The ID of instance.
    instanceName string
    Instance name, which supports fuzzy search based on instance name.
    resultOutputFile string
    Used to save results.
    statuses number[]
    Status of the backup task:1: Backup is in the process.2: The backup is normal.3: Backup to RDB file processing.4: RDB conversion completed.-1: The backup has expired.-2: Backup deleted.
    begin_time str
    start time, such as 2017-02-08 19:09:26.Query the list of backups that the instance started backing up during the [beginTime, endTime] time period.
    end_time str
    End time, such as 2017-02-08 19:09:26.Query the list of backups that the instance started backing up during the [beginTime, endTime] time period.
    id str
    instance_id str
    The ID of instance.
    instance_name str
    Instance name, which supports fuzzy search based on instance name.
    result_output_file str
    Used to save results.
    statuses Sequence[float]
    Status of the backup task:1: Backup is in the process.2: The backup is normal.3: Backup to RDB file processing.4: RDB conversion completed.-1: The backup has expired.-2: Backup deleted.
    beginTime String
    start time, such as 2017-02-08 19:09:26.Query the list of backups that the instance started backing up during the [beginTime, endTime] time period.
    endTime String
    End time, such as 2017-02-08 19:09:26.Query the list of backups that the instance started backing up during the [beginTime, endTime] time period.
    id String
    instanceId String
    The ID of instance.
    instanceName String
    Instance name, which supports fuzzy search based on instance name.
    resultOutputFile String
    Used to save results.
    statuses List<Number>
    Status of the backup task:1: Backup is in the process.2: The backup is normal.3: Backup to RDB file processing.4: RDB conversion completed.-1: The backup has expired.-2: Backup deleted.

    getRedisBackup Result

    The following output properties are available:

    BackupSets List<GetRedisBackupBackupSet>
    An array of backups for the instance.
    Id string
    BeginTime string
    EndTime string
    Backup end time.
    InstanceId string
    The ID of instance.
    InstanceName string
    The name of instance.
    ResultOutputFile string
    Statuses List<double>
    Backup status.1: The backup is locked by another process.2: The backup is normal and not locked by any process.-1: The backup has expired.3: The backup is being exported.4: The backup export is successful.
    BackupSets []GetRedisBackupBackupSet
    An array of backups for the instance.
    Id string
    BeginTime string
    EndTime string
    Backup end time.
    InstanceId string
    The ID of instance.
    InstanceName string
    The name of instance.
    ResultOutputFile string
    Statuses []float64
    Backup status.1: The backup is locked by another process.2: The backup is normal and not locked by any process.-1: The backup has expired.3: The backup is being exported.4: The backup export is successful.
    backupSets List<GetRedisBackupBackupSet>
    An array of backups for the instance.
    id String
    beginTime String
    endTime String
    Backup end time.
    instanceId String
    The ID of instance.
    instanceName String
    The name of instance.
    resultOutputFile String
    statuses List<Double>
    Backup status.1: The backup is locked by another process.2: The backup is normal and not locked by any process.-1: The backup has expired.3: The backup is being exported.4: The backup export is successful.
    backupSets GetRedisBackupBackupSet[]
    An array of backups for the instance.
    id string
    beginTime string
    endTime string
    Backup end time.
    instanceId string
    The ID of instance.
    instanceName string
    The name of instance.
    resultOutputFile string
    statuses number[]
    Backup status.1: The backup is locked by another process.2: The backup is normal and not locked by any process.-1: The backup has expired.3: The backup is being exported.4: The backup export is successful.
    backup_sets Sequence[GetRedisBackupBackupSet]
    An array of backups for the instance.
    id str
    begin_time str
    end_time str
    Backup end time.
    instance_id str
    The ID of instance.
    instance_name str
    The name of instance.
    result_output_file str
    statuses Sequence[float]
    Backup status.1: The backup is locked by another process.2: The backup is normal and not locked by any process.-1: The backup has expired.3: The backup is being exported.4: The backup export is successful.
    backupSets List<Property Map>
    An array of backups for the instance.
    id String
    beginTime String
    endTime String
    Backup end time.
    instanceId String
    The ID of instance.
    instanceName String
    The name of instance.
    resultOutputFile String
    statuses List<Number>
    Backup status.1: The backup is locked by another process.2: The backup is normal and not locked by any process.-1: The backup has expired.3: The backup is being exported.4: The backup export is successful.

    Supporting Types

    GetRedisBackupBackupSet

    BackupId string
    Backup ID.
    BackupSize double
    Internal fields, which can be ignored by the user.
    BackupType string
    Backup type.1: User-initiated manual backup.0: System-initiated backup in the early morning.
    EndTime string
    End time, such as 2017-02-08 19:09:26.Query the list of backups that the instance started backing up during the [beginTime, endTime] time period.
    ExpireTime string
    Backup file expiration time.
    FileType string
    Back up file types.
    FullBackup double
    Internal fields, which can be ignored by the user.
    InstanceId string
    The ID of instance.
    InstanceName string
    Instance name, which supports fuzzy search based on instance name.
    InstanceType double
    Internal fields, which can be ignored by the user.
    Locked double
    Whether the backup is locked.0: Not locked.1: Has been locked.
    Region string
    The region where the backup is located.
    Remark string
    Notes information for the backup.
    StartTime string
    Backup start time.
    Status double
    Status of the backup task:1: Backup is in the process.2: The backup is normal.3: Backup to RDB file processing.4: RDB conversion completed.-1: The backup has expired.-2: Backup deleted.
    BackupId string
    Backup ID.
    BackupSize float64
    Internal fields, which can be ignored by the user.
    BackupType string
    Backup type.1: User-initiated manual backup.0: System-initiated backup in the early morning.
    EndTime string
    End time, such as 2017-02-08 19:09:26.Query the list of backups that the instance started backing up during the [beginTime, endTime] time period.
    ExpireTime string
    Backup file expiration time.
    FileType string
    Back up file types.
    FullBackup float64
    Internal fields, which can be ignored by the user.
    InstanceId string
    The ID of instance.
    InstanceName string
    Instance name, which supports fuzzy search based on instance name.
    InstanceType float64
    Internal fields, which can be ignored by the user.
    Locked float64
    Whether the backup is locked.0: Not locked.1: Has been locked.
    Region string
    The region where the backup is located.
    Remark string
    Notes information for the backup.
    StartTime string
    Backup start time.
    Status float64
    Status of the backup task:1: Backup is in the process.2: The backup is normal.3: Backup to RDB file processing.4: RDB conversion completed.-1: The backup has expired.-2: Backup deleted.
    backupId String
    Backup ID.
    backupSize Double
    Internal fields, which can be ignored by the user.
    backupType String
    Backup type.1: User-initiated manual backup.0: System-initiated backup in the early morning.
    endTime String
    End time, such as 2017-02-08 19:09:26.Query the list of backups that the instance started backing up during the [beginTime, endTime] time period.
    expireTime String
    Backup file expiration time.
    fileType String
    Back up file types.
    fullBackup Double
    Internal fields, which can be ignored by the user.
    instanceId String
    The ID of instance.
    instanceName String
    Instance name, which supports fuzzy search based on instance name.
    instanceType Double
    Internal fields, which can be ignored by the user.
    locked Double
    Whether the backup is locked.0: Not locked.1: Has been locked.
    region String
    The region where the backup is located.
    remark String
    Notes information for the backup.
    startTime String
    Backup start time.
    status Double
    Status of the backup task:1: Backup is in the process.2: The backup is normal.3: Backup to RDB file processing.4: RDB conversion completed.-1: The backup has expired.-2: Backup deleted.
    backupId string
    Backup ID.
    backupSize number
    Internal fields, which can be ignored by the user.
    backupType string
    Backup type.1: User-initiated manual backup.0: System-initiated backup in the early morning.
    endTime string
    End time, such as 2017-02-08 19:09:26.Query the list of backups that the instance started backing up during the [beginTime, endTime] time period.
    expireTime string
    Backup file expiration time.
    fileType string
    Back up file types.
    fullBackup number
    Internal fields, which can be ignored by the user.
    instanceId string
    The ID of instance.
    instanceName string
    Instance name, which supports fuzzy search based on instance name.
    instanceType number
    Internal fields, which can be ignored by the user.
    locked number
    Whether the backup is locked.0: Not locked.1: Has been locked.
    region string
    The region where the backup is located.
    remark string
    Notes information for the backup.
    startTime string
    Backup start time.
    status number
    Status of the backup task:1: Backup is in the process.2: The backup is normal.3: Backup to RDB file processing.4: RDB conversion completed.-1: The backup has expired.-2: Backup deleted.
    backup_id str
    Backup ID.
    backup_size float
    Internal fields, which can be ignored by the user.
    backup_type str
    Backup type.1: User-initiated manual backup.0: System-initiated backup in the early morning.
    end_time str
    End time, such as 2017-02-08 19:09:26.Query the list of backups that the instance started backing up during the [beginTime, endTime] time period.
    expire_time str
    Backup file expiration time.
    file_type str
    Back up file types.
    full_backup float
    Internal fields, which can be ignored by the user.
    instance_id str
    The ID of instance.
    instance_name str
    Instance name, which supports fuzzy search based on instance name.
    instance_type float
    Internal fields, which can be ignored by the user.
    locked float
    Whether the backup is locked.0: Not locked.1: Has been locked.
    region str
    The region where the backup is located.
    remark str
    Notes information for the backup.
    start_time str
    Backup start time.
    status float
    Status of the backup task:1: Backup is in the process.2: The backup is normal.3: Backup to RDB file processing.4: RDB conversion completed.-1: The backup has expired.-2: Backup deleted.
    backupId String
    Backup ID.
    backupSize Number
    Internal fields, which can be ignored by the user.
    backupType String
    Backup type.1: User-initiated manual backup.0: System-initiated backup in the early morning.
    endTime String
    End time, such as 2017-02-08 19:09:26.Query the list of backups that the instance started backing up during the [beginTime, endTime] time period.
    expireTime String
    Backup file expiration time.
    fileType String
    Back up file types.
    fullBackup Number
    Internal fields, which can be ignored by the user.
    instanceId String
    The ID of instance.
    instanceName String
    Instance name, which supports fuzzy search based on instance name.
    instanceType Number
    Internal fields, which can be ignored by the user.
    locked Number
    Whether the backup is locked.0: Not locked.1: Has been locked.
    region String
    The region where the backup is located.
    remark String
    Notes information for the backup.
    startTime String
    Backup start time.
    status Number
    Status of the backup task:1: Backup is in the process.2: The backup is normal.3: Backup to RDB file processing.4: RDB conversion completed.-1: The backup has expired.-2: Backup deleted.

    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