Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.cassandra.getBackupPlans
Explore with Pulumi AI
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:
- Cluster
Id string - The ID of the cluster for the backup.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Cluster
Id string - The ID of the cluster for the backup.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- cluster
Id String - The ID of the cluster for the backup.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- cluster
Id string - The ID of the cluster for the backup.
- output
File 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
).
- cluster
Id String - The ID of the cluster for the backup.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getBackupPlans Result
The following output properties are available:
- Cluster
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Plans
List<Pulumi.
Ali Cloud. Cassandra. Outputs. Get Backup Plans Plan> - Output
File string
- Cluster
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Plans
[]Get
Backup Plans Plan - Output
File string
- cluster
Id String - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- plans
List<Get
Backup Plans Plan> - output
File String
- cluster
Id string - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- plans
Get
Backup Plans Plan[] - output
File string
- cluster_
id str - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- plans
Sequence[Get
Backup Plans Plan] - output_
file str
- cluster
Id String - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- plans List<Property Map>
- output
File String
Supporting Types
GetBackupPlansPlan
- Active bool
- Specifies whether to activate the backup plan.
- Backup
Period string - The backup cycle. Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday.
- Backup
Time string - The start time of the backup task each day. The time is displayed in UTC and denoted by Z.
- Cluster
Id string - The ID of the cluster for the backup.
- Create
Time string - The time when the backup plan was created.
- Data
Center stringId - The ID of the data center for the backup in the cluster.
- Id string
- 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 bool
- Specifies whether to activate the backup plan.
- Backup
Period string - The backup cycle. Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday.
- Backup
Time string - The start time of the backup task each day. The time is displayed in UTC and denoted by Z.
- Cluster
Id string - The ID of the cluster for the backup.
- Create
Time string - The time when the backup plan was created.
- Data
Center stringId - The ID of the data center for the backup in the cluster.
- Id string
- 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.
- backup
Period String - The backup cycle. Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday.
- backup
Time String - The start time of the backup task each day. The time is displayed in UTC and denoted by Z.
- cluster
Id String - The ID of the cluster for the backup.
- create
Time String - The time when the backup plan was created.
- data
Center StringId - The ID of the data center for the backup in the cluster.
- id String
- The ID of the Backup Plan.
- retention
Period 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.
- backup
Period string - The backup cycle. Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday.
- backup
Time string - The start time of the backup task each day. The time is displayed in UTC and denoted by Z.
- cluster
Id string - The ID of the cluster for the backup.
- create
Time string - The time when the backup plan was created.
- data
Center stringId - The ID of the data center for the backup in the cluster.
- id string
- The ID of the Backup Plan.
- retention
Period 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_ strid - 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.
- backup
Period String - The backup cycle. Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday.
- backup
Time String - The start time of the backup task each day. The time is displayed in UTC and denoted by Z.
- cluster
Id String - The ID of the cluster for the backup.
- create
Time String - The time when the backup plan was created.
- data
Center StringId - The ID of the data center for the backup in the cluster.
- id String
- The ID of the Backup Plan.
- retention
Period 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.