get Hana Backup Plans
This data source provides the Hbr Hana Backup Plans of the current Alibaba Cloud user.
NOTE: Available in v1.179.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.hbr.getHanaBackupPlans({
clusterId: "example_value",
ids: [
"example_value-1",
"example_value-2",
],
});
export const hbrHanaBackupPlanId1 = ids.then(ids => ids.plans?.[0]?.id);
Content copied to clipboard
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.hbr.get_hana_backup_plans(cluster_id="example_value",
ids=[
"example_value-1",
"example_value-2",
])
pulumi.export("hbrHanaBackupPlanId1", ids.plans[0].id)
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Hbr.GetHanaBackupPlans.Invoke(new()
{
ClusterId = "example_value",
Ids = new[]
{
"example_value-1",
"example_value-2",
},
});
return new Dictionary<string, object?>
{
["hbrHanaBackupPlanId1"] = ids.Apply(getHanaBackupPlansResult => getHanaBackupPlansResult.Plans[0]?.Id),
};
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/hbr"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := hbr.GetHanaBackupPlans(ctx, &hbr.GetHanaBackupPlansArgs{
ClusterId: "example_value",
Ids: []string{
"example_value-1",
"example_value-2",
},
}, nil)
if err != nil {
return err
}
ctx.Export("hbrHanaBackupPlanId1", ids.Plans[0].Id)
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.hbr.HbrFunctions;
import com.pulumi.alicloud.hbr.inputs.GetHanaBackupPlansArgs;
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 = HbrFunctions.getHanaBackupPlans(GetHanaBackupPlansArgs.builder()
.clusterId("example_value")
.ids(
"example_value-1",
"example_value-2")
.build());
ctx.export("hbrHanaBackupPlanId1", ids.plans()[0].id());
}
}
Content copied to clipboard
variables:
ids:
fn::invoke:
function: alicloud:hbr:getHanaBackupPlans
arguments:
clusterId: example_value
ids:
- example_value-1
- example_value-2
outputs:
hbrHanaBackupPlanId1: ${ids.plans[0].id}
Content copied to clipboard
Return
A collection of values returned by getHanaBackupPlans.
Parameters
argument
A collection of arguments for invoking getHanaBackupPlans.
suspend fun getHanaBackupPlans(clusterId: String, databaseName: String? = null, ids: List<String>? = null, nameRegex: String? = null, outputFile: String? = null, pageNumber: Int? = null, pageSize: Int? = null, vaultId: String? = null): GetHanaBackupPlansResult
Return
A collection of values returned by getHanaBackupPlans.
Parameters
cluster Id
database Name
The name of the database.
ids
A list of Hana Backup Plan IDs.
name Regex
A regex string to filter results by Hana Backup Plan name.
output File
File name where to save data source results (after running pulumi preview
).
page Number
page Size
vault Id
The id of the vault.
See also
suspend fun getHanaBackupPlans(argument: suspend GetHanaBackupPlansPlainArgsBuilder.() -> Unit): GetHanaBackupPlansResult
Return
A collection of values returned by getHanaBackupPlans.
Parameters
argument
Builder for com.pulumi.alicloud.hbr.kotlin.inputs.GetHanaBackupPlansPlainArgs.