Alibaba Cloud

v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

getBackupPlans

This data source provides the Cassandra Backup Plans of the current Alibaba Cloud user.

NOTE: Available in v1.128.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(AliCloud.Cassandra.GetBackupPlans.InvokeAsync(new AliCloud.Cassandra.GetBackupPlansArgs
        {
            ClusterId = "example_value",
        }));
        this.FirstCassandraBackupPlanId = example.Apply(example => example.Plans?[0]?.Id);
    }

    [Output("firstCassandraBackupPlanId")]
    public Output<string> FirstCassandraBackupPlanId { get; set; }
}
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
	})
}
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.applyValue(getBackupPlansResult -> getBackupPlansResult.plans()[0].id()));
    }
}
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.cassandra.get_backup_plans(cluster_id="example_value")
pulumi.export("firstCassandraBackupPlanId", example.plans[0].id)
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);
variables:
  example:
    Fn::Invoke:
      Function: alicloud:cassandra:getBackupPlans
      Arguments:
        clusterId: example_value
outputs:
  firstCassandraBackupPlanId: ${example.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(cluster_id: Optional[str] = None,
                     output_file: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetBackupPlansResult
def get_backup_plans_output(cluster_id: Optional[pulumi.Input[str]] = None,
                     output_file: 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)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: alicloud:cassandra/getBackupPlans:getBackupPlans
  Arguments:
    # Arguments dictionary

The following arguments are supported:

ClusterId string

The ID of the cluster for the backup.

OutputFile string
ClusterId string

The ID of the cluster for the backup.

OutputFile string
clusterId String

The ID of the cluster for the backup.

outputFile String
clusterId string

The ID of the cluster for the backup.

outputFile string
cluster_id str

The ID of the cluster for the backup.

output_file str
clusterId String

The ID of the cluster for the backup.

outputFile String

getBackupPlans Result

The following output properties are available:

ClusterId string
Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
Plans List<Pulumi.AliCloud.Cassandra.Outputs.GetBackupPlansPlan>
OutputFile string
ClusterId string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
Plans []GetBackupPlansPlan
OutputFile string
clusterId String
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
plans List<GetBackupPlansPlan>
outputFile String
clusterId string
id string

The provider-assigned unique ID for this managed resource.

ids string[]
plans GetBackupPlansPlan[]
outputFile string
cluster_id str
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
plans Sequence[GetBackupPlansPlan]
output_file str
clusterId String
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
plans List<Property Map>
outputFile String

Supporting Types

GetBackupPlansPlan

Active bool

Specifies whether to activate the backup plan.

BackupPeriod string

The backup cycle. Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday.

BackupTime string

The start time of the backup task each day. The time is displayed in UTC and denoted by Z.

ClusterId string

The ID of the cluster for the backup.

CreateTime string

The time when the backup plan was created.

DataCenterId string

The ID of the data center for the backup in the cluster.

Id string

The ID of the Backup Plan.

RetentionPeriod int

The duration for which you want to retain the backup. Valid values: 1 to 30. Unit: days.

Active bool

Specifies whether to activate the backup plan.

BackupPeriod string

The backup cycle. Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday.

BackupTime string

The start time of the backup task each day. The time is displayed in UTC and denoted by Z.

ClusterId string

The ID of the cluster for the backup.

CreateTime string

The time when the backup plan was created.

DataCenterId string

The ID of the data center for the backup in the cluster.

Id string

The ID of the Backup Plan.

RetentionPeriod int

The duration for which you want to retain the backup. Valid values: 1 to 30. Unit: days.

active Boolean

Specifies whether to activate the backup plan.

backupPeriod String

The backup cycle. Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday.

backupTime String

The start time of the backup task each day. The time is displayed in UTC and denoted by Z.

clusterId String

The ID of the cluster for the backup.

createTime String

The time when the backup plan was created.

dataCenterId String

The ID of the data center for the backup in the cluster.

id String

The ID of the Backup Plan.

retentionPeriod Integer

The duration for which you want to retain the backup. Valid values: 1 to 30. Unit: days.

active boolean

Specifies whether to activate the backup plan.

backupPeriod string

The backup cycle. Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday.

backupTime string

The start time of the backup task each day. The time is displayed in UTC and denoted by Z.

clusterId string

The ID of the cluster for the backup.

createTime string

The time when the backup plan was created.

dataCenterId string

The ID of the data center for the backup in the cluster.

id string

The ID of the Backup Plan.

retentionPeriod number

The duration for which you want to retain the backup. Valid values: 1 to 30. Unit: days.

active bool

Specifies whether to activate the backup plan.

backup_period str

The backup cycle. Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday.

backup_time str

The start time of the backup task each day. The time is displayed in UTC and denoted by Z.

cluster_id str

The ID of the cluster for the backup.

create_time str

The time when the backup plan was created.

data_center_id str

The ID of the data center for the backup in the cluster.

id str

The ID of the Backup Plan.

retention_period int

The duration for which you want to retain the backup. Valid values: 1 to 30. Unit: days.

active Boolean

Specifies whether to activate the backup plan.

backupPeriod String

The backup cycle. Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday.

backupTime String

The start time of the backup task each day. The time is displayed in UTC and denoted by Z.

clusterId String

The ID of the cluster for the backup.

createTime String

The time when the backup plan was created.

dataCenterId String

The ID of the data center for the backup in the cluster.

id String

The ID of the Backup Plan.

retentionPeriod Number

The duration for which you want to retain the backup. Valid values: 1 to 30. Unit: days.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.