AppSecPenaltyBox

Use the akamai.AppSecPenaltyBox resource to update the penalty box settings for a given security policy.

Example Usage

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 penaltyBox = new Akamai.AppSecPenaltyBox("penaltyBox", new Akamai.AppSecPenaltyBoxArgs
        {
            ConfigId = configuration.Apply(configuration => configuration.ConfigId),
            SecurityPolicyId = @var.Security_policy_id,
            PenaltyBoxProtection = true,
            PenaltyBoxAction = @var.Action,
        });
    }

}
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 := _var.Security_configuration
		configuration, err := akamai.LookupAppSecConfiguration(ctx, &GetAppSecConfigurationArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		_, err = akamai.NewAppSecPenaltyBox(ctx, "penaltyBox", &akamai.AppSecPenaltyBoxArgs{
			ConfigId:             pulumi.Int(configuration.ConfigId),
			SecurityPolicyId:     pulumi.Any(_var.Security_policy_id),
			PenaltyBoxProtection: pulumi.Bool(true),
			PenaltyBoxAction:     pulumi.Any(_var.Action),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name=var["security_configuration"])
penalty_box = akamai.AppSecPenaltyBox("penaltyBox",
    config_id=configuration.config_id,
    security_policy_id=var["security_policy_id"],
    penalty_box_protection=True,
    penalty_box_action=var["action"])
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: _var.security_configuration,
});
const penaltyBox = new akamai.AppSecPenaltyBox("penaltyBox", {
    configId: configuration.then(configuration => configuration.configId),
    securityPolicyId: _var.security_policy_id,
    penaltyBoxProtection: true,
    penaltyBoxAction: _var.action,
});

Create a AppSecPenaltyBox Resource

new AppSecPenaltyBox(name: string, args: AppSecPenaltyBoxArgs, opts?: CustomResourceOptions);
@overload
def AppSecPenaltyBox(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     config_id: Optional[int] = None,
                     penalty_box_action: Optional[str] = None,
                     penalty_box_protection: Optional[bool] = None,
                     security_policy_id: Optional[str] = None)
@overload
def AppSecPenaltyBox(resource_name: str,
                     args: AppSecPenaltyBoxArgs,
                     opts: Optional[ResourceOptions] = None)
func NewAppSecPenaltyBox(ctx *Context, name string, args AppSecPenaltyBoxArgs, opts ...ResourceOption) (*AppSecPenaltyBox, error)
public AppSecPenaltyBox(string name, AppSecPenaltyBoxArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args AppSecPenaltyBoxArgs
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 AppSecPenaltyBoxArgs
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 AppSecPenaltyBoxArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AppSecPenaltyBoxArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

AppSecPenaltyBox 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 AppSecPenaltyBox resource accepts the following input properties:

ConfigId int
The ID of the security configuration to use.
PenaltyBoxAction string
The action to take when penalty box protection is triggered: alert to record the trigger event, deny to block the request, deny_custom_{custom_deny_id} to execute a custom deny action, or none to take no action. Ignored if penalty_box_protection is set to false.
PenaltyBoxProtection bool
A boolean value indicating whether to enable penalty box protection.
SecurityPolicyId string
The ID of the security policy to use.
ConfigId int
The ID of the security configuration to use.
PenaltyBoxAction string
The action to take when penalty box protection is triggered: alert to record the trigger event, deny to block the request, deny_custom_{custom_deny_id} to execute a custom deny action, or none to take no action. Ignored if penalty_box_protection is set to false.
PenaltyBoxProtection bool
A boolean value indicating whether to enable penalty box protection.
SecurityPolicyId string
The ID of the security policy to use.
configId number
The ID of the security configuration to use.
penaltyBoxAction string
The action to take when penalty box protection is triggered: alert to record the trigger event, deny to block the request, deny_custom_{custom_deny_id} to execute a custom deny action, or none to take no action. Ignored if penalty_box_protection is set to false.
penaltyBoxProtection boolean
A boolean value indicating whether to enable penalty box protection.
securityPolicyId string
The ID of the security policy to use.
config_id int
The ID of the security configuration to use.
penalty_box_action str
The action to take when penalty box protection is triggered: alert to record the trigger event, deny to block the request, deny_custom_{custom_deny_id} to execute a custom deny action, or none to take no action. Ignored if penalty_box_protection is set to false.
penalty_box_protection bool
A boolean value indicating whether to enable penalty box protection.
security_policy_id str
The ID of the security policy to use.

Outputs

All input properties are implicitly available as output properties. Additionally, the AppSecPenaltyBox 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 AppSecPenaltyBox Resource

Get an existing AppSecPenaltyBox 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?: AppSecPenaltyBoxState, opts?: CustomResourceOptions): AppSecPenaltyBox
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config_id: Optional[int] = None,
        penalty_box_action: Optional[str] = None,
        penalty_box_protection: Optional[bool] = None,
        security_policy_id: Optional[str] = None) -> AppSecPenaltyBox
func GetAppSecPenaltyBox(ctx *Context, name string, id IDInput, state *AppSecPenaltyBoxState, opts ...ResourceOption) (*AppSecPenaltyBox, error)
public static AppSecPenaltyBox Get(string name, Input<string> id, AppSecPenaltyBoxState? 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:

ConfigId int
The ID of the security configuration to use.
PenaltyBoxAction string
The action to take when penalty box protection is triggered: alert to record the trigger event, deny to block the request, deny_custom_{custom_deny_id} to execute a custom deny action, or none to take no action. Ignored if penalty_box_protection is set to false.
PenaltyBoxProtection bool
A boolean value indicating whether to enable penalty box protection.
SecurityPolicyId string
The ID of the security policy to use.
ConfigId int
The ID of the security configuration to use.
PenaltyBoxAction string
The action to take when penalty box protection is triggered: alert to record the trigger event, deny to block the request, deny_custom_{custom_deny_id} to execute a custom deny action, or none to take no action. Ignored if penalty_box_protection is set to false.
PenaltyBoxProtection bool
A boolean value indicating whether to enable penalty box protection.
SecurityPolicyId string
The ID of the security policy to use.
configId number
The ID of the security configuration to use.
penaltyBoxAction string
The action to take when penalty box protection is triggered: alert to record the trigger event, deny to block the request, deny_custom_{custom_deny_id} to execute a custom deny action, or none to take no action. Ignored if penalty_box_protection is set to false.
penaltyBoxProtection boolean
A boolean value indicating whether to enable penalty box protection.
securityPolicyId string
The ID of the security policy to use.
config_id int
The ID of the security configuration to use.
penalty_box_action str
The action to take when penalty box protection is triggered: alert to record the trigger event, deny to block the request, deny_custom_{custom_deny_id} to execute a custom deny action, or none to take no action. Ignored if penalty_box_protection is set to false.
penalty_box_protection bool
A boolean value indicating whether to enable penalty box protection.
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.