Webhook

class Webhook : KotlinCustomResource

Manages an Automation Runbook's Webhook.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.automation.Account;
import com.pulumi.azure.automation.AccountArgs;
import com.pulumi.azure.automation.RunBook;
import com.pulumi.azure.automation.RunBookArgs;
import com.pulumi.azure.automation.inputs.RunBookPublishContentLinkArgs;
import com.pulumi.azure.automation.Webhook;
import com.pulumi.azure.automation.WebhookArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.skuName("Basic")
.build());
var exampleRunBook = new RunBook("exampleRunBook", RunBookArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.automationAccountName(exampleAccount.name())
.logVerbose("true")
.logProgress("true")
.description("This is an example runbook")
.runbookType("PowerShellWorkflow")
.publishContentLink(RunBookPublishContentLinkArgs.builder()
.uri("https://raw.githubusercontent.com/Azure/azure-quickstart-templates/c4935ffb69246a6058eb24f54640f53f69d3ac9f/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1")
.build())
.build());
var exampleWebhook = new Webhook("exampleWebhook", WebhookArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.automationAccountName(exampleAccount.name())
.expiryTime("2021-12-31T00:00:00Z")
.enabled(true)
.runbookName(exampleRunBook.name())
.parameters(Map.of("input", "parameter"))
.build());
}
}

Import

Automation Webhooks can be imported using the resource id, e.g.

$ pulumi import azure:automation/webhook:Webhook TestRunbook_webhook /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/webHooks/TestRunbook_webhook

Properties

Link copied to clipboard

The name of the automation account in which the Webhook is created. Changing this forces a new resource to be created.

Link copied to clipboard
val enabled: Output<Boolean>?

Controls if Webhook is enabled. Defaults to true.

Link copied to clipboard
val expiryTime: Output<String>

Timestamp when the webhook expires. Changing this forces a new resource to be created.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

Specifies the name of the Webhook. Changing this forces a new resource to be created.

Link copied to clipboard
val parameters: Output<Map<String, String>>?

Map of input parameters passed to runbook.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The name of the resource group in which the Webhook is created. Changing this forces a new resource to be created.

Link copied to clipboard
val runbookName: Output<String>

Name of the Automation Runbook to execute by Webhook.

Link copied to clipboard
val runOnWorkerGroup: Output<String>?

Name of the hybrid worker group the Webhook job will run on.

Link copied to clipboard
val uri: Output<String>

URI to initiate the webhook. Can be generated using Generate URI API. By default, new URI is generated on each new resource creation. Changing this forces a new resource to be created.

Link copied to clipboard
val urn: Output<String>