1. Packages
  2. Azure Native
  3. API Docs
  4. automation
  5. Webhook
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native.automation.Webhook

Explore with Pulumi AI

Definition of the webhook type.

Uses Azure REST API version 2015-10-31. In version 1.x of the Azure Native provider, it used API version 2015-10-31.

Other available API versions: 2023-05-15-preview, 2024-10-23.

Example Usage

Create or update webhook

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var webhook = new AzureNative.Automation.Webhook("webhook", new()
    {
        AutomationAccountName = "myAutomationAccount33",
        ExpiryTime = "2018-03-29T22:18:13.7002872Z",
        IsEnabled = true,
        Name = "TestWebhook",
        ResourceGroupName = "rg",
        Runbook = new AzureNative.Automation.Inputs.RunbookAssociationPropertyArgs
        {
            Name = "TestRunbook",
        },
        Uri = "<uri>",
        WebhookName = "TestWebhook",
    });

});
Copy
package main

import (
	automation "github.com/pulumi/pulumi-azure-native-sdk/automation/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := automation.NewWebhook(ctx, "webhook", &automation.WebhookArgs{
			AutomationAccountName: pulumi.String("myAutomationAccount33"),
			ExpiryTime:            pulumi.String("2018-03-29T22:18:13.7002872Z"),
			IsEnabled:             pulumi.Bool(true),
			Name:                  pulumi.String("TestWebhook"),
			ResourceGroupName:     pulumi.String("rg"),
			Runbook: &automation.RunbookAssociationPropertyArgs{
				Name: pulumi.String("TestRunbook"),
			},
			Uri:         pulumi.String("<uri>"),
			WebhookName: pulumi.String("TestWebhook"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.automation.Webhook;
import com.pulumi.azurenative.automation.WebhookArgs;
import com.pulumi.azurenative.automation.inputs.RunbookAssociationPropertyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var webhook = new Webhook("webhook", WebhookArgs.builder()
            .automationAccountName("myAutomationAccount33")
            .expiryTime("2018-03-29T22:18:13.7002872Z")
            .isEnabled(true)
            .name("TestWebhook")
            .resourceGroupName("rg")
            .runbook(RunbookAssociationPropertyArgs.builder()
                .name("TestRunbook")
                .build())
            .uri("<uri>")
            .webhookName("TestWebhook")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const webhook = new azure_native.automation.Webhook("webhook", {
    automationAccountName: "myAutomationAccount33",
    expiryTime: "2018-03-29T22:18:13.7002872Z",
    isEnabled: true,
    name: "TestWebhook",
    resourceGroupName: "rg",
    runbook: {
        name: "TestRunbook",
    },
    uri: "<uri>",
    webhookName: "TestWebhook",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

webhook = azure_native.automation.Webhook("webhook",
    automation_account_name="myAutomationAccount33",
    expiry_time="2018-03-29T22:18:13.7002872Z",
    is_enabled=True,
    name="TestWebhook",
    resource_group_name="rg",
    runbook={
        "name": "TestRunbook",
    },
    uri="<uri>",
    webhook_name="TestWebhook")
Copy
resources:
  webhook:
    type: azure-native:automation:Webhook
    properties:
      automationAccountName: myAutomationAccount33
      expiryTime: 2018-03-29T22:18:13.7002872Z
      isEnabled: true
      name: TestWebhook
      resourceGroupName: rg
      runbook:
        name: TestRunbook
      uri: <uri>
      webhookName: TestWebhook
Copy

Create Webhook Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Webhook(name: string, args: WebhookArgs, opts?: CustomResourceOptions);
@overload
def Webhook(resource_name: str,
            args: WebhookArgs,
            opts: Optional[ResourceOptions] = None)

@overload
def Webhook(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            automation_account_name: Optional[str] = None,
            name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            expiry_time: Optional[str] = None,
            is_enabled: Optional[bool] = None,
            parameters: Optional[Mapping[str, str]] = None,
            run_on: Optional[str] = None,
            runbook: Optional[RunbookAssociationPropertyArgs] = None,
            uri: Optional[str] = None,
            webhook_name: Optional[str] = None)
func NewWebhook(ctx *Context, name string, args WebhookArgs, opts ...ResourceOption) (*Webhook, error)
public Webhook(string name, WebhookArgs args, CustomResourceOptions? opts = null)
public Webhook(String name, WebhookArgs args)
public Webhook(String name, WebhookArgs args, CustomResourceOptions options)
type: azure-native:automation:Webhook
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. WebhookArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. WebhookArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. WebhookArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. WebhookArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. WebhookArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var azure_nativeWebhookResource = new AzureNative.Automation.Webhook("azure-nativeWebhookResource", new()
{
    AutomationAccountName = "string",
    Name = "string",
    ResourceGroupName = "string",
    ExpiryTime = "string",
    IsEnabled = false,
    Parameters = 
    {
        { "string", "string" },
    },
    RunOn = "string",
    Runbook = new AzureNative.Automation.Inputs.RunbookAssociationPropertyArgs
    {
        Name = "string",
    },
    Uri = "string",
    WebhookName = "string",
});
Copy
example, err := automation.NewWebhook(ctx, "azure-nativeWebhookResource", &automation.WebhookArgs{
	AutomationAccountName: pulumi.String("string"),
	Name:                  pulumi.String("string"),
	ResourceGroupName:     pulumi.String("string"),
	ExpiryTime:            pulumi.String("string"),
	IsEnabled:             pulumi.Bool(false),
	Parameters: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	RunOn: pulumi.String("string"),
	Runbook: &automation.RunbookAssociationPropertyArgs{
		Name: pulumi.String("string"),
	},
	Uri:         pulumi.String("string"),
	WebhookName: pulumi.String("string"),
})
Copy
var azure_nativeWebhookResource = new Webhook("azure-nativeWebhookResource", WebhookArgs.builder()
    .automationAccountName("string")
    .name("string")
    .resourceGroupName("string")
    .expiryTime("string")
    .isEnabled(false)
    .parameters(Map.of("string", "string"))
    .runOn("string")
    .runbook(RunbookAssociationPropertyArgs.builder()
        .name("string")
        .build())
    .uri("string")
    .webhookName("string")
    .build());
Copy
azure_native_webhook_resource = azure_native.automation.Webhook("azure-nativeWebhookResource",
    automation_account_name="string",
    name="string",
    resource_group_name="string",
    expiry_time="string",
    is_enabled=False,
    parameters={
        "string": "string",
    },
    run_on="string",
    runbook={
        "name": "string",
    },
    uri="string",
    webhook_name="string")
Copy
const azure_nativeWebhookResource = new azure_native.automation.Webhook("azure-nativeWebhookResource", {
    automationAccountName: "string",
    name: "string",
    resourceGroupName: "string",
    expiryTime: "string",
    isEnabled: false,
    parameters: {
        string: "string",
    },
    runOn: "string",
    runbook: {
        name: "string",
    },
    uri: "string",
    webhookName: "string",
});
Copy
type: azure-native:automation:Webhook
properties:
    automationAccountName: string
    expiryTime: string
    isEnabled: false
    name: string
    parameters:
        string: string
    resourceGroupName: string
    runOn: string
    runbook:
        name: string
    uri: string
    webhookName: string
Copy

Webhook Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Webhook resource accepts the following input properties:

AutomationAccountName
This property is required.
Changes to this property will trigger replacement.
string
The name of the automation account.
Name This property is required. string
Gets or sets the name of the webhook.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Name of an Azure Resource group.
ExpiryTime string
Gets or sets the expiry time.
IsEnabled bool
Gets or sets the value of the enabled flag of webhook.
Parameters Dictionary<string, string>
Gets or sets the parameters of the job.
RunOn string
Gets or sets the name of the hybrid worker group the webhook job will run on.
Runbook Pulumi.AzureNative.Automation.Inputs.RunbookAssociationProperty
Gets or sets the runbook.
Uri string
Gets or sets the uri.
WebhookName Changes to this property will trigger replacement. string
The webhook name.
AutomationAccountName
This property is required.
Changes to this property will trigger replacement.
string
The name of the automation account.
Name This property is required. string
Gets or sets the name of the webhook.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Name of an Azure Resource group.
ExpiryTime string
Gets or sets the expiry time.
IsEnabled bool
Gets or sets the value of the enabled flag of webhook.
Parameters map[string]string
Gets or sets the parameters of the job.
RunOn string
Gets or sets the name of the hybrid worker group the webhook job will run on.
Runbook RunbookAssociationPropertyArgs
Gets or sets the runbook.
Uri string
Gets or sets the uri.
WebhookName Changes to this property will trigger replacement. string
The webhook name.
automationAccountName
This property is required.
Changes to this property will trigger replacement.
String
The name of the automation account.
name This property is required. String
Gets or sets the name of the webhook.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
Name of an Azure Resource group.
expiryTime String
Gets or sets the expiry time.
isEnabled Boolean
Gets or sets the value of the enabled flag of webhook.
parameters Map<String,String>
Gets or sets the parameters of the job.
runOn String
Gets or sets the name of the hybrid worker group the webhook job will run on.
runbook RunbookAssociationProperty
Gets or sets the runbook.
uri String
Gets or sets the uri.
webhookName Changes to this property will trigger replacement. String
The webhook name.
automationAccountName
This property is required.
Changes to this property will trigger replacement.
string
The name of the automation account.
name This property is required. string
Gets or sets the name of the webhook.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Name of an Azure Resource group.
expiryTime string
Gets or sets the expiry time.
isEnabled boolean
Gets or sets the value of the enabled flag of webhook.
parameters {[key: string]: string}
Gets or sets the parameters of the job.
runOn string
Gets or sets the name of the hybrid worker group the webhook job will run on.
runbook RunbookAssociationProperty
Gets or sets the runbook.
uri string
Gets or sets the uri.
webhookName Changes to this property will trigger replacement. string
The webhook name.
automation_account_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the automation account.
name This property is required. str
Gets or sets the name of the webhook.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
Name of an Azure Resource group.
expiry_time str
Gets or sets the expiry time.
is_enabled bool
Gets or sets the value of the enabled flag of webhook.
parameters Mapping[str, str]
Gets or sets the parameters of the job.
run_on str
Gets or sets the name of the hybrid worker group the webhook job will run on.
runbook RunbookAssociationPropertyArgs
Gets or sets the runbook.
uri str
Gets or sets the uri.
webhook_name Changes to this property will trigger replacement. str
The webhook name.
automationAccountName
This property is required.
Changes to this property will trigger replacement.
String
The name of the automation account.
name This property is required. String
Gets or sets the name of the webhook.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
Name of an Azure Resource group.
expiryTime String
Gets or sets the expiry time.
isEnabled Boolean
Gets or sets the value of the enabled flag of webhook.
parameters Map<String>
Gets or sets the parameters of the job.
runOn String
Gets or sets the name of the hybrid worker group the webhook job will run on.
runbook Property Map
Gets or sets the runbook.
uri String
Gets or sets the uri.
webhookName Changes to this property will trigger replacement. String
The webhook name.

Outputs

All input properties are implicitly available as output properties. Additionally, the Webhook resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Type string
The type of the resource.
CreationTime string
Gets or sets the creation time.
Description string
Gets or sets the description.
LastInvokedTime string
Gets or sets the last invoked time.
LastModifiedBy string
Details of the user who last modified the Webhook
LastModifiedTime string
Gets or sets the last modified time.
Id string
The provider-assigned unique ID for this managed resource.
Type string
The type of the resource.
CreationTime string
Gets or sets the creation time.
Description string
Gets or sets the description.
LastInvokedTime string
Gets or sets the last invoked time.
LastModifiedBy string
Details of the user who last modified the Webhook
LastModifiedTime string
Gets or sets the last modified time.
id String
The provider-assigned unique ID for this managed resource.
type String
The type of the resource.
creationTime String
Gets or sets the creation time.
description String
Gets or sets the description.
lastInvokedTime String
Gets or sets the last invoked time.
lastModifiedBy String
Details of the user who last modified the Webhook
lastModifiedTime String
Gets or sets the last modified time.
id string
The provider-assigned unique ID for this managed resource.
type string
The type of the resource.
creationTime string
Gets or sets the creation time.
description string
Gets or sets the description.
lastInvokedTime string
Gets or sets the last invoked time.
lastModifiedBy string
Details of the user who last modified the Webhook
lastModifiedTime string
Gets or sets the last modified time.
id str
The provider-assigned unique ID for this managed resource.
type str
The type of the resource.
creation_time str
Gets or sets the creation time.
description str
Gets or sets the description.
last_invoked_time str
Gets or sets the last invoked time.
last_modified_by str
Details of the user who last modified the Webhook
last_modified_time str
Gets or sets the last modified time.
id String
The provider-assigned unique ID for this managed resource.
type String
The type of the resource.
creationTime String
Gets or sets the creation time.
description String
Gets or sets the description.
lastInvokedTime String
Gets or sets the last invoked time.
lastModifiedBy String
Details of the user who last modified the Webhook
lastModifiedTime String
Gets or sets the last modified time.

Supporting Types

RunbookAssociationProperty
, RunbookAssociationPropertyArgs

Name string
Gets or sets the name of the runbook.
Name string
Gets or sets the name of the runbook.
name String
Gets or sets the name of the runbook.
name string
Gets or sets the name of the runbook.
name str
Gets or sets the name of the runbook.
name String
Gets or sets the name of the runbook.

RunbookAssociationPropertyResponse
, RunbookAssociationPropertyResponseArgs

Name string
Gets or sets the name of the runbook.
Name string
Gets or sets the name of the runbook.
name String
Gets or sets the name of the runbook.
name string
Gets or sets the name of the runbook.
name str
Gets or sets the name of the runbook.
name String
Gets or sets the name of the runbook.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:automation:Webhook TestWebhook /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0