com.pulumi.azurenative.security.Automation 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.security;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.security.AutomationArgs;
import com.pulumi.azurenative.security.outputs.AutomationActionEventHubResponse;
import com.pulumi.azurenative.security.outputs.AutomationActionLogicAppResponse;
import com.pulumi.azurenative.security.outputs.AutomationActionWorkspaceResponse;
import com.pulumi.azurenative.security.outputs.AutomationScopeResponse;
import com.pulumi.azurenative.security.outputs.AutomationSourceResponse;
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.Object;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* The security automation resource.
* Azure REST API version: 2019-01-01-preview. Prior API version in Azure Native 1.x: 2019-01-01-preview.
*
* Other available API versions: 2023-12-01-preview.
*
* ## Example Usage
* ### Create or update a security automation for all assessments (including all severities)
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.security.Automation;
* import com.pulumi.azurenative.security.AutomationArgs;
* import com.pulumi.azurenative.security.inputs.AutomationScopeArgs;
* import com.pulumi.azurenative.security.inputs.AutomationSourceArgs;
* 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 automation = new Automation("automation", AutomationArgs.builder()
* .actions(AutomationActionLogicAppArgs.builder()
* .actionType("LogicApp")
* .logicAppResourceId("/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1")
* .uri("https://exampleTriggerUri1.com")
* .build())
* .automationName("exampleAutomation")
* .description("An example of a security automation that triggers one LogicApp resource (myTest1) on any security assessment")
* .isEnabled(true)
* .location("Central US")
* .resourceGroupName("exampleResourceGroup")
* .scopes(AutomationScopeArgs.builder()
* .description("A description that helps to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription a5caac9c-5c04-49af-b3d0-e204f40345d5")
* .scopePath("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/myResourceGroup")
* .build())
* .sources(AutomationSourceArgs.builder()
* .eventSource("Assessments")
* .build())
* .tags()
* .build());
*
* }
* }
*
* }
*
* ### Create or update a security automation for all high severity assessments
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.security.Automation;
* import com.pulumi.azurenative.security.AutomationArgs;
* import com.pulumi.azurenative.security.inputs.AutomationScopeArgs;
* import com.pulumi.azurenative.security.inputs.AutomationSourceArgs;
* 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 automation = new Automation("automation", AutomationArgs.builder()
* .actions(AutomationActionLogicAppArgs.builder()
* .actionType("LogicApp")
* .logicAppResourceId("/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1")
* .uri("https://exampleTriggerUri1.com")
* .build())
* .automationName("exampleAutomation")
* .description("An example of a security automation that triggers one LogicApp resource (myTest1) on any high severity security assessment")
* .isEnabled(true)
* .location("Central US")
* .resourceGroupName("exampleResourceGroup")
* .scopes(AutomationScopeArgs.builder()
* .description("A description that helps to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription a5caac9c-5c04-49af-b3d0-e204f40345d5")
* .scopePath("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/myResourceGroup")
* .build())
* .sources(AutomationSourceArgs.builder()
* .eventSource("Assessments")
* .ruleSets(AutomationRuleSetArgs.builder()
* .rules(AutomationTriggeringRuleArgs.builder()
* .expectedValue("High")
* .operator("Equals")
* .propertyJPath("properties.metadata.severity")
* .propertyType("String")
* .build())
* .build())
* .build())
* .tags()
* .build());
*
* }
* }
*
* }
*
* ### Disable or enable a security automation
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.security.Automation;
* import com.pulumi.azurenative.security.AutomationArgs;
* import com.pulumi.azurenative.security.inputs.AutomationScopeArgs;
* import com.pulumi.azurenative.security.inputs.AutomationSourceArgs;
* 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 automation = new Automation("automation", AutomationArgs.builder()
* .actions(AutomationActionLogicAppArgs.builder()
* .actionType("LogicApp")
* .logicAppResourceId("/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1")
* .uri("https://exampleTriggerUri1.com")
* .build())
* .automationName("exampleAutomation")
* .description("An example of a security automation that triggers one LogicApp resource (myTest1) on any security assessment of type customAssessment")
* .isEnabled(false)
* .location("Central US")
* .resourceGroupName("exampleResourceGroup")
* .scopes(AutomationScopeArgs.builder()
* .description("A description that helps to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription a5caac9c-5c04-49af-b3d0-e204f40345d5")
* .scopePath("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/myResourceGroup")
* .build())
* .sources(AutomationSourceArgs.builder()
* .eventSource("Assessments")
* .ruleSets(AutomationRuleSetArgs.builder()
* .rules(AutomationTriggeringRuleArgs.builder()
* .expectedValue("customAssessment")
* .operator("Equals")
* .propertyJPath("$.Entity.AssessmentType")
* .propertyType("String")
* .build())
* .build())
* .build())
* .tags()
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:security:Automation exampleAutomation /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/automations/{automationName}
* ```
*
*/
@ResourceType(type="azure-native:security:Automation")
public class Automation extends com.pulumi.resources.CustomResource {
/**
* A collection of the actions which are triggered if all the configured rules evaluations, within at least one rule set, are true.
*
*/
@Export(name="actions", refs={List.class,Object.class}, tree="[0,1]")
private Output* @Nullable */ List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy