com.pulumi.azurenative.alertsmanagement.ActionRuleByName Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** 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.alertsmanagement;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.alertsmanagement.ActionRuleByNameArgs;
import com.pulumi.azurenative.alertsmanagement.outputs.ActionGroupResponse;
import com.pulumi.azurenative.alertsmanagement.outputs.DiagnosticsResponse;
import com.pulumi.azurenative.alertsmanagement.outputs.SuppressionResponse;
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.Object;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Action rule object containing target scope, conditions and suppression logic
* Azure REST API version: 2019-05-05-preview. Prior API version in Azure Native 1.x: 2019-05-05-preview.
*
* Other available API versions: 2018-11-02-privatepreview.
*
* ## Example Usage
* ### PutActionRule
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.alertsmanagement.ActionRuleByName;
* import com.pulumi.azurenative.alertsmanagement.ActionRuleByNameArgs;
* 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 actionRuleByName = new ActionRuleByName("actionRuleByName", ActionRuleByNameArgs.builder()
* .actionRuleName("DailySuppression")
* .location("Global")
* .properties(SuppressionArgs.builder()
* .conditions(ConditionsArgs.builder()
* .monitorCondition(ConditionArgs.builder()
* .operator("Equals")
* .values("Fired")
* .build())
* .monitorService(ConditionArgs.builder()
* .operator("Equals")
* .values(
* "Platform",
* "Application Insights")
* .build())
* .severity(ConditionArgs.builder()
* .operator("Equals")
* .values(
* "Sev0",
* "Sev2")
* .build())
* .targetResourceType(ConditionArgs.builder()
* .operator("NotEquals")
* .values("Microsoft.Compute/VirtualMachines")
* .build())
* .build())
* .description("Action rule on resource group for daily suppression")
* .scope(ScopeArgs.builder()
* .scopeType("ResourceGroup")
* .values("/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg")
* .build())
* .status("Enabled")
* .suppressionConfig(SuppressionConfigArgs.builder()
* .recurrenceType("Daily")
* .schedule(SuppressionScheduleArgs.builder()
* .endDate("12/18/2018")
* .endTime("14:00:00")
* .startDate("12/09/2018")
* .startTime("06:00:00")
* .build())
* .build())
* .type("Suppression")
* .build())
* .resourceGroupName("alertscorrelationrg")
* .tags()
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:alertsmanagement:ActionRuleByName DailySuppression /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}
* ```
*
*/
@ResourceType(type="azure-native:alertsmanagement:ActionRuleByName")
public class ActionRuleByName extends com.pulumi.resources.CustomResource {
/**
* Resource location
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return Resource location
*
*/
public Output location() {
return this.location;
}
/**
* Azure resource name
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Azure resource name
*
*/
public Output name() {
return this.name;
}
/**
* action rule properties
*
*/
@Export(name="properties", refs={Object.class}, tree="[0]")
private Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy