Manage CloudFlow flows with Resource Orchestration Service (ROS)
Serverless Workflow is integrated with Alibaba Cloud Resource Orchestration Service (ROS). You can use ROS to manage flows. Instead of creating and updating each flow individually, ROS lets you declare flows as infrastructure-as-code in a template and manage their full lifecycle -- create, update, and delete -- through stack operations.
Before you begin
An Alibaba Cloud account with CloudFlow and ROS activated
Familiarity with ROS template syntax and stack operations
ALIYUN::FNF::Flow resource type
Use the ALIYUN::FNF::Flow resource type to declare a CloudFlow flow in a ROS template.
Return values
After the stack is created, retrieve these attributes with Fn::GetAtt:
| Attribute | Description |
|---|---|
Id | The unique identifier of the flow. |
CreatedTime | The timestamp when the flow was created. |
LastModifiedTime | The timestamp when the flow was last modified. |
Deploy a flow with a ROS template
Both examples below create a flow named test-ros with a single pass step. To deploy a template, create a stack from the ROS console or Alibaba Cloud CLI.
YAML format
ROSTemplateFormatVersion: '2015-09-01'
Resources:
Flow:
Type: 'ALIYUN::FNF::Flow'
Properties:
# A text description of the flow
Description: flow created from ros
# Flow definition in YAML format
Definition: |-
version: v1
type: flow
steps:
- type: pass
name: pass1
# Flow name
Name: test-ros
Outputs:
CreatedTime:
Description: The flow creation time.
Value:
'Fn::GetAtt':
- Flow
- CreatedTime
LastModifiedTime:
Description: The flow last modified time.
Value:
'Fn::GetAtt':
- Flow
- LastModifiedTime
Id:
Description: The flow ID.
Value:
'Fn::GetAtt':
- Flow
- IdJSON format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Resources": {
"Flow": {
"Type": "ALIYUN::FNF::Flow",
"Properties": {
"Name": "test-ros",
"Description": "flow created from ros",
"Definition": "version: v1\ntype: flow\nsteps:\n - type: pass\n name: pass1"
}
}
},
"Outputs": {
"CreatedTime": {
"Description": "The flow creation time.",
"Value": {
"Fn::GetAtt": [
"Flow",
"CreatedTime"
]
}
},
"LastModifiedTime": {
"Description": "The flow last modified time.",
"Value": {
"Fn::GetAtt": [
"Flow",
"LastModifiedTime"
]
}
},
"Id": {
"Description": "The flow ID.",
"Value": {
"Fn::GetAtt": [
"Flow",
"Id"
]
}
}
}
}