ActionGroupArgs

data class ActionGroupArgs(val armRoleReceivers: Output<List<ActionGroupArmRoleReceiverArgs>>? = null, val automationRunbookReceivers: Output<List<ActionGroupAutomationRunbookReceiverArgs>>? = null, val azureAppPushReceivers: Output<List<ActionGroupAzureAppPushReceiverArgs>>? = null, val azureFunctionReceivers: Output<List<ActionGroupAzureFunctionReceiverArgs>>? = null, val emailReceivers: Output<List<ActionGroupEmailReceiverArgs>>? = null, val enabled: Output<Boolean>? = null, val eventHubReceivers: Output<List<ActionGroupEventHubReceiverArgs>>? = null, val itsmReceivers: Output<List<ActionGroupItsmReceiverArgs>>? = null, val location: Output<String>? = null, val logicAppReceivers: Output<List<ActionGroupLogicAppReceiverArgs>>? = null, val name: Output<String>? = null, val resourceGroupName: Output<String>? = null, val shortName: Output<String>? = null, val smsReceivers: Output<List<ActionGroupSmsReceiverArgs>>? = null, val tags: Output<Map<String, String>>? = null, val voiceReceivers: Output<List<ActionGroupVoiceReceiverArgs>>? = null, val webhookReceivers: Output<List<ActionGroupWebhookReceiverArgs>>? = null) : ConvertibleToJava<ActionGroupArgs>

Manages an Action Group within Azure Monitor.

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.core.CoreFunctions;
import com.pulumi.azure.operationalinsights.AnalyticsWorkspace;
import com.pulumi.azure.operationalinsights.AnalyticsWorkspaceArgs;
import com.pulumi.azure.monitoring.ActionGroup;
import com.pulumi.azure.monitoring.ActionGroupArgs;
import com.pulumi.azure.monitoring.inputs.ActionGroupArmRoleReceiverArgs;
import com.pulumi.azure.monitoring.inputs.ActionGroupAutomationRunbookReceiverArgs;
import com.pulumi.azure.monitoring.inputs.ActionGroupAzureAppPushReceiverArgs;
import com.pulumi.azure.monitoring.inputs.ActionGroupAzureFunctionReceiverArgs;
import com.pulumi.azure.monitoring.inputs.ActionGroupEmailReceiverArgs;
import com.pulumi.azure.monitoring.inputs.ActionGroupEventHubReceiverArgs;
import com.pulumi.azure.monitoring.inputs.ActionGroupItsmReceiverArgs;
import com.pulumi.azure.monitoring.inputs.ActionGroupLogicAppReceiverArgs;
import com.pulumi.azure.monitoring.inputs.ActionGroupSmsReceiverArgs;
import com.pulumi.azure.monitoring.inputs.ActionGroupVoiceReceiverArgs;
import com.pulumi.azure.monitoring.inputs.ActionGroupWebhookReceiverArgs;
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());
final var current = CoreFunctions.getClientConfig();
var exampleAnalyticsWorkspace = new AnalyticsWorkspace("exampleAnalyticsWorkspace", AnalyticsWorkspaceArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.build());
var exampleActionGroup = new ActionGroup("exampleActionGroup", ActionGroupArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.shortName("p0action")
.armRoleReceivers(ActionGroupArmRoleReceiverArgs.builder()
.name("armroleaction")
.roleId("de139f84-1756-47ae-9be6-808fbbe84772")
.useCommonAlertSchema(true)
.build())
.automationRunbookReceivers(ActionGroupAutomationRunbookReceiverArgs.builder()
.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)
.build())
.azureAppPushReceivers(ActionGroupAzureAppPushReceiverArgs.builder()
.name("pushtoadmin")
.emailAddress("admin@contoso.com")
.build())
.azureFunctionReceivers(ActionGroupAzureFunctionReceiverArgs.builder()
.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)
.build())
.emailReceivers(
ActionGroupEmailReceiverArgs.builder()
.name("sendtoadmin")
.emailAddress("admin@contoso.com")
.build(),
ActionGroupEmailReceiverArgs.builder()
.name("sendtodevops")
.emailAddress("devops@contoso.com")
.useCommonAlertSchema(true)
.build())
.eventHubReceivers(ActionGroupEventHubReceiverArgs.builder()
.name("sendtoeventhub")
.eventHubNamespace("eventhubnamespace")
.eventHubName("eventhub1")
.subscriptionId("00000000-0000-0000-0000-000000000000")
.useCommonAlertSchema(false)
.build())
.itsmReceivers(ActionGroupItsmReceiverArgs.builder()
.name("createorupdateticket")
.workspaceId(exampleAnalyticsWorkspace.workspaceId().applyValue(workspaceId -> String.format("%s|%s", current.applyValue(getClientConfigResult -> getClientConfigResult.subscriptionId()),workspaceId)))
.connectionId("53de6956-42b4-41ba-be3c-b154cdf17b13")
.ticketConfiguration("{\"PayloadRevision\":0,\"WorkItemType\":\"Incident\",\"UseTemplate\":false,\"WorkItemData\":\"{}\",\"CreateOneWIPerCI\":false}")
.region("southcentralus")
.build())
.logicAppReceivers(ActionGroupLogicAppReceiverArgs.builder()
.name("logicappaction")
.resourceId("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-logicapp/providers/Microsoft.Logic/workflows/logicapp")
.callbackUrl("https://logicapptriggerurl/...")
.useCommonAlertSchema(true)
.build())
.smsReceivers(ActionGroupSmsReceiverArgs.builder()
.name("oncallmsg")
.countryCode("1")
.phoneNumber("1231231234")
.build())
.voiceReceivers(ActionGroupVoiceReceiverArgs.builder()
.name("remotesupport")
.countryCode("86")
.phoneNumber("13888888888")
.build())
.webhookReceivers(ActionGroupWebhookReceiverArgs.builder()
.name("callmyapiaswell")
.serviceUri("http://example.com/alert")
.useCommonAlertSchema(true)
.build())
.build());
}
}

Import

Action Groups can be imported using the resource id, e.g.

$ pulumi import azure:monitoring/actionGroup:ActionGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Insights/actionGroups/myagname

Constructors

Link copied to clipboard
fun ActionGroupArgs(armRoleReceivers: Output<List<ActionGroupArmRoleReceiverArgs>>? = null, automationRunbookReceivers: Output<List<ActionGroupAutomationRunbookReceiverArgs>>? = null, azureAppPushReceivers: Output<List<ActionGroupAzureAppPushReceiverArgs>>? = null, azureFunctionReceivers: Output<List<ActionGroupAzureFunctionReceiverArgs>>? = null, emailReceivers: Output<List<ActionGroupEmailReceiverArgs>>? = null, enabled: Output<Boolean>? = null, eventHubReceivers: Output<List<ActionGroupEventHubReceiverArgs>>? = null, itsmReceivers: Output<List<ActionGroupItsmReceiverArgs>>? = null, location: Output<String>? = null, logicAppReceivers: Output<List<ActionGroupLogicAppReceiverArgs>>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null, shortName: Output<String>? = null, smsReceivers: Output<List<ActionGroupSmsReceiverArgs>>? = null, tags: Output<Map<String, String>>? = null, voiceReceivers: Output<List<ActionGroupVoiceReceiverArgs>>? = null, webhookReceivers: Output<List<ActionGroupWebhookReceiverArgs>>? = null)

Functions

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

Properties

Link copied to clipboard

One or more arm_role_receiver blocks as defined below.

Link copied to clipboard

One or more automation_runbook_receiver blocks as defined below.

Link copied to clipboard

One or more azure_app_push_receiver blocks as defined below.

Link copied to clipboard

One or more azure_function_receiver blocks as defined below.

Link copied to clipboard

One or more email_receiver blocks as defined below.

Link copied to clipboard
val enabled: Output<Boolean>? = null

Whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications. Defaults to true.

Link copied to clipboard

One or more event_hub_receiver blocks as defined below.

Link copied to clipboard

One or more itsm_receiver blocks as defined below.

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

The Azure Region where the Action Group should exist. Changing this forces a new Action Group to be created. Defaults to global.

Link copied to clipboard

One or more logic_app_receiver blocks as defined below.

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

The name of the Action Group. Changing this forces a new resource to be created.

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

The name of the resource group in which to create the Action Group instance. Changing this forces a new resource to be created.

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

The short name of the action group. This will be used in SMS messages.

Link copied to clipboard

One or more sms_receiver blocks as defined below.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags to assign to the resource.

Link copied to clipboard

One or more voice_receiver blocks as defined below.

Link copied to clipboard

One or more webhook_receiver blocks as defined below.