All Products
Search
Document Center

CloudFlow:CreateFlow

Last Updated:Apr 11, 2024

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
NamestringYes

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:

  • The name can contain letters, digits, underscores (_), and hyphens (-).
  • The name must start with a letter or an underscore (_).
  • The name is case-sensitive.
  • The name must be 1 to 128 characters in length.
flow
DefinitionstringYes

The definition of the flow. The definition must comply with the flow definition language (FDL) syntax. Considering compatibility, the system supports two flow definition specifications.

version:&nbsp;v1.0<br/>type:&nbsp;flow<br/>steps:<br/>&nbsp;-&nbsp;type:&nbsp;pass<br/>&nbsp;name:&nbsp;mypass
DescriptionstringYes

The description of the flow.

test flow
TypestringYes

The type of the flow. Set this parameter to FDL.

FDL
RoleArnstringNo

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}
ExternalStorageLocationstringNo

The path of the external storage.

/path
ExecutionModestringNo

The execution mode. Valid values: Express and Standard. Considering compatibility, an empty string is equivalent to the Standard execution mode.

Standard

Response parameters

ParameterTypeDescriptionExample
object

The schema of response.

Typestring

The type of the flow.

Valid value:

  • FDL

FDL
Definitionstring

Considering compatibility, the system supports two flow definition specifications.

version: v1.0\ntype: flow\nname: test\nsteps:\n - type: pass\n name: mypass
RoleArnstring

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}
RequestIdstring

The request ID. Each time an HTTP status code is returned, Serverless Workflow returns a value for the parameter.

testRequestID
Descriptionstring

The description of the flow.

test flow
Namestring

The name of the flow.

flow
CreatedTimestring

The time when the flow was created.

2019-01-01T01:01:01.001Z
LastModifiedTimestring

The time when the flow was last modified.

2019-01-01T01:01:01.001Z
Idstring

The unique ID of the flow.

e589e092-e2c0-4dee-b306-3574ddfdddf5****
ExecutionModestring

The execution mode. Valid values: Express and Standard. Considering compatibility, an empty string is equivalent to the Standard execution mode.

Standard

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400ActionNotSupportedThe requested API operation '%s' is incorrect. Please check.-
400APIVersionNotSupportedThe requested API version '%s' is not supported yet. Please check.-
400EntityTooLargeThe payload size exceeds maximum allowed size (%s bytes).The payload size exceeds maximum allowed size (%s bytes).
400InvalidArgumentParameter error.Parameter error.
400MissingRequiredHeaderThe HTTP header '%s' must be specified.The HTTP header '%s' must be specified.
400MissingRequiredParamsThe HTTP query '%s' must be specified.The HTTP query '%s' must be specified.
403AccessDeniedThe resources doesn't belong to you.-
403InvalidAccessKeyIDThe AccessKey ID %s is invalid.The AccessKey ID %s is invalid.
403RequestTimeTooSkewedThe 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.
403SignatureNotMatchThe 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.
409FlowAlreadyExistsFlow %s already exists.Flow %s already exists.
415UnsupportedMediaTypeThe content type must be "application/json".The content type must be "application/json".
429ResourceThrottledThe request is throttled. Please try again later.The request is throttled. Please try again later.
500InternalServerErrorAn 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 timeSummary of changesOperation
2024-03-20The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 409
    delete Error Codes: 415
    delete Error Codes: 429
    delete Error Codes: 500
Input ParametersThe request parameters of the API has changed.
    delete Input Parameters: RequestId
2023-08-29The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 409
    delete Error Codes: 415
    delete Error Codes: 429
    delete Error Codes: 500
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: ExecutionMode
Output ParametersThe response structure of the API has changed.