import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages an Action Group 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: "monitoring-resources", * location: "West Europe", * }); * const current = azure.core.getClientConfig({}); * const exampleAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("example", { * name: "workspace-01", * location: example.location, * resourceGroupName: example.name, * }); * const exampleActionGroup = new azure.monitoring.ActionGroup("example", { * name: "CriticalAlertsAction", * resourceGroupName: example.name, * shortName: "p0action", * armRoleReceivers: [{ * name: "armroleaction", * roleId: "de139f84-1756-47ae-9be6-808fbbe84772", * useCommonAlertSchema: true, * }], * automationRunbookReceivers: [{ * name: "action_name_1", * automationAccountId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-runbooks/providers/Microsoft.Automation/automationAccounts/aaa001", * runbookName: "my runbook", * webhookResourceId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-runbooks/providers/Microsoft.Automation/automationAccounts/aaa001/webHooks/webhook_alert", * isGlobalRunbook: true, * serviceUri: "https://s13events.azure-automation.net/webhooks?token=randomtoken", * useCommonAlertSchema: true, * }], * azureAppPushReceivers: [{ * name: "pushtoadmin", * emailAddress: "admin@contoso.com", * }], * azureFunctionReceivers: [{ * name: "funcaction", * functionAppResourceId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-funcapp/providers/Microsoft.Web/sites/funcapp", * functionName: "myfunc", * httpTriggerUrl: "https://example.com/trigger", * useCommonAlertSchema: true, * }], * emailReceivers: [ * { * name: "sendtoadmin", * emailAddress: "admin@contoso.com", * }, * { * name: "sendtodevops", * emailAddress: "devops@contoso.com", * useCommonAlertSchema: true, * }, * ], * eventHubReceivers: [{ * name: "sendtoeventhub", * eventHubNamespace: "eventhubnamespace", * eventHubName: "eventhub1", * subscriptionId: "00000000-0000-0000-0000-000000000000", * useCommonAlertSchema: false, * }], * itsmReceivers: [{ * name: "createorupdateticket", * workspaceId: pulumi.all([current, exampleAnalyticsWorkspace.workspaceId]).apply(([current, workspaceId]) => `${current.subscriptionId}|${workspaceId}`), * connectionId: "53de6956-42b4-41ba-be3c-b154cdf17b13", * ticketConfiguration: "{\"PayloadRevision\":0,\"WorkItemType\":\"Incident\",\"UseTemplate\":false,\"WorkItemData\":\"{}\",\"CreateOneWIPerCI\":false}", * region: "southcentralus", * }], * logicAppReceivers: [{ * name: "logicappaction", * resourceId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-logicapp/providers/Microsoft.Logic/workflows/logicapp", * callbackUrl: "https://logicapptriggerurl/...", * useCommonAlertSchema: true, * }], * smsReceivers: [{ * name: "oncallmsg", * countryCode: "1", * phoneNumber: "1231231234", * }], * voiceReceivers: [{ * name: "remotesupport", * countryCode: "86", * phoneNumber: "13888888888", * }], * webhookReceivers: [{ * name: "callmyapiaswell", * serviceUri: "http://example.com/alert", * useCommonAlertSchema: true, * }], * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Insights` - 2023-01-01 * * ## Import * * Action Groups can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:monitoring/actionGroup:ActionGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Insights/actionGroups/myagname * ``` */ export declare class ActionGroup extends pulumi.CustomResource { /** * Get an existing ActionGroup 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?: ActionGroupState, opts?: pulumi.CustomResourceOptions): ActionGroup; /** * Returns true if the given object is an instance of ActionGroup. 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 ActionGroup; /** * One or more `armRoleReceiver` blocks as defined below. */ readonly armRoleReceivers: pulumi.Output; /** * One or more `automationRunbookReceiver` blocks as defined below. */ readonly automationRunbookReceivers: pulumi.Output; /** * One or more `azureAppPushReceiver` blocks as defined below. */ readonly azureAppPushReceivers: pulumi.Output; /** * One or more `azureFunctionReceiver` blocks as defined below. */ readonly azureFunctionReceivers: pulumi.Output; /** * One or more `emailReceiver` blocks as defined below. */ readonly emailReceivers: pulumi.Output; /** * Whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications. Defaults to `true`. */ readonly enabled: pulumi.Output; /** * One or more `eventHubReceiver` blocks as defined below. */ readonly eventHubReceivers: pulumi.Output; /** * One or more `itsmReceiver` blocks as defined below. */ readonly itsmReceivers: pulumi.Output; /** * The Azure Region where the Action Group should exist. Changing this forces a new Action Group to be created. Defaults to `global`. */ readonly location: pulumi.Output; /** * One or more `logicAppReceiver` blocks as defined below. */ readonly logicAppReceivers: pulumi.Output; /** * The name of the Action Group. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * The name of the resource group in which to create the Action Group instance. Changing this forces a new resource to be created. */ readonly resourceGroupName: pulumi.Output; /** * The short name of the action group. This will be used in SMS messages. */ readonly shortName: pulumi.Output; /** * One or more `smsReceiver` blocks as defined below. */ readonly smsReceivers: pulumi.Output; /** * A mapping of tags to assign to the resource. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * One or more `voiceReceiver` blocks as defined below. */ readonly voiceReceivers: pulumi.Output; /** * One or more `webhookReceiver` blocks as defined below. */ readonly webhookReceivers: pulumi.Output; /** * Create a ActionGroup 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: ActionGroupArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ActionGroup resources. */ export interface ActionGroupState { /** * One or more `armRoleReceiver` blocks as defined below. */ armRoleReceivers?: pulumi.Input[]>; /** * One or more `automationRunbookReceiver` blocks as defined below. */ automationRunbookReceivers?: pulumi.Input[]>; /** * One or more `azureAppPushReceiver` blocks as defined below. */ azureAppPushReceivers?: pulumi.Input[]>; /** * One or more `azureFunctionReceiver` blocks as defined below. */ azureFunctionReceivers?: pulumi.Input[]>; /** * One or more `emailReceiver` blocks as defined below. */ emailReceivers?: pulumi.Input[]>; /** * Whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications. Defaults to `true`. */ enabled?: pulumi.Input; /** * One or more `eventHubReceiver` blocks as defined below. */ eventHubReceivers?: pulumi.Input[]>; /** * One or more `itsmReceiver` blocks as defined below. */ itsmReceivers?: pulumi.Input[]>; /** * The Azure Region where the Action Group should exist. Changing this forces a new Action Group to be created. Defaults to `global`. */ location?: pulumi.Input; /** * One or more `logicAppReceiver` blocks as defined below. */ logicAppReceivers?: pulumi.Input[]>; /** * The name of the Action Group. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The name of the resource group in which to create the Action Group instance. Changing this forces a new resource to be created. */ resourceGroupName?: pulumi.Input; /** * The short name of the action group. This will be used in SMS messages. */ shortName?: pulumi.Input; /** * One or more `smsReceiver` blocks as defined below. */ smsReceivers?: pulumi.Input[]>; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * One or more `voiceReceiver` blocks as defined below. */ voiceReceivers?: pulumi.Input[]>; /** * One or more `webhookReceiver` blocks as defined below. */ webhookReceivers?: pulumi.Input[]>; } /** * The set of arguments for constructing a ActionGroup resource. */ export interface ActionGroupArgs { /** * One or more `armRoleReceiver` blocks as defined below. */ armRoleReceivers?: pulumi.Input[]>; /** * One or more `automationRunbookReceiver` blocks as defined below. */ automationRunbookReceivers?: pulumi.Input[]>; /** * One or more `azureAppPushReceiver` blocks as defined below. */ azureAppPushReceivers?: pulumi.Input[]>; /** * One or more `azureFunctionReceiver` blocks as defined below. */ azureFunctionReceivers?: pulumi.Input[]>; /** * One or more `emailReceiver` blocks as defined below. */ emailReceivers?: pulumi.Input[]>; /** * Whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications. Defaults to `true`. */ enabled?: pulumi.Input; /** * One or more `eventHubReceiver` blocks as defined below. */ eventHubReceivers?: pulumi.Input[]>; /** * One or more `itsmReceiver` blocks as defined below. */ itsmReceivers?: pulumi.Input[]>; /** * The Azure Region where the Action Group should exist. Changing this forces a new Action Group to be created. Defaults to `global`. */ location?: pulumi.Input; /** * One or more `logicAppReceiver` blocks as defined below. */ logicAppReceivers?: pulumi.Input[]>; /** * The name of the Action Group. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The name of the resource group in which to create the Action Group instance. Changing this forces a new resource to be created. */ resourceGroupName: pulumi.Input; /** * The short name of the action group. This will be used in SMS messages. */ shortName: pulumi.Input; /** * One or more `smsReceiver` blocks as defined below. */ smsReceivers?: pulumi.Input[]>; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * One or more `voiceReceiver` blocks as defined below. */ voiceReceivers?: pulumi.Input[]>; /** * One or more `webhookReceiver` blocks as defined below. */ webhookReceivers?: pulumi.Input[]>; }