Workflows - Create Or Update

建立或更新工作流程。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}?api-version=2016-06-01

URI 參數

名稱 位於 必要 類型 Description
resourceGroupName
path True

string

資源群組名稱。

subscriptionId
path True

string

訂用帳戶標識碼。

workflowName
path True

string

工作流程名稱。

api-version
query True

string

API 版本。

要求本文

名稱 類型 Description
location

string

資源位置。

properties.definition

Object

定義。 請參閱 Azure Logic Apps 中工作流程定義語言的架構參考

properties.integrationAccount

ResourceReference

整合帳戶。

properties.parameters

<string,  WorkflowParameter>

參數。

properties.sku

Sku

SKU。

properties.state

WorkflowState

狀態。

tags

object

資源標籤。

回應

名稱 類型 Description
200 OK

Workflow

確定

201 Created

Workflow

建立時間

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

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

Scopes

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

定義

名稱 Description
Object
ParameterType
ResourceReference

資源參考。

Sku

SKU 類型。

SkuName

SKU 名稱。

Workflow

工作流程類型。

WorkflowParameter

工作流程參數。

WorkflowProvisioningState
WorkflowState

Object

ParameterType

名稱 類型 Description
Array

string

Bool

string

Float

string

Int

string

NotSpecified

string

Object

string

SecureObject

string

SecureString

string

String

string

ResourceReference

資源參考。

名稱 類型 Description
id

string

資源標識碼。

name

string

取得資源名稱。

type

string

取得資源類型。

Sku

SKU 類型。

名稱 類型 Description
name

SkuName

名稱。

plan

ResourceReference

計劃的參考。

SkuName

SKU 名稱。

名稱 類型 Description
Basic

string

Free

string

NotSpecified

string

Premium

string

Shared

string

Standard

string

Workflow

工作流程類型。

名稱 類型 Description
id

string

資源標識碼。

location

string

資源位置。

name

string

取得資源名稱。

properties.accessEndpoint

string

取得存取端點。

properties.changedTime

string

取得變更的時間。

properties.createdTime

string

取得建立的時間。

properties.definition

Object

定義。 請參閱 Azure Logic Apps 中工作流程定義語言的架構參考

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
description

string

描述。

metadata

Object

中繼資料。

type

ParameterType

類型。

value

Object

數值。

WorkflowProvisioningState

名稱 類型 Description
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

名稱 類型 Description
Completed

string

Deleted

string

Disabled

string

Enabled

string

NotSpecified

string

Suspended

string