FileSystem
- Implements: IFileSystem
This class encapsulates and extends the ROS resource type ALIYUN::NAS::FileSystem.
Initializers
import com.aliyun.ros.cdk.nas.FileSystem;
FileSystem.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.protocolType(java.lang.String)
.protocolType(IResolvable)
.storageType(java.lang.String)
.storageType(IResolvable)
// .bandwidth(java.lang.Number)
// .bandwidth(IResolvable)
// .capacity(java.lang.Number)
// .capacity(IResolvable)
// .chargeType(java.lang.String)
// .chargeType(IResolvable)
// .deletionForce(java.lang.Boolean)
// .deletionForce(IResolvable)
// .description(java.lang.String)
// .description(IResolvable)
// .duration(java.lang.Number)
// .duration(IResolvable)
// .encryptType(java.lang.Number)
// .encryptType(IResolvable)
// .fileSystemType(java.lang.String)
// .fileSystemType(IResolvable)
// .resourceGroupId(java.lang.String)
// .resourceGroupId(IResolvable)
// .snapshotId(java.lang.String)
// .snapshotId(IResolvable)
// .tags(java.util.List<TagsProperty>)
// .vpcId(java.lang.String)
// .vpcId(IResolvable)
// .vSwitchId(java.lang.String)
// .vSwitchId(IResolvable)
// .zoneId(java.lang.String)
// .zoneId(IResolvable)
.build();
| Name | Type | Description |
|---|---|---|
scope | com.aliyun.ros.cdk.core.Construct | No description. |
id | java.lang.String | No description. |
enableResourcePropertyConstraint | java.lang.Boolean | No description. |
protocolType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property protocolType: Type of protocol used. |
storageType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property storageType: The storage type of the file System. |
bandwidth | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property bandwidth: Maximum file system throughput, unit is MB\/s. |
capacity | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property capacity: Specify the capacity of the file system. |
chargeType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property chargeType: Type of payment: PayAsYouGo (pay as you go) Subscription. |
deletionForce | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property deletionForce: Whether delete all mount targets on the file system and then delete file system. |
description | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property description: The description of the file system. |
duration | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property duration: The period of subscription in months. |
encryptType | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property encryptType: Specifies whether to encrypt data in the file system. |
fileSystemType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property fileSystemType: File system type. |
resourceGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property resourceGroupId: Resource group id. |
snapshotId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property snapshotId: The snapshot ID. |
tags | java.util.List<TagsProperty> | Property tags: Tags to attach to filesystem. |
vpcId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property vpcId: The VPC ID. |
vSwitchId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property vSwitchId: The vSwitch ID. |
zoneId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property zoneId: The ID of the zone. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
protocolTypeRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property protocolType: Type of protocol used.
Valid values: NFS, SMB, cpfs.
storageTypeRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property storageType: The storage type of the file System.
Valid values: Performance、Capacity、Premium(Available when the file_system_type is standard) standard、advance(Available when the file_system_type is extreme) advance_100、advance_200(Available when the file_system_type is cpfs)
bandwidthOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property bandwidth: Maximum file system throughput, unit is MB\/s.
Required and valid only when FileSystemType=cpfs.
capacityOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property capacity: Specify the capacity of the file system.
Unit: GiB. This parameter is required and valid when FileSystemType is set to extreme, cpfs, or cpfsse. Specify a value based on the specifications on the following buy page:
- Extreme NAS (Pay-as-you-go)
- CPFS (Pay-as-you-go)
chargeTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property chargeType: Type of payment: PayAsYouGo (pay as you go) Subscription.
deletionForceOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property deletionForce: Whether delete all mount targets on the file system and then delete file system.
Default is false
descriptionOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property description: The description of the file system.
Limits:
- Must be 2 to 128 characters in length.
- Must start with a letter but cannot start with
http:\/\/orhttps:\/\/. - Can contain digits, colons (:), underscores (_), and hyphens (-).
durationOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property duration: The period of subscription in months.
Required and valid when ChargeType is Subscription. When the annual and monthly subscription instance expires without renewal, the instance will automatically expire and be released.
encryptTypeOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property encryptType: Specifies whether to encrypt data in the file system.
You can use the keys that are managed by Key Management Service (KMS) to encrypt data in a file system. When you read and write the encrypted data, the data is automatically decrypted. Valid values:
- 0 (default): The data in the file system is not encrypted.
- 1: A NAS-managed key is used to encrypt the data in the file system. This value is valid if FileSystemType is set to standard or extreme.
- 2: A KMS-managed key is used to encrypt the data in the file system. This value is valid if the FileSystemType parameter is set to standard or extreme.
- Extreme NAS: All regions except China East 1 Finance support KMS-managed keys.
- General-purpose NAS: All regions support KMS-managed keys.
fileSystemTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property fileSystemType: File system type.
Allowed values: standard(default), extreme, cpfs
resourceGroupIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: Resource group id.
snapshotIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property snapshotId: The snapshot ID.
This parameter is available only for advanced Extreme NAS file systems.
You can create a file system from a snapshot. The version of the file system is the same as that of the source file system. For example, the source file system of the snapshot uses version 1. To create a file system of version 2, create File System A from the snapshot and create File System B of version 2. Then copy the data and migrate your business from File System A to File System B.
tagsOptional
- Type: java.util.List<TagsProperty>
Property tags: Tags to attach to filesystem.
Max support 20 tags to add during create filesystem. Each tag with two properties Key and Value, and Key is required.
vpcIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vpcId: The VPC ID.
- This parameter is required if FileSystemType is set to cpfs or cpfsse.
- This parameter is reserved and not required if FileSystemType is set to standard or extreme.
vSwitchIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vSwitchId: The vSwitch ID.
- This parameter is required if FileSystemType is set to cpfs.
- If FileSystemType is not set to cpfs, this parameter is reserved and not required.
zoneIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property zoneId: The ID of the zone.
Each region has multiple isolated locations known as zones. Each zone has its own independent power supply and network. This parameter is not required if FileSystemType is set to standard. By default, a random zone is selected based on the protocol type and storage type. This parameter is required if FileSystemType is set to extreme or cpfs.
- An Elastic Compute Service (ECS) instance and a file system that reside in different zones of the same region can access each other.
- We recommend that you select the zone where the ECS instance resides. This prevents cross-zone latency between the file system and the ECS instance.
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of this construct. |
synthesize | Allows this construct to emit artifacts into the cloud assembly during synthesis. |
addCondition | No description. |
addCount | No description. |
addDependency | No description. |
addResourceDesc | No description. |
applyRemovalPolicy | No description. |
fetchCondition | No description. |
fetchDependency | No description. |
fetchResourceDesc | No description. |
getAtt | No description. |
setMetadata | No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
synthesize
public void synthesize(ISynthesisSession session)
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
fetchCondition
public RosCondition fetchCondition()
fetchDependency
public java.util.List<java.lang.String> fetchDependency()
fetchResourceDesc
public java.lang.String fetchResourceDesc()
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
| Name | Description |
|---|---|
isConstruct | Return whether the given object is a Construct. |
isConstruct
import com.aliyun.ros.cdk.nas.FileSystem;
FileSystem.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node | com.aliyun.ros.cdk.core.ConstructNode | The construct tree node associated with this construct. |
env | com.aliyun.ros.cdk.core.IResourceEnvironment | The environment this resource belongs to. |
ref | java.lang.String | No description. |
stack | com.aliyun.ros.cdk.core.Stack | The stack in which this resource is defined. |
resource | com.aliyun.ros.cdk.core.RosResource | No description. |
attrFileSystemId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute FileSystemId: ID of the file system created. |
props | FileSystemProps | No description. |
nodeRequired
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
envRequired
public IResourceEnvironment getEnv();
- Type: com.aliyun.ros.cdk.core.IResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
refRequired
public java.lang.String getRef();
- Type: java.lang.String
stackRequired
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resourceOptional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrFileSystemIdRequired
public java.lang.Object getAttrFileSystemId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute FileSystemId: ID of the file system created.
propsRequired
public FileSystemProps getProps();
- Type: FileSystemProps