All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.insights.ActionGroup Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azurenative.insights;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.insights.ActionGroupArgs;
import com.pulumi.azurenative.insights.outputs.ArmRoleReceiverResponse;
import com.pulumi.azurenative.insights.outputs.AutomationRunbookReceiverResponse;
import com.pulumi.azurenative.insights.outputs.AzureAppPushReceiverResponse;
import com.pulumi.azurenative.insights.outputs.AzureFunctionReceiverResponse;
import com.pulumi.azurenative.insights.outputs.EmailReceiverResponse;
import com.pulumi.azurenative.insights.outputs.EventHubReceiverResponse;
import com.pulumi.azurenative.insights.outputs.ItsmReceiverResponse;
import com.pulumi.azurenative.insights.outputs.LogicAppReceiverResponse;
import com.pulumi.azurenative.insights.outputs.SmsReceiverResponse;
import com.pulumi.azurenative.insights.outputs.VoiceReceiverResponse;
import com.pulumi.azurenative.insights.outputs.WebhookReceiverResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * An action group resource.
 * Azure REST API version: 2023-01-01. Prior API version in Azure Native 1.x: 2019-06-01.
 * 
 * Other available API versions: 2023-09-01-preview.
 * 
 * ## Example Usage
 * ### Create or update an action group
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.insights.ActionGroup;
 * import com.pulumi.azurenative.insights.ActionGroupArgs;
 * import com.pulumi.azurenative.insights.inputs.ArmRoleReceiverArgs;
 * import com.pulumi.azurenative.insights.inputs.AutomationRunbookReceiverArgs;
 * import com.pulumi.azurenative.insights.inputs.AzureAppPushReceiverArgs;
 * import com.pulumi.azurenative.insights.inputs.AzureFunctionReceiverArgs;
 * import com.pulumi.azurenative.insights.inputs.EmailReceiverArgs;
 * import com.pulumi.azurenative.insights.inputs.EventHubReceiverArgs;
 * import com.pulumi.azurenative.insights.inputs.ItsmReceiverArgs;
 * import com.pulumi.azurenative.insights.inputs.LogicAppReceiverArgs;
 * import com.pulumi.azurenative.insights.inputs.SmsReceiverArgs;
 * import com.pulumi.azurenative.insights.inputs.VoiceReceiverArgs;
 * import com.pulumi.azurenative.insights.inputs.WebhookReceiverArgs;
 * 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 }{{@code
 *     public static void main(String[] args) }{{@code
 *         Pulumi.run(App::stack);
 *     }}{@code
 * 
 *     public static void stack(Context ctx) }{{@code
 *         var actionGroup = new ActionGroup("actionGroup", ActionGroupArgs.builder()
 *             .actionGroupName("SampleActionGroup")
 *             .armRoleReceivers(ArmRoleReceiverArgs.builder()
 *                 .name("Sample armRole")
 *                 .roleId("8e3af657-a8ff-443c-a75c-2fe8c4bcb635")
 *                 .useCommonAlertSchema(true)
 *                 .build())
 *             .automationRunbookReceivers(AutomationRunbookReceiverArgs.builder()
 *                 .automationAccountId("/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest")
 *                 .isGlobalRunbook(false)
 *                 .name("testRunbook")
 *                 .runbookName("Sample runbook")
 *                 .serviceUri("")
 *                 .useCommonAlertSchema(true)
 *                 .webhookResourceId("/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084")
 *                 .build())
 *             .azureAppPushReceivers(AzureAppPushReceiverArgs.builder()
 *                 .emailAddress("johndoe}{@literal @}{@code email.com")
 *                 .name("Sample azureAppPush")
 *                 .build())
 *             .azureFunctionReceivers(AzureFunctionReceiverArgs.builder()
 *                 .functionAppResourceId("/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp")
 *                 .functionName("HttpTriggerCSharp1")
 *                 .httpTriggerUrl("http://test.me")
 *                 .name("Sample azureFunction")
 *                 .useCommonAlertSchema(true)
 *                 .build())
 *             .emailReceivers(            
 *                 EmailReceiverArgs.builder()
 *                     .emailAddress("johndoe}{@literal @}{@code email.com")
 *                     .name("John Doe's email")
 *                     .useCommonAlertSchema(false)
 *                     .build(),
 *                 EmailReceiverArgs.builder()
 *                     .emailAddress("janesmith}{@literal @}{@code email.com")
 *                     .name("Jane Smith's email")
 *                     .useCommonAlertSchema(true)
 *                     .build())
 *             .enabled(true)
 *             .eventHubReceivers(EventHubReceiverArgs.builder()
 *                 .eventHubName("testEventHub")
 *                 .eventHubNameSpace("testEventHubNameSpace")
 *                 .name("Sample eventHub")
 *                 .subscriptionId("187f412d-1758-44d9-b052-169e2564721d")
 *                 .tenantId("68a4459a-ccb8-493c-b9da-dd30457d1b84")
 *                 .build())
 *             .groupShortName("sample")
 *             .itsmReceivers(ItsmReceiverArgs.builder()
 *                 .connectionId("a3b9076c-ce8e-434e-85b4-aff10cb3c8f1")
 *                 .name("Sample itsm")
 *                 .region("westcentralus")
 *                 .ticketConfiguration("}{{@code \"PayloadRevision\":0,\"WorkItemType\":\"Incident\",\"UseTemplate\":false,\"WorkItemData\":\"}{}{@code \",\"CreateOneWIPerCI\":false}}{@code ")
 *                 .workspaceId("5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c")
 *                 .build())
 *             .location("Global")
 *             .logicAppReceivers(LogicAppReceiverArgs.builder()
 *                 .callbackUrl("https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w")
 *                 .name("Sample logicApp")
 *                 .resourceId("/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp")
 *                 .useCommonAlertSchema(false)
 *                 .build())
 *             .resourceGroupName("Default-NotificationRules")
 *             .smsReceivers(            
 *                 SmsReceiverArgs.builder()
 *                     .countryCode("1")
 *                     .name("John Doe's mobile")
 *                     .phoneNumber("1234567890")
 *                     .build(),
 *                 SmsReceiverArgs.builder()
 *                     .countryCode("1")
 *                     .name("Jane Smith's mobile")
 *                     .phoneNumber("0987654321")
 *                     .build())
 *             .tags()
 *             .voiceReceivers(VoiceReceiverArgs.builder()
 *                 .countryCode("1")
 *                 .name("Sample voice")
 *                 .phoneNumber("1234567890")
 *                 .build())
 *             .webhookReceivers(            
 *                 WebhookReceiverArgs.builder()
 *                     .name("Sample webhook 1")
 *                     .serviceUri("http://www.example.com/webhook1")
 *                     .useCommonAlertSchema(true)
 *                     .build(),
 *                 WebhookReceiverArgs.builder()
 *                     .identifierUri("http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a")
 *                     .name("Sample webhook 2")
 *                     .objectId("d3bb868c-fe44-452c-aa26-769a6538c808")
 *                     .serviceUri("http://www.example.com/webhook2")
 *                     .tenantId("68a4459a-ccb8-493c-b9da-dd30457d1b84")
 *                     .useAadAuth(true)
 *                     .useCommonAlertSchema(true)
 *                     .build())
 *             .build());
 * 
 *     }}{@code
 * }}{@code
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:insights:ActionGroup SampleActionGroup /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName} * ``` * */ @ResourceType(type="azure-native:insights:ActionGroup") public class ActionGroup extends com.pulumi.resources.CustomResource { /** * The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. * */ @Export(name="armRoleReceivers", refs={List.class,ArmRoleReceiverResponse.class}, tree="[0,1]") private Output> armRoleReceivers; /** * @return The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. * */ public Output>> armRoleReceivers() { return Codegen.optional(this.armRoleReceivers); } /** * The list of AutomationRunbook receivers that are part of this action group. * */ @Export(name="automationRunbookReceivers", refs={List.class,AutomationRunbookReceiverResponse.class}, tree="[0,1]") private Output> automationRunbookReceivers; /** * @return The list of AutomationRunbook receivers that are part of this action group. * */ public Output>> automationRunbookReceivers() { return Codegen.optional(this.automationRunbookReceivers); } /** * The list of AzureAppPush receivers that are part of this action group. * */ @Export(name="azureAppPushReceivers", refs={List.class,AzureAppPushReceiverResponse.class}, tree="[0,1]") private Output> azureAppPushReceivers; /** * @return The list of AzureAppPush receivers that are part of this action group. * */ public Output>> azureAppPushReceivers() { return Codegen.optional(this.azureAppPushReceivers); } /** * The list of azure function receivers that are part of this action group. * */ @Export(name="azureFunctionReceivers", refs={List.class,AzureFunctionReceiverResponse.class}, tree="[0,1]") private Output> azureFunctionReceivers; /** * @return The list of azure function receivers that are part of this action group. * */ public Output>> azureFunctionReceivers() { return Codegen.optional(this.azureFunctionReceivers); } /** * The list of email receivers that are part of this action group. * */ @Export(name="emailReceivers", refs={List.class,EmailReceiverResponse.class}, tree="[0,1]") private Output> emailReceivers; /** * @return The list of email receivers that are part of this action group. * */ public Output>> emailReceivers() { return Codegen.optional(this.emailReceivers); } /** * Indicates whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications. * */ @Export(name="enabled", refs={Boolean.class}, tree="[0]") private Output enabled; /** * @return Indicates whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications. * */ public Output enabled() { return this.enabled; } /** * The list of event hub receivers that are part of this action group. * */ @Export(name="eventHubReceivers", refs={List.class,EventHubReceiverResponse.class}, tree="[0,1]") private Output> eventHubReceivers; /** * @return The list of event hub receivers that are part of this action group. * */ public Output>> eventHubReceivers() { return Codegen.optional(this.eventHubReceivers); } /** * The short name of the action group. This will be used in SMS messages. * */ @Export(name="groupShortName", refs={String.class}, tree="[0]") private Output groupShortName; /** * @return The short name of the action group. This will be used in SMS messages. * */ public Output groupShortName() { return this.groupShortName; } /** * The list of ITSM receivers that are part of this action group. * */ @Export(name="itsmReceivers", refs={List.class,ItsmReceiverResponse.class}, tree="[0,1]") private Output> itsmReceivers; /** * @return The list of ITSM receivers that are part of this action group. * */ public Output>> itsmReceivers() { return Codegen.optional(this.itsmReceivers); } /** * Resource location * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return Resource location * */ public Output location() { return this.location; } /** * The list of logic app receivers that are part of this action group. * */ @Export(name="logicAppReceivers", refs={List.class,LogicAppReceiverResponse.class}, tree="[0,1]") private Output> logicAppReceivers; /** * @return The list of logic app receivers that are part of this action group. * */ public Output>> logicAppReceivers() { return Codegen.optional(this.logicAppReceivers); } /** * Azure resource name * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Azure resource name * */ public Output name() { return this.name; } /** * The list of SMS receivers that are part of this action group. * */ @Export(name="smsReceivers", refs={List.class,SmsReceiverResponse.class}, tree="[0,1]") private Output> smsReceivers; /** * @return The list of SMS receivers that are part of this action group. * */ public Output>> smsReceivers() { return Codegen.optional(this.smsReceivers); } /** * Resource tags * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return Resource tags * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * Azure resource type * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return Azure resource type * */ public Output type() { return this.type; } /** * The list of voice receivers that are part of this action group. * */ @Export(name="voiceReceivers", refs={List.class,VoiceReceiverResponse.class}, tree="[0,1]") private Output> voiceReceivers; /** * @return The list of voice receivers that are part of this action group. * */ public Output>> voiceReceivers() { return Codegen.optional(this.voiceReceivers); } /** * The list of webhook receivers that are part of this action group. * */ @Export(name="webhookReceivers", refs={List.class,WebhookReceiverResponse.class}, tree="[0,1]") private Output> webhookReceivers; /** * @return The list of webhook receivers that are part of this action group. * */ public Output>> webhookReceivers() { return Codegen.optional(this.webhookReceivers); } /** * * @param name The _unique_ name of the resulting resource. */ public ActionGroup(java.lang.String name) { this(name, ActionGroupArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ActionGroup(java.lang.String name, ActionGroupArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public ActionGroup(java.lang.String name, ActionGroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:insights:ActionGroup", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ActionGroup(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:insights:ActionGroup", name, null, makeResourceOptions(options, id), false); } private static ActionGroupArgs makeArgs(ActionGroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ActionGroupArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:insights/v20170401:ActionGroup").build()), Output.of(Alias.builder().type("azure-native:insights/v20180301:ActionGroup").build()), Output.of(Alias.builder().type("azure-native:insights/v20180901:ActionGroup").build()), Output.of(Alias.builder().type("azure-native:insights/v20190301:ActionGroup").build()), Output.of(Alias.builder().type("azure-native:insights/v20190601:ActionGroup").build()), Output.of(Alias.builder().type("azure-native:insights/v20210901:ActionGroup").build()), Output.of(Alias.builder().type("azure-native:insights/v20220401:ActionGroup").build()), Output.of(Alias.builder().type("azure-native:insights/v20220601:ActionGroup").build()), Output.of(Alias.builder().type("azure-native:insights/v20230101:ActionGroup").build()), Output.of(Alias.builder().type("azure-native:insights/v20230901preview:ActionGroup").build()) )) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host 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 options Optional settings to control the behavior of the CustomResource. */ public static ActionGroup get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ActionGroup(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy