Membuat sebuah flow.
Deskripsi operasi
Description
Jumlah flow yang dapat Anda buat dibatasi oleh kuota sumber daya Anda. Untuk informasi selengkapnya, lihat Limits. Jika perlu menambah kuota, Anda dapat mengajukan tiket.
Nama flow harus unik dalam satu Akun Alibaba Cloud.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
fnf:CreateFlow |
create |
*Flow
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
Yes |
Nama flow. Nama tersebut harus unik dalam wilayah yang sama dan tidak dapat diubah setelah flow dibuat. Nama harus memenuhi persyaratan berikut:
|
my_flow_name |
| Definition |
string |
Yes |
Definisi flow, yang harus mematuhi sintaks Flow Definition Language (FDL). Untuk kompatibilitas ke depan, sistem mendukung dua versi spesifikasi definisi flow. Catatan
Pada contoh definisi flow, Name: my_flow_name menentukan nama flow. Nilainya harus sama dengan nilai parameter permintaan Name. |
旧版: " type: flow version: v1 name: my_flow_name steps: - type: pass name: mypass " 新版: " Type: StateMachine SpecVersion: v1 Name: my_flow_name StartAt: my_state States: - Type: Pass Name: my_state End: true " |
| Description |
string |
Yes |
Deskripsi flow. |
my test flow |
| Type |
string |
Yes |
Tipe flow. Tetapkan nilainya ke FDL. Valid values:
|
FDL |
| RoleArn |
string |
No |
Nama Sumber Daya Alibaba Cloud (ARN) dari peran RAM yang diasumsikan oleh Serverless Workflow untuk mengakses resource saat flow dieksekusi. |
acs:ram:${region}:${accountID}:${role} |
| ExternalStorageLocation |
string |
No |
Lokasi penyimpanan eksternal. |
/path |
| ExecutionMode |
string |
No |
Mode eksekusi. Nilai yang valid: Express dan Standard. Untuk kompatibilitas ke depan, string kosong diproses sebagai mode eksekusi Standard. Valid values:
|
Standard |
| Environment |
object |
No |
Konteks lingkungan yang dapat diakses oleh flow selama eksekusi. |
|
| Variables |
array<object> |
No |
Daftar variabel lingkungan yang dapat diakses oleh flow selama eksekusi. |
|
|
object |
No |
Daftar variabel yang dapat diakses oleh flow selama eksekusi. |
||
| Name |
string |
No |
Nama variabel. |
key |
| Value |
string |
No |
Nilai variabel. |
value |
| Description |
string |
No |
Deskripsi variabel. |
description |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Data yang dikembalikan. |
||
| Type |
string |
Tipe flow. Valid values:
|
FDL |
| Definition |
string |
Definisi flow. Untuk kompatibilitas ke depan, sistem mendukung dua versi spesifikasi definisi flow. |
旧版: "type: flow\nversion: v1\nname: my_flow_name\nsteps:\n - type: pass\n name: mypass" 新版: "Type: StateMachine\nSpecVersion: v1\nName: my_flow_name\nStartAt: my_state\nStates:\n - Type: Pass\n Name: my_state\n End: true" |
| RoleArn |
string |
ARN dari peran RAM yang diasumsikan oleh Serverless Workflow untuk mengakses resource saat flow dieksekusi. |
acs:ram:${region}:${accountID}:${role} |
| RequestId |
string |
ID permintaan. Serverless Workflow mengembalikan ID permintaan untuk setiap permintaan yang memiliki |
testRequestID |
| Description |
string |
Deskripsi flow. |
my test flow |
| Name |
string |
Nama flow. |
my_flow_name |
| CreatedTime |
string |
Waktu saat flow dibuat. |
2019-01-01T01:01:01.001Z |
| LastModifiedTime |
string |
Waktu saat flow terakhir dimodifikasi. |
2019-01-01T01:01:01.001Z |
| Id |
string |
ID unik flow. |
e589e092-e2c0-4dee-b306-3574ddfdddf5**** |
| ExecutionMode |
string |
Mode eksekusi. Nilai yang valid: Express dan Standard. Untuk kompatibilitas ke depan, jika parameter ini dibiarkan kosong, mode Standard yang digunakan. |
Standard |
| Environment |
object |
Daftar variabel yang dapat diakses oleh flow selama eksekusi. |
|
| Variables |
array<object> |
Daftar variabel yang dapat diakses oleh flow selama eksekusi. |
|
|
object |
Daftar variabel yang dapat diakses oleh flow selama eksekusi. |
||
| Name |
string |
Nama variabel. |
key |
| Value |
string |
Nilai variabel. |
value |
| Description |
string |
Deskripsi variabel. |
description |
Contoh
Respons sukses
JSONformat
{
"Type": "FDL",
"Definition": "旧版:\n\"type: flow\\nversion: v1\\nname: my_flow_name\\nsteps:\\n - type: pass\\n name: mypass\"\n\n新版:\n\"Type: StateMachine\\nSpecVersion: v1\\nName: my_flow_name\\nStartAt: my_state\\nStates:\\n - Type: Pass\\n Name: my_state\\n End: true\"",
"RoleArn": "acs:ram:${region}:${accountID}:${role}",
"RequestId": "testRequestID",
"Description": "my test flow",
"Name": "my_flow_name",
"CreatedTime": "2019-01-01T01:01:01.001Z",
"LastModifiedTime": "2019-01-01T01:01:01.001Z",
"Id": "e589e092-e2c0-4dee-b306-3574ddfdddf5****",
"ExecutionMode": "Standard",
"Environment": {
"Variables": [
{
"Name": "key",
"Value": "value",
"Description": "description"
}
]
}
}
Kode kesalahan
|
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. |
| 500 | InternalServerError | An internal error has occurred. Please retry. | An internal error has occurred. Please retry. |
| 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. |
| 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. |
| 409 | FlowAlreadyExists | Flow %s already exists. | Flow %s already exists. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.