Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 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 dictionary
The following arguments are supported:
- Db
Instance stringId - The db instance id.
- Backup
Mode string - BackupMode. Valid values:
Automated
andManual
. - Backup
Status string - Backup task status. Valid values:
Automated
andManual
. - End
Time string - The end time.
- Ids List<string>
- A list of Backup IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Start
Time string - The start time.
- Db
Instance stringId - The db instance id.
- Backup
Mode string - BackupMode. Valid values:
Automated
andManual
. - Backup
Status string - Backup task status. Valid values:
Automated
andManual
. - End
Time string - The end time.
- Ids []string
- A list of Backup IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Start
Time string - The start time.
- db
Instance StringId - The db instance id.
- backup
Mode String - BackupMode. Valid values:
Automated
andManual
. - backup
Status String - Backup task status. Valid values:
Automated
andManual
. - end
Time String - The end time.
- ids List<String>
- A list of Backup IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
). - start
Time String - The start time.
- db
Instance stringId - The db instance id.
- backup
Mode string - BackupMode. Valid values:
Automated
andManual
. - backup
Status string - Backup task status. Valid values:
Automated
andManual
. - end
Time string - The end time.
- ids string[]
- A list of Backup IDs.
- output
File string - File name where to save data source results (after running
pulumi preview
). - start
Time string - The start time.
- db_
instance_ strid - The db instance id.
- backup_
mode str - BackupMode. Valid values:
Automated
andManual
. - backup_
status str - Backup task status. Valid values:
Automated
andManual
. - 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.
- db
Instance StringId - The db instance id.
- backup
Mode String - BackupMode. Valid values:
Automated
andManual
. - backup
Status String - Backup task status. Valid values:
Automated
andManual
. - end
Time String - The end time.
- ids List<String>
- A list of Backup IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
). - start
Time String - The start time.
getRdsBackups Result
The following output properties are available:
- Backups
List<Pulumi.
Ali Cloud. Rds. Outputs. Get Rds Backups Backup> - Db
Instance stringId - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Backup
Mode string - Backup
Status string - End
Time string - Output
File string - Start
Time string
- Backups
[]Get
Rds Backups Backup - Db
Instance stringId - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Backup
Mode string - Backup
Status string - End
Time string - Output
File string - Start
Time string
- backups
List<Get
Rds Backups Backup> - db
Instance StringId - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- backup
Mode String - backup
Status String - end
Time String - output
File String - start
Time String
- backups
Get
Rds Backups Backup[] - db
Instance stringId - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- backup
Mode string - backup
Status string - end
Time string - output
File string - start
Time string
- backups
Sequence[Get
Rds 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>
- db
Instance StringId - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- backup
Mode String - backup
Status String - end
Time String - output
File String - start
Time String
Supporting Types
GetRdsBackupsBackup
- Backup
Download stringUrl - The backup download url.
- Backup
End stringTime - BackupEndTime.
- Backup
Id string - BackupId.
- Backup
Initiator string - The initiator of the backup task. Value:
- System: automatically initiated by the System
- User: manually initiated by the User.
- Backup
Intranet stringDownload Url - The backup intranet download url.
- Backup
Method string - BackupMethod.
- Backup
Mode string - BackupMode.
- Backup
Size string - BackupSize.
- Backup
Start stringTime - BackupStartTime.
- Backup
Status 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
- Backup
Type string - BackupType.
- Consistent
Time 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.
- Copy
Only 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
- Db
Instance stringId - The db instance id.
- Encryption string
- The encrypted information of the backup set.
- Host
Instance stringId - HostInstanceID.
- Id string
- The ID of the Backup.
- Is
Avail int - Whether the backup set is available, the value is:
- 0: Not available
- 1: Available.
- Meta
Status 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.
- Storage
Class string - The storage medium for the backup set. Valid values:
- 0: Regular storage
- 1: Archive storage.
- Store
Status string - StoreStatus.
- Backup
Download stringUrl - The backup download url.
- Backup
End stringTime - BackupEndTime.
- Backup
Id string - BackupId.
- Backup
Initiator string - The initiator of the backup task. Value:
- System: automatically initiated by the System
- User: manually initiated by the User.
- Backup
Intranet stringDownload Url - The backup intranet download url.
- Backup
Method string - BackupMethod.
- Backup
Mode string - BackupMode.
- Backup
Size string - BackupSize.
- Backup
Start stringTime - BackupStartTime.
- Backup
Status 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
- Backup
Type string - BackupType.
- Consistent
Time 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.
- Copy
Only 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
- Db
Instance stringId - The db instance id.
- Encryption string
- The encrypted information of the backup set.
- Host
Instance stringId - HostInstanceID.
- Id string
- The ID of the Backup.
- Is
Avail int - Whether the backup set is available, the value is:
- 0: Not available
- 1: Available.
- Meta
Status 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.
- Storage
Class string - The storage medium for the backup set. Valid values:
- 0: Regular storage
- 1: Archive storage.
- Store
Status string - StoreStatus.
- backup
Download StringUrl - The backup download url.
- backup
End StringTime - BackupEndTime.
- backup
Id String - BackupId.
- backup
Initiator String - The initiator of the backup task. Value:
- System: automatically initiated by the System
- User: manually initiated by the User.
- backup
Intranet StringDownload Url - The backup intranet download url.
- backup
Method String - BackupMethod.
- backup
Mode String - BackupMode.
- backup
Size String - BackupSize.
- backup
Start StringTime - BackupStartTime.
- backup
Status 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
- backup
Type String - BackupType.
- consistent
Time 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.
- copy
Only 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
- db
Instance StringId - The db instance id.
- encryption String
- The encrypted information of the backup set.
- host
Instance StringId - HostInstanceID.
- id String
- The ID of the Backup.
- is
Avail Integer - Whether the backup set is available, the value is:
- 0: Not available
- 1: Available.
- meta
Status 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.
- storage
Class String - The storage medium for the backup set. Valid values:
- 0: Regular storage
- 1: Archive storage.
- store
Status String - StoreStatus.
- backup
Download stringUrl - The backup download url.
- backup
End stringTime - BackupEndTime.
- backup
Id string - BackupId.
- backup
Initiator string - The initiator of the backup task. Value:
- System: automatically initiated by the System
- User: manually initiated by the User.
- backup
Intranet stringDownload Url - The backup intranet download url.
- backup
Method string - BackupMethod.
- backup
Mode string - BackupMode.
- backup
Size string - BackupSize.
- backup
Start stringTime - BackupStartTime.
- backup
Status 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
- backup
Type string - BackupType.
- consistent
Time 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.
- copy
Only 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
- db
Instance stringId - The db instance id.
- encryption string
- The encrypted information of the backup set.
- host
Instance stringId - HostInstanceID.
- id string
- The ID of the Backup.
- is
Avail number - Whether the backup set is available, the value is:
- 0: Not available
- 1: Available.
- meta
Status 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.
- storage
Class string - The storage medium for the backup set. Valid values:
- 0: Regular storage
- 1: Archive storage.
- store
Status 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.
- backup
Download StringUrl - The backup download url.
- backup
End StringTime - BackupEndTime.
- backup
Id String - BackupId.
- backup
Initiator String - The initiator of the backup task. Value:
- System: automatically initiated by the System
- User: manually initiated by the User.
- backup
Intranet StringDownload Url - The backup intranet download url.
- backup
Method String - BackupMethod.
- backup
Mode String - BackupMode.
- backup
Size String - BackupSize.
- backup
Start StringTime - BackupStartTime.
- backup
Status 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
- backup
Type String - BackupType.
- consistent
Time 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.
- copy
Only 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
- db
Instance StringId - The db instance id.
- encryption String
- The encrypted information of the backup set.
- host
Instance StringId - HostInstanceID.
- id String
- The ID of the Backup.
- is
Avail Number - Whether the backup set is available, the value is:
- 0: Not available
- 1: Available.
- meta
Status 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.
- storage
Class String - The storage medium for the backup set. Valid values:
- 0: Regular storage
- 1: Archive storage.
- store
Status 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.