全部产品
Search
文档中心

资源编排:ALIYUN::NAS::FileSystem

更新时间:Sep 15, 2023

ALIYUN::NAS::FileSystem类型用于创建文件系统。

语法

{
  "Type": "ALIYUN::NAS::FileSystem",
  "Properties": {
    "SnapshotId": String,
    "Description": String,
    "StorageType": String,
    "DeletionForce": Boolean,
    "EncryptType": Integer,
    "VpcId": String,
    "ZoneId": String,
    "Capacity": Integer,
    "Tags": List,
    "ProtocolType": String,
    "FileSystemType": String,
    "Bandwidth": Integer,
    "VSwitchId": String,
    "Duration": Integer,
    "ChargeType": String
  }
}  

属性

属性名称

类型

必须

允许更新

描述

约束

ProtocolType

String

协议类型。

取值:

  • NFS:NFS协议。

  • SMB:SMB协议。

StorageType

String

存储类型。

取值:

  • 当FileSystemType取值为standard时:

    • Performance:性能型。

    • Capacity:容量型。

  • 当FileSystemType取值为extreme或cpfs时:

    • standard:标准型。

    • advance:高级型。

DeletionForce

Boolean

是否强制删除。

取值:

  • true:强制删除。

  • false(默认值):不强制删除。

Description

String

文件系统描述。

长度为2~128个字符。必须以英文字母或汉字开头,不能以http://https://开头。可包含英文字母、汉字、数字、半角冒号(:)、下划线(_)和短划线(-)。

ZoneId

String

可用区ID。

Tags

List

标签。

每个实例最多绑定20个标签。

更多信息,请参见Tags属性

SnapshotId

String

快照ID。

可以通过指定SnapshotId从指定快照创建NAS实例,目前仅支持极速型NAS。

说明

通过快照创建的文件系统版本需和快照源文件系统版本一致。如果不一致,可以执行以下步骤:

  1. 把快照源文件数据拷贝到创建的文件系统中。

  2. 拷贝完成后,把业务迁移到新的文件系统。

EncryptType

Integer

文件系统是否加密。使用KMS托管密钥,对文件系统落盘数据进行加密存储。在读写加密数据时,无需解密。

当FileSystemType取值为standard或extreme时该参数有效。取值:

  • 0:不加密。

  • 1:加密。

Capacity

Integer

文件系统容量。

当FileSystemType取值为extreme或cpfs时该参数有效且必须指定。

取值范围:

  • 当FileSystemType取值为extreme时:100~262,144。

  • 当FileSystemType取值为cpfs时:2048~512,000。

单位:GB。

FileSystemType

String

文件系统类型。

取值:

  • standard(默认值):通用型。

  • extreme:极速型。

  • cpfs:并行文件系统。

VpcId

String

专有网络ID,指定VpcId和VSwitchId可以在创建文件系统实例的同时预配置一个默认挂载点。

当FileSystemType取值为cpfs时,该参数必须指定。

Bandwidth

Integer

文件系统吞吐上限。

当FileSystemType取值为cpfs时该参数必须指定,取值根据Capacity确定。更多信息,请参见CPFS购买页面

单位:Mbps。

VSwitchId

String

交换机ID,指定VpcId和VSwitchId可以在创建文件系统实例的同时预配置一个默认挂载点。

当FileSystemType取值为cpfs时该参数必须指定。

Duration

Integer

包年包月时长。

当ChargeType取值为Subscription时该参数有效且必须指定。当包年包月实例到期时未进行续费,实例会自动到期释放。取值:

  • 1

  • 2

  • 3

  • 6

  • 12

  • 36

单位:月。

ChargeType

String

付费类型。

取值:

  • PayAsYouGo:按量付费。

  • Subscription:包年包月。

Tags语法

"Tags": [
  {
    "Key": String,
    "Value": String
  }
]  

Tags属性

属性名称

类型

必须

允许更新

描述

约束

Key

String

标签键。

长度为1~128个字符,不能以aliyunacs:开头,不能包含http://https://

Value

String

标签值。

长度为0~128个字符,不能以aliyunacs:开头,不能包含http://https://

返回值

Fn::GetAtt

FileSystemId:文件系统ID。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Description: Test NAS FileSystem
    Parameters: {}
    Resources:
      FileSystem:
        Type: ALIYUN::NAS::FileSystem
        Properties:
          ProtocolType: NFS
          StorageType: Capacity
    Outputs:
      FileSystemId:
        Description: ID of the file system created
        Value:
          Fn::GetAtt:
            - FileSystem
            - FileSystemId
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Description": "Test NAS FileSystem",
      "Parameters": {
      },
      "Resources": {
        "FileSystem": {
          "Type": "ALIYUN::NAS::FileSystem",
          "Properties": {
            "ProtocolType": "NFS",
            "StorageType": "Capacity"
          }
        }
      },
      "Outputs": {
        "FileSystemId": {
          "Description": "ID of the file system created",
          "Value": {
            "Fn::GetAtt": [
              "FileSystem",
              "FileSystemId"
            ]
          }
        }
      }
    }

更多示例,请参见创建文件系统、创建权限组、创建权限规则和创建挂载点的组合示例:JSON示例YAML示例