All Products
Search
Document Center

Apsara File Storage NAS:Work with ROS

Last Updated:Jul 17, 2024

You can use Resource Orchestration Service (ROS) to call Apsara File Storage NAS (NAS) resources. This topic describes how to create an ROS template and use the template to automatically create a NAS file system.

Supported resources

ROS is an Alibaba Cloud service that simplifies the management of cloud computing resources. You can create a template to describe the required cloud computing resources such as Elastic Compute Service (ECS) and ApsaraDB RDS instances, as well as the dependencies between the resources. ROS automatically creates and configures all resources based on the template to implement automated deployment and O&M. For more information, see What is ROS?

You can use ROS to call the API operations of NAS. Resources that can be orchestrated by using ROS include regular resources and data resources.

Permissions

In this example, you must create a file system. By default, ROS uses the credentials of the user who logs on to the ROS console. The user must be granted 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-side navigation pane, click Stacks. On the Stacks page, choose Create Stack > Use ROS.

    • Specify Template: Select Select an Existing Template.

    • Template Import Method: Select Enter Template Content.

  4. Template Content: Select ROS and then enter code.

    For more information about the syntax, description, and examples of how to create a file system, see ALIYUN::NAS::FileSystem.

    • YAML format

      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
    • JSON format

      {
        "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 and execute the created stack.

  6. View the result.

    image

  7. After the file system is created, click the Resources tab to view the ID of the fie system in the Resource ID column. You can click the resource ID in the Resource ID column to go to the details page of the file system.

    image