1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. rds
  5. getRdsBackups
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.rds.getRdsBackups

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    This data source provides the Rds Backups of the current Alibaba Cloud user.

    NOTE: Available in v1.149.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = alicloud.rds.getRdsBackups({
        dbInstanceId: "example_value",
    });
    export const firstRdsBackupId = example.then(example => example.backups?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.rds.get_rds_backups(db_instance_id="example_value")
    pulumi.export("firstRdsBackupId", example.backups[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/rds"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := rds.GetRdsBackups(ctx, &rds.GetRdsBackupsArgs{
    			DbInstanceId: "example_value",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstRdsBackupId", example.Backups[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = AliCloud.Rds.GetRdsBackups.Invoke(new()
        {
            DbInstanceId = "example_value",
        });
    
        return new Dictionary<string, object?>
        {
            ["firstRdsBackupId"] = example.Apply(getRdsBackupsResult => getRdsBackupsResult.Backups[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.rds.RdsFunctions;
    import com.pulumi.alicloud.rds.inputs.GetRdsBackupsArgs;
    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 = RdsFunctions.getRdsBackups(GetRdsBackupsArgs.builder()
                .dbInstanceId("example_value")
                .build());
    
            ctx.export("firstRdsBackupId", example.applyValue(getRdsBackupsResult -> getRdsBackupsResult.backups()[0].id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: alicloud:rds:getRdsBackups
          Arguments:
            dbInstanceId: example_value
    outputs:
      firstRdsBackupId: ${example.backups[0].id}
    

    Using getRdsBackups

    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 getRdsBackups(args: GetRdsBackupsArgs, opts?: InvokeOptions): Promise<GetRdsBackupsResult>
    function getRdsBackupsOutput(args: GetRdsBackupsOutputArgs, opts?: InvokeOptions): Output<GetRdsBackupsResult>
    def get_rds_backups(backup_mode: Optional[str] = None,
                        backup_status: Optional[str] = None,
                        db_instance_id: Optional[str] = None,
                        end_time: Optional[str] = None,
                        ids: Optional[Sequence[str]] = None,
                        output_file: Optional[str] = None,
                        start_time: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetRdsBackupsResult
    def get_rds_backups_output(backup_mode: Optional[pulumi.Input[str]] = None,
                        backup_status: Optional[pulumi.Input[str]] = None,
                        db_instance_id: Optional[pulumi.Input[str]] = None,
                        end_time: Optional[pulumi.Input[str]] = None,
                        ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                        output_file: Optional[pulumi.Input[str]] = None,
                        start_time: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetRdsBackupsResult]
    func GetRdsBackups(ctx *Context, args *GetRdsBackupsArgs, opts ...InvokeOption) (*GetRdsBackupsResult, error)
    func GetRdsBackupsOutput(ctx *Context, args *GetRdsBackupsOutputArgs, opts ...InvokeOption) GetRdsBackupsResultOutput

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

    public static class GetRdsBackups 
    {
        public static Task<GetRdsBackupsResult> InvokeAsync(GetRdsBackupsArgs args, InvokeOptions? opts = null)
        public static Output<GetRdsBackupsResult> Invoke(GetRdsBackupsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRdsBackupsResult> getRdsBackups(GetRdsBackupsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:rds/getRdsBackups:getRdsBackups
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DbInstanceId string
    The db instance id.
    BackupMode string
    BackupMode.
    BackupStatus string
    Backup task status. NOTE: This parameter will only be returned when a task is executed. Value:

    • NoStart: Not started
    • Checking: check the backup
    • Preparing: Prepare a backup
    • Waiting: Waiting for backup
    • Uploading: Upload backup
    • Finished: Complete backup
    • Failed: backup Failed
    EndTime string
    The end time.
    Ids List<string>
    A list of Backup IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    StartTime string
    The start time.
    DbInstanceId string
    The db instance id.
    BackupMode string
    BackupMode.
    BackupStatus string
    Backup task status. NOTE: This parameter will only be returned when a task is executed. Value:

    • NoStart: Not started
    • Checking: check the backup
    • Preparing: Prepare a backup
    • Waiting: Waiting for backup
    • Uploading: Upload backup
    • Finished: Complete backup
    • Failed: backup Failed
    EndTime string
    The end time.
    Ids []string
    A list of Backup IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    StartTime string
    The start time.
    dbInstanceId String
    The db instance id.
    backupMode String
    BackupMode.
    backupStatus String
    Backup task status. NOTE: This parameter will only be returned when a task is executed. Value:

    • NoStart: Not started
    • Checking: check the backup
    • Preparing: Prepare a backup
    • Waiting: Waiting for backup
    • Uploading: Upload backup
    • Finished: Complete backup
    • Failed: backup Failed
    endTime String
    The end time.
    ids List<String>
    A list of Backup IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    startTime String
    The start time.
    dbInstanceId string
    The db instance id.
    backupMode string
    BackupMode.
    backupStatus string
    Backup task status. NOTE: This parameter will only be returned when a task is executed. Value:

    • NoStart: Not started
    • Checking: check the backup
    • Preparing: Prepare a backup
    • Waiting: Waiting for backup
    • Uploading: Upload backup
    • Finished: Complete backup
    • Failed: backup Failed
    endTime string
    The end time.
    ids string[]
    A list of Backup IDs.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    startTime string
    The start time.
    db_instance_id str
    The db instance id.
    backup_mode str
    BackupMode.
    backup_status str
    Backup task status. NOTE: This parameter will only be returned when a task is executed. Value:

    • NoStart: Not started
    • Checking: check the backup
    • Preparing: Prepare a backup
    • Waiting: Waiting for backup
    • Uploading: Upload backup
    • Finished: Complete backup
    • Failed: backup Failed
    end_time str
    The end time.
    ids Sequence[str]
    A list of Backup IDs.
    output_file str
    File name where to save data source results (after running pulumi preview).
    start_time str
    The start time.
    dbInstanceId String
    The db instance id.
    backupMode String
    BackupMode.
    backupStatus String
    Backup task status. NOTE: This parameter will only be returned when a task is executed. Value:

    • NoStart: Not started
    • Checking: check the backup
    • Preparing: Prepare a backup
    • Waiting: Waiting for backup
    • Uploading: Upload backup
    • Finished: Complete backup
    • Failed: backup Failed
    endTime String
    The end time.
    ids List<String>
    A list of Backup IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    startTime String
    The start time.

    getRdsBackups Result

    The following output properties are available:

    Backups List<Pulumi.AliCloud.Rds.Outputs.GetRdsBackupsBackup>
    DbInstanceId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    BackupMode string
    BackupStatus string
    EndTime string
    OutputFile string
    StartTime string
    Backups []GetRdsBackupsBackup
    DbInstanceId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    BackupMode string
    BackupStatus string
    EndTime string
    OutputFile string
    StartTime string
    backups List<GetRdsBackupsBackup>
    dbInstanceId String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    backupMode String
    backupStatus String
    endTime String
    outputFile String
    startTime String
    backups GetRdsBackupsBackup[]
    dbInstanceId string
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    backupMode string
    backupStatus string
    endTime string
    outputFile string
    startTime string
    backups Sequence[GetRdsBackupsBackup]
    db_instance_id str
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    backup_mode str
    backup_status str
    end_time str
    output_file str
    start_time str
    backups List<Property Map>
    dbInstanceId String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    backupMode String
    backupStatus String
    endTime String
    outputFile String
    startTime String

    Supporting Types

    GetRdsBackupsBackup

    BackupDownloadUrl string
    The backup download url.
    BackupEndTime string
    BackupEndTime.
    BackupId string
    BackupId.
    BackupInitiator string
    The initiator of the backup task. Value:

    • System: automatically initiated by the System
    • User: manually initiated by the User.
    BackupIntranetDownloadUrl string
    The backup intranet download url.
    BackupMethod string
    BackupMethod.
    BackupMode string
    BackupMode.
    BackupSize string
    BackupSize.
    BackupStartTime string
    BackupStartTime.
    BackupStatus string
    Backup task status. NOTE: This parameter will only be returned when a task is executed. Value:

    • NoStart: Not started
    • Checking: check the backup
    • Preparing: Prepare a backup
    • Waiting: Waiting for backup
    • Uploading: Upload backup
    • Finished: Complete backup
    • Failed: backup Failed
    BackupType string
    BackupType.
    ConsistentTime string
    The consistency point of the backup set. The return value is a timestamp. NOTE: only MySQL 5.6 returns this parameter, and other versions return 0.
    CopyOnlyBackup string
    The backup mode is divided into the normal backup mode (full and incremental recovery is supported) and the replication-only mode (full recovery is supported only). NOTE: Only SQL Server returns this parameter. Valid values:

    • 0: General Backup Mode
    • 1: Copy only mode
    DbInstanceId string
    The db instance id.
    Encryption string
    The encrypted information of the backup set.
    HostInstanceId string
    HostInstanceID.
    Id string
    The ID of the Backup.
    IsAvail int
    Whether the backup set is available, the value is:

    • 0: Not available
    • 1: Available.
    MetaStatus string
    The backup set status of the database table. NOTE: an empty string indicates that the backup set for database table recovery is not enabled. Valid values:

    • OK: normal.
    • LARGE: There are too many tables that cannot be used for database and table recovery.
    • EMPTY: The backup set that failed to be backed up.
    StorageClass string
    The storage medium for the backup set. Valid values:

    • 0: Regular storage
    • 1: Archive storage.
    StoreStatus string
    StoreStatus.
    BackupDownloadUrl string
    The backup download url.
    BackupEndTime string
    BackupEndTime.
    BackupId string
    BackupId.
    BackupInitiator string
    The initiator of the backup task. Value:

    • System: automatically initiated by the System
    • User: manually initiated by the User.
    BackupIntranetDownloadUrl string
    The backup intranet download url.
    BackupMethod string
    BackupMethod.
    BackupMode string
    BackupMode.
    BackupSize string
    BackupSize.
    BackupStartTime string
    BackupStartTime.
    BackupStatus string
    Backup task status. NOTE: This parameter will only be returned when a task is executed. Value:

    • NoStart: Not started
    • Checking: check the backup
    • Preparing: Prepare a backup
    • Waiting: Waiting for backup
    • Uploading: Upload backup
    • Finished: Complete backup
    • Failed: backup Failed
    BackupType string
    BackupType.
    ConsistentTime string
    The consistency point of the backup set. The return value is a timestamp. NOTE: only MySQL 5.6 returns this parameter, and other versions return 0.
    CopyOnlyBackup string
    The backup mode is divided into the normal backup mode (full and incremental recovery is supported) and the replication-only mode (full recovery is supported only). NOTE: Only SQL Server returns this parameter. Valid values:

    • 0: General Backup Mode
    • 1: Copy only mode
    DbInstanceId string
    The db instance id.
    Encryption string
    The encrypted information of the backup set.
    HostInstanceId string
    HostInstanceID.
    Id string
    The ID of the Backup.
    IsAvail int
    Whether the backup set is available, the value is:

    • 0: Not available
    • 1: Available.
    MetaStatus string
    The backup set status of the database table. NOTE: an empty string indicates that the backup set for database table recovery is not enabled. Valid values:

    • OK: normal.
    • LARGE: There are too many tables that cannot be used for database and table recovery.
    • EMPTY: The backup set that failed to be backed up.
    StorageClass string
    The storage medium for the backup set. Valid values:

    • 0: Regular storage
    • 1: Archive storage.
    StoreStatus string
    StoreStatus.
    backupDownloadUrl String
    The backup download url.
    backupEndTime String
    BackupEndTime.
    backupId String
    BackupId.
    backupInitiator String
    The initiator of the backup task. Value:

    • System: automatically initiated by the System
    • User: manually initiated by the User.
    backupIntranetDownloadUrl String
    The backup intranet download url.
    backupMethod String
    BackupMethod.
    backupMode String
    BackupMode.
    backupSize String
    BackupSize.
    backupStartTime String
    BackupStartTime.
    backupStatus String
    Backup task status. NOTE: This parameter will only be returned when a task is executed. Value:

    • NoStart: Not started
    • Checking: check the backup
    • Preparing: Prepare a backup
    • Waiting: Waiting for backup
    • Uploading: Upload backup
    • Finished: Complete backup
    • Failed: backup Failed
    backupType String
    BackupType.
    consistentTime String
    The consistency point of the backup set. The return value is a timestamp. NOTE: only MySQL 5.6 returns this parameter, and other versions return 0.
    copyOnlyBackup String
    The backup mode is divided into the normal backup mode (full and incremental recovery is supported) and the replication-only mode (full recovery is supported only). NOTE: Only SQL Server returns this parameter. Valid values:

    • 0: General Backup Mode
    • 1: Copy only mode
    dbInstanceId String
    The db instance id.
    encryption String
    The encrypted information of the backup set.
    hostInstanceId String
    HostInstanceID.
    id String
    The ID of the Backup.
    isAvail Integer
    Whether the backup set is available, the value is:

    • 0: Not available
    • 1: Available.
    metaStatus String
    The backup set status of the database table. NOTE: an empty string indicates that the backup set for database table recovery is not enabled. Valid values:

    • OK: normal.
    • LARGE: There are too many tables that cannot be used for database and table recovery.
    • EMPTY: The backup set that failed to be backed up.
    storageClass String
    The storage medium for the backup set. Valid values:

    • 0: Regular storage
    • 1: Archive storage.
    storeStatus String
    StoreStatus.
    backupDownloadUrl string
    The backup download url.
    backupEndTime string
    BackupEndTime.
    backupId string
    BackupId.
    backupInitiator string
    The initiator of the backup task. Value:

    • System: automatically initiated by the System
    • User: manually initiated by the User.
    backupIntranetDownloadUrl string
    The backup intranet download url.
    backupMethod string
    BackupMethod.
    backupMode string
    BackupMode.
    backupSize string
    BackupSize.
    backupStartTime string
    BackupStartTime.
    backupStatus string
    Backup task status. NOTE: This parameter will only be returned when a task is executed. Value:

    • NoStart: Not started
    • Checking: check the backup
    • Preparing: Prepare a backup
    • Waiting: Waiting for backup
    • Uploading: Upload backup
    • Finished: Complete backup
    • Failed: backup Failed
    backupType string
    BackupType.
    consistentTime string
    The consistency point of the backup set. The return value is a timestamp. NOTE: only MySQL 5.6 returns this parameter, and other versions return 0.
    copyOnlyBackup string
    The backup mode is divided into the normal backup mode (full and incremental recovery is supported) and the replication-only mode (full recovery is supported only). NOTE: Only SQL Server returns this parameter. Valid values:

    • 0: General Backup Mode
    • 1: Copy only mode
    dbInstanceId string
    The db instance id.
    encryption string
    The encrypted information of the backup set.
    hostInstanceId string
    HostInstanceID.
    id string
    The ID of the Backup.
    isAvail number
    Whether the backup set is available, the value is:

    • 0: Not available
    • 1: Available.
    metaStatus string
    The backup set status of the database table. NOTE: an empty string indicates that the backup set for database table recovery is not enabled. Valid values:

    • OK: normal.
    • LARGE: There are too many tables that cannot be used for database and table recovery.
    • EMPTY: The backup set that failed to be backed up.
    storageClass string
    The storage medium for the backup set. Valid values:

    • 0: Regular storage
    • 1: Archive storage.
    storeStatus string
    StoreStatus.
    backup_download_url str
    The backup download url.
    backup_end_time str
    BackupEndTime.
    backup_id str
    BackupId.
    backup_initiator str
    The initiator of the backup task. Value:

    • System: automatically initiated by the System
    • User: manually initiated by the User.
    backup_intranet_download_url str
    The backup intranet download url.
    backup_method str
    BackupMethod.
    backup_mode str
    BackupMode.
    backup_size str
    BackupSize.
    backup_start_time str
    BackupStartTime.
    backup_status str
    Backup task status. NOTE: This parameter will only be returned when a task is executed. Value:

    • NoStart: Not started
    • Checking: check the backup
    • Preparing: Prepare a backup
    • Waiting: Waiting for backup
    • Uploading: Upload backup
    • Finished: Complete backup
    • Failed: backup Failed
    backup_type str
    BackupType.
    consistent_time str
    The consistency point of the backup set. The return value is a timestamp. NOTE: only MySQL 5.6 returns this parameter, and other versions return 0.
    copy_only_backup str
    The backup mode is divided into the normal backup mode (full and incremental recovery is supported) and the replication-only mode (full recovery is supported only). NOTE: Only SQL Server returns this parameter. Valid values:

    • 0: General Backup Mode
    • 1: Copy only mode
    db_instance_id str
    The db instance id.
    encryption str
    The encrypted information of the backup set.
    host_instance_id str
    HostInstanceID.
    id str
    The ID of the Backup.
    is_avail int
    Whether the backup set is available, the value is:

    • 0: Not available
    • 1: Available.
    meta_status str
    The backup set status of the database table. NOTE: an empty string indicates that the backup set for database table recovery is not enabled. Valid values:

    • OK: normal.
    • LARGE: There are too many tables that cannot be used for database and table recovery.
    • EMPTY: The backup set that failed to be backed up.
    storage_class str
    The storage medium for the backup set. Valid values:

    • 0: Regular storage
    • 1: Archive storage.
    store_status str
    StoreStatus.
    backupDownloadUrl String
    The backup download url.
    backupEndTime String
    BackupEndTime.
    backupId String
    BackupId.
    backupInitiator String
    The initiator of the backup task. Value:

    • System: automatically initiated by the System
    • User: manually initiated by the User.
    backupIntranetDownloadUrl String
    The backup intranet download url.
    backupMethod String
    BackupMethod.
    backupMode String
    BackupMode.
    backupSize String
    BackupSize.
    backupStartTime String
    BackupStartTime.
    backupStatus String
    Backup task status. NOTE: This parameter will only be returned when a task is executed. Value:

    • NoStart: Not started
    • Checking: check the backup
    • Preparing: Prepare a backup
    • Waiting: Waiting for backup
    • Uploading: Upload backup
    • Finished: Complete backup
    • Failed: backup Failed
    backupType String
    BackupType.
    consistentTime String
    The consistency point of the backup set. The return value is a timestamp. NOTE: only MySQL 5.6 returns this parameter, and other versions return 0.
    copyOnlyBackup String
    The backup mode is divided into the normal backup mode (full and incremental recovery is supported) and the replication-only mode (full recovery is supported only). NOTE: Only SQL Server returns this parameter. Valid values:

    • 0: General Backup Mode
    • 1: Copy only mode
    dbInstanceId String
    The db instance id.
    encryption String
    The encrypted information of the backup set.
    hostInstanceId String
    HostInstanceID.
    id String
    The ID of the Backup.
    isAvail Number
    Whether the backup set is available, the value is:

    • 0: Not available
    • 1: Available.
    metaStatus String
    The backup set status of the database table. NOTE: an empty string indicates that the backup set for database table recovery is not enabled. Valid values:

    • OK: normal.
    • LARGE: There are too many tables that cannot be used for database and table recovery.
    • EMPTY: The backup set that failed to be backed up.
    storageClass String
    The storage medium for the backup set. Valid values:

    • 0: Regular storage
    • 1: Archive storage.
    storeStatus String
    StoreStatus.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi