Use Alibaba Cloud CLI to manage CloudFlow

Updated at:

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:

Important

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 ...
ComponentDescription
aliyunThe Alibaba Cloud CLI executable
fnfThe 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 operationDescription
CreateFlowCreate a flow
DeleteFlowDelete a flow
UpdateFlowUpdate a flow definition or configuration
DescribeFlowQuery the details of a specific flow
ListFlowsList all flows in the current account
StartExecutionStart a new execution of a flow
StopExecutionStop a running execution
DescribeExecutionQuery the details of a specific execution
ListExecutionsList all executions of a flow
GetExecutionHistoryGet the event history of an execution
DescribeRegionsQuery available regions for CloudFlow

To list all available operations from the CLI, run:

aliyun help fnf

Expected 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 API

Get help for a specific API operation

To view the parameters for any API operation, append --help:

aliyun fnf ListFlows --help

Expected output:

Alibaba Cloud CLI x.x.x

Product: fnf (CloudFlow)
Link: https://xxxxxx.html

Parameters:
  --Limit     String  Optional
  --NextToken String  Optional
  --RequestID String  Optional

The 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 ListFlows

Expected output:

{
    "Flows": [
        {
            "Name": "xxx",
            ...
        }
    ],
    "RequestId": "xxx"
}

The response is returned in JSON format. Key fields include:

FieldDescription
FlowsArray of flow objects. Each object contains flow details such as Name.
RequestIdUnique identifier for the API request. Use this value when troubleshooting issues with Alibaba Cloud support.

Next steps

  • Run aliyun fnf <ApiName> --help to view the parameters for any operation.

  • See the CloudFlow API reference for detailed parameter descriptions, request examples, and response schemas.