import * as pulumi from "@pulumi/pulumi"; /** * Manages an Automation Wacher. * * ## 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: "example-account", * location: example.location, * resourceGroupName: example.name, * skuName: "Basic", * }); * const exampleHybridRunbookWorkerGroup = new azure.automation.HybridRunbookWorkerGroup("example", { * name: "example", * resourceGroupName: example.name, * automationAccountName: exampleAccount.name, * }); * 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 exampleWatcher = new azure.automation.Watcher("example", { * name: "example", * automationAccountId: exampleAccount.id, * location: "West Europe", * scriptName: exampleRunBook.name, * scriptRunOn: exampleHybridRunbookWorkerGroup.name, * description: "example-watcher desc", * executionFrequencyInSeconds: 42, * tags: { * foo: "bar", * }, * scriptParameters: { * foo: "bar", * }, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Automation` - 2020-01-13-preview * * ## Import * * Automation Watchers can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:automation/watcher:Watcher example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/watchers/watch1 * ``` */ export declare class Watcher extends pulumi.CustomResource { /** * Get an existing Watcher 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?: WatcherState, opts?: pulumi.CustomResourceOptions): Watcher; /** * Returns true if the given object is an instance of Watcher. 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 Watcher; /** * The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created. */ readonly automationAccountId: pulumi.Output; /** * A description of this Automation Watcher. */ readonly description: pulumi.Output; /** * A string of etag assigned to this Automation Watcher. */ readonly etag: pulumi.Output; /** * Specify the frequency at which the watcher is invoked. */ readonly executionFrequencyInSeconds: pulumi.Output; /** * The Azure Region where the Automation Watcher should exist. Changing this forces a new Automation Watcher to be created. */ readonly location: pulumi.Output; /** * The name which should be used for this Automation Watcher. Changing this forces a new Automation Watcher to be created. */ readonly name: pulumi.Output; /** * Specify the name of an existing runbook this watcher is attached to. Changing this forces a new Automation to be created. */ readonly scriptName: pulumi.Output; /** * Specifies a list of key-vaule parameters. Changing this forces a new Automation watcher to be created. */ readonly scriptParameters: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Specify the name of the Hybrid work group the watcher will run on. */ readonly scriptRunOn: pulumi.Output; /** * The current status of the Automation Watcher. */ readonly status: pulumi.Output; /** * A mapping of tags which should be assigned to the Automation Watcher. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Create a Watcher 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: WatcherArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Watcher resources. */ export interface WatcherState { /** * The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created. */ automationAccountId?: pulumi.Input; /** * A description of this Automation Watcher. */ description?: pulumi.Input; /** * A string of etag assigned to this Automation Watcher. */ etag?: pulumi.Input; /** * Specify the frequency at which the watcher is invoked. */ executionFrequencyInSeconds?: pulumi.Input; /** * The Azure Region where the Automation Watcher should exist. Changing this forces a new Automation Watcher to be created. */ location?: pulumi.Input; /** * The name which should be used for this Automation Watcher. Changing this forces a new Automation Watcher to be created. */ name?: pulumi.Input; /** * Specify the name of an existing runbook this watcher is attached to. Changing this forces a new Automation to be created. */ scriptName?: pulumi.Input; /** * Specifies a list of key-vaule parameters. Changing this forces a new Automation watcher to be created. */ scriptParameters?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Specify the name of the Hybrid work group the watcher will run on. */ scriptRunOn?: pulumi.Input; /** * The current status of the Automation Watcher. */ status?: pulumi.Input; /** * A mapping of tags which should be assigned to the Automation Watcher. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; } /** * The set of arguments for constructing a Watcher resource. */ export interface WatcherArgs { /** * The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created. */ automationAccountId: pulumi.Input; /** * A description of this Automation Watcher. */ description?: pulumi.Input; /** * A string of etag assigned to this Automation Watcher. */ etag?: pulumi.Input; /** * Specify the frequency at which the watcher is invoked. */ executionFrequencyInSeconds: pulumi.Input; /** * The Azure Region where the Automation Watcher should exist. Changing this forces a new Automation Watcher to be created. */ location?: pulumi.Input; /** * The name which should be used for this Automation Watcher. Changing this forces a new Automation Watcher to be created. */ name?: pulumi.Input; /** * Specify the name of an existing runbook this watcher is attached to. Changing this forces a new Automation to be created. */ scriptName: pulumi.Input; /** * Specifies a list of key-vaule parameters. Changing this forces a new Automation watcher to be created. */ scriptParameters?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Specify the name of the Hybrid work group the watcher will run on. */ scriptRunOn: pulumi.Input; /** * A mapping of tags which should be assigned to the Automation Watcher. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; }