FileSystem

Provides a DFS File System resource.

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

NOTE: Available in v1.140.0+.

Example Usage

Basic Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var config = new Config();
        var name = config.Get("name") ?? "tf-testAccFileSystem";
        var defaultZones = Output.Create(AliCloud.Dfs.GetZones.InvokeAsync());
        var defaultFileSystem = new AliCloud.Dfs.FileSystem("defaultFileSystem", new AliCloud.Dfs.FileSystemArgs
        {
            StorageType = defaultZones.Apply(defaultZones => defaultZones.Zones?[0]?.Options?[0]?.StorageType),
            ZoneId = defaultZones.Apply(defaultZones => defaultZones.Zones?[0]?.ZoneId),
            ProtocolType = "HDFS",
            Description = name,
            FileSystemName = name,
            ThroughputMode = "Standard",
            SpaceCapacity = 1024,
        });
    }

}
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-testAccFileSystem"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		defaultZones, err := dfs.GetZones(ctx, nil, nil)
		if err != nil {
			return err
		}
		_, err = dfs.NewFileSystem(ctx, "defaultFileSystem", &dfs.FileSystemArgs{
			StorageType:    pulumi.String(defaultZones.Zones[0].Options[0].StorageType),
			ZoneId:         pulumi.String(defaultZones.Zones[0].ZoneId),
			ProtocolType:   pulumi.String("HDFS"),
			Description:    pulumi.String(name),
			FileSystemName: pulumi.String(name),
			ThroughputMode: pulumi.String("Standard"),
			SpaceCapacity:  pulumi.Int(1024),
		})
		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.adb.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-testAccFileSystem");
        final var defaultZones = DfsFunctions.getZones();

        var defaultFileSystem = new FileSystem("defaultFileSystem", FileSystemArgs.builder()        
            .storageType(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].options()[0].storageType()))
            .zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].zoneId()))
            .protocolType("HDFS")
            .description(name)
            .fileSystemName(name)
            .throughputMode("Standard")
            .spaceCapacity("1024")
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "tf-testAccFileSystem"
default_zones = alicloud.dfs.get_zones()
default_file_system = alicloud.dfs.FileSystem("defaultFileSystem",
    storage_type=default_zones.zones[0].options[0].storage_type,
    zone_id=default_zones.zones[0].zone_id,
    protocol_type="HDFS",
    description=name,
    file_system_name=name,
    throughput_mode="Standard",
    space_capacity=1024)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const config = new pulumi.Config();
const name = config.get("name") || "tf-testAccFileSystem";
const defaultZones = alicloud.dfs.getZones({});
const defaultFileSystem = new alicloud.dfs.FileSystem("defaultFileSystem", {
    storageType: defaultZones.then(defaultZones => defaultZones.zones?[0]?.options?[0]?.storageType),
    zoneId: defaultZones.then(defaultZones => defaultZones.zones?[0]?.zoneId),
    protocolType: "HDFS",
    description: name,
    fileSystemName: name,
    throughputMode: "Standard",
    spaceCapacity: 1024,
});
configuration:
  name:
    type: string
    default: tf-testAccFileSystem
resources:
  defaultFileSystem:
    type: alicloud:dfs:FileSystem
    properties:
      storageType: ${defaultZones.zones[0].options[0].storageType}
      zoneId: ${defaultZones.zones[0].zoneId}
      protocolType: HDFS
      description: ${name}
      fileSystemName: ${name}
      throughputMode: Standard
      spaceCapacity: 1024
variables:
  defaultZones:
    Fn::Invoke:
      Function: alicloud:dfs:getZones
      Arguments: {}

Create FileSystem Resource

new FileSystem(name: string, args: FileSystemArgs, opts?: CustomResourceOptions);
@overload
def FileSystem(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               description: Optional[str] = None,
               file_system_name: Optional[str] = None,
               protocol_type: Optional[str] = None,
               provisioned_throughput_in_mi_bps: Optional[int] = None,
               space_capacity: Optional[int] = None,
               storage_type: Optional[str] = None,
               throughput_mode: Optional[str] = None,
               zone_id: Optional[str] = None)
@overload
def FileSystem(resource_name: str,
               args: FileSystemArgs,
               opts: Optional[ResourceOptions] = None)
func NewFileSystem(ctx *Context, name string, args FileSystemArgs, opts ...ResourceOption) (*FileSystem, error)
public FileSystem(string name, FileSystemArgs args, CustomResourceOptions? opts = null)
public FileSystem(String name, FileSystemArgs args)
public FileSystem(String name, FileSystemArgs args, CustomResourceOptions options)
type: alicloud:dfs:FileSystem
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args FileSystemArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args FileSystemArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args FileSystemArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args FileSystemArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args FileSystemArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

FileSystem Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The FileSystem resource accepts the following input properties:

FileSystemName string

The name of the File system.

ProtocolType string

The protocol type. Valid values: HDFS.

SpaceCapacity int

The capacity budget of the File system. NOTE: When the actual data storage reaches the file system capacity budget, the data cannot be written. The file system capacity budget does not support shrinking.

StorageType string

The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.

ZoneId string

The zone ID of the File system.

Description string

The description of the File system.

ProvisionedThroughputInMiBps int

The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s. NOTE: Only when throughput_mode is Provisioned, this param is valid.

ThroughputMode string

The throughput mode of the File system. Valid values: Provisioned, Standard.

FileSystemName string

The name of the File system.

ProtocolType string

The protocol type. Valid values: HDFS.

SpaceCapacity int

The capacity budget of the File system. NOTE: When the actual data storage reaches the file system capacity budget, the data cannot be written. The file system capacity budget does not support shrinking.

StorageType string

The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.

ZoneId string

The zone ID of the File system.

Description string

The description of the File system.

ProvisionedThroughputInMiBps int

The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s. NOTE: Only when throughput_mode is Provisioned, this param is valid.

ThroughputMode string

The throughput mode of the File system. Valid values: Provisioned, Standard.

fileSystemName String

The name of the File system.

protocolType String

The protocol type. Valid values: HDFS.

spaceCapacity Integer

The capacity budget of the File system. NOTE: When the actual data storage reaches the file system capacity budget, the data cannot be written. The file system capacity budget does not support shrinking.

storageType String

The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.

zoneId String

The zone ID of the File system.

description String

The description of the File system.

provisionedThroughputInMiBps Integer

The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s. NOTE: Only when throughput_mode is Provisioned, this param is valid.

throughputMode String

The throughput mode of the File system. Valid values: Provisioned, Standard.

fileSystemName string

The name of the File system.

protocolType string

The protocol type. Valid values: HDFS.

spaceCapacity number

The capacity budget of the File system. NOTE: When the actual data storage reaches the file system capacity budget, the data cannot be written. The file system capacity budget does not support shrinking.

storageType string

The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.

zoneId string

The zone ID of the File system.

description string

The description of the File system.

provisionedThroughputInMiBps number

The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s. NOTE: Only when throughput_mode is Provisioned, this param is valid.

throughputMode string

The throughput mode of the File system. Valid values: Provisioned, Standard.

file_system_name str

The name of the File system.

protocol_type str

The protocol type. Valid values: HDFS.

space_capacity int

The capacity budget of the File system. NOTE: When the actual data storage reaches the file system capacity budget, the data cannot be written. The file system capacity budget does not support shrinking.

storage_type str

The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.

zone_id str

The zone ID of the File system.

description str

The description of the File system.

provisioned_throughput_in_mi_bps int

The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s. NOTE: Only when throughput_mode is Provisioned, this param is valid.

throughput_mode str

The throughput mode of the File system. Valid values: Provisioned, Standard.

fileSystemName String

The name of the File system.

protocolType String

The protocol type. Valid values: HDFS.

spaceCapacity Number

The capacity budget of the File system. NOTE: When the actual data storage reaches the file system capacity budget, the data cannot be written. The file system capacity budget does not support shrinking.

storageType String

The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.

zoneId String

The zone ID of the File system.

description String

The description of the File system.

provisionedThroughputInMiBps Number

The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s. NOTE: Only when throughput_mode is Provisioned, this param is valid.

throughputMode String

The throughput mode of the File system. Valid values: Provisioned, Standard.

Outputs

All input properties are implicitly available as output properties. Additionally, the FileSystem resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing FileSystem Resource

Get an existing FileSystem 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?: FileSystemState, opts?: CustomResourceOptions): FileSystem
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        file_system_name: Optional[str] = None,
        protocol_type: Optional[str] = None,
        provisioned_throughput_in_mi_bps: Optional[int] = None,
        space_capacity: Optional[int] = None,
        storage_type: Optional[str] = None,
        throughput_mode: Optional[str] = None,
        zone_id: Optional[str] = None) -> FileSystem
func GetFileSystem(ctx *Context, name string, id IDInput, state *FileSystemState, opts ...ResourceOption) (*FileSystem, error)
public static FileSystem Get(string name, Input<string> id, FileSystemState? state, CustomResourceOptions? opts = null)
public static FileSystem get(String name, Output<String> id, FileSystemState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
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:
Description string

The description of the File system.

FileSystemName string

The name of the File system.

ProtocolType string

The protocol type. Valid values: HDFS.

ProvisionedThroughputInMiBps int

The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s. NOTE: Only when throughput_mode is Provisioned, this param is valid.

SpaceCapacity int

The capacity budget of the File system. NOTE: When the actual data storage reaches the file system capacity budget, the data cannot be written. The file system capacity budget does not support shrinking.

StorageType string

The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.

ThroughputMode string

The throughput mode of the File system. Valid values: Provisioned, Standard.

ZoneId string

The zone ID of the File system.

Description string

The description of the File system.

FileSystemName string

The name of the File system.

ProtocolType string

The protocol type. Valid values: HDFS.

ProvisionedThroughputInMiBps int

The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s. NOTE: Only when throughput_mode is Provisioned, this param is valid.

SpaceCapacity int

The capacity budget of the File system. NOTE: When the actual data storage reaches the file system capacity budget, the data cannot be written. The file system capacity budget does not support shrinking.

StorageType string

The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.

ThroughputMode string

The throughput mode of the File system. Valid values: Provisioned, Standard.

ZoneId string

The zone ID of the File system.

description String

The description of the File system.

fileSystemName String

The name of the File system.

protocolType String

The protocol type. Valid values: HDFS.

provisionedThroughputInMiBps Integer

The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s. NOTE: Only when throughput_mode is Provisioned, this param is valid.

spaceCapacity Integer

The capacity budget of the File system. NOTE: When the actual data storage reaches the file system capacity budget, the data cannot be written. The file system capacity budget does not support shrinking.

storageType String

The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.

throughputMode String

The throughput mode of the File system. Valid values: Provisioned, Standard.

zoneId String

The zone ID of the File system.

description string

The description of the File system.

fileSystemName string

The name of the File system.

protocolType string

The protocol type. Valid values: HDFS.

provisionedThroughputInMiBps number

The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s. NOTE: Only when throughput_mode is Provisioned, this param is valid.

spaceCapacity number

The capacity budget of the File system. NOTE: When the actual data storage reaches the file system capacity budget, the data cannot be written. The file system capacity budget does not support shrinking.

storageType string

The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.

throughputMode string

The throughput mode of the File system. Valid values: Provisioned, Standard.

zoneId string

The zone ID of the File system.

description str

The description of the File system.

file_system_name str

The name of the File system.

protocol_type str

The protocol type. Valid values: HDFS.

provisioned_throughput_in_mi_bps int

The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s. NOTE: Only when throughput_mode is Provisioned, this param is valid.

space_capacity int

The capacity budget of the File system. NOTE: When the actual data storage reaches the file system capacity budget, the data cannot be written. The file system capacity budget does not support shrinking.

storage_type str

The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.

throughput_mode str

The throughput mode of the File system. Valid values: Provisioned, Standard.

zone_id str

The zone ID of the File system.

description String

The description of the File system.

fileSystemName String

The name of the File system.

protocolType String

The protocol type. Valid values: HDFS.

provisionedThroughputInMiBps Number

The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s. NOTE: Only when throughput_mode is Provisioned, this param is valid.

spaceCapacity Number

The capacity budget of the File system. NOTE: When the actual data storage reaches the file system capacity budget, the data cannot be written. The file system capacity budget does not support shrinking.

storageType String

The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.

throughputMode String

The throughput mode of the File system. Valid values: Provisioned, Standard.

zoneId String

The zone ID of the File system.

Import

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

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

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.