getAppSecPenaltyBox

Scopes: Security policy

Returns penalty box settings for the specified security policy. When using automated attack groups, and when the penalty box is enabled, clients that trigger an attack group are placed in the “penalty box.” That means that, for the next 10 minutes, all requests from that client are ignored.

Related API Endpoint: /appsec/v1/configs/{configId}/versions/{versionNumber}/security-policies/{policyId}/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, penalty box protection is enabled. If false, penalty box protection is disabled.
  • output_text. Tabular report of penalty box protection settings.

Example 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 penaltyBox = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecPenaltyBox.InvokeAsync(new Akamai.GetAppSecPenaltyBoxArgs
        {
            ConfigId = configuration.ConfigId,
            SecurityPolicyId = "gms1_134637",
        })));
        this.PenaltyBoxAction = penaltyBox.Apply(penaltyBox => penaltyBox.Action);
        this.PenaltyBoxEnabled = penaltyBox.Apply(penaltyBox => penaltyBox.Enabled);
        this.PenaltyBoxText = penaltyBox.Apply(penaltyBox => penaltyBox.OutputText);
    }

    [Output("penaltyBoxAction")]
    public Output<string> PenaltyBoxAction { get; set; }
    [Output("penaltyBoxEnabled")]
    public Output<string> PenaltyBoxEnabled { get; set; }
    [Output("penaltyBoxText")]
    public Output<string> PenaltyBoxText { get; set; }
}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "Documentation"
		configuration, err := akamai.LookupAppSecConfiguration(ctx, &GetAppSecConfigurationArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		penaltyBox, err := akamai.LookupAppSecPenaltyBox(ctx, &GetAppSecPenaltyBoxArgs{
			ConfigId:         configuration.ConfigId,
			SecurityPolicyId: "gms1_134637",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("penaltyBoxAction", penaltyBox.Action)
		ctx.Export("penaltyBoxEnabled", penaltyBox.Enabled)
		ctx.Export("penaltyBoxText", penaltyBox.OutputText)
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name="Documentation")
penalty_box = akamai.get_app_sec_penalty_box(config_id=configuration.config_id,
    security_policy_id="gms1_134637")
pulumi.export("penaltyBoxAction", penalty_box.action)
pulumi.export("penaltyBoxEnabled", penalty_box.enabled)
pulumi.export("penaltyBoxText", penalty_box.output_text)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: "Documentation",
});
const penaltyBox = configuration.then(configuration => akamai.getAppSecPenaltyBox({
    configId: configuration.configId,
    securityPolicyId: "gms1_134637",
}));
export const penaltyBoxAction = penaltyBox.then(penaltyBox => penaltyBox.action);
export const penaltyBoxEnabled = penaltyBox.then(penaltyBox => penaltyBox.enabled);
export const penaltyBoxText = penaltyBox.then(penaltyBox => penaltyBox.outputText);

Using getAppSecPenaltyBox

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 getAppSecPenaltyBox(args: GetAppSecPenaltyBoxArgs, opts?: InvokeOptions): Promise<GetAppSecPenaltyBoxResult>
function getAppSecPenaltyBoxOutput(args: GetAppSecPenaltyBoxOutputArgs, opts?: InvokeOptions): Output<GetAppSecPenaltyBoxResult>
def get_app_sec_penalty_box(config_id: Optional[int] = None,
                            security_policy_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetAppSecPenaltyBoxResult
def get_app_sec_penalty_box_output(config_id: Optional[pulumi.Input[int]] = None,
                            security_policy_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetAppSecPenaltyBoxResult]
func LookupAppSecPenaltyBox(ctx *Context, args *LookupAppSecPenaltyBoxArgs, opts ...InvokeOption) (*LookupAppSecPenaltyBoxResult, error)
func LookupAppSecPenaltyBoxOutput(ctx *Context, args *LookupAppSecPenaltyBoxOutputArgs, opts ...InvokeOption) LookupAppSecPenaltyBoxResultOutput

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

public static class GetAppSecPenaltyBox 
{
    public static Task<GetAppSecPenaltyBoxResult> InvokeAsync(GetAppSecPenaltyBoxArgs args, InvokeOptions? opts = null)
    public static Output<GetAppSecPenaltyBoxResult> Invoke(GetAppSecPenaltyBoxInvokeArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

ConfigId int
. Unique identifier of the security configuration associated with the penalty box settings.
SecurityPolicyId string
. Unique identifier of the security policy associated with the penalty box settings.
ConfigId int
. Unique identifier of the security configuration associated with the penalty box settings.
SecurityPolicyId string
. Unique identifier of the security policy associated with the penalty box settings.
configId number
. Unique identifier of the security configuration associated with the penalty box settings.
securityPolicyId string
. Unique identifier of the security policy associated with the penalty box settings.
config_id int
. Unique identifier of the security configuration associated with the penalty box settings.
security_policy_id str
. Unique identifier of the security policy associated with the penalty box settings.

getAppSecPenaltyBox 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 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

Package Details

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