全部产品
Search
文档中心

资源编排:ALIYUN::DFS::FileSystem

更新时间:Aug 12, 2024

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
  }
}

属性

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

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

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

取值范围:1~5120。

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

返回值

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