Integration overview

Updated at:
Copy as MD

Cloud Parallel File Storage (CPFS) supports four methods for managing resources programmatically: SDK, command-line interface (CLI), Terraform, and Resource Orchestration Service (ROS).

Choose an integration method

Alibaba Cloud provides OpenAPI Explorer to help developers quickly and efficiently learn and use the APIs of cloud services. It combines features such as intelligent API search, documentation, online debugging, SDK acquisition, code samples, error diagnosis, and call statistics. You can use OpenAPI Explorer to call the APIs of Alibaba Cloud services and view API requests and responses. OpenAPI Explorer also automatically generates SDK sample code to help you get started with Alibaba Cloud services. For more information, see What is OpenAPI?.

Versions

Alibaba Cloud OpenAPI uses version numbers to manage API releases for its services. For example, Cloud Parallel File Storage (CPFS) currently supports the API version 2017-06-26. This identifier is a version number, not a date. It represents the API data structure and does not imply the API has been unchanged since 2017-06-26.

Note

Cloud Parallel File Storage (CPFS) and Apsara File Storage NAS share the same SDK. Therefore, use the endpoints and SDK of Apsara File Storage NAS when working with CPFS.

Version

Description

2017-06-26

Recommended

Online debugging

Cloud Parallel File Storage (CPFS) provides features such as API debugging in OpenAPI Explorer. Before you call an API, understand the versions, endpoints, and integration methods that CPFS provides.

On the OpenAPI Explorer debugging page, the left navigation pane lists file system APIs such as CreateFileSystem, DeleteFileSystem, and DescribeFileSystems. The central pane contains the parameter configuration form for the CreateFileSystem API. This form includes fields such as FileSystemType (valid values: standard, extreme, cpfs), ChargeType (valid values: PayAsYouGo, Subscription), Duration, Capacity, Bandwidth, StorageType (required, marked with a red asterisk), and ZoneId. You can select an endpoint for a specific region, such as China East 1 (Hangzhou). At the bottom of the page is a Send Request button.

Debugging entry point

To debug the API, go to Cloud Parallel File Storage (CPFS).

The following table compares the four integration methods to help you choose the one that fits your use case.

Method

How it works

When to use

SDK (recommended)

Calls OpenAPI through a language-native client library. Handles authentication, retry, and response parsing automatically.

Building applications or automation scripts in Python, Java, Go, or other supported languages. Best for most developers.

CLI

Calls OpenAPI through a command-line tool. No coding required.

Running one-off operations, writing shell scripts, or testing API calls interactively.

Terraform

Declares CPFS resources as infrastructure-as-code. Converts templates into OpenAPI calls.

Managing CPFS resources alongside other cloud infrastructure in a GitOps or infrastructure-as-code (IaC) workflow.

Resource Orchestration Service (ROS)

Uses Alibaba Cloud ROS to define and deploy resource stacks from templates.

Orchestrating CPFS resources with other Alibaba Cloud resources as part of a larger deployment stack.

Endpoints

To minimize latency, use the endpoint for the region where your CPFS resources are located. For example, the public endpoint for CPFS in the China (Ulanqab) region is nas.cn-wulanchabu.aliyuncs.com, and the VPC endpoint is nas-vpc.cn-wulanchabu.aliyuncs.com.

Two endpoint types are available:

  • Public endpoints — accessible from anywhere, including outside Alibaba Cloud.

  • VPC endpoints — accessible only from within a virtual private cloud (VPC) in the same Alibaba Cloud region. Advantages of VPC endpoints:

    • Higher security: VPC endpoints are reachable only from within a VPC, providing stronger isolation and privacy.

    • Lower latency: VPC endpoints use internal network paths, which typically offer faster response times than public endpoints and can help you avoid issues such as Internet latency and bandwidth limitations.

    • Lower cost: VPC endpoints use internal network communication.

The following table lists the supported regions and endpoints for CPFS General-purpose Edition.

Region name

Region ID

Public endpoint

VPC endpoint

China (Qingdao)

cn-qingdao

nas.cn-qingdao.aliyuncs.com

nas-vpc.cn-qingdao.aliyuncs.com

China (Beijing)

cn-beijing

nas.cn-beijing.aliyuncs.com

nas-vpc.cn-beijing.aliyuncs.com

China (Zhangjiakou)

cn-zhangjiakou

nas.cn-zhangjiakou.aliyuncs.com

nas-vpc.cn-zhangjiakou.aliyuncs.com

China (Hohhot)

cn-huhehaote

nas.cn-huhehaote.aliyuncs.com

nas-vpc.cn-huhehaote.aliyuncs.com

China (Ulanqab)

cn-wulanchabu

nas.cn-wulanchabu.aliyuncs.com

nas-vpc.cn-wulanchabu.aliyuncs.com

China (Hangzhou)

cn-hangzhou

nas.cn-hangzhou.aliyuncs.com

nas-vpc.cn-hangzhou.aliyuncs.com

China (Shanghai)

cn-shanghai

nas.cn-shanghai.aliyuncs.com

nas-vpc.cn-shanghai.aliyuncs.com

China (Shenzhen)

cn-shenzhen

nas.cn-shenzhen.aliyuncs.com

nas-vpc.cn-shenzhen.aliyuncs.com

China (Heyuan)

cn-heyuan

nas.cn-heyuan.aliyuncs.com

nas-vpc.cn-heyuan.aliyuncs.com

China (Chengdu)

cn-chengdu

nas.cn-chengdu.aliyuncs.com

nas-vpc.cn-chengdu.aliyuncs.com

Singapore

ap-southeast-1

nas.ap-southeast-1.aliyuncs.com

nas-vpc.ap-southeast-1.aliyuncs.com

Supported user identities

User identity

Support status

Alibaba Cloud account

Supported

RAM user (Recommended)

Supported

RAM role (Recommended)

Supported

We recommend using a RAM user or RAM role to make API calls, and granting permissions based on your specific business needs.

More information

Integration methods

Note

The SDK offers the simplest setup and the best long-term support. Use it unless you have a specific reason to choose another method, such as scripting shell operations (CLI) or managing infrastructure as code (Terraform or ROS).

Alibaba Cloud SDK

  • Alibaba Cloud provides SDKs for multiple programming languages, including Java, C#, Go, Python, Node.js/TypeScript, PHP, and C++. You can use these SDKs to call APIs. The SDKs simplify development by handling signing logic, timeouts, retries, and returning structured response objects. For more information about the Alibaba Cloud SDK, see Alibaba Cloud SDK.

  • You can use the Alibaba Cloud SDK to call Cloud Parallel File Storage (CPFS) APIs in OpenAPI Explorer. For information about supported languages and how to install dependencies, see File Storage (NAS/CPFS) SDK.

Alibaba Cloud CLI

The Alibaba Cloud CLI allows you to interact with Alibaba Cloud services and manage your cloud resources from the command line by using the aliyun command. For more information about the Alibaba Cloud CLI, see What is Alibaba Cloud CLI.

Manual API calls (Not recommended)

To make native HTTP calls, you must implement the signing algorithm and construct custom requests. For more information about the signing mechanism, see API reference and V3 request body and signature mechanism.

Usage notes

  • If an API call returns an error, use the returned error code to verify that your request parameters and values are correct. For more information, see Error Code Center.

  • You can also record the RequestID or SDK error message returned from the call and use the Alibaba Cloud OpenAPI Diagnosis Platform for self-service diagnostics.