Webhook - Create Or Update

Creare il webhook identificato dal nome del webhook.

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

Parametri dell'URI

Nome In Necessario Tipo Descrizione
automationAccountName
path True

string

Nome dell'account di automazione.

resourceGroupName
path True

string

Nome di un gruppo di risorse di Azure.

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

subscriptionId
path True

string

Ottiene le credenziali di sottoscrizione che consentono di identificare in modo univoco la sottoscrizione Microsoft Azure. L'ID sottoscrizione fa parte dell'URI per ogni chiamata di servizio.

webhookName
path True

string

Nome del webhook.

api-version
query True

string

Versione api client.

Corpo della richiesta

Nome Necessario Tipo Descrizione
name True

string

Ottiene o imposta il nome del webhook.

properties.expiryTime

string

Ottiene o imposta l'ora di scadenza.

properties.isEnabled

boolean

Ottiene o imposta il valore del flag abilitato del webhook.

properties.parameters

object

Ottiene o imposta i parametri del processo.

properties.runOn

string

Ottiene o imposta il nome del gruppo di lavoro ibrido in cui verrà eseguito il processo webhook.

properties.runbook

RunbookAssociationProperty

Ottiene o imposta il runbook.

properties.uri

string

Ottiene o imposta l'URI.

Risposte

Nome Tipo Descrizione
200 OK

Webhook

OK

201 Created

Webhook

Data di creazione

Other Status Codes

ErrorResponse

Risposta di errore di automazione che descrive il motivo per cui l'operazione non è riuscita.

Sicurezza

azure_auth

Flusso OAuth2 di Azure Active Directory

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

Scopes

Nome Descrizione
user_impersonation rappresentare l'account utente

Esempio

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

Definizioni

Nome Descrizione
ErrorResponse

Risposta di errore di un errore dell'operazione

RunbookAssociationProperty

Proprietà del runbook associata all'entità .

Webhook

Definizione del tipo di webhook.

WebhookCreateOrUpdateParameters

Parametri forniti all'operazione di creazione o aggiornamento del webhook.

ErrorResponse

Risposta di errore di un errore dell'operazione

Nome Tipo Descrizione
code

string

Codice di errore

message

string

Messaggio di errore che indica il motivo per cui l'operazione non è riuscita.

RunbookAssociationProperty

Proprietà del runbook associata all'entità .

Nome Tipo Descrizione
name

string

Ottiene o imposta il nome del runbook.

Webhook

Definizione del tipo di webhook.

Nome Tipo Valore predefinito Descrizione
id

string

ID risorsa completo per la risorsa

name

string

nome della risorsa.

properties.creationTime

string

Ottiene o imposta l'ora di creazione.

properties.description

string

Ottiene o imposta la descrizione.

properties.expiryTime

string

Ottiene o imposta l'ora di scadenza.

properties.isEnabled

boolean

False

Ottiene o imposta il valore del flag abilitato del webhook.

properties.lastInvokedTime

string

Ottiene o imposta l'ora dell'ultima chiamata.

properties.lastModifiedBy

string

Dettagli dell'utente che ha modificato l'ultimo webhook

properties.lastModifiedTime

string

Ottiene o imposta l'ora dell'ultima modifica.

properties.parameters

object

Ottiene o imposta i parametri del processo creato quando il webhook chiama il runbook a cui è associato.

properties.runOn

string

Ottiene o imposta il nome del gruppo di lavoro ibrido in cui verrà eseguito il processo webhook.

properties.runbook

RunbookAssociationProperty

Ottiene o imposta il runbook a cui è associato il webhook.

properties.uri

string

Ottiene o imposta l'URI del webhook.

type

string

Tipo di risorsa.

WebhookCreateOrUpdateParameters

Parametri forniti all'operazione di creazione o aggiornamento del webhook.

Nome Tipo Descrizione
name

string

Ottiene o imposta il nome del webhook.

properties.expiryTime

string

Ottiene o imposta l'ora di scadenza.

properties.isEnabled

boolean

Ottiene o imposta il valore del flag abilitato del webhook.

properties.parameters

object

Ottiene o imposta i parametri del processo.

properties.runOn

string

Ottiene o imposta il nome del gruppo di lavoro ibrido in cui verrà eseguito il processo webhook.

properties.runbook

RunbookAssociationProperty

Ottiene o imposta il runbook.

properties.uri

string

Ottiene o imposta l'URI.