ALIYUN::NAS::DataFlow

更新时间:
复制 MD 格式

Creates a data flow between a Cloud Parallel File Storage (CPFS) file system and an Object Storage Service (OSS) bucket.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

FsetId

String

Yes

No

The fileset ID.

None.

SourceStorage

String

Yes

No

The access path of the OSS bucket.

Value format: <storage type>://<path>.

Format details:

  • storage type: Only OSS is supported.

  • path: the name of the OSS bucket. The following limits apply:

    • The name can contain only lowercase letters, digits, and hyphens (-). It must start and end with a lowercase letter or digit.

    • It must be 8 to 128 characters in length.

    • It must be encoded in UTF-8.

    • It cannot start with http:// or https://.

Note

The OSS bucket must be an existing bucket in the specified region.

Description

String

No

Yes

The description of the data flow.

The following limits apply:

  • The description must be 2 to 128 characters in length.

  • It must start with a letter and cannot start with http:// or https://.

  • It can contain letters, digits, colons (:), underscores (_), and hyphens (-).

SourceSecurityType

String

No

No

The security mechanism for accessing the OSS bucket.

Required when the OSS bucket is accessed by using a security mechanism.

Valid values:

  • Null (default): No security mechanism is used to access the OSS bucket.

  • SSL: The OSS bucket is accessed by using an SSL certificate.

FileSystemId

String

Yes

No

The ID of the file system.

None.

Throughput

Integer

Yes

Yes

The maximum data flow bandwidth.

Unit: MB/s. Valid values:

  • 600

  • 1200

  • 1500

Note

The data flow bandwidth must be less than the I/O bandwidth of the file system.

AutoRefreshs

List

No

No

The automatic update configurations.

For more information, see AutoRefreshs property.

AutoRefreshPolicy

String

No

No

The automatic update policy.

Specifies how CPFS imports updated data from the OSS bucket to the CPFS file system.

Valid values:

  • None (default): CPFS does not automatically import updated data from the OSS bucket. You can import the data by running a data flow task.

  • ImportChanged: CPFS automatically imports updated data from the OSS bucket to the CPFS file system.

AutoRefreshInterval

Integer

No

No

The interval at which automatic updates are performed.

At each interval, CPFS checks the directory for updated data and automatically imports any changes.

Unit: minutes.

Valid values: 5 to 525600. Default value: 10.

AutoRefreshs syntax

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

AutoRefreshs property

Property

Type

Required

Editable

Description

Constraint

RefreshPath

String

Yes

No

The automatic update directory.

CPFS monitors data change events in the OSS bucket and checks this directory for updates. If updates exist, CPFS automatically imports them.

Empty by default. If left empty, CPFS does not automatically import updated data from the OSS bucket. You must run a manual task to import the data.

The following limits apply:

  • The directory must be 2 to 1,024 characters in length.

  • It must be encoded in UTF-8.

  • It must start and end with a forward slash (/).

  • The directory must be an existing directory in CPFS and must belong to the fileset directory of the data flow.

Return values

Fn::GetAtt

  • FileSystemId: the ID of the file system.

  • DataFlowId: the ID of the data flow.

Examples

  • YAML format

    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 format

    {
      "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"
            ]
          }
        }
      }
    }