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

语法

{
  "Type": "ALIYUN::DFS::FileSystem",
  "Properties": {
    "SpaceCapacity": Integer,
    "Description": String,
    "StorageType": String,
    "ZoneId": String,
    "PartitionNumber": Integer,
    "ProtocolType": String,
    "DataRedundancyType": String,
    "FileSystemName": String,
    "ProvisionedThroughputInMiBps": Integer,
    "ThroughputMode": String,
    "StorageSetName": String
  }
}

属性

属性名称 类型 必须 允许更新 描述 约束
SpaceCapacity Integer 文件系统容量预算。
Description String 文件系统的描述信息。
StorageType String 存储介质类型。 取值:
  • STANDARD:标准型。
  • PERFORMANCE:性能型。
ZoneId String 可用区ID。
PartitionNumber Integer 预留参数。
ProtocolType String 协议类型。 取值:HDFS。
DataRedundancyType String 文件系统的冗余模式。 取值:
  • LRS(默认值):本地冗余。
  • ZRS:同城冗余。

    当您选择ZRS时,zoneId为期望同城冗余的多个可用区列表组成的字符串,例如 :zoneId1,zoneId2

FileSystemName String 文件系统名称。 命名规则如下:
  • 长度为6~100个字符。
  • 全局唯一且不能为空串。
  • 支持英文字母,可包含数字和下划线(_)。
ProvisionedThroughputInMiBps Integer 预置吞吐量。 单位:MB/s。

取值范围:1~5120。

ThroughputMode String 吞吐模式。 取值:
  • Standard(默认值):标准吞吐。
  • Provisioned:预置吞吐。
StorageSetName String 预留参数。

返回值

Fn::GetAtt

FileSystemId:文件系统ID。

示例

  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "SpaceCapacity": {
          "Type": "Number",
          "Description": "Capacity of the file system.\nWhen the actual data volume reaches the file system capacity, data cannot be written.\nUnit: GB"
        },
        "StorageType": {
          "Type": "String",
          "Description": "Type of storage media.\nValues:\nSTANDARD (default) : standard type.\nPERFORMANCE: performance type.",
          "AllowedValues": [
            "STANDARD",
            "PERFORMANCE"
          ],
          "Default": "STANDARD"
        },
        "ZoneId": {
          "Type": "String",
          "Description": "zone id"
        },
        "ProtocolType": {
          "Type": "String",
          "Description": "Protocol type, only support HDFS(HadoopFileSystem)",
          "AllowedValues": [
            "HDFS"
          ]
        }
      },
      "Resources": {
        "FileSystem": {
          "Type": "ALIYUN::DFS::FileSystem",
          "Properties": {
            "SpaceCapacity": {
              "Ref": "SpaceCapacity"
            },
            "StorageType": {
              "Ref": "StorageType"
            },
            "ZoneId": {
              "Ref": "ZoneId"
            },
            "ProtocolType": {
              "Ref": "ProtocolType"
            }
          }
        }
      },
      "Outputs": {
        "FileSystemId": {
          "Description": "The ID of the file system.",
          "Value": {
            "Fn::GetAtt": [
              "FileSystem",
              "FileSystemId"
            ]
          }
        }
      }
    }
  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      SpaceCapacity:
        Type: Number
        Description: |-
          Capacity of the file system.
          When the actual data volume reaches the file system capacity, data cannot be written.
          Unit: GB
      StorageType:
        Type: String
        Description: |-
          Type of storage media.
          Values:
          STANDARD (default) : standard type.
          PERFORMANCE: performance type.
        AllowedValues:
          - STANDARD
          - PERFORMANCE
        Default: STANDARD
      ZoneId:
        Type: String
        Description: zone id
      ProtocolType:
        Type: String
        Description: Protocol type, only support HDFS(HadoopFileSystem)
        AllowedValues:
          - HDFS
    Resources:
      FileSystem:
        Type: ALIYUN::DFS::FileSystem
        Properties:
          SpaceCapacity:
            Ref: SpaceCapacity
          StorageType:
            Ref: StorageType
          ZoneId:
            Ref: ZoneId
          ProtocolType:
            Ref: ProtocolType
    Outputs:
      FileSystemId:
        Description: The ID of the file system.
        Value:
          Fn::GetAtt:
            - FileSystem
            - FileSystemId