Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azure.sentinel.kotlin.AutomationRuleArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.sentinel.kotlin
import com.pulumi.azure.sentinel.AutomationRuleArgs.builder
import com.pulumi.azure.sentinel.kotlin.inputs.AutomationRuleActionIncidentArgs
import com.pulumi.azure.sentinel.kotlin.inputs.AutomationRuleActionIncidentArgsBuilder
import com.pulumi.azure.sentinel.kotlin.inputs.AutomationRuleActionPlaybookArgs
import com.pulumi.azure.sentinel.kotlin.inputs.AutomationRuleActionPlaybookArgsBuilder
import com.pulumi.azure.sentinel.kotlin.inputs.AutomationRuleConditionArgs
import com.pulumi.azure.sentinel.kotlin.inputs.AutomationRuleConditionArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Manages a Sentinel Automation Rule.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-rg",
* location: "west europe",
* });
* const exampleAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("example", {
* name: "example-workspace",
* location: example.location,
* resourceGroupName: example.name,
* sku: "PerGB2018",
* });
* const exampleLogAnalyticsWorkspaceOnboarding = new azure.sentinel.LogAnalyticsWorkspaceOnboarding("example", {workspaceId: exampleAnalyticsWorkspace.id});
* const exampleAutomationRule = new azure.sentinel.AutomationRule("example", {
* name: "56094f72-ac3f-40e7-a0c0-47bd95f70336",
* logAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.workspaceId,
* displayName: "automation_rule1",
* order: 1,
* actionIncidents: [{
* order: 1,
* status: "Active",
* }],
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-rg",
* location="west europe")
* example_analytics_workspace = azure.operationalinsights.AnalyticsWorkspace("example",
* name="example-workspace",
* location=example.location,
* resource_group_name=example.name,
* sku="PerGB2018")
* example_log_analytics_workspace_onboarding = azure.sentinel.LogAnalyticsWorkspaceOnboarding("example", workspace_id=example_analytics_workspace.id)
* example_automation_rule = azure.sentinel.AutomationRule("example",
* name="56094f72-ac3f-40e7-a0c0-47bd95f70336",
* log_analytics_workspace_id=example_log_analytics_workspace_onboarding.workspace_id,
* display_name="automation_rule1",
* order=1,
* action_incidents=[{
* "order": 1,
* "status": "Active",
* }])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-rg",
* Location = "west europe",
* });
* var exampleAnalyticsWorkspace = new Azure.OperationalInsights.AnalyticsWorkspace("example", new()
* {
* Name = "example-workspace",
* Location = example.Location,
* ResourceGroupName = example.Name,
* Sku = "PerGB2018",
* });
* var exampleLogAnalyticsWorkspaceOnboarding = new Azure.Sentinel.LogAnalyticsWorkspaceOnboarding("example", new()
* {
* WorkspaceId = exampleAnalyticsWorkspace.Id,
* });
* var exampleAutomationRule = new Azure.Sentinel.AutomationRule("example", new()
* {
* Name = "56094f72-ac3f-40e7-a0c0-47bd95f70336",
* LogAnalyticsWorkspaceId = exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId,
* DisplayName = "automation_rule1",
* Order = 1,
* ActionIncidents = new[]
* {
* new Azure.Sentinel.Inputs.AutomationRuleActionIncidentArgs
* {
* Order = 1,
* Status = "Active",
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/operationalinsights"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/sentinel"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-rg"),
* Location: pulumi.String("west europe"),
* })
* if err != nil {
* return err
* }
* exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{
* Name: pulumi.String("example-workspace"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* Sku: pulumi.String("PerGB2018"),
* })
* if err != nil {
* return err
* }
* exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{
* WorkspaceId: exampleAnalyticsWorkspace.ID(),
* })
* if err != nil {
* return err
* }
* _, err = sentinel.NewAutomationRule(ctx, "example", &sentinel.AutomationRuleArgs{
* Name: pulumi.String("56094f72-ac3f-40e7-a0c0-47bd95f70336"),
* LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId,
* DisplayName: pulumi.String("automation_rule1"),
* Order: pulumi.Int(1),
* ActionIncidents: sentinel.AutomationRuleActionIncidentArray{
* &sentinel.AutomationRuleActionIncidentArgs{
* Order: pulumi.Int(1),
* Status: pulumi.String("Active"),
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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.AutomationRule;
* import com.pulumi.azure.sentinel.AutomationRuleArgs;
* import com.pulumi.azure.sentinel.inputs.AutomationRuleActionIncidentArgs;
* 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("example-rg")
* .location("west europe")
* .build());
* var exampleAnalyticsWorkspace = new AnalyticsWorkspace("exampleAnalyticsWorkspace", AnalyticsWorkspaceArgs.builder()
* .name("example-workspace")
* .location(example.location())
* .resourceGroupName(example.name())
* .sku("PerGB2018")
* .build());
* var exampleLogAnalyticsWorkspaceOnboarding = new LogAnalyticsWorkspaceOnboarding("exampleLogAnalyticsWorkspaceOnboarding", LogAnalyticsWorkspaceOnboardingArgs.builder()
* .workspaceId(exampleAnalyticsWorkspace.id())
* .build());
* var exampleAutomationRule = new AutomationRule("exampleAutomationRule", AutomationRuleArgs.builder()
* .name("56094f72-ac3f-40e7-a0c0-47bd95f70336")
* .logAnalyticsWorkspaceId(exampleLogAnalyticsWorkspaceOnboarding.workspaceId())
* .displayName("automation_rule1")
* .order(1)
* .actionIncidents(AutomationRuleActionIncidentArgs.builder()
* .order(1)
* .status("Active")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-rg
* location: west europe
* exampleAnalyticsWorkspace:
* type: azure:operationalinsights:AnalyticsWorkspace
* name: example
* properties:
* name: example-workspace
* location: ${example.location}
* resourceGroupName: ${example.name}
* sku: PerGB2018
* exampleLogAnalyticsWorkspaceOnboarding:
* type: azure:sentinel:LogAnalyticsWorkspaceOnboarding
* name: example
* properties:
* workspaceId: ${exampleAnalyticsWorkspace.id}
* exampleAutomationRule:
* type: azure:sentinel:AutomationRule
* name: example
* properties:
* name: 56094f72-ac3f-40e7-a0c0-47bd95f70336
* logAnalyticsWorkspaceId: ${exampleLogAnalyticsWorkspaceOnboarding.workspaceId}
* displayName: automation_rule1
* order: 1
* actionIncidents:
* - order: 1
* status: Active
* ```
*
* ## Import
* Sentinel Automation Rules can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:sentinel/automationRule:AutomationRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/automationRules/rule1
* ```
* @property actionIncidents One or more `action_incident` blocks as defined below.
* @property actionPlaybooks One or more `action_playbook` blocks as defined below.
* > **Note:** Either one `action_incident` block or `action_playbook` block has to be specified.
* @property conditionJson A JSON array of one or more condition JSON objects as is defined [here](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#automationruletriggeringlogic).
* @property conditions One or more `condition` blocks as defined below.
* > **Note:** `condition` only supports the [`Property` condition type](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#propertyconditionproperties). Please use `condition_json` if you want other condition types.
* @property displayName The display name which should be used for this Sentinel Automation Rule.
* @property enabled Whether this Sentinel Automation Rule is enabled? Defaults to `true`.
* @property expiration The time in RFC3339 format of kind `UTC` that determines when this Automation Rule should expire and be disabled.
* @property logAnalyticsWorkspaceId The ID of the Log Analytics Workspace where this Sentinel applies to. Changing this forces a new Sentinel Automation Rule to be created.
* @property name The UUID which should be used for this Sentinel Automation Rule. Changing this forces a new Sentinel Automation Rule to be created.
* @property order The order of this Sentinel Automation Rule. Possible values varies between `1` and `1000`.
* @property triggersOn Specifies what triggers this automation rule. Possible values are `Alerts` and `Incidents`. Defaults to `Incidents`.
* @property triggersWhen Specifies when will this automation rule be triggered. Possible values are `Created` and `Updated`. Defaults to `Created`.
*/
public data class AutomationRuleArgs(
public val actionIncidents: Output>? = null,
public val actionPlaybooks: Output>? = null,
public val conditionJson: Output? = null,
@Deprecated(
message = """
This is deprecated in favor of `condition_json`
""",
)
public val conditions: Output>? = null,
public val displayName: Output? = null,
public val enabled: Output? = null,
public val expiration: Output? = null,
public val logAnalyticsWorkspaceId: Output? = null,
public val name: Output? = null,
public val order: Output? = null,
public val triggersOn: Output? = null,
public val triggersWhen: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.sentinel.AutomationRuleArgs =
com.pulumi.azure.sentinel.AutomationRuleArgs.builder()
.actionIncidents(
actionIncidents?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.actionPlaybooks(
actionPlaybooks?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.conditionJson(conditionJson?.applyValue({ args0 -> args0 }))
.conditions(
conditions?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.displayName(displayName?.applyValue({ args0 -> args0 }))
.enabled(enabled?.applyValue({ args0 -> args0 }))
.expiration(expiration?.applyValue({ args0 -> args0 }))
.logAnalyticsWorkspaceId(logAnalyticsWorkspaceId?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.order(order?.applyValue({ args0 -> args0 }))
.triggersOn(triggersOn?.applyValue({ args0 -> args0 }))
.triggersWhen(triggersWhen?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [AutomationRuleArgs].
*/
@PulumiTagMarker
public class AutomationRuleArgsBuilder internal constructor() {
private var actionIncidents: Output>? = null
private var actionPlaybooks: Output>? = null
private var conditionJson: Output? = null
private var conditions: Output>? = null
private var displayName: Output? = null
private var enabled: Output? = null
private var expiration: Output? = null
private var logAnalyticsWorkspaceId: Output? = null
private var name: Output? = null
private var order: Output? = null
private var triggersOn: Output? = null
private var triggersWhen: Output? = null
/**
* @param value One or more `action_incident` blocks as defined below.
*/
@JvmName("vbbdulvmujjxnpxo")
public suspend fun actionIncidents(`value`: Output>) {
this.actionIncidents = value
}
@JvmName("ewyjjnepbedbbmem")
public suspend fun actionIncidents(vararg values: Output) {
this.actionIncidents = Output.all(values.asList())
}
/**
* @param values One or more `action_incident` blocks as defined below.
*/
@JvmName("sdpopuxekuagksdh")
public suspend fun actionIncidents(values: List>) {
this.actionIncidents = Output.all(values)
}
/**
* @param value One or more `action_playbook` blocks as defined below.
* > **Note:** Either one `action_incident` block or `action_playbook` block has to be specified.
*/
@JvmName("hbykjvbxhlsgylyg")
public suspend fun actionPlaybooks(`value`: Output>) {
this.actionPlaybooks = value
}
@JvmName("htmpegjbxrymrvvn")
public suspend fun actionPlaybooks(vararg values: Output) {
this.actionPlaybooks = Output.all(values.asList())
}
/**
* @param values One or more `action_playbook` blocks as defined below.
* > **Note:** Either one `action_incident` block or `action_playbook` block has to be specified.
*/
@JvmName("kbvygqjohmbgadsj")
public suspend fun actionPlaybooks(values: List>) {
this.actionPlaybooks = Output.all(values)
}
/**
* @param value A JSON array of one or more condition JSON objects as is defined [here](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#automationruletriggeringlogic).
*/
@JvmName("dciygntwftwxfviy")
public suspend fun conditionJson(`value`: Output) {
this.conditionJson = value
}
/**
* @param value One or more `condition` blocks as defined below.
* > **Note:** `condition` only supports the [`Property` condition type](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#propertyconditionproperties). Please use `condition_json` if you want other condition types.
*/
@Deprecated(
message = """
This is deprecated in favor of `condition_json`
""",
)
@JvmName("awyfjpadixnhfodc")
public suspend fun conditions(`value`: Output>) {
this.conditions = value
}
@JvmName("gymdytvkmeltoixo")
public suspend fun conditions(vararg values: Output) {
this.conditions = Output.all(values.asList())
}
/**
* @param values One or more `condition` blocks as defined below.
* > **Note:** `condition` only supports the [`Property` condition type](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#propertyconditionproperties). Please use `condition_json` if you want other condition types.
*/
@Deprecated(
message = """
This is deprecated in favor of `condition_json`
""",
)
@JvmName("ogamvxsecqpqyhof")
public suspend fun conditions(values: List>) {
this.conditions = Output.all(values)
}
/**
* @param value The display name which should be used for this Sentinel Automation Rule.
*/
@JvmName("akdjgsbrbukrkcge")
public suspend fun displayName(`value`: Output) {
this.displayName = value
}
/**
* @param value Whether this Sentinel Automation Rule is enabled? Defaults to `true`.
*/
@JvmName("vqjtpyrkwigkouks")
public suspend fun enabled(`value`: Output) {
this.enabled = value
}
/**
* @param value The time in RFC3339 format of kind `UTC` that determines when this Automation Rule should expire and be disabled.
*/
@JvmName("tnfqtdrtiijlhusk")
public suspend fun expiration(`value`: Output) {
this.expiration = value
}
/**
* @param value The ID of the Log Analytics Workspace where this Sentinel applies to. Changing this forces a new Sentinel Automation Rule to be created.
*/
@JvmName("gchvycvnevbshhpn")
public suspend fun logAnalyticsWorkspaceId(`value`: Output) {
this.logAnalyticsWorkspaceId = value
}
/**
* @param value The UUID which should be used for this Sentinel Automation Rule. Changing this forces a new Sentinel Automation Rule to be created.
*/
@JvmName("mattdoqtsctharth")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The order of this Sentinel Automation Rule. Possible values varies between `1` and `1000`.
*/
@JvmName("puuwncgdrlcynjqe")
public suspend fun order(`value`: Output) {
this.order = value
}
/**
* @param value Specifies what triggers this automation rule. Possible values are `Alerts` and `Incidents`. Defaults to `Incidents`.
*/
@JvmName("barvtpwmmysvqfxj")
public suspend fun triggersOn(`value`: Output) {
this.triggersOn = value
}
/**
* @param value Specifies when will this automation rule be triggered. Possible values are `Created` and `Updated`. Defaults to `Created`.
*/
@JvmName("tnnihljcpodiscqk")
public suspend fun triggersWhen(`value`: Output) {
this.triggersWhen = value
}
/**
* @param value One or more `action_incident` blocks as defined below.
*/
@JvmName("txesjetmnircvxil")
public suspend fun actionIncidents(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.actionIncidents = mapped
}
/**
* @param argument One or more `action_incident` blocks as defined below.
*/
@JvmName("qbwnxcufwgrgpujr")
public suspend fun actionIncidents(argument: List Unit>) {
val toBeMapped = argument.toList().map {
AutomationRuleActionIncidentArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.actionIncidents = mapped
}
/**
* @param argument One or more `action_incident` blocks as defined below.
*/
@JvmName("llwaepaasxftsymb")
public suspend fun actionIncidents(vararg argument: suspend AutomationRuleActionIncidentArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
AutomationRuleActionIncidentArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.actionIncidents = mapped
}
/**
* @param argument One or more `action_incident` blocks as defined below.
*/
@JvmName("mmccsddelvlnrggq")
public suspend fun actionIncidents(argument: suspend AutomationRuleActionIncidentArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
AutomationRuleActionIncidentArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.actionIncidents = mapped
}
/**
* @param values One or more `action_incident` blocks as defined below.
*/
@JvmName("okibgsqmevvaacni")
public suspend fun actionIncidents(vararg values: AutomationRuleActionIncidentArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.actionIncidents = mapped
}
/**
* @param value One or more `action_playbook` blocks as defined below.
* > **Note:** Either one `action_incident` block or `action_playbook` block has to be specified.
*/
@JvmName("dcdvgjhpuvdynmeh")
public suspend fun actionPlaybooks(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.actionPlaybooks = mapped
}
/**
* @param argument One or more `action_playbook` blocks as defined below.
* > **Note:** Either one `action_incident` block or `action_playbook` block has to be specified.
*/
@JvmName("polaxkbovlqlfwqj")
public suspend fun actionPlaybooks(argument: List Unit>) {
val toBeMapped = argument.toList().map {
AutomationRuleActionPlaybookArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.actionPlaybooks = mapped
}
/**
* @param argument One or more `action_playbook` blocks as defined below.
* > **Note:** Either one `action_incident` block or `action_playbook` block has to be specified.
*/
@JvmName("fncvjbstiwopfphk")
public suspend fun actionPlaybooks(vararg argument: suspend AutomationRuleActionPlaybookArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
AutomationRuleActionPlaybookArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.actionPlaybooks = mapped
}
/**
* @param argument One or more `action_playbook` blocks as defined below.
* > **Note:** Either one `action_incident` block or `action_playbook` block has to be specified.
*/
@JvmName("xqtxknfbaorhglak")
public suspend fun actionPlaybooks(argument: suspend AutomationRuleActionPlaybookArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
AutomationRuleActionPlaybookArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.actionPlaybooks = mapped
}
/**
* @param values One or more `action_playbook` blocks as defined below.
* > **Note:** Either one `action_incident` block or `action_playbook` block has to be specified.
*/
@JvmName("icjkoltcuysokiqq")
public suspend fun actionPlaybooks(vararg values: AutomationRuleActionPlaybookArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.actionPlaybooks = mapped
}
/**
* @param value A JSON array of one or more condition JSON objects as is defined [here](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#automationruletriggeringlogic).
*/
@JvmName("mglsuduesubavyko")
public suspend fun conditionJson(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.conditionJson = mapped
}
/**
* @param value One or more `condition` blocks as defined below.
* > **Note:** `condition` only supports the [`Property` condition type](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#propertyconditionproperties). Please use `condition_json` if you want other condition types.
*/
@Deprecated(
message = """
This is deprecated in favor of `condition_json`
""",
)
@JvmName("mkrctgacgwrwkjuf")
public suspend fun conditions(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.conditions = mapped
}
/**
* @param argument One or more `condition` blocks as defined below.
* > **Note:** `condition` only supports the [`Property` condition type](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#propertyconditionproperties). Please use `condition_json` if you want other condition types.
*/
@Deprecated(
message = """
This is deprecated in favor of `condition_json`
""",
)
@JvmName("vclrifloimjxkuje")
public suspend fun conditions(argument: List Unit>) {
val toBeMapped = argument.toList().map {
AutomationRuleConditionArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.conditions = mapped
}
/**
* @param argument One or more `condition` blocks as defined below.
* > **Note:** `condition` only supports the [`Property` condition type](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#propertyconditionproperties). Please use `condition_json` if you want other condition types.
*/
@Deprecated(
message = """
This is deprecated in favor of `condition_json`
""",
)
@JvmName("cnbwrweawxxxcpdd")
public suspend fun conditions(vararg argument: suspend AutomationRuleConditionArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
AutomationRuleConditionArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.conditions = mapped
}
/**
* @param argument One or more `condition` blocks as defined below.
* > **Note:** `condition` only supports the [`Property` condition type](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#propertyconditionproperties). Please use `condition_json` if you want other condition types.
*/
@Deprecated(
message = """
This is deprecated in favor of `condition_json`
""",
)
@JvmName("nyoqjhtipnhpipda")
public suspend fun conditions(argument: suspend AutomationRuleConditionArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
AutomationRuleConditionArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.conditions = mapped
}
/**
* @param values One or more `condition` blocks as defined below.
* > **Note:** `condition` only supports the [`Property` condition type](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#propertyconditionproperties). Please use `condition_json` if you want other condition types.
*/
@Deprecated(
message = """
This is deprecated in favor of `condition_json`
""",
)
@JvmName("xxjmhsrwgnsyprlu")
public suspend fun conditions(vararg values: AutomationRuleConditionArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.conditions = mapped
}
/**
* @param value The display name which should be used for this Sentinel Automation Rule.
*/
@JvmName("ffgmpiaaynnhpptu")
public suspend fun displayName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.displayName = mapped
}
/**
* @param value Whether this Sentinel Automation Rule is enabled? Defaults to `true`.
*/
@JvmName("quyqbuokilkkijlh")
public suspend fun enabled(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.enabled = mapped
}
/**
* @param value The time in RFC3339 format of kind `UTC` that determines when this Automation Rule should expire and be disabled.
*/
@JvmName("qafumhkgkntqlpmg")
public suspend fun expiration(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.expiration = mapped
}
/**
* @param value The ID of the Log Analytics Workspace where this Sentinel applies to. Changing this forces a new Sentinel Automation Rule to be created.
*/
@JvmName("agsykmpwiclrwodv")
public suspend fun logAnalyticsWorkspaceId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.logAnalyticsWorkspaceId = mapped
}
/**
* @param value The UUID which should be used for this Sentinel Automation Rule. Changing this forces a new Sentinel Automation Rule to be created.
*/
@JvmName("jptottruhffohwmq")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The order of this Sentinel Automation Rule. Possible values varies between `1` and `1000`.
*/
@JvmName("vlulncjyndjvrtgl")
public suspend fun order(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.order = mapped
}
/**
* @param value Specifies what triggers this automation rule. Possible values are `Alerts` and `Incidents`. Defaults to `Incidents`.
*/
@JvmName("fwxvadbwagfojkas")
public suspend fun triggersOn(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.triggersOn = mapped
}
/**
* @param value Specifies when will this automation rule be triggered. Possible values are `Created` and `Updated`. Defaults to `Created`.
*/
@JvmName("yvhujntkmeffcbev")
public suspend fun triggersWhen(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.triggersWhen = mapped
}
internal fun build(): AutomationRuleArgs = AutomationRuleArgs(
actionIncidents = actionIncidents,
actionPlaybooks = actionPlaybooks,
conditionJson = conditionJson,
conditions = conditions,
displayName = displayName,
enabled = enabled,
expiration = expiration,
logAnalyticsWorkspaceId = logAnalyticsWorkspaceId,
name = name,
order = order,
triggersOn = triggersOn,
triggersWhen = triggersWhen,
)
}