get Backup Plans
This data source provides the Dbs Backup Plans of the current Alibaba Cloud user.
NOTE: Available in v1.185.0+.
Example Usage
Basic Usage
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();
ctx.export("dbsBackupPlanId1", ids.applyValue(getBackupPlansResult -> getBackupPlansResult.plans()[0].id()));
final var nameRegex = DbsFunctions.getBackupPlans(GetBackupPlansArgs.builder()
.nameRegex("^my-BackupPlan")
.build());
ctx.export("dbsBackupPlanId2", nameRegex.applyValue(getBackupPlansResult -> getBackupPlansResult.plans()[0].id()));
}
}
Content copied to clipboard
Return
A collection of values returned by getBackupPlans.
Parameters
argument
A collection of arguments for invoking getBackupPlans.
suspend fun getBackupPlans(backupPlanName: String? = null, enableDetails: Boolean? = null, ids: List<String>? = null, nameRegex: String? = null, outputFile: String? = null, pageNumber: Int? = null, pageSize: Int? = null, status: String? = null): GetBackupPlansResult
Return
A collection of values returned by getBackupPlans.
See also
Parameters
backup Plan Name
The name of the resource.
enable Details
Default to true
. Set it to false
can hide the payment_type
to output.
ids
A list of Backup Plan IDs.
name Regex
A regex string to filter results by Backup Plan name.
output File
File name where to save data source results (after running pulumi preview
).
page Number
page Size
status
The status of the resource.
suspend fun getBackupPlans(argument: suspend GetBackupPlansPlainArgsBuilder.() -> Unit): GetBackupPlansResult
Return
A collection of values returned by getBackupPlans.
See also
Parameters
argument
Builder for com.pulumi.alicloud.dbs.kotlin.inputs.GetBackupPlansPlainArgs.