get Alert Rule Anomaly
Use this data source to access information about an existing Anomaly Alert Rule.
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.operationalinsights.AnalyticsWorkspace;
import com.pulumi.azure.operationalinsights.AnalyticsWorkspaceArgs;
import com.pulumi.azure.sentinel.LogAnalyticsWorkspaceOnboarding;
import com.pulumi.azure.sentinel.LogAnalyticsWorkspaceOnboardingArgs;
import com.pulumi.azure.sentinel.SentinelFunctions;
import com.pulumi.azure.sentinel.inputs.GetAlertRuleAnomalyArgs;
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());
var exampleAnalyticsWorkspace = new AnalyticsWorkspace("exampleAnalyticsWorkspace", AnalyticsWorkspaceArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.sku("PerGB2018")
.build());
var exampleLogAnalyticsWorkspaceOnboarding = new LogAnalyticsWorkspaceOnboarding("exampleLogAnalyticsWorkspaceOnboarding", LogAnalyticsWorkspaceOnboardingArgs.builder()
.workspaceId(exampleAnalyticsWorkspace.id())
.customerManagedKeyEnabled(false)
.build());
final var exampleAlertRuleAnomaly = SentinelFunctions.getAlertRuleAnomaly(GetAlertRuleAnomalyArgs.builder()
.logAnalyticsWorkspaceId(exampleLogAnalyticsWorkspaceOnboarding.workspaceId())
.displayName("Potential data staging")
.build());
ctx.export("id", exampleAlertRuleAnomaly.applyValue(getAlertRuleAnomalyResult -> getAlertRuleAnomalyResult).applyValue(exampleAlertRuleAnomaly -> exampleAlertRuleAnomaly.applyValue(getAlertRuleAnomalyResult -> getAlertRuleAnomalyResult.id())));
}
}
Content copied to clipboard
Return
A collection of values returned by getAlertRuleAnomaly.
Parameters
argument
A collection of arguments for invoking getAlertRuleAnomaly.
suspend fun getAlertRuleAnomaly(displayName: String? = null, logAnalyticsWorkspaceId: String, name: String? = null): GetAlertRuleAnomalyResult
Return
A collection of values returned by getAlertRuleAnomaly.
See also
Parameters
display Name
The display name of this Sentinel Alert Rule Template. Either display_name
or name
have to be specified.
NOTE One of
name
ordisplay_name
must be specified.
log Analytics Workspace Id
The ID of the Log Analytics Workspace.
name
The guid of this Sentinel Alert Rule Template. Either display_name
or name
have to be specified.
suspend fun getAlertRuleAnomaly(argument: suspend GetAlertRuleAnomalyPlainArgsBuilder.() -> Unit): GetAlertRuleAnomalyResult
Return
A collection of values returned by getAlertRuleAnomaly.
See also
Parameters
argument
Builder for com.pulumi.azure.sentinel.kotlin.inputs.GetAlertRuleAnomalyPlainArgs.