Digital Twin - Invoke Component Command

叫用數字對應項命令。

POST https://fully-qualified-iothubname.azure-devices.net/digitaltwins/{id}/components/{componentPath}/commands/{commandName}?api-version=2021-04-12
POST https://fully-qualified-iothubname.azure-devices.net/digitaltwins/{id}/components/{componentPath}/commands/{commandName}?api-version=2021-04-12&connectTimeoutInSeconds={connectTimeoutInSeconds}&responseTimeoutInSeconds={responseTimeoutInSeconds}

URI 參數

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

string

componentPath
path True

string

id
path True

string

api-version
query True

string

Api 的版本。

connectTimeoutInSeconds
query

integer

int32

數字對應項命令將等候答案的最大時間間隔,以秒為單位。

responseTimeoutInSeconds
query

integer

int32

數字對應項命令將等候答案的最大時間間隔,以秒為單位。

要求本文

名稱 類型 Description
payload

object

回應

名稱 類型 Description
200 OK

object

傳回數字對應項命令回應承載

Headers

  • x-ms-command-statuscode: integer
  • x-ms-request-id: string