All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::NAS::FileSystem

Last Updated:Aug 13, 2026

Gunakan tipe resource ALIYUN::NAS::FileSystem untuk membuat sistem file.

Sintaks

{
  "Type": "ALIYUN::NAS::FileSystem",
  "Properties": {
    "SnapshotId": String,
    "Description": String,
    "StorageType": String,
    "DeletionForce": Boolean,
    "EncryptType": Integer,
    "VpcId": String,
    "ZoneId": String,
    "Capacity": Integer,
    "Tags": List,
    "ProtocolType": String,
    "FileSystemType": String,
    "Bandwidth": Integer,
    "VSwitchId": String,
    "Duration": Integer,
    "ChargeType": String,
    "ResourceGroupId": String
  }
}  

Properti

Property

Type

Required

Editable

Description

Constraints

ProtocolType

String

Yes

No

Jenis protokol.

Nilai yang valid:

  • NFS: Protokol NFS.

  • SMB: Protokol SMB.

  • cpfs: Protokol CPFS.

Bandwidth

Integer

No

No

Throughput maksimum sistem file.

Parameter ini wajib ditentukan ketika FileSystemType diatur ke cpfs. Nilai parameter ini ditentukan oleh nilai Capacity. Untuk informasi lebih lanjut, lihat halaman pembelian CPFS.

Unit: Mbps.

ChargeType

String

No

No

Metode penagihan.

Nilai yang valid:

  • PayAsYouGo: pay-as-you-go.

  • Subscription: subscription.

Duration

Integer

No

No

Durasi langganan.

Parameter ini wajib ditentukan dan hanya berlaku ketika ChargeType diatur ke Subscription. Jika Anda tidak memperpanjang instans langganan, instans tersebut akan secara otomatis dilepas setelah masa berlaku habis. Nilai yang valid:

  • 1

  • 2

  • 3

  • 6

  • 12

  • 36

Unit: bulan.

StorageType

String

Yes

No

Kelas penyimpanan.

Nilai yang valid:

  • Jika FileSystemType diatur ke standard:

    • Performance: instans komputasi-teroptimalkan.

    • Capacity: penyimpanan-teroptimalkan.

  • Jika FileSystemType diatur ke extreme:

    • standard: Menengah.

    • advance: advanced.

  • Jika FileSystemType diatur ke cpfs:

    • advance_100: garis dasar 100 MB/s/TiB.

    • advance_200: garis dasar 200 MB/s/TiB.

DeletionForce

Boolean

No

Yes

Paksa hapus?

Nilai yang valid:

  • true: memaksa menghapus sistem file.

  • false (default): tidak memaksa menghapus sistem file.

Description

String

No

Yes

Deskripsi sistem file.

Deskripsi harus terdiri dari 2 hingga 128 karakter. Deskripsi harus dimulai dengan huruf atau karakter Tionghoa dan tidak boleh dimulai dengan http:// atau https://. Deskripsi dapat berisi huruf, karakter Tionghoa, angka, titik dua (:), garis bawah (_), dan tanda hubung (-).

Tags

List

No

Yes

Tag.

Anda dapat menambahkan hingga 20 tag untuk setiap instans.

Untuk informasi lebih lanjut, lihat bagian properti Tags.

SnapshotId

String

No

No

ID snapshot.

Anda dapat membuat instans NAS dari snapshot dengan menentukan parameter ini. Fitur ini hanya tersedia untuk sistem file NAS Ekstrem.

Catatan

Versi sistem file yang Anda buat dari snapshot harus sama dengan versi sistem file sumber snapshot tersebut. Jika versinya berbeda, lakukan langkah-langkah berikut:

  1. Salin data dari sistem file sumber snapshot ke sistem file baru.

  2. Setelah data disalin, migrasikan layanan Anda ke sistem file baru.

EncryptType

Integer

No

No

Menentukan apakah data dalam sistem file dienkripsi. Anda dapat menggunakan kunci yang dikelola KMS untuk mengenkripsi data yang disimpan dalam sistem file. Saat membaca dan menulis data terenkripsi, Anda tidak perlu mendekripsi data tersebut.

Parameter ini hanya tersedia ketika FileSystemType diatur ke standard atau extreme. Nilai yang valid:

  • 0: tidak mengenkripsi data.

  • 1: mengenkripsi data.

Capacity

Integer

No

Yes

Kapasitas sistem file.

Parameter ini wajib ditentukan dan hanya berlaku ketika FileSystemType diatur ke extreme atau cpfs.

Rentang nilai:

  • Jika FileSystemType diatur ke extreme: 100 hingga 262.144.

  • Jika FileSystemType diatur ke cpfs: 2.048 hingga 512.000.

Unit: GB.

FileSystemType

String

No

No

Jenis sistem file.

Nilai yang valid:

  • standard (default): tujuan umum.

  • extreme: Extreme.

  • cpfs: sistem file paralel.

VpcId

String

No

No

ID virtual private cloud (VPC). Jika Anda menentukan VpcId dan VSwitchId, titik pemasangan default akan dikonfigurasi sebelumnya saat Anda membuat sistem file.

Parameter ini wajib ditentukan ketika FileSystemType diatur ke cpfs.

VSwitchId

String

No

No

ID vSwitch. Jika Anda menentukan VpcId dan VSwitchId, titik pemasangan default akan dikonfigurasi sebelumnya saat Anda membuat sistem file.

Parameter ini wajib ditentukan ketika FileSystemType diatur ke cpfs.

ResourceGroupId

String

No

Yes

ID kelompok sumber daya.

Tidak ada

ZoneId

String

No

No

ID zona.

Tidak ada

Sintaks Tags

"Tags": [
  {
    "Key": String,
    "Value": String
  }
]  

Properti Tags

Property Name

Type

Required

Update allowed

Description

Constraints

Key

String

Yes

No

Kunci tag.

Kunci tag dapat terdiri dari 1 hingga 128 karakter. Kunci tag tidak boleh dimulai dengan aliyun atau acs: dan tidak boleh berisi http:// atau https://.

Value

String

No

No

Nilai tag.

Nilai tag dapat terdiri dari 0 hingga 128 karakter. Nilai tag tidak boleh dimulai dengan aliyun atau acs: dan tidak boleh berisi http:// atau https://.

Nilai kembalian

Fn::GetAtt

  • FileSystemId: ID sistem file.

Contoh

Skenario 1: Buat sistem file.

Buat cepat

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

Skenario 2: Buat sistem file NAS, grup akses, aturan akses, dan titik pemasangan.

Buat cepat

ROSTemplateFormatVersion: '2015-09-01'
Description: Create NAS file systems, access groups, access rules, and mount targets, configure
  protocols, storage types, permissions, and network settings.
Parameters:
  Description:
    Type: String
    Description: File system description.
    Default: mytest
  ProtocolType:
    Type: String
    Description: Type of protocol used.
    Default: NFS
    AllowedValues:
    - NFS
    - SMB
  StorageType:
    Type: String
    Description: The file system type.
    Default: Capacity
    AllowedValues:
    - Performance
    - Capacity
  AccessGroupName:
    Type: String
    Default: mytest
  VSwitchId:
    Type: String
  VpcId:
    Type: String
  Priority:
    Type: Number
    Description: 'Allowed Values: 1~100'
    Default: 1
    MinValue: 1
    MaxValue: 100
  UserAccessType:
    Type: String
    Default: no_squash
    AllowedValues:
    - no_squash
    - root_squash
    - all_squash
  SourceCidrIp:
    Type: String
    Description: Address or address segment
    Default: 0.0.0.0/0
  RWAccessType:
    Type: String
    Description: 'Read-write permission type: RDWR (default), RDONLY'
    Default: RDWR
    AllowedValues:
    - RDWR
    - RDONLY
Resources:
  FileSystem:
    Type: ALIYUN::NAS::FileSystem
    Properties:
      ProtocolType:
        Ref: ProtocolType
      StorageType:
        Ref: StorageType
      Description:
        Ref: Description
  AccessGroup:
    Type: ALIYUN::NAS::AccessGroup
    Properties:
      AccessGroupType: Vpc
      AccessGroupName:
        Ref: AccessGroupName
  AccessRule:
    Type: ALIYUN::NAS::AccessRule
    Properties:
      Priority:
        Ref: Priority
      UserAccessType:
        Ref: UserAccessType
      AccessGroupName:
        Fn::GetAtt:
        - AccessGroup
        - AccessGroupName
      SourceCidrIp:
        Ref: SourceCidrIp
      RWAccessType:
        Ref: RWAccessType
    DependsOn: AccessGroup
  MountTarget:
    Type: ALIYUN::NAS::MountTarget
    Properties:
      VpcId:
        Ref: VpcId
      VSwitchId:
        Ref: VSwitchId
      FileSystemId:
        Fn::GetAtt:
        - FileSystem
        - FileSystemId
      NetworkType: Vpc
      AccessGroupName:
        Fn::GetAtt:
        - AccessGroup
        - AccessGroupName
    DependsOn:
    - AccessRule
    - FileSystem
Outputs:
  FileSystemId:
    Description: ID of the file system created
    Value:
      Fn::GetAtt:
      - FileSystem
      - FileSystemId
  AccessGroupName:
    Description: Permission group name
    Value:
      Fn::GetAtt:
      - AccessGroup
      - AccessGroupName
  AccessRuleId:
    Value:
      Fn::GetAtt:
      - AccessRule
      - AccessRuleId
  MountTargetDomain:
    Value:
      Fn::GetAtt:
      - MountTarget
      - MountTargetDomain
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": "Create NAS file systems, access groups, access rules, and mount targets, configure protocols, storage types, permissions, and network settings.",
  "Parameters": {
    "Description": {
      "Type": "String",
      "Description": "File system description.",
      "Default": "mytest"
    },
    "ProtocolType": {
      "Type": "String",
      "Description": "Type of protocol used.",
      "Default": "NFS",
      "AllowedValues": [
        "NFS",
        "SMB"
      ]
    },
    "StorageType": {
      "Type": "String",
      "Description": "The file system type.",
      "Default": "Capacity",
      "AllowedValues": [
        "Performance",
        "Capacity"
      ]
    },
    "AccessGroupName": {
      "Type": "String",
      "Default": "mytest"
    },
    "VSwitchId": {
      "Type": "String"
    },
    "VpcId": {
      "Type": "String"
    },
    "Priority": {
      "Type": "Number",
      "Description": "Allowed Values: 1~100",
      "Default": 1,
      "MinValue": 1,
      "MaxValue": 100
    },
    "UserAccessType": {
      "Type": "String",
      "Default": "no_squash",
      "AllowedValues": [
        "no_squash",
        "root_squash",
        "all_squash"
      ]
    },
    "SourceCidrIp": {
      "Type": "String",
      "Description": "Address or address segment",
      "Default": "0.0.0.0/0"
    },
    "RWAccessType": {
      "Type": "String",
      "Description": "Read-write permission type: RDWR (default), RDONLY",
      "Default": "RDWR",
      "AllowedValues": [
        "RDWR",
        "RDONLY"
      ]
    }
  },
  "Resources": {
    "FileSystem": {
      "Type": "ALIYUN::NAS::FileSystem",
      "Properties": {
        "ProtocolType": {
          "Ref": "ProtocolType"
        },
        "StorageType": {
          "Ref": "StorageType"
        },
        "Description": {
          "Ref": "Description"
        }
      }
    },
    "AccessGroup": {
      "Type": "ALIYUN::NAS::AccessGroup",
      "Properties": {
        "AccessGroupType": "Vpc",
        "AccessGroupName": {
          "Ref": "AccessGroupName"
        }
      }
    },
    "AccessRule": {
      "Type": "ALIYUN::NAS::AccessRule",
      "Properties": {
        "Priority": {
          "Ref": "Priority"
        },
        "UserAccessType": {
          "Ref": "UserAccessType"
        },
        "AccessGroupName": {
          "Fn::GetAtt": [
            "AccessGroup",
            "AccessGroupName"
          ]
        },
        "SourceCidrIp": {
          "Ref": "SourceCidrIp"
        },
        "RWAccessType": {
          "Ref": "RWAccessType"
        }
      },
      "DependsOn": "AccessGroup"
    },
    "MountTarget": {
      "Type": "ALIYUN::NAS::MountTarget",
      "Properties": {
        "VpcId": {
          "Ref": "VpcId"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "FileSystemId": {
          "Fn::GetAtt": [
            "FileSystem",
            "FileSystemId"
          ]
        },
        "NetworkType": "Vpc",
        "AccessGroupName": {
          "Fn::GetAtt": [
            "AccessGroup",
            "AccessGroupName"
          ]
        }
      },
      "DependsOn": [
        "AccessRule",
        "FileSystem"
      ]
    }
  },
  "Outputs": {
    "FileSystemId": {
      "Description": "ID of the file system created",
      "Value": {
        "Fn::GetAtt": [
          "FileSystem",
          "FileSystemId"
        ]
      }
    },
    "AccessGroupName": {
      "Description": "Permission group name",
      "Value": {
        "Fn::GetAtt": [
          "AccessGroup",
          "AccessGroupName"
        ]
      }
    },
    "AccessRuleId": {
      "Value": {
        "Fn::GetAtt": [
          "AccessRule",
          "AccessRuleId"
        ]
      }
    },
    "MountTargetDomain": {
      "Value": {
        "Fn::GetAtt": [
          "MountTarget",
          "MountTargetDomain"
        ]
      }
    }
  }
}

Skenario 3: Bangun model percakapan menggunakan Qwen dan LangChain.

Buat cepat

ROSTemplateFormatVersion: '2015-09-01'
Description: Create a VPC environment, configure security groups, set up an NFS file system,
  enable PAI services, and deploy a conversation model WebUI based on Qwen and LangChain.
Parameters:
  ZoneId:
    Type: String
    Label: VSwitch Availability Zone
    Description: Availability Zone ID
    AssociationProperty: ZoneId
  PAIEASInstanceType:
    Type: String
    Label: PAI-EAS instance type.
    Description: PAI-EAS instance type.
    AllowedPattern: '(^ecs.*gn.*)|(^ml.*)'
    AssociationProperty: ALIYUN::EAS::Instance::InstanceType
    AssociationPropertyMetadata:
      SubscriptionType: PayAsYouGo
Resources:
  RandomString:
    Type: ALIYUN::RandomString
    Properties:
      length: 8
      character_classes:
        - class: lowercase
          min: 1
        - class: digits
          min: 1
  Vpc:
    Type: ALIYUN::ECS::VPC
    Properties:
      CidrBlock: 192.168.0.0/16
  VSwitch:
    Type: ALIYUN::ECS::VSwitch
    Properties:
      ZoneId:
        Ref: ZoneId
      VpcId:
        Ref: Vpc
      CidrBlock: 192.168.0.0/24
  SecurityGroup:
    Type: ALIYUN::ECS::SecurityGroup
    Properties:
      VpcId:
        Ref: Vpc
      SecurityGroupIngress:
        - PortRange: 80/80
          Priority: 1
          SourceCidrIp: 0.0.0.0/0
          IpProtocol: tcp
          NicType: internet
        - PortRange: 443/443
          Priority: 1
          SourceCidrIp: 0.0.0.0/0
          IpProtocol: tcp
          NicType: internet
        - PortRange: 3389/3389
          Priority: 1
          SourceCidrIp: 0.0.0.0/0
          IpProtocol: tcp
          NicType: internet
  NasFileSystem:
    Type: ALIYUN::NAS::FileSystem
    Properties:
      ProtocolType: NFS
      FileSystemType: standard
      StorageType: Performance
      DeletionForce: true
      ZoneId:
        Ref: ZoneId
      VpcId:
        Ref: Vpc
      VSwitchId:
        Ref: VSwitch
  NasAccessGroup:
    Type: ALIYUN::NAS::AccessGroup
    Properties:
      AccessGroupType: Vpc
      AccessGroupName: 
        Fn::Sub: nas-access-group-${ALIYUN::StackId}
  NasMountTarget:
    Type: ALIYUN::NAS::MountTarget
    DependsOn:
    - NasAccessRule
    Properties:
      VpcId:
        Ref: Vpc
      VSwitchId:
        Ref: VSwitch
      NetworkType: Vpc
      AccessGroupName:
        Ref: NasAccessGroup
      FileSystemId:
        Ref: NasFileSystem
  NasAccessRule:
    Type: ALIYUN::NAS::AccessRule
    Properties:
      SourceCidrIp: 0.0.0.0/0
      AccessGroupName:
        Ref: NasAccessGroup
  Workspace:
    Type: ALIYUN::PAI::Workspace
    Properties:
      EnvTypes:
        - dev
        - prod
      Description: Build a conversational model based on Qwen and LangChain.
      WorkspaceName:
        Fn::Sub: qwen_demo_${RandomString.value}
  EAS:
    Type: ALIYUN::PAI::Service
    Properties:
      ServiceConfig:
        metadata:
          name:
            Fn::Sub: qwen_demo_${RandomString.value}
          instance: 1
          enable_webservice: 'true'
        cloud:
          computing:
            instance_type:
              Ref: PAIEASInstanceType
            instances: Null
        containers:
          - image:
              Fn::Sub:
                - 'eas-registry-vpc.${Region}.cr.aliyuncs.com/pai-eas/chat-llm-webui:2.1'
                - Region:
                    Ref: ALIYUN::Region
            script: 'python webui/webui_server.py --port=8000 --model-path=Qwen/Qwen-7B-Chat'
            port: 8000
    DependsOn:
      - Workspace
Outputs:
  Namespace:
    Description: The namespace where the service resides.
    Value:
      Fn::GetAtt:
        - EAS
        - Namespace
Metadata:
  ALIYUN::ROS::Interface:
    ParameterGroups:
      - Parameters:
          - ZoneId
          - PAIEASInstanceType
    TemplateTags:
      - acs:technical-solution:AI:Build a conversational model using Qwen and LangChain
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": "Create a VPC environment, configure security groups, set up an NFS file system, enable PAI services, and deploy a conversation model WebUI based on Qwen and LangChain.",
  "Parameters": {
    "ZoneId": {
      "Type": "String",
      "Label": "VSwitch Availability Zone",
      "Description": "Availability Zone ID",
      "AssociationProperty": "ZoneId"
    },
    "PAIEASInstanceType": {
      "Type": "String",
      "Label": "PAI-EAS instance type.",
      "Description": "PAI-EAS instance type.",
      "AllowedPattern": "(^ecs.*gn.*)|(^ml.*)",
      "AssociationProperty": "ALIYUN::EAS::Instance::InstanceType",
      "AssociationPropertyMetadata": {
        "SubscriptionType": "PayAsYouGo"
      }
    }
  },
  "Resources": {
    "RandomString": {
      "Type": "ALIYUN::RandomString",
      "Properties": {
        "length": 8,
        "character_classes": [
          {
            "class": "lowercase",
            "min": 1
          },
          {
            "class": "digits",
            "min": 1
          }
        ]
      }
    },
    "Vpc": {
      "Type": "ALIYUN::ECS::VPC",
      "Properties": {
        "CidrBlock": "192.168.0.0/16"
      }
    },
    "VSwitch": {
      "Type": "ALIYUN::ECS::VSwitch",
      "Properties": {
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "VpcId": {
          "Ref": "Vpc"
        },
        "CidrBlock": "192.168.0.0/24"
      }
    },
    "SecurityGroup": {
      "Type": "ALIYUN::ECS::SecurityGroup",
      "Properties": {
        "VpcId": {
          "Ref": "Vpc"
        },
        "SecurityGroupIngress": [
          {
            "PortRange": "80/80",
            "Priority": 1,
            "SourceCidrIp": "0.0.0.0/0",
            "IpProtocol": "tcp",
            "NicType": "internet"
          },
          {
            "PortRange": "443/443",
            "Priority": 1,
            "SourceCidrIp": "0.0.0.0/0",
            "IpProtocol": "tcp",
            "NicType": "internet"
          },
          {
            "PortRange": "3389/3389",
            "Priority": 1,
            "SourceCidrIp": "0.0.0.0/0",
            "IpProtocol": "tcp",
            "NicType": "internet"
          }
        ]
      }
    },
    "NasFileSystem": {
      "Type": "ALIYUN::NAS::FileSystem",
      "Properties": {
        "ProtocolType": "NFS",
        "FileSystemType": "standard",
        "StorageType": "Performance",
        "DeletionForce": true,
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "VpcId": {
          "Ref": "Vpc"
        },
        "VSwitchId": {
          "Ref": "VSwitch"
        }
      }
    },
    "NasAccessGroup": {
      "Type": "ALIYUN::NAS::AccessGroup",
      "Properties": {
        "AccessGroupType": "Vpc",
        "AccessGroupName": {
          "Fn::Sub": "nas-access-group-${ALIYUN::StackId}"
        }
      }
    },
    "NasMountTarget": {
      "Type": "ALIYUN::NAS::MountTarget",
      "DependsOn": [
        "NasAccessRule"
      ],
      "Properties": {
        "VpcId": {
          "Ref": "Vpc"
        },
        "VSwitchId": {
          "Ref": "VSwitch"
        },
        "NetworkType": "Vpc",
        "AccessGroupName": {
          "Ref": "NasAccessGroup"
        },
        "FileSystemId": {
          "Ref": "NasFileSystem"
        }
      }
    },
    "NasAccessRule": {
      "Type": "ALIYUN::NAS::AccessRule",
      "Properties": {
        "SourceCidrIp": "0.0.0.0/0",
        "AccessGroupName": {
          "Ref": "NasAccessGroup"
        }
      }
    },
    "Workspace": {
      "Type": "ALIYUN::PAI::Workspace",
      "Properties": {
        "EnvTypes": [
          "dev",
          "prod"
        ],
        "Description": "Build a conversational model based on Qwen and LangChain.",
        "WorkspaceName": {
          "Fn::Sub": "qwen_demo_${RandomString.value}"
        }
      }
    },
    "EAS": {
      "Type": "ALIYUN::PAI::Service",
      "Properties": {
        "ServiceConfig": {
          "metadata": {
            "name": {
              "Fn::Sub": "qwen_demo_${RandomString.value}"
            },
            "instance": 1,
            "enable_webservice": "true"
          },
          "cloud": {
            "computing": {
              "instance_type": {
                "Ref": "PAIEASInstanceType"
              },
              "instances": null
            }
          },
          "containers": [
            {
              "image": {
                "Fn::Sub": [
                  "eas-registry-vpc.${Region}.cr.aliyuncs.com/pai-eas/chat-llm-webui:2.1",
                  {
                    "Region": {
                      "Ref": "ALIYUN::Region"
                    }
                  }
                ]
              },
              "script": "python webui/webui_server.py --port=8000 --model-path=Qwen/Qwen-7B-Chat",
              "port": 8000
            }
          ]
        }
      },
      "DependsOn": [
        "Workspace"
      ]
    }
  },
  "Outputs": {
    "Namespace": {
      "Description": "The namespace where the service resides.",
      "Value": {
        "Fn::GetAtt": [
          "EAS",
          "Namespace"
        ]
      }
    }
  },
  "Metadata": {
    "ALIYUN::ROS::Interface": {
      "ParameterGroups": [
        {
          "Parameters": [
            "ZoneId",
            "PAIEASInstanceType"
          ]
        }
      ],
      "TemplateTags": [
        "acs:technical-solution:AI:Build a conversational model using Qwen and LangChain"
      ]
    }
  }
}

Untuk contoh lainnya, lihat Templat publik yang berisi resource ini.