LifecyclePolicyArgs

data class LifecyclePolicyArgs(val fileSystemId: Output<String>? = null, val lifecyclePolicyName: Output<String>? = null, val lifecycleRuleName: Output<String>? = null, val paths: Output<List<String>>? = null, val storageType: Output<String>? = null) : ConvertibleToJava<LifecyclePolicyArgs>

Provides a Network Attached Storage (NAS) Lifecycle Policy resource. For information about Network Attached Storage (NAS) Lifecycle Policy and how to use it, see What is Lifecycle Policy.

NOTE: Available in v1.153.0+.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.nas.FileSystem;
import com.pulumi.alicloud.nas.FileSystemArgs;
import com.pulumi.alicloud.nas.LifecyclePolicy;
import com.pulumi.alicloud.nas.LifecyclePolicyArgs;
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 exampleFileSystem = new FileSystem("exampleFileSystem", FileSystemArgs.builder()
.protocolType("NFS")
.storageType("Capacity")
.build());
var exampleLifecyclePolicy = new LifecyclePolicy("exampleLifecyclePolicy", LifecyclePolicyArgs.builder()
.fileSystemId(exampleFileSystem.id())
.lifecyclePolicyName("terraform-example")
.lifecycleRuleName("DEFAULT_ATIME_14")
.storageType("InfrequentAccess")
.paths("/")
.build());
}
}

Import

Network Attached Storage (NAS) Lifecycle Policy can be imported using the id, e.g.

$ pulumi import alicloud:nas/lifecyclePolicy:LifecyclePolicy example <file_system_id>:<lifecycle_policy_name>

Constructors

Link copied to clipboard
fun LifecyclePolicyArgs(fileSystemId: Output<String>? = null, lifecyclePolicyName: Output<String>? = null, lifecycleRuleName: Output<String>? = null, paths: Output<List<String>>? = null, storageType: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): LifecyclePolicyArgs

Properties

Link copied to clipboard
val fileSystemId: Output<String>? = null

The ID of the file system.

Link copied to clipboard
val lifecyclePolicyName: Output<String>? = null

The name of the lifecycle management policy.

Link copied to clipboard
val lifecycleRuleName: Output<String>? = null

The rules in the lifecycle management policy. Valid values: DEFAULT_ATIME_14, DEFAULT_ATIME_30, DEFAULT_ATIME_60, DEFAULT_ATIME_90.

Link copied to clipboard
val paths: Output<List<String>>? = null

The absolute path of the directory for which the lifecycle management policy is configured. Set a maximum of 10 path. The path value must be prefixed by a forward slash (/) and must be an existing path in the mount target.

Link copied to clipboard
val storageType: Output<String>? = null

The storage type of the data that is dumped to the IA storage medium. Valid values: InfrequentAccess.