AppSecEvalGroup

Use the akamai.AppSecEvalGroup resource to create or modify an evaluation attack group’s action, conditions and exceptions. When the conditions are met, the rule’s actions are ignored and not applied to that specific traffic. BETA This is Adaptive Security Engine(ASE) related data resource. Please contact your akamai representative if you want to learn more

Example Usage

using System.IO;
using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var configuration = Output.Create(Akamai.GetAppSecConfiguration.InvokeAsync(new Akamai.GetAppSecConfigurationArgs
        {
            Name = @var.Security_configuration,
        }));
        var evalAttackGroup = new Akamai.AppSecEvalGroup("evalAttackGroup", new Akamai.AppSecEvalGroupArgs
        {
            ConfigId = configuration.Apply(configuration => configuration.ConfigId),
            SecurityPolicyId = @var.Security_policy_id,
            AttackGroup = @var.Attack_group,
            AttackGroupAction = @var.Attack_group_action,
            ConditionException = File.ReadAllText($"{path.Module}/condition_exception.json"),
        });
    }

}
package main

import (
	"fmt"
	"io/ioutil"

	"github.com/pulumi/pulumi-akamai/sdk/v2/go/akamai"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func readFileOrPanic(path string) pulumi.StringPtrInput {
	data, err := ioutil.ReadFile(path)
	if err != nil {
		panic(err.Error())
	}
	return pulumi.String(string(data))
}

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := _var.Security_configuration
		configuration, err := akamai.LookupAppSecConfiguration(ctx, &GetAppSecConfigurationArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		_, err = akamai.NewAppSecEvalGroup(ctx, "evalAttackGroup", &akamai.AppSecEvalGroupArgs{
			ConfigId:           pulumi.Int(configuration.ConfigId),
			SecurityPolicyId:   pulumi.Any(_var.Security_policy_id),
			AttackGroup:        pulumi.Any(_var.Attack_group),
			AttackGroupAction:  pulumi.Any(_var.Attack_group_action),
			ConditionException: readFileOrPanic(fmt.Sprintf("%v%v", path.Module, "/condition_exception.json")),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name=var["security_configuration"])
eval_attack_group = akamai.AppSecEvalGroup("evalAttackGroup",
    config_id=configuration.config_id,
    security_policy_id=var["security_policy_id"],
    attack_group=var["attack_group"],
    attack_group_action=var["attack_group_action"],
    condition_exception=(lambda path: open(path).read())(f"{path['module']}/condition_exception.json"))
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";
import * from "fs";

const configuration = akamai.getAppSecConfiguration({
    name: _var.security_configuration,
});
const evalAttackGroup = new akamai.AppSecEvalGroup("evalAttackGroup", {
    configId: configuration.then(configuration => configuration.configId),
    securityPolicyId: _var.security_policy_id,
    attackGroup: _var.attack_group,
    attackGroupAction: _var.attack_group_action,
    conditionException: fs.readFileSync(`${path.module}/condition_exception.json`),
});

Create a AppSecEvalGroup Resource

new AppSecEvalGroup(name: string, args: AppSecEvalGroupArgs, opts?: CustomResourceOptions);
@overload
def AppSecEvalGroup(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    attack_group: Optional[str] = None,
                    attack_group_action: Optional[str] = None,
                    condition_exception: Optional[str] = None,
                    config_id: Optional[int] = None,
                    security_policy_id: Optional[str] = None)
@overload
def AppSecEvalGroup(resource_name: str,
                    args: AppSecEvalGroupArgs,
                    opts: Optional[ResourceOptions] = None)
func NewAppSecEvalGroup(ctx *Context, name string, args AppSecEvalGroupArgs, opts ...ResourceOption) (*AppSecEvalGroup, error)
public AppSecEvalGroup(string name, AppSecEvalGroupArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args AppSecEvalGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args AppSecEvalGroupArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args AppSecEvalGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AppSecEvalGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

AppSecEvalGroup Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The AppSecEvalGroup resource accepts the following input properties:

AttackGroup string
The eval attack group to use.
AttackGroupAction string
The action to be taken: alert to record the trigger of the event, deny to block the request, deny_custom_{custom_deny_id} to execute a custom deny action, or none to take no action.
ConfigId int
The ID of the security configuration to use.
SecurityPolicyId string
The ID of the security policy to use.
ConditionException string
The name of a file containing a JSON-formatted description of the conditions and exceptions to use (format).
AttackGroup string
The eval attack group to use.
AttackGroupAction string
The action to be taken: alert to record the trigger of the event, deny to block the request, deny_custom_{custom_deny_id} to execute a custom deny action, or none to take no action.
ConfigId int
The ID of the security configuration to use.
SecurityPolicyId string
The ID of the security policy to use.
ConditionException string
The name of a file containing a JSON-formatted description of the conditions and exceptions to use (format).
attackGroup string
The eval attack group to use.
attackGroupAction string
The action to be taken: alert to record the trigger of the event, deny to block the request, deny_custom_{custom_deny_id} to execute a custom deny action, or none to take no action.
configId number
The ID of the security configuration to use.
securityPolicyId string
The ID of the security policy to use.
conditionException string
The name of a file containing a JSON-formatted description of the conditions and exceptions to use (format).
attack_group str
The eval attack group to use.
attack_group_action str
The action to be taken: alert to record the trigger of the event, deny to block the request, deny_custom_{custom_deny_id} to execute a custom deny action, or none to take no action.
config_id int
The ID of the security configuration to use.
security_policy_id str
The ID of the security policy to use.
condition_exception str
The name of a file containing a JSON-formatted description of the conditions and exceptions to use (format).

Outputs

All input properties are implicitly available as output properties. Additionally, the AppSecEvalGroup resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing AppSecEvalGroup Resource

Get an existing AppSecEvalGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: AppSecEvalGroupState, opts?: CustomResourceOptions): AppSecEvalGroup
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        attack_group: Optional[str] = None,
        attack_group_action: Optional[str] = None,
        condition_exception: Optional[str] = None,
        config_id: Optional[int] = None,
        security_policy_id: Optional[str] = None) -> AppSecEvalGroup
func GetAppSecEvalGroup(ctx *Context, name string, id IDInput, state *AppSecEvalGroupState, opts ...ResourceOption) (*AppSecEvalGroup, error)
public static AppSecEvalGroup Get(string name, Input<string> id, AppSecEvalGroupState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

AttackGroup string
The eval attack group to use.
AttackGroupAction string
The action to be taken: alert to record the trigger of the event, deny to block the request, deny_custom_{custom_deny_id} to execute a custom deny action, or none to take no action.
ConditionException string
The name of a file containing a JSON-formatted description of the conditions and exceptions to use (format).
ConfigId int
The ID of the security configuration to use.
SecurityPolicyId string
The ID of the security policy to use.
AttackGroup string
The eval attack group to use.
AttackGroupAction string
The action to be taken: alert to record the trigger of the event, deny to block the request, deny_custom_{custom_deny_id} to execute a custom deny action, or none to take no action.
ConditionException string
The name of a file containing a JSON-formatted description of the conditions and exceptions to use (format).
ConfigId int
The ID of the security configuration to use.
SecurityPolicyId string
The ID of the security policy to use.
attackGroup string
The eval attack group to use.
attackGroupAction string
The action to be taken: alert to record the trigger of the event, deny to block the request, deny_custom_{custom_deny_id} to execute a custom deny action, or none to take no action.
conditionException string
The name of a file containing a JSON-formatted description of the conditions and exceptions to use (format).
configId number
The ID of the security configuration to use.
securityPolicyId string
The ID of the security policy to use.
attack_group str
The eval attack group to use.
attack_group_action str
The action to be taken: alert to record the trigger of the event, deny to block the request, deny_custom_{custom_deny_id} to execute a custom deny action, or none to take no action.
condition_exception str
The name of a file containing a JSON-formatted description of the conditions and exceptions to use (format).
config_id int
The ID of the security configuration to use.
security_policy_id str
The ID of the security policy to use.

Package Details

Repository
https://github.com/pulumi/pulumi-akamai
License
Apache-2.0
Notes
This Pulumi package is based on the akamai Terraform Provider.