你当前正在访问 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 参数

名称 必需 类型 说明
resourceGroupName
path True

string

资源组名称。

subscriptionId
path True

string

订阅 ID。

workflowName
path True

string

工作流名称。

api-version
query True

string

API 版本。

请求正文

名称 类型 说明
location

string

资源位置。

properties.definition

Object

定义。 请参阅 Azure 逻辑应用中工作流定义语言的架构参考

properties.integrationAccount

ResourceReference

集成帐户。

properties.parameters

<string,  WorkflowParameter>

参数。

properties.sku

Sku

SKU。

properties.state

WorkflowState

状态。

tags

object

资源标记。

响应

名称 类型 说明
200 OK

Workflow

确定

201 Created

Workflow

创建

安全性

azure_auth

Azure Active Directory OAuth2 流。

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

Create or update a workflow

Sample Request

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": {}
}

Sample Response

{
  "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
ParameterType
ResourceReference

资源引用。

Sku

SKU 类型。

SkuName

SKU 名称。

Workflow

工作流类型。

WorkflowParameter

工作流参数。

WorkflowProvisioningState
WorkflowState

Object

ParameterType

名称 类型 说明
Array

string

Bool

string

Float

string

Int

string

NotSpecified

string

Object

string

SecureObject

string

SecureString

string

String

string

ResourceReference

资源引用。

名称 类型 说明
id

string

资源 ID。

name

string

获取资源名称。

type

string

获取资源类型。

Sku

SKU 类型。

名称 类型 说明
name

SkuName

名称。

plan

ResourceReference

对计划的引用。

SkuName

SKU 名称。

名称 类型 说明
Basic

string

Free

string

NotSpecified

string

Premium

string

Shared

string

Standard

string

Workflow

工作流类型。

名称 类型 说明
id

string

资源 ID。

location

string

资源位置。

name

string

获取资源名称。

properties.accessEndpoint

string

获取访问终结点。

properties.changedTime

string

获取更改的时间。

properties.createdTime

string

获取创建时间。

properties.definition

Object

定义。 请参阅 Azure 逻辑应用中工作流定义语言的架构参考

properties.integrationAccount

ResourceReference

集成帐户。

properties.parameters

<string,  WorkflowParameter>

参数。

properties.provisioningState

WorkflowProvisioningState

获取预配状态。

properties.sku

Sku

SKU。

properties.state

WorkflowState

状态。

properties.version

string

获取版本。

tags

object

资源标记。

type

string

获取资源类型。

WorkflowParameter

工作流参数。

名称 类型 说明
description

string

说明。

metadata

Object

元数据。

type

ParameterType

类型。

value

Object

值。

WorkflowProvisioningState

名称 类型 说明
Accepted

string

Canceled

string

Completed

string

Created

string

Creating

string

Deleted

string

Deleting

string

Failed

string

Moving

string

NotSpecified

string

Ready

string

Registered

string

Registering

string

Running

string

Succeeded

string

Unregistered

string

Unregistering

string

Updating

string

WorkflowState

名称 类型 说明
Completed

string

Deleted

string

Disabled

string

Enabled

string

NotSpecified

string

Suspended

string