WebhookArgs

data class WebhookArgs(val automationAccountName: Output<String>? = null, val enabled: Output<Boolean>? = null, val expiryTime: Output<String>? = null, val name: Output<String>? = null, val parameters: Output<Map<String, String>>? = null, val resourceGroupName: Output<String>? = null, val runOnWorkerGroup: Output<String>? = null, val runbookName: Output<String>? = null, val uri: Output<String>? = null) : ConvertibleToJava<WebhookArgs>

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

Constructors

Link copied to clipboard
fun WebhookArgs(automationAccountName: Output<String>? = null, enabled: Output<Boolean>? = null, expiryTime: Output<String>? = null, name: Output<String>? = null, parameters: Output<Map<String, String>>? = null, resourceGroupName: Output<String>? = null, runOnWorkerGroup: Output<String>? = null, runbookName: Output<String>? = null, uri: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): WebhookArgs

Properties

Link copied to clipboard
val automationAccountName: Output<String>? = null

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>? = null

Controls if Webhook is enabled. Defaults to true.

Link copied to clipboard
val expiryTime: Output<String>? = null

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

Link copied to clipboard
val name: Output<String>? = null

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>>? = null

Map of input parameters passed to runbook.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

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>? = null

Name of the Automation Runbook to execute by Webhook.

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

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

Link copied to clipboard
val uri: Output<String>? = null

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.