文档

ALIYUN::NAS::DataFlow

更新时间:

ALIYUN::NAS::DataFlow类型用于创建一个CPFS文件系统与源端存储的数据流动。

语法

{
  "Type": "ALIYUN::NAS::DataFlow",
  "Properties": {
    "FsetId": String,
    "SourceStorage": String,
    "Description": String,
    "SourceSecurityType": String,
    "FileSystemId": String,
    "Throughput": Integer,
    "AutoRefreshs": List,
    "AutoRefreshPolicy": String,
    "AutoRefreshInterval": Integer
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

FsetId

String

Fileset ID。

SourceStorage

String

源端存储的访问路径。

格式:<storage type>://<path>

取值:

  • storage type:目前只支持OSS。

  • path:OSS的Bucket名称。限制如下:

    • 仅支持小写字母、数字和短划线(-)且必须以小写字母或者数字开头和结尾。

    • 长度为8~128个英文字符。

    • 使用UTF-8编码。

    • 不能以http://https://开头。

说明

OSS Bucket必须为该地域已存在的Bucket。

Description

String

数据流动的描述。

限制:

  • 长度为2~128个英文或中文字符。

  • 必须以大小写字母或中文开头,不能以http://https://开头。

  • 可以包含数字、半角冒号(:)、下划线(_)或者短划线(-)。

SourceSecurityType

String

源端存储的安全保护类型。

如果源端存储必须通过安全保护访问,请指定源端存储的安全保护类型。

取值:

  • 无(默认值):表示源端存储不需要通过安全保护方式访问。

  • SSL:通过SSL证书保护访问。

FileSystemId

String

文件系统ID。

Throughput

Integer

数据流动的传输带宽上限。

单位:MB/s 。取值:

  • 600

  • 1200

  • 1500

说明

数据流动的传输带宽必须小于文件系统的IO带宽。

AutoRefreshs

List

自动更新配置信息集合。

更多信息,请参见属性

AutoRefreshPolicy

String

自动更新策略。

源端数据更新以后,数据更新导入到CPFS的策略。

取值:

  • None(默认值):源端的数据更新不自动导入CPFS,用户可通过数据流动任务导入源端的数据更新。

  • ImportChanged:源端的数据更新自动导入CPFS。

AutoRefreshInterval

Integer

自动更新间隔时间。

每隔该时间间隔,CPFS检查目录内是否存在数据更新,如果有数据更新,启动自动更新任务。

单位:分钟。

取值范围:5~525600,默认值:10。

AutoRefreshs语法

"AutoRefreshs": [
  {
    "RefreshPath": String
  }
]

AutoRefreshs属性

属性名称

类型

必须

允许更新

描述

约束

RefreshPath

String

自动更新目录。

CPFS注册源端存储的数据修改事件,检查该目录下的源端数据是否发生更新并自动导入更新的数据。

默认为空,源端存储的任何数据更新不会自动导入 CPFS,需要通过手动任务导入更新。

限制:

  • 长度为2~1024个字符。

  • 使用UTF-8编码。

  • 必须以正斜线(/)开头和结尾。

  • 该目录必须是CPFS上的已有目录,且必须位于该数据流动的Fileset目录中。

返回值

Fn::GetAtt

  • FileSystemId:文件系统ID。

  • DataFlowId:数据流动ID。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      FileSystemId:
        Default: cpfs-03c125afccb****
        Type: String
      FsetId:
        Default: fset-1902718ea0ae****
        Type: String
      FileSystemPath:
        Default: "/rostestfilesystempath/"
        Type: String
      SourceStorage:
        Default: oss://cpfs-data-flow-source-test-****
        Type: String
    Resources:
      DataFlow:
        Type: ALIYUN::NAS::DataFlow
        Properties:
          SourceSecurityType: SSL
          Description: ros_test_data_flow
          AutoRefreshPolicy: ImportChanged
          FileSystemId:
            Ref: FileSystemId
          FsetId:
            Ref: FsetId
          Throughput: 600
          AutoRefreshs:
          - RefreshPath:
              Ref: FileSystemPath
          AutoRefreshInterval: 10
          SourceStorage:
            Ref: SourceStorage
    Outputs:
      DataFlowId:
        Value:
          Fn::GetAtt:
          - DataFlow
          - DataFlowId
      FileSystemId:
        Value:
          Fn::GetAtt:
          - DataFlow
          - FileSystemId
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "FileSystemId": {
          "Default": "cpfs-03c125afccb****",
          "Type": "String"
        },
        "FsetId": {
          "Default": "fset-1902718ea0ae****",
          "Type": "String"
        },
        "FileSystemPath": {
          "Default": "/rostestfilesystempath/",
          "Type": "String"
        },
        "SourceStorage": {
          "Default": "oss://cpfs-data-flow-source-test-****",
          "Type": "String"
        }
      },
      "Resources": {
        "DataFlow": {
          "Type": "ALIYUN::NAS::DataFlow",
          "Properties": {
            "SourceSecurityType": "SSL",
            "Description": "ros_test_data_flow",
            "AutoRefreshPolicy": "ImportChanged",
            "FileSystemId": {
              "Ref": "FileSystemId"
            },
            "FsetId": {
              "Ref": "FsetId"
            },
            "Throughput": 600,
            "AutoRefreshs": [
              {
                "RefreshPath": {
                  "Ref": "FileSystemPath"
                }
              }
            ],
            "AutoRefreshInterval": 10,
            "SourceStorage": {
              "Ref": "SourceStorage"
            }
          }
        }
      },
      "Outputs": {
        "DataFlowId": {
          "Value": {
            "Fn::GetAtt": [
              "DataFlow",
              "DataFlowId"
            ]
          }
        },
        "FileSystemId": {
          "Value": {
            "Fn::GetAtt": [
              "DataFlow",
              "FileSystemId"
            ]
          }
        }
      }
    }
  • 本页导读 (1)
文档反馈