getOtsBackupPlans

This data source provides the Hbr OtsBackupPlans of the current Alibaba Cloud user.

NOTE: Available in v1.163.0+.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.hbr.getOtsBackupPlans({
nameRegex: "^my-otsBackupPlan",
});
export const hbrOtsBackupPlanId = plans[0].id;
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.hbr.get_ots_backup_plans(name_regex="^my-otsBackupPlan")
pulumi.export("hbrOtsBackupPlanId", plans[0]["id"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Hbr.GetOtsBackupPlans.Invoke(new()
{
NameRegex = "^my-otsBackupPlan",
});
return new Dictionary<string, object?>
{
["hbrOtsBackupPlanId"] = plans[0].Id,
};
});
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 {
_, err := hbr.GetOtsBackupPlans(ctx, &hbr.GetOtsBackupPlansArgs{
NameRegex: pulumi.StringRef("^my-otsBackupPlan"),
}, nil)
if err != nil {
return err
}
ctx.Export("hbrOtsBackupPlanId", plans[0].Id)
return nil
})
}
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.GetOtsBackupPlansArgs;
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.getOtsBackupPlans(GetOtsBackupPlansArgs.builder()
.nameRegex("^my-otsBackupPlan")
.build());
ctx.export("hbrOtsBackupPlanId", plans[0].id());
}
}
variables:
ids:
fn::invoke:
function: alicloud:hbr:getOtsBackupPlans
arguments:
nameRegex: ^my-otsBackupPlan
outputs:
hbrOtsBackupPlanId: ${plans[0].id}

Return

A collection of values returned by getOtsBackupPlans.

Parameters

argument

A collection of arguments for invoking getOtsBackupPlans.


suspend fun getOtsBackupPlans(ids: List<String>? = null, nameRegex: String? = null, outputFile: String? = null, planId: String? = null, planName: String? = null, vaultId: String? = null): GetOtsBackupPlansResult

Return

A collection of values returned by getOtsBackupPlans.

Parameters

ids

A list of OtsBackupPlan IDs.

nameRegex

A regex string to filter results by OtsBackupPlan name.

outputFile

File name where to save data source results (after running pulumi preview).

planId

The ID of the backup plan.

planName

The ID of the backup plan.

vaultId

The ID of backup vault the OtsBackupPlan used.

See also


Return

A collection of values returned by getOtsBackupPlans.

Parameters

argument

Builder for com.pulumi.alicloud.hbr.kotlin.inputs.GetOtsBackupPlansPlainArgs.

See also