1. Packages
  2. Alicloud Provider
  3. API Docs
  4. cassandra
  5. getBackupPlans
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.cassandra.getBackupPlans

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    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);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.cassandra.get_backup_plans(cluster_id="example_value")
    pulumi.export("firstCassandraBackupPlanId", example.plans[0].id)
    
    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
    	})
    }
    
    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),
        };
    });
    
    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()));
        }
    }
    
    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
    File name where to save data source results (after running pulumi preview).
    ClusterId string
    The ID of the cluster for the backup.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    clusterId String
    The ID of the cluster for the backup.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    clusterId string
    The ID of the cluster for the backup.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    cluster_id str
    The ID of the cluster for the backup.
    output_file str
    File name where to save data source results (after running pulumi preview).
    clusterId String
    The ID of the cluster for the backup.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    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
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi