FileSystemArgs

data class FileSystemArgs(val capacity: Output<Int>? = null, val description: Output<String>? = null, val encryptType: Output<Int>? = null, val fileSystemType: Output<String>? = null, val keytab: Output<String>? = null, val keytabMd5: Output<String>? = null, val kmsKeyId: Output<String>? = null, val nfsAcl: Output<FileSystemNfsAclArgs>? = null, val options: Output<FileSystemOptionsArgs>? = null, val protocolType: Output<String>? = null, val recycleBin: Output<FileSystemRecycleBinArgs>? = null, val resourceGroupId: Output<String>? = null, val smbAcl: Output<FileSystemSmbAclArgs>? = null, val snapshotId: Output<String>? = null, val storageType: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val vpcId: Output<String>? = null, val vswitchId: Output<String>? = null, val zoneId: Output<String>? = null) : ConvertibleToJava<FileSystemArgs>

Provides a File Storage (NAS) File System resource. File System Instance. For information about File Storage (NAS) File System and how to use it, see What is File System.

NOTE: Available since v1.33.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = alicloud.nas.getZones({
fileSystemType: "standard",
});
const defaultFileSystem = new alicloud.nas.FileSystem("default", {
protocolType: "NFS",
storageType: "Capacity",
description: name,
encryptType: 1,
fileSystemType: "standard",
recycleBin: {
status: "Enable",
reservedDays: 10,
},
nfsAcl: {
enabled: true,
},
zoneId: _default.then(_default => _default.zones?.[0]?.zoneId),
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.nas.get_zones(file_system_type="standard")
default_file_system = alicloud.nas.FileSystem("default",
protocol_type="NFS",
storage_type="Capacity",
description=name,
encrypt_type=1,
file_system_type="standard",
recycle_bin={
"status": "Enable",
"reserved_days": 10,
},
nfs_acl={
"enabled": True,
},
zone_id=default.zones[0].zone_id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = AliCloud.Nas.GetZones.Invoke(new()
{
FileSystemType = "standard",
});
var defaultFileSystem = new AliCloud.Nas.FileSystem("default", new()
{
ProtocolType = "NFS",
StorageType = "Capacity",
Description = name,
EncryptType = 1,
FileSystemType = "standard",
RecycleBin = new AliCloud.Nas.Inputs.FileSystemRecycleBinArgs
{
Status = "Enable",
ReservedDays = 10,
},
NfsAcl = new AliCloud.Nas.Inputs.FileSystemNfsAclArgs
{
Enabled = true,
},
ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.ZoneId)),
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/nas"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := nas.GetZones(ctx, &nas.GetZonesArgs{
FileSystemType: pulumi.StringRef("standard"),
}, nil)
if err != nil {
return err
}
_, err = nas.NewFileSystem(ctx, "default", &nas.FileSystemArgs{
ProtocolType: pulumi.String("NFS"),
StorageType: pulumi.String("Capacity"),
Description: pulumi.String(name),
EncryptType: pulumi.Int(1),
FileSystemType: pulumi.String("standard"),
RecycleBin: &nas.FileSystemRecycleBinArgs{
Status: pulumi.String("Enable"),
ReservedDays: pulumi.Int(10),
},
NfsAcl: &nas.FileSystemNfsAclArgs{
Enabled: pulumi.Bool(true),
},
ZoneId: pulumi.String(_default.Zones[0].ZoneId),
})
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.nas.NasFunctions;
import com.pulumi.alicloud.nas.inputs.GetZonesArgs;
import com.pulumi.alicloud.nas.FileSystem;
import com.pulumi.alicloud.nas.FileSystemArgs;
import com.pulumi.alicloud.nas.inputs.FileSystemRecycleBinArgs;
import com.pulumi.alicloud.nas.inputs.FileSystemNfsAclArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
final var default = NasFunctions.getZones(GetZonesArgs.builder()
.fileSystemType("standard")
.build());
var defaultFileSystem = new FileSystem("defaultFileSystem", FileSystemArgs.builder()
.protocolType("NFS")
.storageType("Capacity")
.description(name)
.encryptType(1)
.fileSystemType("standard")
.recycleBin(FileSystemRecycleBinArgs.builder()
.status("Enable")
.reservedDays(10)
.build())
.nfsAcl(FileSystemNfsAclArgs.builder()
.enabled(true)
.build())
.zoneId(default_.zones()[0].zoneId())
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
defaultFileSystem:
type: alicloud:nas:FileSystem
name: default
properties:
protocolType: NFS
storageType: Capacity
description: ${name}
encryptType: 1
fileSystemType: standard
recycleBin:
status: Enable
reservedDays: '10'
nfsAcl:
enabled: true
zoneId: ${default.zones[0].zoneId}
variables:
default:
fn::invoke:
function: alicloud:nas:getZones
arguments:
fileSystemType: standard

Import

File Storage (NAS) File System can be imported using the id, e.g.

$ pulumi import alicloud:nas/fileSystem:FileSystem example <id>

Constructors

Link copied to clipboard
constructor(capacity: Output<Int>? = null, description: Output<String>? = null, encryptType: Output<Int>? = null, fileSystemType: Output<String>? = null, keytab: Output<String>? = null, keytabMd5: Output<String>? = null, kmsKeyId: Output<String>? = null, nfsAcl: Output<FileSystemNfsAclArgs>? = null, options: Output<FileSystemOptionsArgs>? = null, protocolType: Output<String>? = null, recycleBin: Output<FileSystemRecycleBinArgs>? = null, resourceGroupId: Output<String>? = null, smbAcl: Output<FileSystemSmbAclArgs>? = null, snapshotId: Output<String>? = null, storageType: Output<String>? = null, tags: Output<Map<String, String>>? = null, vpcId: Output<String>? = null, vswitchId: Output<String>? = null, zoneId: Output<String>? = null)

Properties

Link copied to clipboard
val capacity: Output<Int>? = null

File system capacity. Unit: GiB, required and valid when FileSystemType = extreme or cpfs. For optional values, please refer to the actual specifications on the purchase page: -Fast NAS Pay-As-You-Go Page(https://common-buy.aliyun.com/? commodityCode=nas_extreme_post#/buy) -Fast NAS Package Monthly Purchase Page(https://common-buy.aliyun.com/? commodityCode=nas_extreme#/buy) -Parallel File System CPFS Pay-As-You-Go Purchase Page(https://common-buy.aliyun.com/? commodityCode=nas_cpfs_post#/buy) -Parallel File System CPFS Package Monthly Purchase Page(https://common-buy.aliyun.com/? commodityCode=cpfs#/buy)

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

File system description. Restrictions:

Link copied to clipboard
val encryptType: Output<Int>? = null

Whether the file system is encrypted. Use the KMS service hosting key to encrypt and store the file system disk data. When reading and writing encrypted data, there is no need to decrypt it. Value:

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

File system type. Value:

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

String of keytab file content encrypted by base64

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

String of the keytab file content encrypted by MD5

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

The ID of the KMS key. This parameter is required only when EncryptType = 2.

Link copied to clipboard
val nfsAcl: Output<FileSystemNfsAclArgs>? = null

NFS ACL See nfs_acl below.

Link copied to clipboard
val options: Output<FileSystemOptionsArgs>? = null

Option. See options below.

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

File transfer protocol type.

Link copied to clipboard

Recycle Bin See recycle_bin below.

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

The ID of the resource group.

Link copied to clipboard
val smbAcl: Output<FileSystemSmbAclArgs>? = null

SMB ACL See smb_acl below.

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

Only extreme NAS is supported.

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

The storage type.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Label information collection.

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

The ID of the VPC network. This parameter must be configured when FileSystemType = cpfs. When the FileSystemType is standard or extreme, this parameter is reserved for the interface and has not taken effect yet. You do not need to configure it.

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

The ID of the switch. This parameter must be configured when FileSystemType = cpfs. When the FileSystemType is standard or extreme, this parameter is reserved for the interface and has not taken effect yet. You do not need to configure it.

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

The zone ID. The usable area refers to the physical area where power and network are independent of each other in the same area. When the FileSystemType is set to standard, this parameter is optional. By default, a zone that meets the conditions is randomly selected based on the ProtocolType and StorageType configurations. This parameter is required when FileSystemType = extreme or FileSystemType = cpfs.

Functions

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