你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Workflows - Create Or Update
创建或更新工作流。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}?api-version=2016-06-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
resource
|
path | True |
string |
资源组名称。 |
subscription
|
path | True |
string |
订阅 ID。 |
workflow
|
path | True |
string |
工作流名称。 |
api-version
|
query | True |
string |
API 版本。 |
请求正文
名称 | 类型 | 说明 |
---|---|---|
location |
string |
资源位置。 |
properties.definition |
定义。 请参阅 Azure 逻辑应用中工作流定义语言 |
|
properties.integrationAccount |
集成帐户。 |
|
properties.parameters |
<string,
Workflow |
参数。 |
properties.sku |
SKU。 |
|
properties.state |
状态。 |
|
tags |
object |
资源标记。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
还行 |
|
201 Created |
创建 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
Create or update a workflow
示例请求
PUT https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-group/providers/Microsoft.Logic/workflows/test-workflow?api-version=2016-06-01
{
"properties": {
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {
"manual": {
"type": "Request",
"kind": "Http",
"inputs": {
"schema": {}
}
}
},
"actions": {
"Find_pet_by_ID": {
"runAfter": {},
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['test-custom-connector']['connectionId']"
}
},
"method": "get",
"path": "/pet/@{encodeURIComponent('1')}"
}
}
},
"outputs": {}
},
"parameters": {
"$connections": {
"value": {
"test-custom-connector": {
"connectionId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-group/providers/Microsoft.Web/connections/test-custom-connector",
"connectionName": "test-custom-connector",
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/locations/brazilsouth/managedApis/test-custom-connector"
}
}
}
}
},
"location": "brazilsouth",
"tags": {}
}
示例响应
{
"properties": {
"provisioningState": "Succeeded",
"createdTime": "2018-04-25T01:39:21.4365247Z",
"changedTime": "2018-08-09T22:54:54.3533634Z",
"state": "Enabled",
"version": "08586677515911718341",
"accessEndpoint": "http://tempuri.org",
"integrationAccount": {
"name": "test-integration-account",
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-group/providers/Microsoft.Logic/integrationAccounts/test-integration-account",
"type": "Microsoft.Logic/integrationAccounts"
},
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"triggers": {},
"actions": {},
"outputs": {}
},
"parameters": {}
}
}
{
"properties": {
"provisioningState": "Succeeded",
"createdTime": "2018-04-25T01:39:21.4365247Z",
"changedTime": "2018-08-09T22:54:54.3533634Z",
"state": "Enabled",
"version": "08586677515911718341",
"accessEndpoint": "http://tempuri.org",
"integrationAccount": {
"name": "test-integration-account",
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-group/providers/Microsoft.Logic/integrationAccounts/test-integration-account",
"type": "Microsoft.Logic/integrationAccounts"
},
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"triggers": {},
"actions": {},
"outputs": {}
},
"parameters": {}
}
}
定义
名称 | 说明 |
---|---|
Object | |
Parameter |
|
Resource |
资源引用。 |
Sku |
SKU 类型。 |
Sku |
SKU 名称。 |
Workflow |
工作流类型。 |
Workflow |
工作流参数。 |
Workflow |
|
Workflow |
Object
ParameterType
值 | 说明 |
---|---|
Array | |
Bool | |
Float | |
Int | |
NotSpecified | |
Object | |
SecureObject | |
SecureString | |
String |
ResourceReference
资源引用。
名称 | 类型 | 说明 |
---|---|---|
id |
string |
资源 ID。 |
name |
string |
获取资源名称。 |
type |
string |
获取资源类型。 |
Sku
SKU 类型。
名称 | 类型 | 说明 |
---|---|---|
name |
名称。 |
|
plan |
计划的引用。 |
SkuName
SKU 名称。
值 | 说明 |
---|---|
Basic | |
Free | |
NotSpecified | |
Premium | |
Shared | |
Standard |
Workflow
工作流类型。
名称 | 类型 | 说明 |
---|---|---|
id |
string |
资源 ID。 |
location |
string |
资源位置。 |
name |
string |
获取资源名称。 |
properties.accessEndpoint |
string |
获取访问终结点。 |
properties.changedTime |
string (date-time) |
获取更改的时间。 |
properties.createdTime |
string (date-time) |
获取创建的时间。 |
properties.definition |
定义。 请参阅 Azure 逻辑应用中工作流定义语言 |
|
properties.integrationAccount |
集成帐户。 |
|
properties.parameters |
<string,
Workflow |
参数。 |
properties.provisioningState |
获取预配状态。 |
|
properties.sku |
SKU。 |
|
properties.state |
状态。 |
|
properties.version |
string |
获取版本。 |
tags |
object |
资源标记。 |
type |
string |
获取资源类型。 |
WorkflowParameter
工作流参数。
名称 | 类型 | 说明 |
---|---|---|
description |
string |
说明。 |
metadata |
元数据。 |
|
type |
类型。 |
|
value |
值。 |
WorkflowProvisioningState
值 | 说明 |
---|---|
Accepted | |
Canceled | |
Completed | |
Created | |
Creating | |
Deleted | |
Deleting | |
Failed | |
Moving | |
NotSpecified | |
Ready | |
Registered | |
Registering | |
Running | |
Succeeded | |
Unregistered | |
Unregistering | |
Updating |
WorkflowState
值 | 说明 |
---|---|
Completed | |
Deleted | |
Disabled | |
Enabled | |
NotSpecified | |
Suspended |