Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.rds.getRdsBackups
Explore with Pulumi AI
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 dictionaryThe following arguments are supported:
- DbInstance stringId 
- The db instance id.
- BackupMode string
- BackupMode. Valid values: AutomatedandManual.
- BackupStatus string
- Backup task status. Valid values: AutomatedandManual.
- 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.
- DbInstance stringId 
- The db instance id.
- BackupMode string
- BackupMode. Valid values: AutomatedandManual.
- BackupStatus string
- Backup task status. Valid values: AutomatedandManual.
- 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.
- dbInstance StringId 
- The db instance id.
- backupMode String
- BackupMode. Valid values: AutomatedandManual.
- backupStatus String
- Backup task status. Valid values: AutomatedandManual.
- 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.
- dbInstance stringId 
- The db instance id.
- backupMode string
- BackupMode. Valid values: AutomatedandManual.
- backupStatus string
- Backup task status. Valid values: AutomatedandManual.
- 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_ strid 
- The db instance id.
- backup_mode str
- BackupMode. Valid values: AutomatedandManual.
- backup_status str
- Backup task status. Valid values: AutomatedandManual.
- 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.
- dbInstance StringId 
- The db instance id.
- backupMode String
- BackupMode. Valid values: AutomatedandManual.
- backupStatus String
- Backup task status. Valid values: AutomatedandManual.
- 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.Ali Cloud. Rds. Outputs. Get Rds Backups Backup> 
- DbInstance stringId 
- 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
[]GetRds Backups Backup 
- DbInstance stringId 
- 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<GetRds Backups Backup> 
- dbInstance StringId 
- 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
GetRds Backups Backup[] 
- dbInstance stringId 
- 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[GetRds Backups Backup] 
- db_instance_ strid 
- 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>
- dbInstance StringId 
- 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   
- BackupDownload stringUrl 
- The backup download url.
- BackupEnd stringTime 
- 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.
 
- BackupIntranet stringDownload Url 
- The backup intranet download url.
- BackupMethod string
- BackupMethod.
- BackupMode string
- BackupMode.
- BackupSize string
- BackupSize.
- BackupStart stringTime 
- 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.
- CopyOnly stringBackup 
- 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
 
- DbInstance stringId 
- The db instance id.
- Encryption string
- The encrypted information of the backup set.
- HostInstance stringId 
- 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.
- BackupDownload stringUrl 
- The backup download url.
- BackupEnd stringTime 
- 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.
 
- BackupIntranet stringDownload Url 
- The backup intranet download url.
- BackupMethod string
- BackupMethod.
- BackupMode string
- BackupMode.
- BackupSize string
- BackupSize.
- BackupStart stringTime 
- 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.
- CopyOnly stringBackup 
- 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
 
- DbInstance stringId 
- The db instance id.
- Encryption string
- The encrypted information of the backup set.
- HostInstance stringId 
- 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.
- backupDownload StringUrl 
- The backup download url.
- backupEnd StringTime 
- 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.
 
- backupIntranet StringDownload Url 
- The backup intranet download url.
- backupMethod String
- BackupMethod.
- backupMode String
- BackupMode.
- backupSize String
- BackupSize.
- backupStart StringTime 
- 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.
- copyOnly StringBackup 
- 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
 
- dbInstance StringId 
- The db instance id.
- encryption String
- The encrypted information of the backup set.
- hostInstance StringId 
- 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.
- backupDownload stringUrl 
- The backup download url.
- backupEnd stringTime 
- 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.
 
- backupIntranet stringDownload Url 
- The backup intranet download url.
- backupMethod string
- BackupMethod.
- backupMode string
- BackupMode.
- backupSize string
- BackupSize.
- backupStart stringTime 
- 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.
- copyOnly stringBackup 
- 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
 
- dbInstance stringId 
- The db instance id.
- encryption string
- The encrypted information of the backup set.
- hostInstance stringId 
- 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_ strurl 
- The backup download url.
- backup_end_ strtime 
- 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_ strdownload_ url 
- The backup intranet download url.
- backup_method str
- BackupMethod.
- backup_mode str
- BackupMode.
- backup_size str
- BackupSize.
- backup_start_ strtime 
- 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_ strbackup 
- 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_ strid 
- The db instance id.
- encryption str
- The encrypted information of the backup set.
- host_instance_ strid 
- 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.
- backupDownload StringUrl 
- The backup download url.
- backupEnd StringTime 
- 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.
 
- backupIntranet StringDownload Url 
- The backup intranet download url.
- backupMethod String
- BackupMethod.
- backupMode String
- BackupMode.
- backupSize String
- BackupSize.
- backupStart StringTime 
- 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.
- copyOnly StringBackup 
- 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
 
- dbInstance StringId 
- The db instance id.
- encryption String
- The encrypted information of the backup set.
- hostInstance StringId 
- 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 alicloudTerraform Provider.