getAppSecPenaltyBox

Use the akamai.AppSecPenaltyBox data source to retrieve the penalty box settings for a specified 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 = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecPenaltyBox.InvokeAsync(new Akamai.GetAppSecPenaltyBoxArgs
        {
            ConfigId = configuration.ConfigId,
            SecurityPolicyId = @var.Security_policy_id,
        })));
        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 := _var.Security_configuration
		configuration, err := akamai.LookupAppSecConfiguration(ctx, &akamai.LookupAppSecConfigurationArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		penaltyBox, err := akamai.LookupAppSecPenaltyBox(ctx, &akamai.LookupAppSecPenaltyBoxArgs{
			ConfigId:         configuration.ConfigId,
			SecurityPolicyId: _var.Security_policy_id,
		}, 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=var["security_configuration"])
penalty_box = akamai.get_app_sec_penalty_box(config_id=configuration.config_id,
    security_policy_id=var["security_policy_id"])
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: _var.security_configuration,
});
const penaltyBox = configuration.then(configuration => akamai.getAppSecPenaltyBox({
    configId: configuration.configId,
    securityPolicyId: _var.security_policy_id,
}));
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

function getAppSecPenaltyBox(args: GetAppSecPenaltyBoxArgs, opts?: InvokeOptions): Promise<GetAppSecPenaltyBoxResult>
def get_app_sec_penalty_box(config_id: Optional[int] = None,
                            security_policy_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetAppSecPenaltyBoxResult
func LookupAppSecPenaltyBox(ctx *Context, args *LookupAppSecPenaltyBoxArgs, opts ...InvokeOption) (*LookupAppSecPenaltyBoxResult, error)

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

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

The following arguments are supported:

ConfigId int
The ID of the security configuration to use.
SecurityPolicyId string
The ID of the security policy to use.
ConfigId int
The ID of the security configuration to use.
SecurityPolicyId string
The ID of the security policy to use.
configId number
The ID of the security configuration to use.
securityPolicyId string
The ID of the security policy to use.
config_id int
The ID of the security configuration to use.
security_policy_id str
The ID of the security policy to use.

getAppSecPenaltyBox Result

The following output properties are available:

Action string
The action for the penalty box: alert, deny, or none.
ConfigId int
Enabled bool
Either true or false, indicating whether penalty box protection is enabled.
Id string
The provider-assigned unique ID for this managed resource.
OutputText string
A tabular display of the action and enabled information.
SecurityPolicyId string
Action string
The action for the penalty box: alert, deny, or none.
ConfigId int
Enabled bool
Either true or false, indicating whether penalty box protection is enabled.
Id string
The provider-assigned unique ID for this managed resource.
OutputText string
A tabular display of the action and enabled information.
SecurityPolicyId string
action string
The action for the penalty box: alert, deny, or none.
configId number
enabled boolean
Either true or false, indicating whether penalty box protection is enabled.
id string
The provider-assigned unique ID for this managed resource.
outputText string
A tabular display of the action and enabled information.
securityPolicyId string
action str
The action for the penalty box: alert, deny, or none.
config_id int
enabled bool
Either true or false, indicating whether penalty box protection is enabled.
id str
The provider-assigned unique ID for this managed resource.
output_text str
A tabular display of the action and enabled information.
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.