Creates a flow.
Operation description
Usage notes
- The number of flows that each user can create is restricted by resources. For more information, see Limits . If you want to create more flows, submit a ticket.
- At the user level, flows are distinguished by name. The name of a flow within one account must be unique.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
fnf:CreateFlow | create |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Name | string | Yes | The name of the flow. The name is unique within the same region and cannot be modified after the flow is created. Set this parameter based on the following rules:
| flow |
Definition | string | Yes | The definition of the workflow. The definition must comply with the flow definition language (FDL) syntax. Considering compatibility, the system supports two flow definition specifications. Note
In the preceding flow definition example, Name:my_flow_name is the workflow name, which must be consistent with the input parameter Name
| version: v1.0<br/>type: flow<br/>steps:<br/> - type: pass<br/> name: mypass |
Description | string | Yes | The description of the flow. | test flow |
Type | string | Yes | The type of the flow. Set this parameter to FDL. | FDL |
RoleArn | string | No | The Alibaba Cloud resource name (ARN) of the authorized role on which the execution of the flow relies. During the execution of the flow, CloudFlow assumes the role to call API operations of relevant services. | acs:ram:${region}:${accountID}:${role} |
ExternalStorageLocation | string | No | The path of the external storage. | /path |
ExecutionMode | string | No | The execution mode. Valid values: Express and Standard. Considering compatibility, an empty string is equivalent to the Standard execution mode. | Standard |
Response parameters
Examples
Sample success responses
JSON
format
{
"Type": "FDL",
"Definition": "version: v1.0\\ntype: flow\\nname: test\\nsteps:\\n - type: pass\\n name: mypass",
"RoleArn": "acs:ram:${region}:${accountID}:${role}",
"RequestId": "testRequestID",
"Description": "test flow",
"Name": "flow",
"CreatedTime": "2019-01-01T01:01:01.001Z",
"LastModifiedTime": "2019-01-01T01:01:01.001Z",
"Id": "e589e092-e2c0-4dee-b306-3574ddfdddf5****",
"ExecutionMode": "Standard"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | ActionNotSupported | The requested API operation '%s' is incorrect. Please check. | - |
400 | APIVersionNotSupported | The requested API version '%s' is not supported yet. Please check. | - |
400 | EntityTooLarge | The payload size exceeds maximum allowed size (%s bytes). | The payload size exceeds maximum allowed size (%s bytes). |
400 | InvalidArgument | Parameter error. | Parameter error. |
400 | MissingRequiredHeader | The HTTP header '%s' must be specified. | The HTTP header '%s' must be specified. |
400 | MissingRequiredParams | The HTTP query '%s' must be specified. | The HTTP query '%s' must be specified. |
403 | AccessDenied | The resources doesn't belong to you. | - |
403 | InvalidAccessKeyID | The AccessKey ID %s is invalid. | The AccessKey ID %s is invalid. |
403 | RequestTimeTooSkewed | The difference between the request time %s and the current time %s is too large. | The difference between the request time %s and the current time %s is too large. |
403 | SignatureNotMatch | The request signature we calculated does not match the signature you provided. Check your access key and signing method. | The calculated signature of the request does not match the signature you provided. Check your AccessKey Secret and signing algorithm. |
409 | FlowAlreadyExists | Flow %s already exists. | Flow %s already exists. |
415 | UnsupportedMediaType | The content type must be "application/json". | The content type must be "application/json". |
429 | ResourceThrottled | The request is throttled. Please try again later. | The request is throttled. Please try again later. |
500 | InternalServerError | An internal error has occurred. Please retry. | An internal error has occurred. Please retry. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-03-20 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-08-29 | The Error code has changed. The request parameters of the API has changed. The response structure of the API has changed | View Change Details |