tencentcloud.CfsAutoSnapshotPolicy
Explore with Pulumi AI
Provides a resource to create a cfs auto snapshot policy
Example Usage
Use day of week
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.CfsAutoSnapshotPolicy("example", {
aliveDays: 7,
dayOfWeek: "1,2",
hour: "2,3",
policyName: "tf-example",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.CfsAutoSnapshotPolicy("example",
alive_days=7,
day_of_week="1,2",
hour="2,3",
policy_name="tf-example")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewCfsAutoSnapshotPolicy(ctx, "example", &tencentcloud.CfsAutoSnapshotPolicyArgs{
AliveDays: pulumi.Float64(7),
DayOfWeek: pulumi.String("1,2"),
Hour: pulumi.String("2,3"),
PolicyName: pulumi.String("tf-example"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var example = new Tencentcloud.CfsAutoSnapshotPolicy("example", new()
{
AliveDays = 7,
DayOfWeek = "1,2",
Hour = "2,3",
PolicyName = "tf-example",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.CfsAutoSnapshotPolicy;
import com.pulumi.tencentcloud.CfsAutoSnapshotPolicyArgs;
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 example = new CfsAutoSnapshotPolicy("example", CfsAutoSnapshotPolicyArgs.builder()
.aliveDays(7)
.dayOfWeek("1,2")
.hour("2,3")
.policyName("tf-example")
.build());
}
}
resources:
example:
type: tencentcloud:CfsAutoSnapshotPolicy
properties:
aliveDays: 7
dayOfWeek: 1,2
hour: 2,3
policyName: tf-example
Use day of month
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.CfsAutoSnapshotPolicy("example", {
aliveDays: 7,
dayOfMonth: "2,3,4",
hour: "2,3",
policyName: "tf-example",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.CfsAutoSnapshotPolicy("example",
alive_days=7,
day_of_month="2,3,4",
hour="2,3",
policy_name="tf-example")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewCfsAutoSnapshotPolicy(ctx, "example", &tencentcloud.CfsAutoSnapshotPolicyArgs{
AliveDays: pulumi.Float64(7),
DayOfMonth: pulumi.String("2,3,4"),
Hour: pulumi.String("2,3"),
PolicyName: pulumi.String("tf-example"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var example = new Tencentcloud.CfsAutoSnapshotPolicy("example", new()
{
AliveDays = 7,
DayOfMonth = "2,3,4",
Hour = "2,3",
PolicyName = "tf-example",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.CfsAutoSnapshotPolicy;
import com.pulumi.tencentcloud.CfsAutoSnapshotPolicyArgs;
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 example = new CfsAutoSnapshotPolicy("example", CfsAutoSnapshotPolicyArgs.builder()
.aliveDays(7)
.dayOfMonth("2,3,4")
.hour("2,3")
.policyName("tf-example")
.build());
}
}
resources:
example:
type: tencentcloud:CfsAutoSnapshotPolicy
properties:
aliveDays: 7
dayOfMonth: 2,3,4
hour: 2,3
policyName: tf-example
Use interval days
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.CfsAutoSnapshotPolicy("example", {
aliveDays: 7,
hour: "2,3",
intervalDays: 1,
policyName: "policy_name",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.CfsAutoSnapshotPolicy("example",
alive_days=7,
hour="2,3",
interval_days=1,
policy_name="policy_name")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewCfsAutoSnapshotPolicy(ctx, "example", &tencentcloud.CfsAutoSnapshotPolicyArgs{
AliveDays: pulumi.Float64(7),
Hour: pulumi.String("2,3"),
IntervalDays: pulumi.Float64(1),
PolicyName: pulumi.String("policy_name"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var example = new Tencentcloud.CfsAutoSnapshotPolicy("example", new()
{
AliveDays = 7,
Hour = "2,3",
IntervalDays = 1,
PolicyName = "policy_name",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.CfsAutoSnapshotPolicy;
import com.pulumi.tencentcloud.CfsAutoSnapshotPolicyArgs;
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 example = new CfsAutoSnapshotPolicy("example", CfsAutoSnapshotPolicyArgs.builder()
.aliveDays(7)
.hour("2,3")
.intervalDays(1)
.policyName("policy_name")
.build());
}
}
resources:
example:
type: tencentcloud:CfsAutoSnapshotPolicy
properties:
aliveDays: 7
hour: 2,3
intervalDays: 1
policyName: policy_name
Create CfsAutoSnapshotPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CfsAutoSnapshotPolicy(name: string, args: CfsAutoSnapshotPolicyArgs, opts?: CustomResourceOptions);
@overload
def CfsAutoSnapshotPolicy(resource_name: str,
args: CfsAutoSnapshotPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CfsAutoSnapshotPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
hour: Optional[str] = None,
alive_days: Optional[float] = None,
cfs_auto_snapshot_policy_id: Optional[str] = None,
day_of_month: Optional[str] = None,
day_of_week: Optional[str] = None,
interval_days: Optional[float] = None,
policy_name: Optional[str] = None)
func NewCfsAutoSnapshotPolicy(ctx *Context, name string, args CfsAutoSnapshotPolicyArgs, opts ...ResourceOption) (*CfsAutoSnapshotPolicy, error)
public CfsAutoSnapshotPolicy(string name, CfsAutoSnapshotPolicyArgs args, CustomResourceOptions? opts = null)
public CfsAutoSnapshotPolicy(String name, CfsAutoSnapshotPolicyArgs args)
public CfsAutoSnapshotPolicy(String name, CfsAutoSnapshotPolicyArgs args, CustomResourceOptions options)
type: tencentcloud:CfsAutoSnapshotPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CfsAutoSnapshotPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CfsAutoSnapshotPolicyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CfsAutoSnapshotPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CfsAutoSnapshotPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CfsAutoSnapshotPolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CfsAutoSnapshotPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The CfsAutoSnapshotPolicy resource accepts the following input properties:
- Hour string
- The time point when to repeat the snapshot operation.
- Alive
Days double - Snapshot retention period.
- Cfs
Auto stringSnapshot Policy Id - ID of the resource.
- Day
Of stringMonth - The specific day (day 1 to day 31) of the month on which to create a snapshot.
- Day
Of stringWeek - The day of the week on which to repeat the snapshot operation.
- Interval
Days double - The snapshot interval, in days.
- Policy
Name string - Policy name.
- Hour string
- The time point when to repeat the snapshot operation.
- Alive
Days float64 - Snapshot retention period.
- Cfs
Auto stringSnapshot Policy Id - ID of the resource.
- Day
Of stringMonth - The specific day (day 1 to day 31) of the month on which to create a snapshot.
- Day
Of stringWeek - The day of the week on which to repeat the snapshot operation.
- Interval
Days float64 - The snapshot interval, in days.
- Policy
Name string - Policy name.
- hour String
- The time point when to repeat the snapshot operation.
- alive
Days Double - Snapshot retention period.
- cfs
Auto StringSnapshot Policy Id - ID of the resource.
- day
Of StringMonth - The specific day (day 1 to day 31) of the month on which to create a snapshot.
- day
Of StringWeek - The day of the week on which to repeat the snapshot operation.
- interval
Days Double - The snapshot interval, in days.
- policy
Name String - Policy name.
- hour string
- The time point when to repeat the snapshot operation.
- alive
Days number - Snapshot retention period.
- cfs
Auto stringSnapshot Policy Id - ID of the resource.
- day
Of stringMonth - The specific day (day 1 to day 31) of the month on which to create a snapshot.
- day
Of stringWeek - The day of the week on which to repeat the snapshot operation.
- interval
Days number - The snapshot interval, in days.
- policy
Name string - Policy name.
- hour str
- The time point when to repeat the snapshot operation.
- alive_
days float - Snapshot retention period.
- cfs_
auto_ strsnapshot_ policy_ id - ID of the resource.
- day_
of_ strmonth - The specific day (day 1 to day 31) of the month on which to create a snapshot.
- day_
of_ strweek - The day of the week on which to repeat the snapshot operation.
- interval_
days float - The snapshot interval, in days.
- policy_
name str - Policy name.
- hour String
- The time point when to repeat the snapshot operation.
- alive
Days Number - Snapshot retention period.
- cfs
Auto StringSnapshot Policy Id - ID of the resource.
- day
Of StringMonth - The specific day (day 1 to day 31) of the month on which to create a snapshot.
- day
Of StringWeek - The day of the week on which to repeat the snapshot operation.
- interval
Days Number - The snapshot interval, in days.
- policy
Name String - Policy name.
Outputs
All input properties are implicitly available as output properties. Additionally, the CfsAutoSnapshotPolicy resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing CfsAutoSnapshotPolicy Resource
Get an existing CfsAutoSnapshotPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: CfsAutoSnapshotPolicyState, opts?: CustomResourceOptions): CfsAutoSnapshotPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
alive_days: Optional[float] = None,
cfs_auto_snapshot_policy_id: Optional[str] = None,
day_of_month: Optional[str] = None,
day_of_week: Optional[str] = None,
hour: Optional[str] = None,
interval_days: Optional[float] = None,
policy_name: Optional[str] = None) -> CfsAutoSnapshotPolicy
func GetCfsAutoSnapshotPolicy(ctx *Context, name string, id IDInput, state *CfsAutoSnapshotPolicyState, opts ...ResourceOption) (*CfsAutoSnapshotPolicy, error)
public static CfsAutoSnapshotPolicy Get(string name, Input<string> id, CfsAutoSnapshotPolicyState? state, CustomResourceOptions? opts = null)
public static CfsAutoSnapshotPolicy get(String name, Output<String> id, CfsAutoSnapshotPolicyState state, CustomResourceOptions options)
resources: _: type: tencentcloud:CfsAutoSnapshotPolicy get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Alive
Days double - Snapshot retention period.
- Cfs
Auto stringSnapshot Policy Id - ID of the resource.
- Day
Of stringMonth - The specific day (day 1 to day 31) of the month on which to create a snapshot.
- Day
Of stringWeek - The day of the week on which to repeat the snapshot operation.
- Hour string
- The time point when to repeat the snapshot operation.
- Interval
Days double - The snapshot interval, in days.
- Policy
Name string - Policy name.
- Alive
Days float64 - Snapshot retention period.
- Cfs
Auto stringSnapshot Policy Id - ID of the resource.
- Day
Of stringMonth - The specific day (day 1 to day 31) of the month on which to create a snapshot.
- Day
Of stringWeek - The day of the week on which to repeat the snapshot operation.
- Hour string
- The time point when to repeat the snapshot operation.
- Interval
Days float64 - The snapshot interval, in days.
- Policy
Name string - Policy name.
- alive
Days Double - Snapshot retention period.
- cfs
Auto StringSnapshot Policy Id - ID of the resource.
- day
Of StringMonth - The specific day (day 1 to day 31) of the month on which to create a snapshot.
- day
Of StringWeek - The day of the week on which to repeat the snapshot operation.
- hour String
- The time point when to repeat the snapshot operation.
- interval
Days Double - The snapshot interval, in days.
- policy
Name String - Policy name.
- alive
Days number - Snapshot retention period.
- cfs
Auto stringSnapshot Policy Id - ID of the resource.
- day
Of stringMonth - The specific day (day 1 to day 31) of the month on which to create a snapshot.
- day
Of stringWeek - The day of the week on which to repeat the snapshot operation.
- hour string
- The time point when to repeat the snapshot operation.
- interval
Days number - The snapshot interval, in days.
- policy
Name string - Policy name.
- alive_
days float - Snapshot retention period.
- cfs_
auto_ strsnapshot_ policy_ id - ID of the resource.
- day_
of_ strmonth - The specific day (day 1 to day 31) of the month on which to create a snapshot.
- day_
of_ strweek - The day of the week on which to repeat the snapshot operation.
- hour str
- The time point when to repeat the snapshot operation.
- interval_
days float - The snapshot interval, in days.
- policy_
name str - Policy name.
- alive
Days Number - Snapshot retention period.
- cfs
Auto StringSnapshot Policy Id - ID of the resource.
- day
Of StringMonth - The specific day (day 1 to day 31) of the month on which to create a snapshot.
- day
Of StringWeek - The day of the week on which to repeat the snapshot operation.
- hour String
- The time point when to repeat the snapshot operation.
- interval
Days Number - The snapshot interval, in days.
- policy
Name String - Policy name.
Import
cfs auto snapshot policy can be imported using the id, e.g.
$ pulumi import tencentcloud:index/cfsAutoSnapshotPolicy:CfsAutoSnapshotPolicy example asp-f8q793kj
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.