Create a NAS file system by using ROS
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:
Regular resources
ALIYUN::NAS::AccessGroup: creates a permission group.
ALIYUN::NAS::AccessRule: creates a rule for a permission group.
ALIYUN::NAS::FileSystem: creates a NAS file system.
ALIYUN::NAS::MountTarget: creates a mount target.
Data resources
DATASOURCE::NAS::AccessGroups: queries the details of permission groups.
DATASOURCE::NAS::FileSystems: queries the details of file systems.
DATASOURCE::NAS::Zones: queries zones.
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
Log on to the ROS console.
In the top navigation bar, select a region.
In the left navigation pane, click Stacks and select .
Specify template: Select Select an Existing Template.
Template entry method: Select Enter Template Content.
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" ] } } } }Click Create to create the stack.
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.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.