alicloud.clickhouse.getBackupPolicies
Explore with Pulumi AI
This data source provides the Click House Backup Policies of the current Alibaba Cloud user.
NOTE: Available in v1.147.0+.
Example Usage
Basic Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = AliCloud.ClickHouse.GetBackupPolicies.Invoke(new()
{
DbClusterId = "example_value",
});
return new Dictionary<string, object?>
{
["clickHouseBackupPolicyId1"] = example.Apply(getBackupPoliciesResult => getBackupPoliciesResult.Policies[0]?.Id),
};
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/clickhouse"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := clickhouse.GetBackupPolicies(ctx, &clickhouse.GetBackupPoliciesArgs{
DbClusterId: "example_value",
}, nil)
if err != nil {
return err
}
ctx.Export("clickHouseBackupPolicyId1", example.Policies[0].Id)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.clickhouse.ClickhouseFunctions;
import com.pulumi.alicloud.clickhouse.inputs.GetBackupPoliciesArgs;
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 = ClickhouseFunctions.getBackupPolicies(GetBackupPoliciesArgs.builder()
.dbClusterId("example_value")
.build());
ctx.export("clickHouseBackupPolicyId1", example.applyValue(getBackupPoliciesResult -> getBackupPoliciesResult.policies()[0].id()));
}
}
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.clickhouse.get_backup_policies(db_cluster_id="example_value")
pulumi.export("clickHouseBackupPolicyId1", example.policies[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = alicloud.clickhouse.getBackupPolicies({
dbClusterId: "example_value",
});
export const clickHouseBackupPolicyId1 = example.then(example => example.policies?.[0]?.id);
variables:
example:
fn::invoke:
Function: alicloud:clickhouse:getBackupPolicies
Arguments:
dbClusterId: example_value
outputs:
clickHouseBackupPolicyId1: ${example.policies[0].id}
Using getBackupPolicies
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 getBackupPolicies(args: GetBackupPoliciesArgs, opts?: InvokeOptions): Promise<GetBackupPoliciesResult>
function getBackupPoliciesOutput(args: GetBackupPoliciesOutputArgs, opts?: InvokeOptions): Output<GetBackupPoliciesResult>
def get_backup_policies(db_cluster_id: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetBackupPoliciesResult
def get_backup_policies_output(db_cluster_id: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetBackupPoliciesResult]
func GetBackupPolicies(ctx *Context, args *GetBackupPoliciesArgs, opts ...InvokeOption) (*GetBackupPoliciesResult, error)
func GetBackupPoliciesOutput(ctx *Context, args *GetBackupPoliciesOutputArgs, opts ...InvokeOption) GetBackupPoliciesResultOutput
> Note: This function is named GetBackupPolicies
in the Go SDK.
public static class GetBackupPolicies
{
public static Task<GetBackupPoliciesResult> InvokeAsync(GetBackupPoliciesArgs args, InvokeOptions? opts = null)
public static Output<GetBackupPoliciesResult> Invoke(GetBackupPoliciesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetBackupPoliciesResult> getBackupPolicies(GetBackupPoliciesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:clickhouse/getBackupPolicies:getBackupPolicies
arguments:
# arguments dictionary
The following arguments are supported:
- Db
Cluster stringId The db cluster id.
- Output
File string File name where to save data source results (after running
pulumi preview
).
- Db
Cluster stringId The db cluster id.
- Output
File string File name where to save data source results (after running
pulumi preview
).
- db
Cluster StringId The db cluster id.
- output
File String File name where to save data source results (after running
pulumi preview
).
- db
Cluster stringId The db cluster id.
- output
File string File name where to save data source results (after running
pulumi preview
).
- db_
cluster_ strid The db cluster id.
- output_
file str File name where to save data source results (after running
pulumi preview
).
- db
Cluster StringId The db cluster id.
- output
File String File name where to save data source results (after running
pulumi preview
).
getBackupPolicies Result
The following output properties are available:
- Db
Cluster stringId - Id string
The provider-assigned unique ID for this managed resource.
- Policies
List<Pulumi.
Ali Cloud. Click House. Outputs. Get Backup Policies Policy> - Output
File string
- Db
Cluster stringId - Id string
The provider-assigned unique ID for this managed resource.
- Policies
[]Get
Backup Policies Policy - Output
File string
- db
Cluster StringId - id String
The provider-assigned unique ID for this managed resource.
- policies
List<Get
Backup Policies Policy> - output
File String
- db
Cluster stringId - id string
The provider-assigned unique ID for this managed resource.
- policies
Get
Backup Policies Policy[] - output
File string
- db_
cluster_ strid - id str
The provider-assigned unique ID for this managed resource.
- policies
Sequence[Get
Backup Policies Policy] - output_
file str
- db
Cluster StringId - id String
The provider-assigned unique ID for this managed resource.
- policies List<Property Map>
- output
File String
Supporting Types
GetBackupPoliciesPolicy
- Backup
Retention intPeriod Data backup days. Valid values:
7
to730
.- Db
Cluster stringId The db cluster id.
- Id string
The ID of the Backup Policy.
- Preferred
Backup List<string>Periods DBCluster Backup period.
- Preferred
Backup stringTime Backup Time, UTC time.
- Status string
The status of the resource.
- Backup
Retention intPeriod Data backup days. Valid values:
7
to730
.- Db
Cluster stringId The db cluster id.
- Id string
The ID of the Backup Policy.
- Preferred
Backup []stringPeriods DBCluster Backup period.
- Preferred
Backup stringTime Backup Time, UTC time.
- Status string
The status of the resource.
- backup
Retention IntegerPeriod Data backup days. Valid values:
7
to730
.- db
Cluster StringId The db cluster id.
- id String
The ID of the Backup Policy.
- preferred
Backup List<String>Periods DBCluster Backup period.
- preferred
Backup StringTime Backup Time, UTC time.
- status String
The status of the resource.
- backup
Retention numberPeriod Data backup days. Valid values:
7
to730
.- db
Cluster stringId The db cluster id.
- id string
The ID of the Backup Policy.
- preferred
Backup string[]Periods DBCluster Backup period.
- preferred
Backup stringTime Backup Time, UTC time.
- status string
The status of the resource.
- backup_
retention_ intperiod Data backup days. Valid values:
7
to730
.- db_
cluster_ strid The db cluster id.
- id str
The ID of the Backup Policy.
- preferred_
backup_ Sequence[str]periods DBCluster Backup period.
- preferred_
backup_ strtime Backup Time, UTC time.
- status str
The status of the resource.
- backup
Retention NumberPeriod Data backup days. Valid values:
7
to730
.- db
Cluster StringId The db cluster id.
- id String
The ID of the Backup Policy.
- preferred
Backup List<String>Periods DBCluster Backup period.
- preferred
Backup StringTime Backup Time, UTC time.
- status String
The status of the resource.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.