get Backup Plans
This data source provides the Cassandra Backup Plans of the current Alibaba Cloud user.
NOTE: Available in v1.128.0+. DEPRECATED: This data source has been deprecated from version
1.220.0
.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = alicloud.cassandra.getBackupPlans({
clusterId: "example_value",
});
export const firstCassandraBackupPlanId = example.then(example => example.plans?.[0]?.id);
Content copied to clipboard
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.cassandra.get_backup_plans(cluster_id="example_value")
pulumi.export("firstCassandraBackupPlanId", example.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 example = AliCloud.Cassandra.GetBackupPlans.Invoke(new()
{
ClusterId = "example_value",
});
return new Dictionary<string, object?>
{
["firstCassandraBackupPlanId"] = example.Apply(getBackupPlansResult => getBackupPlansResult.Plans[0]?.Id),
};
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cassandra"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := cassandra.GetBackupPlans(ctx, &cassandra.GetBackupPlansArgs{
ClusterId: "example_value",
}, nil)
if err != nil {
return err
}
ctx.Export("firstCassandraBackupPlanId", example.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.cassandra.CassandraFunctions;
import com.pulumi.alicloud.cassandra.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 example = CassandraFunctions.getBackupPlans(GetBackupPlansArgs.builder()
.clusterId("example_value")
.build());
ctx.export("firstCassandraBackupPlanId", example.plans()[0].id());
}
}
Content copied to clipboard
variables:
example:
fn::invoke:
function: alicloud:cassandra:getBackupPlans
arguments:
clusterId: example_value
outputs:
firstCassandraBackupPlanId: ${example.plans[0].id}
Content copied to clipboard
Return
A collection of values returned by getBackupPlans.
Parameters
argument
A collection of arguments for invoking getBackupPlans.
Return
A collection of values returned by getBackupPlans.
Parameters
cluster Id
The ID of the cluster for the backup.
output File
File name where to save data source results (after running pulumi preview
).
See also
suspend fun getBackupPlans(argument: suspend GetBackupPlansPlainArgsBuilder.() -> Unit): GetBackupPlansResult
Return
A collection of values returned by getBackupPlans.
Parameters
argument
Builder for com.pulumi.alicloud.cassandra.kotlin.inputs.GetBackupPlansPlainArgs.