Akamai

v3.1.1 published on Tuesday, Nov 1, 2022 by Pulumi

getAppSecEvalPenaltyBox

Scopes: Security policy

ASE_Beta.: Returns the penalty box settings for a security policy in evaluation mode - evaluation penalty box. When the penalty box is enabled for a policy in evaluation mode, clients that trigger a WAF Deny action are placed in the “penalty box”. There, the action you select for the penalty box (either Alert or Deny) continues to apply to any requests from that client for the next 10 minutes.

Related API Endpoint: /appsec/v1/configs/{configId}/versions/{versionNumber}/security-policies/{policyId}/eval_penalty-box

Output Options

The following options can be used to determine the information returned, and how that returned information is formatted:

  • action. Action taken any time the penalty box is triggered. Valid values are:
    • alert. Record the event.
    • deny. The request is blocked.
    • deny_custom_{custom_deny_id}. The action defined by the custom deny is taken.
    • none. Take no action.
  • enabled. If true, evaluation penalty box protection is enabled. If false, evaluation penalty box protection is disabled.
  • output_text. Tabular report of evaluation penalty box protection settings.

Example Usage

Basic usage

using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var configuration = Output.Create(Akamai.GetAppSecConfiguration.InvokeAsync(new Akamai.GetAppSecConfigurationArgs
        {
            Name = "Documentation",
        }));
        var evalPenaltyBox = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecEvalPenaltyBox.InvokeAsync(new Akamai.GetAppSecEvalPenaltyBoxArgs
        {
            ConfigId = configuration.ConfigId,
            SecurityPolicyId = "gms1_134637",
        })));
        this.EvalPenaltyBoxAction = evalPenaltyBox.Apply(evalPenaltyBox => evalPenaltyBox.Action);
        this.EvalPenaltyBoxEnabled = evalPenaltyBox.Apply(evalPenaltyBox => evalPenaltyBox.Enabled);
        this.EvalPenaltyBoxText = evalPenaltyBox.Apply(evalPenaltyBox => evalPenaltyBox.OutputText);
    }

    [Output("evalPenaltyBoxAction")]
    public Output<string> EvalPenaltyBoxAction { get; set; }
    [Output("evalPenaltyBoxEnabled")]
    public Output<string> EvalPenaltyBoxEnabled { get; set; }
    [Output("evalPenaltyBoxText")]
    public Output<string> EvalPenaltyBoxText { get; set; }
}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		configuration, err := akamai.LookupAppSecConfiguration(ctx, &GetAppSecConfigurationArgs{
			Name: pulumi.StringRef("Documentation"),
		}, nil)
		if err != nil {
			return err
		}
		evalPenaltyBox, err := akamai.LookupAppSecEvalPenaltyBox(ctx, &GetAppSecEvalPenaltyBoxArgs{
			ConfigId:         configuration.ConfigId,
			SecurityPolicyId: "gms1_134637",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("evalPenaltyBoxAction", evalPenaltyBox.Action)
		ctx.Export("evalPenaltyBoxEnabled", evalPenaltyBox.Enabled)
		ctx.Export("evalPenaltyBoxText", evalPenaltyBox.OutputText)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.akamai.AkamaiFunctions;
import com.pulumi.akamai.inputs.GetAppSecConfigurationArgs;
import com.pulumi.akamai.inputs.GetAppSecEvalPenaltyBoxArgs;
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) {
        final var configuration = AkamaiFunctions.getAppSecConfiguration(GetAppSecConfigurationArgs.builder()
            .name("Documentation")
            .build());

        final var evalPenaltyBox = AkamaiFunctions.getAppSecEvalPenaltyBox(GetAppSecEvalPenaltyBoxArgs.builder()
            .configId(configuration.applyValue(getAppSecConfigurationResult -> getAppSecConfigurationResult.configId()))
            .securityPolicyId("gms1_134637")
            .build());

        ctx.export("evalPenaltyBoxAction", evalPenaltyBox.applyValue(getAppSecEvalPenaltyBoxResult -> getAppSecEvalPenaltyBoxResult.action()));
        ctx.export("evalPenaltyBoxEnabled", evalPenaltyBox.applyValue(getAppSecEvalPenaltyBoxResult -> getAppSecEvalPenaltyBoxResult.enabled()));
        ctx.export("evalPenaltyBoxText", evalPenaltyBox.applyValue(getAppSecEvalPenaltyBoxResult -> getAppSecEvalPenaltyBoxResult.outputText()));
    }
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name="Documentation")
eval_penalty_box = akamai.get_app_sec_eval_penalty_box(config_id=configuration.config_id,
    security_policy_id="gms1_134637")
pulumi.export("evalPenaltyBoxAction", eval_penalty_box.action)
pulumi.export("evalPenaltyBoxEnabled", eval_penalty_box.enabled)
pulumi.export("evalPenaltyBoxText", eval_penalty_box.output_text)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: "Documentation",
});
const evalPenaltyBox = configuration.then(configuration => akamai.getAppSecEvalPenaltyBox({
    configId: configuration.configId,
    securityPolicyId: "gms1_134637",
}));
export const evalPenaltyBoxAction = evalPenaltyBox.then(evalPenaltyBox => evalPenaltyBox.action);
export const evalPenaltyBoxEnabled = evalPenaltyBox.then(evalPenaltyBox => evalPenaltyBox.enabled);
export const evalPenaltyBoxText = evalPenaltyBox.then(evalPenaltyBox => evalPenaltyBox.outputText);
variables:
  configuration:
    Fn::Invoke:
      Function: akamai:getAppSecConfiguration
      Arguments:
        name: Documentation
  evalPenaltyBox:
    Fn::Invoke:
      Function: akamai:getAppSecEvalPenaltyBox
      Arguments:
        configId: ${configuration.configId}
        securityPolicyId: gms1_134637
outputs:
  evalPenaltyBoxAction: ${evalPenaltyBox.action}
  evalPenaltyBoxEnabled: ${evalPenaltyBox.enabled}
  evalPenaltyBoxText: ${evalPenaltyBox.outputText}

Using getAppSecEvalPenaltyBox

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getAppSecEvalPenaltyBox(args: GetAppSecEvalPenaltyBoxArgs, opts?: InvokeOptions): Promise<GetAppSecEvalPenaltyBoxResult>
function getAppSecEvalPenaltyBoxOutput(args: GetAppSecEvalPenaltyBoxOutputArgs, opts?: InvokeOptions): Output<GetAppSecEvalPenaltyBoxResult>
def get_app_sec_eval_penalty_box(config_id: Optional[int] = None,
                                 security_policy_id: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetAppSecEvalPenaltyBoxResult
def get_app_sec_eval_penalty_box_output(config_id: Optional[pulumi.Input[int]] = None,
                                 security_policy_id: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetAppSecEvalPenaltyBoxResult]
func LookupAppSecEvalPenaltyBox(ctx *Context, args *LookupAppSecEvalPenaltyBoxArgs, opts ...InvokeOption) (*LookupAppSecEvalPenaltyBoxResult, error)
func LookupAppSecEvalPenaltyBoxOutput(ctx *Context, args *LookupAppSecEvalPenaltyBoxOutputArgs, opts ...InvokeOption) LookupAppSecEvalPenaltyBoxResultOutput

> Note: This function is named LookupAppSecEvalPenaltyBox in the Go SDK.

public static class GetAppSecEvalPenaltyBox 
{
    public static Task<GetAppSecEvalPenaltyBoxResult> InvokeAsync(GetAppSecEvalPenaltyBoxArgs args, InvokeOptions? opts = null)
    public static Output<GetAppSecEvalPenaltyBoxResult> Invoke(GetAppSecEvalPenaltyBoxInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAppSecEvalPenaltyBoxResult> getAppSecEvalPenaltyBox(GetAppSecEvalPenaltyBoxArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: akamai:index/getAppSecEvalPenaltyBox:getAppSecEvalPenaltyBox
  arguments:
    # arguments dictionary

The following arguments are supported:

ConfigId int

. Unique identifier of the security configuration associated with the evaluation penalty box settings.

SecurityPolicyId string

. Unique identifier of the security policy associated with the evaluation penalty box settings.

ConfigId int

. Unique identifier of the security configuration associated with the evaluation penalty box settings.

SecurityPolicyId string

. Unique identifier of the security policy associated with the evaluation penalty box settings.

configId Integer

. Unique identifier of the security configuration associated with the evaluation penalty box settings.

securityPolicyId String

. Unique identifier of the security policy associated with the evaluation penalty box settings.

configId number

. Unique identifier of the security configuration associated with the evaluation penalty box settings.

securityPolicyId string

. Unique identifier of the security policy associated with the evaluation penalty box settings.

config_id int

. Unique identifier of the security configuration associated with the evaluation penalty box settings.

security_policy_id str

. Unique identifier of the security policy associated with the evaluation penalty box settings.

configId Number

. Unique identifier of the security configuration associated with the evaluation penalty box settings.

securityPolicyId String

. Unique identifier of the security policy associated with the evaluation penalty box settings.

getAppSecEvalPenaltyBox Result

The following output properties are available:

Action string
ConfigId int
Enabled bool
Id string

The provider-assigned unique ID for this managed resource.

OutputText string
SecurityPolicyId string
Action string
ConfigId int
Enabled bool
Id string

The provider-assigned unique ID for this managed resource.

OutputText string
SecurityPolicyId string
action String
configId Integer
enabled Boolean
id String

The provider-assigned unique ID for this managed resource.

outputText String
securityPolicyId String
action string
configId number
enabled boolean
id string

The provider-assigned unique ID for this managed resource.

outputText string
securityPolicyId string
action str
config_id int
enabled bool
id str

The provider-assigned unique ID for this managed resource.

output_text str
security_policy_id str
action String
configId Number
enabled Boolean
id String

The provider-assigned unique ID for this managed resource.

outputText String
securityPolicyId String

Package Details

Repository
https://github.com/pulumi/pulumi-akamai
License
Apache-2.0
Notes

This Pulumi package is based on the akamai Terraform Provider.