import * as pulumi from "@pulumi/pulumi"; /** * Manages an Automation Runbook's Webhook. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.core.ResourceGroup("example", { * name: "example-resources", * location: "West Europe", * }); * const exampleAccount = new azure.automation.Account("example", { * name: "account1", * location: example.location, * resourceGroupName: example.name, * skuName: "Basic", * }); * const exampleRunBook = new azure.automation.RunBook("example", { * name: "Get-AzureVMTutorial", * location: example.location, * resourceGroupName: example.name, * automationAccountName: exampleAccount.name, * logVerbose: true, * logProgress: true, * description: "This is an example runbook", * runbookType: "PowerShellWorkflow", * publishContentLink: { * uri: "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/c4935ffb69246a6058eb24f54640f53f69d3ac9f/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1", * }, * }); * const exampleWebhook = new azure.automation.Webhook("example", { * name: "TestRunbook_webhook", * resourceGroupName: example.name, * automationAccountName: exampleAccount.name, * expiryTime: "2021-12-31T00:00:00Z", * enabled: true, * runbookName: exampleRunBook.name, * parameters: { * input: "parameter", * }, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Automation` - 2015-10-31 * * ## Import * * Automation Webhooks can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:automation/webhook:Webhook TestRunbook_webhook /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/webHooks/TestRunbook_webhook * ``` */ export declare class Webhook extends pulumi.CustomResource { /** * Get an existing Webhook resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: WebhookState, opts?: pulumi.CustomResourceOptions): Webhook; /** * Returns true if the given object is an instance of Webhook. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Webhook; /** * The name of the automation account in which the Webhook is created. Changing this forces a new resource to be created. */ readonly automationAccountName: pulumi.Output; /** * Controls if Webhook is enabled. Defaults to `true`. */ readonly enabled: pulumi.Output; /** * Timestamp when the webhook expires. Changing this forces a new resource to be created. */ readonly expiryTime: pulumi.Output; /** * Specifies the name of the Webhook. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * Map of input parameters passed to runbook. */ readonly parameters: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The name of the resource group in which the Webhook is created. Changing this forces a new resource to be created. */ readonly resourceGroupName: pulumi.Output; /** * Name of the hybrid worker group the Webhook job will run on. */ readonly runOnWorkerGroup: pulumi.Output; /** * Name of the Automation Runbook to execute by Webhook. */ readonly runbookName: pulumi.Output; /** * URI to initiate the webhook. Can be generated using [Generate URI API](https://docs.microsoft.com/rest/api/automation/webhook/generate-uri). By default, new URI is generated on each new resource creation. Changing this forces a new resource to be created. */ readonly uri: pulumi.Output; /** * Create a Webhook resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: WebhookArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Webhook resources. */ export interface WebhookState { /** * The name of the automation account in which the Webhook is created. Changing this forces a new resource to be created. */ automationAccountName?: pulumi.Input; /** * Controls if Webhook is enabled. Defaults to `true`. */ enabled?: pulumi.Input; /** * Timestamp when the webhook expires. Changing this forces a new resource to be created. */ expiryTime?: pulumi.Input; /** * Specifies the name of the Webhook. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * Map of input parameters passed to runbook. */ parameters?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The name of the resource group in which the Webhook is created. Changing this forces a new resource to be created. */ resourceGroupName?: pulumi.Input; /** * Name of the hybrid worker group the Webhook job will run on. */ runOnWorkerGroup?: pulumi.Input; /** * Name of the Automation Runbook to execute by Webhook. */ runbookName?: pulumi.Input; /** * URI to initiate the webhook. Can be generated using [Generate URI API](https://docs.microsoft.com/rest/api/automation/webhook/generate-uri). By default, new URI is generated on each new resource creation. Changing this forces a new resource to be created. */ uri?: pulumi.Input; } /** * The set of arguments for constructing a Webhook resource. */ export interface WebhookArgs { /** * The name of the automation account in which the Webhook is created. Changing this forces a new resource to be created. */ automationAccountName: pulumi.Input; /** * Controls if Webhook is enabled. Defaults to `true`. */ enabled?: pulumi.Input; /** * Timestamp when the webhook expires. Changing this forces a new resource to be created. */ expiryTime: pulumi.Input; /** * Specifies the name of the Webhook. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * Map of input parameters passed to runbook. */ parameters?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The name of the resource group in which the Webhook is created. Changing this forces a new resource to be created. */ resourceGroupName: pulumi.Input; /** * Name of the hybrid worker group the Webhook job will run on. */ runOnWorkerGroup?: pulumi.Input; /** * Name of the Automation Runbook to execute by Webhook. */ runbookName: pulumi.Input; /** * URI to initiate the webhook. Can be generated using [Generate URI API](https://docs.microsoft.com/rest/api/automation/webhook/generate-uri). By default, new URI is generated on each new resource creation. Changing this forces a new resource to be created. */ uri?: pulumi.Input; }