Provides a Network Attached Storage (NAS) Auto Snapshot Policy resource.
For information about Network Attached Storage (NAS) Auto Snapshot Policy and how to use it, see What is Auto Snapshot Policy.
Basic Usage
resource "alicloud_nas_auto_snapshot_policy" "example" {
auto_snapshot_policy_name = "example_value"
repeat_weekdays = ["3", "4", "5"]
retention_days = 30
time_points = ["3", "4", "5"]
}
The following arguments are supported:
auto_snapshot_policy_name
- (Optional) The name of the automatic snapshot policy. Limits:
2
to 128
characters in length,http://
or https://
.repeat_weekdays
- (Required) The day on which an auto snapshot is created.
retention_days
- (Optional, Computed) The number of days for which you want to retain auto snapshots. Unit: days. Valid values:
-1
: the default value. Auto snapshots are permanently retained. After the number of auto snapshots exceeds the upper limit, the earliest auto snapshot is automatically deleted.1
to 65536
: Auto snapshots are retained for the specified days. After the retention period of auto snapshots expires, the auto snapshots are automatically deleted.time_points
- (Required) The point in time at which an auto snapshot is created.
The following attributes are exported:
id
- The resource ID in terraform of Auto Snapshot Policy.status
- The status of the automatic snapshot policy.The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 1 mins) Used when create the Auto Snapshot Policy.delete
- (Defaults to 1 mins) Used when delete the Auto Snapshot Policy.update
- (Defaults to 1 mins) Used when update the Auto Snapshot Policy.Network Attached Storage (NAS) Auto Snapshot Policy can be imported using the id, e.g.
$ terraform import alicloud_nas_auto_snapshot_policy.example <id>