alicloud.dfs.FileSystem
Explore with Pulumi AI
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
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 defaultZones = AliCloud.Dfs.GetZones.Invoke();
var defaultFileSystem = new AliCloud.Dfs.FileSystem("defaultFileSystem", new()
{
StorageType = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Options[0]?.StorageType),
ZoneId = defaultZones.Apply(getZonesResult => getZonesResult.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-example"
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.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 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-example"
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-example";
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-example
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:
- File
System stringName The name of the File system.
- Protocol
Type string 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 string The storage specifications of the File system. Valid values:
PERFORMANCE
,STANDARD
.- Zone
Id string The zone ID of the File system.
- Description string
The description of the File system.
- Provisioned
Throughput intIn Mi Bps The preset throughput of the File system. Valid values:
1
to1024
, Unit: MB/s. NOTE: Only whenthroughput_mode
isProvisioned
, this param is valid.- Throughput
Mode string The throughput mode of the File system. Valid values:
Provisioned
,Standard
.
- File
System stringName The name of the File system.
- Protocol
Type string 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 string The storage specifications of the File system. Valid values:
PERFORMANCE
,STANDARD
.- Zone
Id string The zone ID of the File system.
- Description string
The description of the File system.
- Provisioned
Throughput intIn Mi Bps The preset throughput of the File system. Valid values:
1
to1024
, Unit: MB/s. NOTE: Only whenthroughput_mode
isProvisioned
, this param is valid.- Throughput
Mode string The throughput mode of the File system. Valid values:
Provisioned
,Standard
.
- file
System StringName The name of the File system.
- protocol
Type String The protocol type. Valid values:
HDFS
.- space
Capacity 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.
- storage
Type String The storage specifications of the File system. Valid values:
PERFORMANCE
,STANDARD
.- zone
Id String The zone ID of the File system.
- description String
The description of the File system.
- provisioned
Throughput IntegerIn Mi Bps The preset throughput of the File system. Valid values:
1
to1024
, Unit: MB/s. NOTE: Only whenthroughput_mode
isProvisioned
, this param is valid.- throughput
Mode String The throughput mode of the File system. Valid values:
Provisioned
,Standard
.
- file
System stringName The name of the File system.
- protocol
Type string The protocol type. Valid values:
HDFS
.- space
Capacity 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.
- storage
Type string The storage specifications of the File system. Valid values:
PERFORMANCE
,STANDARD
.- zone
Id string The zone ID of the File system.
- description string
The description of the File system.
- provisioned
Throughput numberIn Mi Bps The preset throughput of the File system. Valid values:
1
to1024
, Unit: MB/s. NOTE: Only whenthroughput_mode
isProvisioned
, this param is valid.- throughput
Mode string The throughput mode of the File system. Valid values:
Provisioned
,Standard
.
- file_
system_ strname 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_ intin_ mi_ bps The preset throughput of the File system. Valid values:
1
to1024
, Unit: MB/s. NOTE: Only whenthroughput_mode
isProvisioned
, this param is valid.- throughput_
mode str The throughput mode of the File system. Valid values:
Provisioned
,Standard
.
- file
System StringName The name of the File system.
- protocol
Type String The protocol type. Valid values:
HDFS
.- space
Capacity 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.
- storage
Type String The storage specifications of the File system. Valid values:
PERFORMANCE
,STANDARD
.- zone
Id String The zone ID of the File system.
- description String
The description of the File system.
- provisioned
Throughput NumberIn Mi Bps The preset throughput of the File system. Valid values:
1
to1024
, Unit: MB/s. NOTE: Only whenthroughput_mode
isProvisioned
, this param is valid.- throughput
Mode 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.
- Description string
The description of the File system.
- File
System stringName The name of the File system.
- Protocol
Type string The protocol type. Valid values:
HDFS
.- Provisioned
Throughput intIn Mi Bps The preset throughput of the File system. Valid values:
1
to1024
, Unit: MB/s. NOTE: Only whenthroughput_mode
isProvisioned
, 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 string The storage specifications of the File system. Valid values:
PERFORMANCE
,STANDARD
.- Throughput
Mode string The throughput mode of the File system. Valid values:
Provisioned
,Standard
.- Zone
Id string The zone ID of the File system.
- Description string
The description of the File system.
- File
System stringName The name of the File system.
- Protocol
Type string The protocol type. Valid values:
HDFS
.- Provisioned
Throughput intIn Mi Bps The preset throughput of the File system. Valid values:
1
to1024
, Unit: MB/s. NOTE: Only whenthroughput_mode
isProvisioned
, 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 string The storage specifications of the File system. Valid values:
PERFORMANCE
,STANDARD
.- Throughput
Mode string The throughput mode of the File system. Valid values:
Provisioned
,Standard
.- Zone
Id string The zone ID of the File system.
- description String
The description of the File system.
- file
System StringName The name of the File system.
- protocol
Type String The protocol type. Valid values:
HDFS
.- provisioned
Throughput IntegerIn Mi Bps The preset throughput of the File system. Valid values:
1
to1024
, Unit: MB/s. NOTE: Only whenthroughput_mode
isProvisioned
, this param is valid.- space
Capacity 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.
- storage
Type String The storage specifications of the File system. Valid values:
PERFORMANCE
,STANDARD
.- throughput
Mode String The throughput mode of the File system. Valid values:
Provisioned
,Standard
.- zone
Id String The zone ID of the File system.
- description string
The description of the File system.
- file
System stringName The name of the File system.
- protocol
Type string The protocol type. Valid values:
HDFS
.- provisioned
Throughput numberIn Mi Bps The preset throughput of the File system. Valid values:
1
to1024
, Unit: MB/s. NOTE: Only whenthroughput_mode
isProvisioned
, this param is valid.- space
Capacity 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.
- storage
Type string The storage specifications of the File system. Valid values:
PERFORMANCE
,STANDARD
.- throughput
Mode string The throughput mode of the File system. Valid values:
Provisioned
,Standard
.- zone
Id string The zone ID of the File system.
- description str
The description of the File system.
- file_
system_ strname The name of the File system.
- protocol_
type str The protocol type. Valid values:
HDFS
.- provisioned_
throughput_ intin_ mi_ bps The preset throughput of the File system. Valid values:
1
to1024
, Unit: MB/s. NOTE: Only whenthroughput_mode
isProvisioned
, 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.
- file
System StringName The name of the File system.
- protocol
Type String The protocol type. Valid values:
HDFS
.- provisioned
Throughput NumberIn Mi Bps The preset throughput of the File system. Valid values:
1
to1024
, Unit: MB/s. NOTE: Only whenthroughput_mode
isProvisioned
, this param is valid.- space
Capacity 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.
- storage
Type String The storage specifications of the File system. Valid values:
PERFORMANCE
,STANDARD
.- throughput
Mode String The throughput mode of the File system. Valid values:
Provisioned
,Standard
.- zone
Id 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
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.