Alibaba Cloud v3.88.0 published on Saturday, Nov 1, 2025 by Pulumi
alicloud.dbs.getBackupPlans
This data source provides the Dbs Backup Plans of the current Alibaba Cloud user.
NOTE: Available in v1.185.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.dbs.getBackupPlans({});
export const dbsBackupPlanId1 = ids.then(ids => ids.plans?.[0]?.id);
const nameRegex = alicloud.dbs.getBackupPlans({
nameRegex: "^my-BackupPlan",
});
export const dbsBackupPlanId2 = nameRegex.then(nameRegex => nameRegex.plans?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.dbs.get_backup_plans()
pulumi.export("dbsBackupPlanId1", ids.plans[0].id)
name_regex = alicloud.dbs.get_backup_plans(name_regex="^my-BackupPlan")
pulumi.export("dbsBackupPlanId2", name_regex.plans[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dbs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := dbs.GetBackupPlans(ctx, &dbs.GetBackupPlansArgs{}, nil)
if err != nil {
return err
}
ctx.Export("dbsBackupPlanId1", ids.Plans[0].Id)
nameRegex, err := dbs.GetBackupPlans(ctx, &dbs.GetBackupPlansArgs{
NameRegex: pulumi.StringRef("^my-BackupPlan"),
}, nil)
if err != nil {
return err
}
ctx.Export("dbsBackupPlanId2", nameRegex.Plans[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.DBS.GetBackupPlans.Invoke();
var nameRegex = AliCloud.DBS.GetBackupPlans.Invoke(new()
{
NameRegex = "^my-BackupPlan",
});
return new Dictionary<string, object?>
{
["dbsBackupPlanId1"] = ids.Apply(getBackupPlansResult => getBackupPlansResult.Plans[0]?.Id),
["dbsBackupPlanId2"] = nameRegex.Apply(getBackupPlansResult => getBackupPlansResult.Plans[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.dbs.DbsFunctions;
import com.pulumi.alicloud.dbs.inputs.GetBackupPlansArgs;
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 ids = DbsFunctions.getBackupPlans(GetBackupPlansArgs.builder()
.build());
ctx.export("dbsBackupPlanId1", ids.plans()[0].id());
final var nameRegex = DbsFunctions.getBackupPlans(GetBackupPlansArgs.builder()
.nameRegex("^my-BackupPlan")
.build());
ctx.export("dbsBackupPlanId2", nameRegex.plans()[0].id());
}
}
variables:
ids:
fn::invoke:
function: alicloud:dbs:getBackupPlans
arguments: {}
nameRegex:
fn::invoke:
function: alicloud:dbs:getBackupPlans
arguments:
nameRegex: ^my-BackupPlan
outputs:
dbsBackupPlanId1: ${ids.plans[0].id}
dbsBackupPlanId2: ${nameRegex.plans[0].id}
Using getBackupPlans
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 getBackupPlans(args: GetBackupPlansArgs, opts?: InvokeOptions): Promise<GetBackupPlansResult>
function getBackupPlansOutput(args: GetBackupPlansOutputArgs, opts?: InvokeOptions): Output<GetBackupPlansResult>def get_backup_plans(backup_plan_name: Optional[str] = None,
enable_details: Optional[bool] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
page_number: Optional[int] = None,
page_size: Optional[int] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetBackupPlansResult
def get_backup_plans_output(backup_plan_name: Optional[pulumi.Input[str]] = None,
enable_details: Optional[pulumi.Input[bool]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
page_number: Optional[pulumi.Input[int]] = None,
page_size: Optional[pulumi.Input[int]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetBackupPlansResult]func GetBackupPlans(ctx *Context, args *GetBackupPlansArgs, opts ...InvokeOption) (*GetBackupPlansResult, error)
func GetBackupPlansOutput(ctx *Context, args *GetBackupPlansOutputArgs, opts ...InvokeOption) GetBackupPlansResultOutput> Note: This function is named GetBackupPlans in the Go SDK.
public static class GetBackupPlans
{
public static Task<GetBackupPlansResult> InvokeAsync(GetBackupPlansArgs args, InvokeOptions? opts = null)
public static Output<GetBackupPlansResult> Invoke(GetBackupPlansInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetBackupPlansResult> getBackupPlans(GetBackupPlansArgs args, InvokeOptions options)
public static Output<GetBackupPlansResult> getBackupPlans(GetBackupPlansArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:dbs/getBackupPlans:getBackupPlans
arguments:
# arguments dictionaryThe following arguments are supported:
- Backup
Plan stringName - The name of the resource.
- Enable
Details bool - Default to
true. Set it tofalsecan hide thepayment_typeto output. - Ids List<string>
- A list of Backup Plan IDs.
- Name
Regex string - A regex string to filter results by Backup Plan name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Page
Number int - Page
Size int - Status string
- The status of the resource. Valid values:
check_pass,init,locked,pause,running,stop,wait.
- Backup
Plan stringName - The name of the resource.
- Enable
Details bool - Default to
true. Set it tofalsecan hide thepayment_typeto output. - Ids []string
- A list of Backup Plan IDs.
- Name
Regex string - A regex string to filter results by Backup Plan name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Page
Number int - Page
Size int - Status string
- The status of the resource. Valid values:
check_pass,init,locked,pause,running,stop,wait.
- backup
Plan StringName - The name of the resource.
- enable
Details Boolean - Default to
true. Set it tofalsecan hide thepayment_typeto output. - ids List<String>
- A list of Backup Plan IDs.
- name
Regex String - A regex string to filter results by Backup Plan name.
- output
File String - File name where to save data source results (after running
pulumi preview). - page
Number Integer - page
Size Integer - status String
- The status of the resource. Valid values:
check_pass,init,locked,pause,running,stop,wait.
- backup
Plan stringName - The name of the resource.
- enable
Details boolean - Default to
true. Set it tofalsecan hide thepayment_typeto output. - ids string[]
- A list of Backup Plan IDs.
- name
Regex string - A regex string to filter results by Backup Plan name.
- output
File string - File name where to save data source results (after running
pulumi preview). - page
Number number - page
Size number - status string
- The status of the resource. Valid values:
check_pass,init,locked,pause,running,stop,wait.
- backup_
plan_ strname - The name of the resource.
- enable_
details bool - Default to
true. Set it tofalsecan hide thepayment_typeto output. - ids Sequence[str]
- A list of Backup Plan IDs.
- name_
regex str - A regex string to filter results by Backup Plan name.
- output_
file str - File name where to save data source results (after running
pulumi preview). - page_
number int - page_
size int - status str
- The status of the resource. Valid values:
check_pass,init,locked,pause,running,stop,wait.
- backup
Plan StringName - The name of the resource.
- enable
Details Boolean - Default to
true. Set it tofalsecan hide thepayment_typeto output. - ids List<String>
- A list of Backup Plan IDs.
- name
Regex String - A regex string to filter results by Backup Plan name.
- output
File String - File name where to save data source results (after running
pulumi preview). - page
Number Number - page
Size Number - status String
- The status of the resource. Valid values:
check_pass,init,locked,pause,running,stop,wait.
getBackupPlans Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Plans
List<Pulumi.
Ali Cloud. DBS. Outputs. Get Backup Plans Plan> - Backup
Plan stringName - Enable
Details bool - Name
Regex string - Output
File string - Page
Number int - Page
Size int - Status string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Plans
[]Get
Backup Plans Plan - Backup
Plan stringName - Enable
Details bool - Name
Regex string - Output
File string - Page
Number int - Page
Size int - Status string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- plans
List<Get
Backup Plans Plan> - backup
Plan StringName - enable
Details Boolean - name
Regex String - output
File String - page
Number Integer - page
Size Integer - status String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- plans
Get
Backup Plans Plan[] - backup
Plan stringName - enable
Details boolean - name
Regex string - output
File string - page
Number number - page
Size number - status string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- plans
Sequence[Get
Backup Plans Plan] - backup_
plan_ strname - enable_
details bool - name_
regex str - output_
file str - page_
number int - page_
size int - status str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- plans List<Property Map>
- backup
Plan StringName - enable
Details Boolean - name
Regex String - output
File String - page
Number Number - page
Size Number - status String
Supporting Types
GetBackupPlansPlan
- Backup
Gateway stringId - The ID of the backup gateway.
- Backup
Method string - The Backup method.
- Backup
Objects string - The backup object.
- Backup
Period string - Full backup cycle.
- Backup
Plan stringId - The first ID of the resource.
- Backup
Plan stringName - The name of the resource.
- Backup
Retention intPeriod - The retention time of backup data.
- Backup
Start stringTime - The start time of full Backup.
- Backup
Storage stringType - Built-in storage type.
- Cross
Aliyun stringId - The UID that is backed up across Alibaba cloud accounts.
- Cross
Role stringName - The name of the RAM role that is backed up across Alibaba cloud accounts.
- Database
Type string - The database type.
- Duplication
Archive intPeriod - The storage time for conversion to archive cold standby is 365 days by default.
- Duplication
Infrequent intAccess Period - The storage time is converted to low-frequency access. The default time is 180 days.
- Enable
Backup boolLog - Whether to enable incremental log Backup.
- Id string
- The ID of the Backup Plan.
- Instance
Class string - The Instance class.
- Oss
Bucket stringName - The OSS Bucket name.
- Payment
Type string - The payment type of the resource.
- Resource
Group stringId - The ID of the resource group.
- Source
Endpoint stringDatabase Name - The name of the database.
- Source
Endpoint stringInstance Id - The ID of the database instance.
- Source
Endpoint stringInstance Type - The location of the database.
- Source
Endpoint stringRegion - The region of the database.
- Source
Endpoint stringSid - The Oracle SID name.
- Source
Endpoint stringUser Name - The source endpoint username.
- Status string
- The status of the resource.
- Backup
Gateway stringId - The ID of the backup gateway.
- Backup
Method string - The Backup method.
- Backup
Objects string - The backup object.
- Backup
Period string - Full backup cycle.
- Backup
Plan stringId - The first ID of the resource.
- Backup
Plan stringName - The name of the resource.
- Backup
Retention intPeriod - The retention time of backup data.
- Backup
Start stringTime - The start time of full Backup.
- Backup
Storage stringType - Built-in storage type.
- Cross
Aliyun stringId - The UID that is backed up across Alibaba cloud accounts.
- Cross
Role stringName - The name of the RAM role that is backed up across Alibaba cloud accounts.
- Database
Type string - The database type.
- Duplication
Archive intPeriod - The storage time for conversion to archive cold standby is 365 days by default.
- Duplication
Infrequent intAccess Period - The storage time is converted to low-frequency access. The default time is 180 days.
- Enable
Backup boolLog - Whether to enable incremental log Backup.
- Id string
- The ID of the Backup Plan.
- Instance
Class string - The Instance class.
- Oss
Bucket stringName - The OSS Bucket name.
- Payment
Type string - The payment type of the resource.
- Resource
Group stringId - The ID of the resource group.
- Source
Endpoint stringDatabase Name - The name of the database.
- Source
Endpoint stringInstance Id - The ID of the database instance.
- Source
Endpoint stringInstance Type - The location of the database.
- Source
Endpoint stringRegion - The region of the database.
- Source
Endpoint stringSid - The Oracle SID name.
- Source
Endpoint stringUser Name - The source endpoint username.
- Status string
- The status of the resource.
- backup
Gateway StringId - The ID of the backup gateway.
- backup
Method String - The Backup method.
- backup
Objects String - The backup object.
- backup
Period String - Full backup cycle.
- backup
Plan StringId - The first ID of the resource.
- backup
Plan StringName - The name of the resource.
- backup
Retention IntegerPeriod - The retention time of backup data.
- backup
Start StringTime - The start time of full Backup.
- backup
Storage StringType - Built-in storage type.
- cross
Aliyun StringId - The UID that is backed up across Alibaba cloud accounts.
- cross
Role StringName - The name of the RAM role that is backed up across Alibaba cloud accounts.
- database
Type String - The database type.
- duplication
Archive IntegerPeriod - The storage time for conversion to archive cold standby is 365 days by default.
- duplication
Infrequent IntegerAccess Period - The storage time is converted to low-frequency access. The default time is 180 days.
- enable
Backup BooleanLog - Whether to enable incremental log Backup.
- id String
- The ID of the Backup Plan.
- instance
Class String - The Instance class.
- oss
Bucket StringName - The OSS Bucket name.
- payment
Type String - The payment type of the resource.
- resource
Group StringId - The ID of the resource group.
- source
Endpoint StringDatabase Name - The name of the database.
- source
Endpoint StringInstance Id - The ID of the database instance.
- source
Endpoint StringInstance Type - The location of the database.
- source
Endpoint StringRegion - The region of the database.
- source
Endpoint StringSid - The Oracle SID name.
- source
Endpoint StringUser Name - The source endpoint username.
- status String
- The status of the resource.
- backup
Gateway stringId - The ID of the backup gateway.
- backup
Method string - The Backup method.
- backup
Objects string - The backup object.
- backup
Period string - Full backup cycle.
- backup
Plan stringId - The first ID of the resource.
- backup
Plan stringName - The name of the resource.
- backup
Retention numberPeriod - The retention time of backup data.
- backup
Start stringTime - The start time of full Backup.
- backup
Storage stringType - Built-in storage type.
- cross
Aliyun stringId - The UID that is backed up across Alibaba cloud accounts.
- cross
Role stringName - The name of the RAM role that is backed up across Alibaba cloud accounts.
- database
Type string - The database type.
- duplication
Archive numberPeriod - The storage time for conversion to archive cold standby is 365 days by default.
- duplication
Infrequent numberAccess Period - The storage time is converted to low-frequency access. The default time is 180 days.
- enable
Backup booleanLog - Whether to enable incremental log Backup.
- id string
- The ID of the Backup Plan.
- instance
Class string - The Instance class.
- oss
Bucket stringName - The OSS Bucket name.
- payment
Type string - The payment type of the resource.
- resource
Group stringId - The ID of the resource group.
- source
Endpoint stringDatabase Name - The name of the database.
- source
Endpoint stringInstance Id - The ID of the database instance.
- source
Endpoint stringInstance Type - The location of the database.
- source
Endpoint stringRegion - The region of the database.
- source
Endpoint stringSid - The Oracle SID name.
- source
Endpoint stringUser Name - The source endpoint username.
- status string
- The status of the resource.
- backup_
gateway_ strid - The ID of the backup gateway.
- backup_
method str - The Backup method.
- backup_
objects str - The backup object.
- backup_
period str - Full backup cycle.
- backup_
plan_ strid - The first ID of the resource.
- backup_
plan_ strname - The name of the resource.
- backup_
retention_ intperiod - The retention time of backup data.
- backup_
start_ strtime - The start time of full Backup.
- backup_
storage_ strtype - Built-in storage type.
- cross_
aliyun_ strid - The UID that is backed up across Alibaba cloud accounts.
- cross_
role_ strname - The name of the RAM role that is backed up across Alibaba cloud accounts.
- database_
type str - The database type.
- duplication_
archive_ intperiod - The storage time for conversion to archive cold standby is 365 days by default.
- duplication_
infrequent_ intaccess_ period - The storage time is converted to low-frequency access. The default time is 180 days.
- enable_
backup_ boollog - Whether to enable incremental log Backup.
- id str
- The ID of the Backup Plan.
- instance_
class str - The Instance class.
- oss_
bucket_ strname - The OSS Bucket name.
- payment_
type str - The payment type of the resource.
- resource_
group_ strid - The ID of the resource group.
- source_
endpoint_ strdatabase_ name - The name of the database.
- source_
endpoint_ strinstance_ id - The ID of the database instance.
- source_
endpoint_ strinstance_ type - The location of the database.
- source_
endpoint_ strregion - The region of the database.
- source_
endpoint_ strsid - The Oracle SID name.
- source_
endpoint_ struser_ name - The source endpoint username.
- status str
- The status of the resource.
- backup
Gateway StringId - The ID of the backup gateway.
- backup
Method String - The Backup method.
- backup
Objects String - The backup object.
- backup
Period String - Full backup cycle.
- backup
Plan StringId - The first ID of the resource.
- backup
Plan StringName - The name of the resource.
- backup
Retention NumberPeriod - The retention time of backup data.
- backup
Start StringTime - The start time of full Backup.
- backup
Storage StringType - Built-in storage type.
- cross
Aliyun StringId - The UID that is backed up across Alibaba cloud accounts.
- cross
Role StringName - The name of the RAM role that is backed up across Alibaba cloud accounts.
- database
Type String - The database type.
- duplication
Archive NumberPeriod - The storage time for conversion to archive cold standby is 365 days by default.
- duplication
Infrequent NumberAccess Period - The storage time is converted to low-frequency access. The default time is 180 days.
- enable
Backup BooleanLog - Whether to enable incremental log Backup.
- id String
- The ID of the Backup Plan.
- instance
Class String - The Instance class.
- oss
Bucket StringName - The OSS Bucket name.
- payment
Type String - The payment type of the resource.
- resource
Group StringId - The ID of the resource group.
- source
Endpoint StringDatabase Name - The name of the database.
- source
Endpoint StringInstance Id - The ID of the database instance.
- source
Endpoint StringInstance Type - The location of the database.
- source
Endpoint StringRegion - The region of the database.
- source
Endpoint StringSid - The Oracle SID name.
- source
Endpoint StringUser Name - The source endpoint username.
- status String
- The status of the resource.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
