Use Alibaba Cloud CLI to manage CloudFlow
Alibaba Cloud CLI lets you create, update, query, and delete CloudFlow resources from the command line.
Prerequisites
Before you begin, make sure that you have:
Alibaba Cloud CLI installed (latest version recommended)
Alibaba Cloud CLI configured with a valid AccessKey ID and AccessKey secret
Earlier versions of Alibaba Cloud CLI may return a "CloudFlow cannot be found" error. Update to the latest version to resolve this issue.
Command syntax
All CloudFlow CLI commands follow this pattern:
aliyun fnf <ApiName> --parameter1 value1 --parameter2 value2 ...| Component | Description |
|---|---|
aliyun | The Alibaba Cloud CLI executable |
fnf | The product code for CloudFlow |
<ApiName> | The API operation name in PascalCase, such as ListFlows or CreateFlow |
Available API operations
CloudFlow supports the following API operations through the CLI:
| API operation | Description |
|---|---|
CreateFlow | Create a flow |
DeleteFlow | Delete a flow |
UpdateFlow | Update a flow definition or configuration |
DescribeFlow | Query the details of a specific flow |
ListFlows | List all flows in the current account |
StartExecution | Start a new execution of a flow |
StopExecution | Stop a running execution |
DescribeExecution | Query the details of a specific execution |
ListExecutions | List all executions of a flow |
GetExecutionHistory | Get the event history of an execution |
DescribeRegions | Query available regions for CloudFlow |
To list all available operations from the CLI, run:
aliyun help fnfExpected output:
Alibaba Cloud CLI x.x.x
Usage:
aliyun fnf <ApiName> --parameter1 value1 --parameter2 value2 ...
Product: fnf (CloudFlow)
Version: 2019-03-15
Link: https://example.com/api/fnf
Available Api List:
CreateFlow
DeleteFlow
DescribeExecution
DescribeFlow
DescribeRegions
GetExecutionHistory
ListExecutions
ListFlows
StartExecution
StopExecution
UpdateFlow
Run `aliyun fnf <ApiName> --help` to get more information about this APIGet help for a specific API operation
To view the parameters for any API operation, append --help:
aliyun fnf ListFlows --helpExpected output:
Alibaba Cloud CLI x.x.x
Product: fnf (CloudFlow)
Link: https://xxxxxx.html
Parameters:
--Limit String Optional
--NextToken String Optional
--RequestID String OptionalThe output lists each parameter with its name, type, and whether it is required or optional.
Call an API operation
Specify the API name and required parameters to call a CloudFlow operation.
The following example lists all flows in your account:
aliyun fnf ListFlowsExpected output:
{
"Flows": [
{
"Name": "xxx",
...
}
],
"RequestId": "xxx"
}The response is returned in JSON format. Key fields include:
| Field | Description |
|---|---|
Flows | Array of flow objects. Each object contains flow details such as Name. |
RequestId | Unique identifier for the API request. Use this value when troubleshooting issues with Alibaba Cloud support. |
Next steps
Run
aliyun fnf <ApiName> --helpto view the parameters for any operation.See the CloudFlow API reference for detailed parameter descriptions, request examples, and response schemas.