Auto Snap Shot Policy
Provides a Dbfs Auto Snap Shot Policy resource. For information about Dbfs Auto Snap Shot Policy and how to use it.
NOTE: Available since v1.202.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = new alicloud.databasefilesystem.AutoSnapShotPolicy("default", {
timePoints: ["01"],
policyName: "tf-example",
retentionDays: 1,
repeatWeekdays: ["2"],
});
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.databasefilesystem.AutoSnapShotPolicy("default",
time_points=["01"],
policy_name="tf-example",
retention_days=1,
repeat_weekdays=["2"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = new AliCloud.DatabaseFilesystem.AutoSnapShotPolicy("default", new()
{
TimePoints = new[]
{
"01",
},
PolicyName = "tf-example",
RetentionDays = 1,
RepeatWeekdays = new[]
{
"2",
},
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/databasefilesystem"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := databasefilesystem.NewAutoSnapShotPolicy(ctx, "default", &databasefilesystem.AutoSnapShotPolicyArgs{
TimePoints: pulumi.StringArray{
pulumi.String("01"),
},
PolicyName: pulumi.String("tf-example"),
RetentionDays: pulumi.Int(1),
RepeatWeekdays: pulumi.StringArray{
pulumi.String("2"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.databasefilesystem.AutoSnapShotPolicy;
import com.pulumi.alicloud.databasefilesystem.AutoSnapShotPolicyArgs;
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) {
var default_ = new AutoSnapShotPolicy("default", AutoSnapShotPolicyArgs.builder()
.timePoints("01")
.policyName("tf-example")
.retentionDays(1)
.repeatWeekdays("2")
.build());
}
}
resources:
default:
type: alicloud:databasefilesystem:AutoSnapShotPolicy
properties:
timePoints:
- '01'
policyName: tf-example
retentionDays: 1
repeatWeekdays:
- '2'
Import
Dbfs Auto Snap Shot Policy can be imported using the id, e.g.
$ pulumi import alicloud:databasefilesystem/autoSnapShotPolicy:AutoSnapShotPolicy example <id>
Properties
The number of database file systems set by the automatic snapshot policy.
The creation time of the resource
Last modification time of automatic snapshot policy
Automatic snapshot policy name
A collection of automatic snapshots performed on several days of the week. Value range: 1~7, for example, 1
means Monday.
Automatic snapshot retention days.
Automatic snapshot policy status details
The set of times at which the snapshot is taken on the day the automatic snapshot is executed. Value range: 00
to 23
, representing 24 time points from 00:00 to 23:00, for example, 01
indicates 01:00.