import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages an Activity Log Alert within Azure Monitor. * * ## 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 main = new azure.monitoring.ActionGroup("main", { * name: "example-actiongroup", * resourceGroupName: example.name, * shortName: "p0action", * webhookReceivers: [{ * name: "callmyapi", * serviceUri: "http://example.com/alert", * }], * }); * const toMonitor = new azure.storage.Account("to_monitor", { * name: "examplesa", * resourceGroupName: example.name, * location: example.location, * accountTier: "Standard", * accountReplicationType: "GRS", * }); * const mainActivityLogAlert = new azure.monitoring.ActivityLogAlert("main", { * name: "example-activitylogalert", * resourceGroupName: example.name, * location: example.location, * scopes: [example.id], * description: "This alert will monitor a specific storage account updates.", * criteria: { * resourceId: toMonitor.id, * operationName: "Microsoft.Storage/storageAccounts/write", * category: "Recommendation", * }, * actions: [{ * actionGroupId: main.id, * webhookProperties: { * from: "source", * }, * }], * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Insights` - 2020-10-01 * * ## Import * * Activity log alerts can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:monitoring/activityLogAlert:ActivityLogAlert example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Insights/activityLogAlerts/myalertname * ``` */ export declare class ActivityLogAlert extends pulumi.CustomResource { /** * Get an existing ActivityLogAlert 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?: ActivityLogAlertState, opts?: pulumi.CustomResourceOptions): ActivityLogAlert; /** * Returns true if the given object is an instance of ActivityLogAlert. 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 ActivityLogAlert; /** * One or more `action` blocks as defined below. */ readonly actions: pulumi.Output; /** * A `criteria` block as defined below. */ readonly criteria: pulumi.Output; /** * The description of this activity log alert. */ readonly description: pulumi.Output; /** * Should this Activity Log Alert be enabled? Defaults to `true`. */ readonly enabled: pulumi.Output; /** * The Azure Region where the activity log alert rule should exist. Possible values are `global`, `westeurope`, `northeurope`, and `eastus2euap`. Changing this forces a new resource to be created. */ readonly location: pulumi.Output; /** * The name of the activity log alert. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * The name of the resource group in which to create the activity log alert instance. Changing this forces a new resource to be created. */ readonly resourceGroupName: pulumi.Output; /** * The Scope at which the Activity Log should be applied. A list of strings which could be a resource group , or a subscription, or a resource ID (such as a Storage Account). */ readonly scopes: pulumi.Output; /** * A mapping of tags to assign to the resource. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Create a ActivityLogAlert 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: ActivityLogAlertArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ActivityLogAlert resources. */ export interface ActivityLogAlertState { /** * One or more `action` blocks as defined below. */ actions?: pulumi.Input[]>; /** * A `criteria` block as defined below. */ criteria?: pulumi.Input; /** * The description of this activity log alert. */ description?: pulumi.Input; /** * Should this Activity Log Alert be enabled? Defaults to `true`. */ enabled?: pulumi.Input; /** * The Azure Region where the activity log alert rule should exist. Possible values are `global`, `westeurope`, `northeurope`, and `eastus2euap`. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * The name of the activity log alert. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The name of the resource group in which to create the activity log alert instance. Changing this forces a new resource to be created. */ resourceGroupName?: pulumi.Input; /** * The Scope at which the Activity Log should be applied. A list of strings which could be a resource group , or a subscription, or a resource ID (such as a Storage Account). */ scopes?: pulumi.Input[]>; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; } /** * The set of arguments for constructing a ActivityLogAlert resource. */ export interface ActivityLogAlertArgs { /** * One or more `action` blocks as defined below. */ actions?: pulumi.Input[]>; /** * A `criteria` block as defined below. */ criteria: pulumi.Input; /** * The description of this activity log alert. */ description?: pulumi.Input; /** * Should this Activity Log Alert be enabled? Defaults to `true`. */ enabled?: pulumi.Input; /** * The Azure Region where the activity log alert rule should exist. Possible values are `global`, `westeurope`, `northeurope`, and `eastus2euap`. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * The name of the activity log alert. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The name of the resource group in which to create the activity log alert instance. Changing this forces a new resource to be created. */ resourceGroupName: pulumi.Input; /** * The Scope at which the Activity Log should be applied. A list of strings which could be a resource group , or a subscription, or a resource ID (such as a Storage Account). */ scopes: pulumi.Input[]>; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; }