Viewing docs for ucloud 1.39.3
published on Wednesday, Mar 11, 2026 by ucloud
published on Wednesday, Mar 11, 2026 by ucloud
Viewing docs for ucloud 1.39.3
published on Wednesday, Mar 11, 2026 by ucloud
published on Wednesday, Mar 11, 2026 by ucloud
This data source provides a list of database backups according to their name, availability zone and project.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ucloud from "@pulumi/ucloud";
const example = ucloud.getDbBackups({
availabilityZone: "cn-bj2-05",
nameRegex: "init.*",
});
export const backups = example.then(example => example.dbBackups);
import pulumi
import pulumi_ucloud as ucloud
example = ucloud.get_db_backups(availability_zone="cn-bj2-05",
name_regex="init.*")
pulumi.export("backups", example.db_backups)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ucloud/ucloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := ucloud.GetDbBackups(ctx, &ucloud.GetDbBackupsArgs{
AvailabilityZone: pulumi.StringRef("cn-bj2-05"),
NameRegex: pulumi.StringRef("init.*"),
}, nil)
if err != nil {
return err
}
ctx.Export("backups", example.DbBackups)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ucloud = Pulumi.Ucloud;
return await Deployment.RunAsync(() =>
{
var example = Ucloud.GetDbBackups.Invoke(new()
{
AvailabilityZone = "cn-bj2-05",
NameRegex = "init.*",
});
return new Dictionary<string, object?>
{
["backups"] = example.Apply(getDbBackupsResult => getDbBackupsResult.DbBackups),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ucloud.UcloudFunctions;
import com.pulumi.ucloud.inputs.GetDbBackupsArgs;
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 = UcloudFunctions.getDbBackups(GetDbBackupsArgs.builder()
.availabilityZone("cn-bj2-05")
.nameRegex("init.*")
.build());
ctx.export("backups", example.dbBackups());
}
}
variables:
example:
fn::invoke:
function: ucloud:getDbBackups
arguments:
availabilityZone: cn-bj2-05
nameRegex: init.*
outputs:
backups: ${example.dbBackups}
Using getDbBackups
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 getDbBackups(args: GetDbBackupsArgs, opts?: InvokeOptions): Promise<GetDbBackupsResult>
function getDbBackupsOutput(args: GetDbBackupsOutputArgs, opts?: InvokeOptions): Output<GetDbBackupsResult>def get_db_backups(availability_zone: Optional[str] = None,
id: Optional[str] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
project_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDbBackupsResult
def get_db_backups_output(availability_zone: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDbBackupsResult]func GetDbBackups(ctx *Context, args *GetDbBackupsArgs, opts ...InvokeOption) (*GetDbBackupsResult, error)
func GetDbBackupsOutput(ctx *Context, args *GetDbBackupsOutputArgs, opts ...InvokeOption) GetDbBackupsResultOutput> Note: This function is named GetDbBackups in the Go SDK.
public static class GetDbBackups
{
public static Task<GetDbBackupsResult> InvokeAsync(GetDbBackupsArgs args, InvokeOptions? opts = null)
public static Output<GetDbBackupsResult> Invoke(GetDbBackupsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDbBackupsResult> getDbBackups(GetDbBackupsArgs args, InvokeOptions options)
public static Output<GetDbBackupsResult> getDbBackups(GetDbBackupsArgs args, InvokeOptions options)
fn::invoke:
function: ucloud:index/getDbBackups:getDbBackups
arguments:
# arguments dictionaryThe following arguments are supported:
- Availability
Zone string - Availability zone where database instances are located. Such as: "cn-bj2-02". You may refer to list of availability zone
- Id string
- Name
Regex string - A regex string to filter backups by name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Project
Id string - id of the projects to which the backups belong
- Availability
Zone string - Availability zone where database instances are located. Such as: "cn-bj2-02". You may refer to list of availability zone
- Id string
- Name
Regex string - A regex string to filter backups by name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Project
Id string - id of the projects to which the backups belong
- availability
Zone String - Availability zone where database instances are located. Such as: "cn-bj2-02". You may refer to list of availability zone
- id String
- name
Regex String - A regex string to filter backups by name.
- output
File String - File name where to save data source results (after running
pulumi preview). - project
Id String - id of the projects to which the backups belong
- availability
Zone string - Availability zone where database instances are located. Such as: "cn-bj2-02". You may refer to list of availability zone
- id string
- name
Regex string - A regex string to filter backups by name.
- output
File string - File name where to save data source results (after running
pulumi preview). - project
Id string - id of the projects to which the backups belong
- availability_
zone str - Availability zone where database instances are located. Such as: "cn-bj2-02". You may refer to list of availability zone
- id str
- name_
regex str - A regex string to filter backups by name.
- output_
file str - File name where to save data source results (after running
pulumi preview). - project_
id str - id of the projects to which the backups belong
- availability
Zone String - Availability zone where database instances are located. Such as: "cn-bj2-02". You may refer to list of availability zone
- id String
- name
Regex String - A regex string to filter backups by name.
- output
File String - File name where to save data source results (after running
pulumi preview). - project
Id String - id of the projects to which the backups belong
getDbBackups Result
The following output properties are available:
- Db
Backups List<GetDb Backups Db Backup> - It is a nested type which documented below.
- Id string
- Total
Count double - Total number of database backups that satisfy the condition.
- Availability
Zone string - Name
Regex string - Output
File string - Project
Id string
- Db
Backups []GetDb Backups Db Backup - It is a nested type which documented below.
- Id string
- Total
Count float64 - Total number of database backups that satisfy the condition.
- Availability
Zone string - Name
Regex string - Output
File string - Project
Id string
- db
Backups List<GetDb Backups Db Backup> - It is a nested type which documented below.
- id String
- total
Count Double - Total number of database backups that satisfy the condition.
- availability
Zone String - name
Regex String - output
File String - project
Id String
- db
Backups GetDb Backups Db Backup[] - It is a nested type which documented below.
- id string
- total
Count number - Total number of database backups that satisfy the condition.
- availability
Zone string - name
Regex string - output
File string - project
Id string
- db_
backups Sequence[GetDb Backups Db Backup] - It is a nested type which documented below.
- id str
- total_
count float - Total number of database backups that satisfy the condition.
- availability_
zone str - name_
regex str - output_
file str - project_
id str
- db
Backups List<Property Map> - It is a nested type which documented below.
- id String
- total
Count Number - Total number of database backups that satisfy the condition.
- availability
Zone String - name
Regex String - output
File String - project
Id String
Supporting Types
GetDbBackupsDbBackup
- Backup
End stringTime - time when the backup was completed
- Backup
Id double - id of the database backup which can used to seed new database instance
- Backup
Name string - name of the database backup
- Backup
Size double - size of the database backup in bytes
- Backup
Time string - time when the backup was created
- Backup
Type double - type of backup, 0: auto-backup, 1: manual-backup
- Backup
Zone string - availability zone where the backup database locates, empty for non-master-slave instances
- Db
Id string - id of the database instance
- Db
Name string - name of the database instance
- State string
- State of backup
- Zone string
- availability zone where the database instance locates
- Backup
End stringTime - time when the backup was completed
- Backup
Id float64 - id of the database backup which can used to seed new database instance
- Backup
Name string - name of the database backup
- Backup
Size float64 - size of the database backup in bytes
- Backup
Time string - time when the backup was created
- Backup
Type float64 - type of backup, 0: auto-backup, 1: manual-backup
- Backup
Zone string - availability zone where the backup database locates, empty for non-master-slave instances
- Db
Id string - id of the database instance
- Db
Name string - name of the database instance
- State string
- State of backup
- Zone string
- availability zone where the database instance locates
- backup
End StringTime - time when the backup was completed
- backup
Id Double - id of the database backup which can used to seed new database instance
- backup
Name String - name of the database backup
- backup
Size Double - size of the database backup in bytes
- backup
Time String - time when the backup was created
- backup
Type Double - type of backup, 0: auto-backup, 1: manual-backup
- backup
Zone String - availability zone where the backup database locates, empty for non-master-slave instances
- db
Id String - id of the database instance
- db
Name String - name of the database instance
- state String
- State of backup
- zone String
- availability zone where the database instance locates
- backup
End stringTime - time when the backup was completed
- backup
Id number - id of the database backup which can used to seed new database instance
- backup
Name string - name of the database backup
- backup
Size number - size of the database backup in bytes
- backup
Time string - time when the backup was created
- backup
Type number - type of backup, 0: auto-backup, 1: manual-backup
- backup
Zone string - availability zone where the backup database locates, empty for non-master-slave instances
- db
Id string - id of the database instance
- db
Name string - name of the database instance
- state string
- State of backup
- zone string
- availability zone where the database instance locates
- backup_
end_ strtime - time when the backup was completed
- backup_
id float - id of the database backup which can used to seed new database instance
- backup_
name str - name of the database backup
- backup_
size float - size of the database backup in bytes
- backup_
time str - time when the backup was created
- backup_
type float - type of backup, 0: auto-backup, 1: manual-backup
- backup_
zone str - availability zone where the backup database locates, empty for non-master-slave instances
- db_
id str - id of the database instance
- db_
name str - name of the database instance
- state str
- State of backup
- zone str
- availability zone where the database instance locates
- backup
End StringTime - time when the backup was completed
- backup
Id Number - id of the database backup which can used to seed new database instance
- backup
Name String - name of the database backup
- backup
Size Number - size of the database backup in bytes
- backup
Time String - time when the backup was created
- backup
Type Number - type of backup, 0: auto-backup, 1: manual-backup
- backup
Zone String - availability zone where the backup database locates, empty for non-master-slave instances
- db
Id String - id of the database instance
- db
Name String - name of the database instance
- state String
- State of backup
- zone String
- availability zone where the database instance locates
Package Details
- Repository
- ucloud ucloud/terraform-provider-ucloud
- License
- Notes
- This Pulumi package is based on the
ucloudTerraform Provider.
Viewing docs for ucloud 1.39.3
published on Wednesday, Mar 11, 2026 by ucloud
published on Wednesday, Mar 11, 2026 by ucloud
