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 | 是 | 否 | 協議類型。 | 取值:
|
StorageType | String | 是 | 否 | 存儲類型。 | 取值:
|
DeletionForce | Boolean | 否 | 是 | 是否強制刪除。 | 取值:
|
Description | String | 否 | 是 | 文件系統描述。 | 長度為2~128個字符。必須以英文字母或漢字開頭,不能以 |
ZoneId | String | 否 | 否 | 可用區ID。 | 無 |
Tags | List | 否 | 是 | 標簽。 | 每個實例最多綁定20個標簽。 更多信息,請參見Tags屬性。 |
SnapshotId | String | 否 | 否 | 快照ID。 | 可以通過指定SnapshotId從指定快照創建NAS實例,目前僅支持極速型NAS。 說明 通過快照創建的文件系統版本需和快照源文件系統版本一致。如果不一致,可以執行以下步驟:
|
EncryptType | Integer | 否 | 否 | 文件系統是否加密。使用KMS托管密鑰,對文件系統落盤數據進行加密存儲。在讀寫加密數據時,無需解密。 | 當FileSystemType取值為standard或extreme時該參數有效。取值:
|
Capacity | Integer | 否 | 是 | 文件系統容量。 | 當FileSystemType取值為extreme或cpfs時該參數有效且必須指定。 取值范圍:
單位:GB。 |
FileSystemType | String | 否 | 否 | 文件系統類型。 | 取值:
|
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時該參數有效且必須指定。當包年包月實例到期時未進行續費,實例會自動到期釋放。取值:
單位:月。 |
ChargeType | String | 否 | 否 | 付費類型。 | 取值:
|
Tags語法
"Tags": [
{
"Key": String,
"Value": String
}
]
Tags屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
Key | String | 是 | 否 | 標簽鍵。 | 長度為1~128個字符,不能以 |
Value | String | 否 | 否 | 標簽值。 | 長度為0~128個字符,不能以 |
返回值
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"
]
}
}
}
}
更多示例,請參見創建文件系統、創建權限組、創建權限規則和創建掛載點的組合示例:YAML示例。