SnapshotPolicy
Provides an ECS snapshot policy resource.
For information about snapshot policy and how to use it, see Snapshot.
NOTE: Available in 1.42.0+.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var sp = new AliCloud.Ecs.SnapshotPolicy("sp", new AliCloud.Ecs.SnapshotPolicyArgs
{
RepeatWeekdays =
{
"1",
"2",
"3",
},
RetentionDays = -1,
TimePoints =
{
"1",
"22",
"23",
},
});
}
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
sp = alicloud.ecs.SnapshotPolicy("sp",
repeat_weekdays=[
"1",
"2",
"3",
],
retention_days=-1,
time_points=[
"1",
"22",
"23",
])import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const sp = new alicloud.ecs.SnapshotPolicy("sp", {
repeatWeekdays: [
"1",
"2",
"3",
],
retentionDays: -1,
timePoints: [
"1",
"22",
"23",
],
});Create a SnapshotPolicy Resource
new SnapshotPolicy(name: string, args: SnapshotPolicyArgs, opts?: CustomResourceOptions);def SnapshotPolicy(resource_name, opts=None, name=None, repeat_weekdays=None, retention_days=None, time_points=None, __props__=None);func NewSnapshotPolicy(ctx *Context, name string, args SnapshotPolicyArgs, opts ...ResourceOption) (*SnapshotPolicy, error)public SnapshotPolicy(string name, SnapshotPolicyArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args SnapshotPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SnapshotPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SnapshotPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
SnapshotPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The SnapshotPolicy resource accepts the following input properties:
- Repeat
Weekdays List<string> The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array. - A maximum of seven time points can be selected. - The format is an JSON array of [“1”, “2”, … “7”] and the time points are separated by commas (,).
- Retention
Days int The snapshot retention time, and the unit of measurement is day. Optional values: - -1: The automatic snapshots are retained permanently. - [1, 65536]: The number of days retained.
- Time
Points List<string> The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array. - A maximum of 24 time points can be selected. - The format is an JSON array of [“0”, “1”, … “23”] and the time points are separated by commas (,).
- Name string
The snapshot policy name.
- Repeat
Weekdays []string The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array. - A maximum of seven time points can be selected. - The format is an JSON array of [“1”, “2”, … “7”] and the time points are separated by commas (,).
- Retention
Days int The snapshot retention time, and the unit of measurement is day. Optional values: - -1: The automatic snapshots are retained permanently. - [1, 65536]: The number of days retained.
- Time
Points []string The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array. - A maximum of 24 time points can be selected. - The format is an JSON array of [“0”, “1”, … “23”] and the time points are separated by commas (,).
- Name string
The snapshot policy name.
- repeat
Weekdays string[] The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array. - A maximum of seven time points can be selected. - The format is an JSON array of [“1”, “2”, … “7”] and the time points are separated by commas (,).
- retention
Days number The snapshot retention time, and the unit of measurement is day. Optional values: - -1: The automatic snapshots are retained permanently. - [1, 65536]: The number of days retained.
- time
Points string[] The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array. - A maximum of 24 time points can be selected. - The format is an JSON array of [“0”, “1”, … “23”] and the time points are separated by commas (,).
- name string
The snapshot policy name.
- repeat_
weekdays List[str] The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array. - A maximum of seven time points can be selected. - The format is an JSON array of [“1”, “2”, … “7”] and the time points are separated by commas (,).
- retention_
days float The snapshot retention time, and the unit of measurement is day. Optional values: - -1: The automatic snapshots are retained permanently. - [1, 65536]: The number of days retained.
- time_
points List[str] The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array. - A maximum of 24 time points can be selected. - The format is an JSON array of [“0”, “1”, … “23”] and the time points are separated by commas (,).
- name str
The snapshot policy name.
Outputs
All input properties are implicitly available as output properties. Additionally, the SnapshotPolicy resource produces the following output properties:
Look up an Existing SnapshotPolicy Resource
Get an existing SnapshotPolicy 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?: SnapshotPolicyState, opts?: CustomResourceOptions): SnapshotPolicystatic get(resource_name, id, opts=None, name=None, repeat_weekdays=None, retention_days=None, time_points=None, __props__=None);func GetSnapshotPolicy(ctx *Context, name string, id IDInput, state *SnapshotPolicyState, opts ...ResourceOption) (*SnapshotPolicy, error)public static SnapshotPolicy Get(string name, Input<string> id, SnapshotPolicyState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Name string
The snapshot policy name.
- Repeat
Weekdays List<string> The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array. - A maximum of seven time points can be selected. - The format is an JSON array of [“1”, “2”, … “7”] and the time points are separated by commas (,).
- Retention
Days int The snapshot retention time, and the unit of measurement is day. Optional values: - -1: The automatic snapshots are retained permanently. - [1, 65536]: The number of days retained.
- Time
Points List<string> The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array. - A maximum of 24 time points can be selected. - The format is an JSON array of [“0”, “1”, … “23”] and the time points are separated by commas (,).
- Name string
The snapshot policy name.
- Repeat
Weekdays []string The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array. - A maximum of seven time points can be selected. - The format is an JSON array of [“1”, “2”, … “7”] and the time points are separated by commas (,).
- Retention
Days int The snapshot retention time, and the unit of measurement is day. Optional values: - -1: The automatic snapshots are retained permanently. - [1, 65536]: The number of days retained.
- Time
Points []string The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array. - A maximum of 24 time points can be selected. - The format is an JSON array of [“0”, “1”, … “23”] and the time points are separated by commas (,).
- name string
The snapshot policy name.
- repeat
Weekdays string[] The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array. - A maximum of seven time points can be selected. - The format is an JSON array of [“1”, “2”, … “7”] and the time points are separated by commas (,).
- retention
Days number The snapshot retention time, and the unit of measurement is day. Optional values: - -1: The automatic snapshots are retained permanently. - [1, 65536]: The number of days retained.
- time
Points string[] The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array. - A maximum of 24 time points can be selected. - The format is an JSON array of [“0”, “1”, … “23”] and the time points are separated by commas (,).
- name str
The snapshot policy name.
- repeat_
weekdays List[str] The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array. - A maximum of seven time points can be selected. - The format is an JSON array of [“1”, “2”, … “7”] and the time points are separated by commas (,).
- retention_
days float The snapshot retention time, and the unit of measurement is day. Optional values: - -1: The automatic snapshots are retained permanently. - [1, 65536]: The number of days retained.
- time_
points List[str] The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array. - A maximum of 24 time points can be selected. - The format is an JSON array of [“0”, “1”, … “23”] and the time points are separated by commas (,).
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.