Create a NAS file system by using ROS

Updated at:

Automatically create a NAS file system by defining it in a Resource Orchestration Service (ROS) template.

Supported resources

An ROS template declares the cloud resources you need, such as Elastic Compute Service (ECS) and ApsaraDB RDS instances, along with their dependencies. ROS then automatically creates and configures these resources. For more information, see What is Resource Orchestration Service

ROS supports the following NAS resource types:

Permissions

By default, ROS uses the credentials of the current user. To create a file system, grant the user the following permission:

  • AliyunNASFullAccess: grants full permissions on NAS.

Procedure

  1. Log on to the ROS console.

  2. In the top navigation bar, select a region.

  3. In the left navigation pane, click Stacks and select Use ROS.

    • Specify template: Select Select an Existing Template.

    • Template entry method: Select Enter Template Content.

  4. Template content Select ROS and enter the code.

    For the syntax and examples of creating a file system, see ALIYUN::NAS::FileSystem.

    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
    {
      "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"
            ]
          }
        }
      }
    }
  5. Click Create to create the stack.

  6. View the result.

    On the Stack information tab, Status is displayed as Created successfully (green check mark) and the status description reads Stack CREATE completed successfully, indicating that the stack has been created successfully.

  7. After the stack is created, click the Resources tab to view the ID of the created file system, which is Resource ID. You can click Resource ID to go to the file system details page for more information.