AppSecCustomRuleAction

The akamai.AppSecCustomRuleAction resource allows you to associate an action to a custom rule.

Example Usage

using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var configuration = Output.Create(Akamai.GetAppSecConfiguration.InvokeAsync(new Akamai.GetAppSecConfigurationArgs
        {
            Name = "Akamai Tools",
        }));
        var createCustomRuleAction = new Akamai.AppSecCustomRuleAction("createCustomRuleAction", new Akamai.AppSecCustomRuleActionArgs
        {
            ConfigId = configuration.Apply(configuration => configuration.ConfigId),
            SecurityPolicyId = "crAP_75829",
            CustomRuleId = 12345,
            CustomRuleAction = "alert",
        });
        this.CustomRuleId = createCustomRuleAction.CustomRuleId;
    }

    [Output("customRuleId")]
    public Output<string> CustomRuleId { 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 := "Akamai Tools"
		configuration, err := akamai.LookupAppSecConfiguration(ctx, &GetAppSecConfigurationArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		createCustomRuleAction, err := akamai.NewAppSecCustomRuleAction(ctx, "createCustomRuleAction", &akamai.AppSecCustomRuleActionArgs{
			ConfigId:         pulumi.Int(configuration.ConfigId),
			SecurityPolicyId: pulumi.String("crAP_75829"),
			CustomRuleId:     pulumi.Int(12345),
			CustomRuleAction: pulumi.String("alert"),
		})
		if err != nil {
			return err
		}
		ctx.Export("customRuleId", createCustomRuleAction.CustomRuleId)
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name="Akamai Tools")
create_custom_rule_action = akamai.AppSecCustomRuleAction("createCustomRuleAction",
    config_id=configuration.config_id,
    security_policy_id="crAP_75829",
    custom_rule_id=12345,
    custom_rule_action="alert")
pulumi.export("customRuleId", create_custom_rule_action.custom_rule_id)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: "Akamai Tools",
});
const createCustomRuleAction = new akamai.AppSecCustomRuleAction("createCustomRuleAction", {
    configId: configuration.then(configuration => configuration.configId),
    securityPolicyId: "crAP_75829",
    customRuleId: 12345,
    customRuleAction: "alert",
});
export const customRuleId = createCustomRuleAction.customRuleId;

Create a AppSecCustomRuleAction Resource

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

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

ConfigId int
The ID of the security configuration to use.
CustomRuleAction string
The action to take when the custom rule is invoked: 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.
CustomRuleId int
The custom rule for which to apply the action.
SecurityPolicyId string
The security policy to use.
ConfigId int
The ID of the security configuration to use.
CustomRuleAction string
The action to take when the custom rule is invoked: 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.
CustomRuleId int
The custom rule for which to apply the action.
SecurityPolicyId string
The security policy to use.
configId number
The ID of the security configuration to use.
customRuleAction string
The action to take when the custom rule is invoked: 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.
customRuleId number
The custom rule for which to apply the action.
securityPolicyId string
The security policy to use.
config_id int
The ID of the security configuration to use.
custom_rule_action str
The action to take when the custom rule is invoked: 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.
custom_rule_id int
The custom rule for which to apply the action.
security_policy_id str
The security policy to use.

Outputs

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

Get an existing AppSecCustomRuleAction 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?: AppSecCustomRuleActionState, opts?: CustomResourceOptions): AppSecCustomRuleAction
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config_id: Optional[int] = None,
        custom_rule_action: Optional[str] = None,
        custom_rule_id: Optional[int] = None,
        security_policy_id: Optional[str] = None) -> AppSecCustomRuleAction
func GetAppSecCustomRuleAction(ctx *Context, name string, id IDInput, state *AppSecCustomRuleActionState, opts ...ResourceOption) (*AppSecCustomRuleAction, error)
public static AppSecCustomRuleAction Get(string name, Input<string> id, AppSecCustomRuleActionState? 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.
CustomRuleAction string
The action to take when the custom rule is invoked: 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.
CustomRuleId int
The custom rule for which to apply the action.
SecurityPolicyId string
The security policy to use.
ConfigId int
The ID of the security configuration to use.
CustomRuleAction string
The action to take when the custom rule is invoked: 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.
CustomRuleId int
The custom rule for which to apply the action.
SecurityPolicyId string
The security policy to use.
configId number
The ID of the security configuration to use.
customRuleAction string
The action to take when the custom rule is invoked: 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.
customRuleId number
The custom rule for which to apply the action.
securityPolicyId string
The security policy to use.
config_id int
The ID of the security configuration to use.
custom_rule_action str
The action to take when the custom rule is invoked: 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.
custom_rule_id int
The custom rule for which to apply the action.
security_policy_id str
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.