Webhook - Create Or Update

Buat webhook yang diidentifikasi dengan nama webhook.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}?api-version=2015-10-31

Parameter URI

Name In Required Type Description
automationAccountName
path True
  • string

Nama akun otomatisasi.

resourceGroupName
path True
  • string

Nama grup Sumber Daya Azure.

Regex pattern: ^[-\w\._]+$

subscriptionId
path True
  • string

Mendapatkan kredensial langganan yang secara unik mengidentifikasi langganan Microsoft Azure. ID langganan membentuk bagian dari URI untuk setiap panggilan layanan.

webhookName
path True
  • string

Nama webhook.

api-version
query True
  • string

Versi Api Klien.

Isi Permintaan

Name Required Type Description
name True
  • string

Mendapatkan atau mengatur nama webhook.

properties.expiryTime
  • string

Mendapatkan atau mengatur waktu kedaluwarsa.

properties.isEnabled
  • boolean

Mendapatkan atau menetapkan nilai bendera webhook yang diaktifkan.

properties.parameters
  • object

Mendapatkan atau mengatur parameter pekerjaan.

properties.runOn
  • string

Mendapatkan atau mengatur nama grup hybrid worker tempat pekerjaan webhook akan berjalan.

properties.runbook

Mendapatkan atau mengatur runbook.

properties.uri
  • string

Mendapatkan atau mengatur uri.

Respons

Name Type Description
200 OK

OK

201 Created

Dibuat

Other Status Codes

Respons kesalahan automasi yang menjelaskan mengapa operasi gagal.

Keamanan

azure_auth

Azure Active Directory Flow OAuth2

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

Scopes

Name Description
user_impersonation meniru akun pengguna Anda

Contoh

Create or update webhook

Sample Request

PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/webhooks/TestWebhook?api-version=2015-10-31

{
  "name": "TestWebhook",
  "properties": {
    "isEnabled": true,
    "uri": "<uri>",
    "expiryTime": "2018-03-29T22:18:13.7002872Z",
    "runbook": {
      "name": "TestRunbook"
    }
  }
}

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/webhooks/TestWebhook",
  "name": "TestWebhook",
  "type": "Microsoft.Automation/AutomationAccounts/Webhooks",
  "properties": {
    "isEnabled": true,
    "expiryTime": "2018-03-29T22:18:13.7002872+00:00",
    "runbook": {
      "name": "TestRunbook"
    },
    "lastInvokedTime": null,
    "runOn": null,
    "parameters": null,
    "uri": "",
    "creationTime": "2017-03-29T22:18:14.6651862+00:00",
    "lastModifiedBy": "",
    "lastModifiedTime": "2017-03-29T22:18:14.6651862+00:00"
  }
}
{
  "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/webhooks/TestWebhook",
  "name": "TestWebhook",
  "type": "Microsoft.Automation/AutomationAccounts/Webhooks",
  "properties": {
    "isEnabled": true,
    "expiryTime": "2018-03-29T22:18:13.7002872+00:00",
    "runbook": {
      "name": "TestRunbook"
    },
    "lastInvokedTime": null,
    "runOn": null,
    "parameters": null,
    "uri": "",
    "creationTime": "2017-03-29T22:18:14.6651862+00:00",
    "lastModifiedBy": "",
    "lastModifiedTime": "2017-03-29T22:18:14.6651862+00:00"
  }
}

Definisi

ErrorResponse

Respons kesalahan kegagalan operasi

RunbookAssociationProperty

Properti runbook yang terkait dengan entitas.

Webhook

Definisi jenis webhook.

WebhookCreateOrUpdateParameters

Parameter yang disediakan untuk operasi buat atau perbarui webhook.

ErrorResponse

Respons kesalahan kegagalan operasi

Name Type Description
code
  • string

Kode kesalahan

message
  • string

Pesan kesalahan yang menunjukkan mengapa operasi gagal.

RunbookAssociationProperty

Properti runbook yang terkait dengan entitas.

Name Type Description
name
  • string

Mendapatkan atau mengatur nama runbook.

Webhook

Definisi jenis webhook.

Name Type Default Value Description
id
  • string

Id sumber daya yang sepenuhnya memenuhi syarat untuk sumber daya

name
  • string

Nama sumber daya.

properties.creationTime
  • string

Mendapatkan atau mengatur waktu pembuatan.

properties.description
  • string

Mendapatkan atau mengatur deskripsi.

properties.expiryTime
  • string

Mendapatkan atau mengatur waktu kedaluwarsa.

properties.isEnabled
  • boolean
False

Mendapatkan atau menetapkan nilai bendera webhook yang diaktifkan.

properties.lastInvokedTime
  • string

Mendapatkan atau mengatur waktu terakhir yang dipanggil.

properties.lastModifiedBy
  • string

Detail pengguna yang terakhir mengubah Webhook

properties.lastModifiedTime
  • string

Mendapatkan atau mengatur waktu terakhir yang dimodifikasi.

properties.parameters
  • object

Mendapatkan atau mengatur parameter pekerjaan yang dibuat saat webhook memanggil runbook yang terkait dengannya.

properties.runOn
  • string

Mendapatkan atau mengatur nama grup hybrid worker tempat pekerjaan webhook akan berjalan.

properties.runbook

Mendapatkan atau mengatur runbook yang dikaitkan dengan webhook.

properties.uri
  • string

Mendapatkan atau mengatur uri webhook.

type
  • string

Jenis sumber daya.

WebhookCreateOrUpdateParameters

Parameter yang disediakan untuk operasi buat atau perbarui webhook.

Name Type Description
name
  • string

Mendapatkan atau mengatur nama webhook.

properties.expiryTime
  • string

Mendapatkan atau mengatur waktu kedaluwarsa.

properties.isEnabled
  • boolean

Mendapatkan atau menetapkan nilai bendera webhook yang diaktifkan.

properties.parameters
  • object

Mendapatkan atau mengatur parameter pekerjaan.

properties.runOn
  • string

Mendapatkan atau mengatur nama grup hybrid worker tempat pekerjaan webhook akan berjalan.

properties.runbook

Mendapatkan atau mengatur runbook.

properties.uri
  • string

Mendapatkan atau mengatur uri.