FileSystem

class FileSystem : KotlinCustomResource

Provides a DFS File System resource. For information about DFS File System and how to use it, see What is File System.

NOTE: Available since v1.140.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") || "tf-example";
const default = alicloud.dfs.getZones({});
const defaultFileSystem = new alicloud.dfs.FileSystem("default", {
storageType: _default.then(_default => _default.zones?.[0]?.options?.[0]?.storageType),
zoneId: _default.then(_default => _default.zones?.[0]?.zoneId),
protocolType: "HDFS",
description: name,
fileSystemName: name,
throughputMode: "Provisioned",
spaceCapacity: 1024,
provisionedThroughputInMiBps: 512,
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-example"
default = alicloud.dfs.get_zones()
default_file_system = alicloud.dfs.FileSystem("default",
storage_type=default.zones[0].options[0].storage_type,
zone_id=default.zones[0].zone_id,
protocol_type="HDFS",
description=name,
file_system_name=name,
throughput_mode="Provisioned",
space_capacity=1024,
provisioned_throughput_in_mi_bps=512)
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") ?? "tf-example";
var @default = AliCloud.Dfs.GetZones.Invoke();
var defaultFileSystem = new AliCloud.Dfs.FileSystem("default", new()
{
StorageType = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Options[0]?.StorageType)),
ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.ZoneId)),
ProtocolType = "HDFS",
Description = name,
FileSystemName = name,
ThroughputMode = "Provisioned",
SpaceCapacity = 1024,
ProvisionedThroughputInMiBps = 512,
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dfs"
"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 := "tf-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := dfs.GetZones(ctx, nil, nil)
if err != nil {
return err
}
_, err = dfs.NewFileSystem(ctx, "default", &dfs.FileSystemArgs{
StorageType: pulumi.String(_default.Zones[0].Options[0].StorageType),
ZoneId: pulumi.String(_default.Zones[0].ZoneId),
ProtocolType: pulumi.String("HDFS"),
Description: pulumi.String(name),
FileSystemName: pulumi.String(name),
ThroughputMode: pulumi.String("Provisioned"),
SpaceCapacity: pulumi.Int(1024),
ProvisionedThroughputInMiBps: pulumi.Int(512),
})
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.dfs.DfsFunctions;
import com.pulumi.alicloud.dfs.inputs.GetZonesArgs;
import com.pulumi.alicloud.dfs.FileSystem;
import com.pulumi.alicloud.dfs.FileSystemArgs;
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("tf-example");
final var default = DfsFunctions.getZones();
var defaultFileSystem = new FileSystem("defaultFileSystem", FileSystemArgs.builder()
.storageType(default_.zones()[0].options()[0].storageType())
.zoneId(default_.zones()[0].zoneId())
.protocolType("HDFS")
.description(name)
.fileSystemName(name)
.throughputMode("Provisioned")
.spaceCapacity("1024")
.provisionedThroughputInMiBps("512")
.build());
}
}
configuration:
name:
type: string
default: tf-example
resources:
defaultFileSystem:
type: alicloud:dfs:FileSystem
name: default
properties:
storageType: ${default.zones[0].options[0].storageType}
zoneId: ${default.zones[0].zoneId}
protocolType: HDFS
description: ${name}
fileSystemName: ${name}
throughputMode: Provisioned
spaceCapacity: '1024'
provisionedThroughputInMiBps: '512'
variables:
default:
fn::invoke:
Function: alicloud:dfs:getZones
Arguments: {}

Import

DFS File System can be imported using the id, e.g.

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

Properties

Link copied to clipboard
val createTime: Output<String>

The creation time of the file system instance.

Link copied to clipboard

Redundancy mode of the file system. Value:

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

The description of the file system resource. No more than 32 characters in length.

Link copied to clipboard
val fileSystemName: Output<String>

The file system name. The naming rules are as follows: The length is 6~64 characters. Globally unique and cannot be an empty string. English letters are supported and can contain numbers, underscores (_), and dashes (-).

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val partitionNumber: Output<Int>?

Save set sequence number, the user selects the content of the specified sequence number in the Save set.

Link copied to clipboard
val protocolType: Output<String>

The protocol type. Only HDFS(Hadoop Distributed File System) is supported.

Link copied to clipboard

Provisioned throughput. This parameter is required when ThroughputMode is set to Provisioned. Unit: MB/s Value range: 1~5120.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val spaceCapacity: Output<Int>

File system capacity. When the actual amount of data stored reaches the capacity of the file system, data cannot be written. Unit: GiB.

Link copied to clipboard
val storageSetName: Output<String>?

Save set identity, used to select a user-specified save set.

Link copied to clipboard
val storageType: Output<String>

The storage media type. Value: STANDARD (default): STANDARD PERFORMANCE: PERFORMANCE type.

Link copied to clipboard
val throughputMode: Output<String>

The throughput mode. Value: Standard (default): Standard throughput Provisioned: preset throughput.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val zoneId: Output<String>

Zone Id, which is used to create file system resources to the specified zone.