Akamai

Pulumi Official
Package maintained by Pulumi
v3.0.0 published on Monday, Jul 25, 2022 by Pulumi

AppSecSlowPost

Scopes: Security policy

Modifies slow POST protection settings for a security configuration and security policy. Slow POST protections help defend a site against attacks that try to tie up the site by using extremely slow requests and responses.

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

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 slowPost = new Akamai.AppSecSlowPost("slowPost", new Akamai.AppSecSlowPostArgs
        {
            ConfigId = configuration.Apply(configuration => configuration.ConfigId),
            SecurityPolicyId = "gms1_134637",
            SlowRateAction = "alert",
            SlowRateThresholdRate = 10,
            SlowRateThresholdPeriod = 30,
            DurationThresholdTimeout = 20,
        });
    }

}
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
		}
		_, err = akamai.NewAppSecSlowPost(ctx, "slowPost", &akamai.AppSecSlowPostArgs{
			ConfigId:                 pulumi.Int(configuration.ConfigId),
			SecurityPolicyId:         pulumi.String("gms1_134637"),
			SlowRateAction:           pulumi.String("alert"),
			SlowRateThresholdRate:    pulumi.Int(10),
			SlowRateThresholdPeriod:  pulumi.Int(30),
			DurationThresholdTimeout: pulumi.Int(20),
		})
		if err != nil {
			return err
		}
		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.AppSecSlowPost;
import com.pulumi.akamai.AppSecSlowPostArgs;
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());

        var slowPost = new AppSecSlowPost("slowPost", AppSecSlowPostArgs.builder()        
            .configId(configuration.applyValue(getAppSecConfigurationResult -> getAppSecConfigurationResult.configId()))
            .securityPolicyId("gms1_134637")
            .slowRateAction("alert")
            .slowRateThresholdRate(10)
            .slowRateThresholdPeriod(30)
            .durationThresholdTimeout(20)
            .build());

    }
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name="Documentation")
slow_post = akamai.AppSecSlowPost("slowPost",
    config_id=configuration.config_id,
    security_policy_id="gms1_134637",
    slow_rate_action="alert",
    slow_rate_threshold_rate=10,
    slow_rate_threshold_period=30,
    duration_threshold_timeout=20)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: "Documentation",
});
const slowPost = new akamai.AppSecSlowPost("slowPost", {
    configId: configuration.then(configuration => configuration.configId),
    securityPolicyId: "gms1_134637",
    slowRateAction: "alert",
    slowRateThresholdRate: 10,
    slowRateThresholdPeriod: 30,
    durationThresholdTimeout: 20,
});
resources:
  slowPost:
    type: akamai:AppSecSlowPost
    properties:
      configId: ${configuration.configId}
      securityPolicyId: gms1_134637
      slowRateAction: alert
      slowRateThresholdRate: 10
      slowRateThresholdPeriod: 30
      durationThresholdTimeout: 20
variables:
  configuration:
    Fn::Invoke:
      Function: akamai:getAppSecConfiguration
      Arguments:
        name: Documentation

Create a AppSecSlowPost Resource

new AppSecSlowPost(name: string, args: AppSecSlowPostArgs, opts?: CustomResourceOptions);
@overload
def AppSecSlowPost(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   config_id: Optional[int] = None,
                   duration_threshold_timeout: Optional[int] = None,
                   security_policy_id: Optional[str] = None,
                   slow_rate_action: Optional[str] = None,
                   slow_rate_threshold_period: Optional[int] = None,
                   slow_rate_threshold_rate: Optional[int] = None)
@overload
def AppSecSlowPost(resource_name: str,
                   args: AppSecSlowPostArgs,
                   opts: Optional[ResourceOptions] = None)
func NewAppSecSlowPost(ctx *Context, name string, args AppSecSlowPostArgs, opts ...ResourceOption) (*AppSecSlowPost, error)
public AppSecSlowPost(string name, AppSecSlowPostArgs args, CustomResourceOptions? opts = null)
public AppSecSlowPost(String name, AppSecSlowPostArgs args)
public AppSecSlowPost(String name, AppSecSlowPostArgs args, CustomResourceOptions options)
type: akamai:AppSecSlowPost
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AppSecSlowPostArgs
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 AppSecSlowPostArgs
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 AppSecSlowPostArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AppSecSlowPostArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AppSecSlowPostArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

ConfigId int

. Unique identifier of the security configuration associated with the slow POST settings being modified.

SecurityPolicyId string

. Unique identifier of the security policy associated with the slow POST settings being modified.

SlowRateAction string

. Action to be taken if slow POST protection is triggered. Allowed values are:

  • alert. Record the event.
  • abort. Block the request.
DurationThresholdTimeout int

. Maximum amount of time (in seconds) that the first eight kilobytes of the POST body must be received in to avoid triggering the specified action.

SlowRateThresholdPeriod int

. Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.

SlowRateThresholdRate int

. Average rate (in bytes per second over the specified time period) allowed before the specified action is triggered.

ConfigId int

. Unique identifier of the security configuration associated with the slow POST settings being modified.

SecurityPolicyId string

. Unique identifier of the security policy associated with the slow POST settings being modified.

SlowRateAction string

. Action to be taken if slow POST protection is triggered. Allowed values are:

  • alert. Record the event.
  • abort. Block the request.
DurationThresholdTimeout int

. Maximum amount of time (in seconds) that the first eight kilobytes of the POST body must be received in to avoid triggering the specified action.

SlowRateThresholdPeriod int

. Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.

SlowRateThresholdRate int

. Average rate (in bytes per second over the specified time period) allowed before the specified action is triggered.

configId Integer

. Unique identifier of the security configuration associated with the slow POST settings being modified.

securityPolicyId String

. Unique identifier of the security policy associated with the slow POST settings being modified.

slowRateAction String

. Action to be taken if slow POST protection is triggered. Allowed values are:

  • alert. Record the event.
  • abort. Block the request.
durationThresholdTimeout Integer

. Maximum amount of time (in seconds) that the first eight kilobytes of the POST body must be received in to avoid triggering the specified action.

slowRateThresholdPeriod Integer

. Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.

slowRateThresholdRate Integer

. Average rate (in bytes per second over the specified time period) allowed before the specified action is triggered.

configId number

. Unique identifier of the security configuration associated with the slow POST settings being modified.

securityPolicyId string

. Unique identifier of the security policy associated with the slow POST settings being modified.

slowRateAction string

. Action to be taken if slow POST protection is triggered. Allowed values are:

  • alert. Record the event.
  • abort. Block the request.
durationThresholdTimeout number

. Maximum amount of time (in seconds) that the first eight kilobytes of the POST body must be received in to avoid triggering the specified action.

slowRateThresholdPeriod number

. Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.

slowRateThresholdRate number

. Average rate (in bytes per second over the specified time period) allowed before the specified action is triggered.

config_id int

. Unique identifier of the security configuration associated with the slow POST settings being modified.

security_policy_id str

. Unique identifier of the security policy associated with the slow POST settings being modified.

slow_rate_action str

. Action to be taken if slow POST protection is triggered. Allowed values are:

  • alert. Record the event.
  • abort. Block the request.
duration_threshold_timeout int

. Maximum amount of time (in seconds) that the first eight kilobytes of the POST body must be received in to avoid triggering the specified action.

slow_rate_threshold_period int

. Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.

slow_rate_threshold_rate int

. Average rate (in bytes per second over the specified time period) allowed before the specified action is triggered.

configId Number

. Unique identifier of the security configuration associated with the slow POST settings being modified.

securityPolicyId String

. Unique identifier of the security policy associated with the slow POST settings being modified.

slowRateAction String

. Action to be taken if slow POST protection is triggered. Allowed values are:

  • alert. Record the event.
  • abort. Block the request.
durationThresholdTimeout Number

. Maximum amount of time (in seconds) that the first eight kilobytes of the POST body must be received in to avoid triggering the specified action.

slowRateThresholdPeriod Number

. Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.

slowRateThresholdRate Number

. Average rate (in bytes per second over the specified time period) allowed before the specified action is triggered.

Outputs

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

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing AppSecSlowPost Resource

Get an existing AppSecSlowPost 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?: AppSecSlowPostState, opts?: CustomResourceOptions): AppSecSlowPost
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config_id: Optional[int] = None,
        duration_threshold_timeout: Optional[int] = None,
        security_policy_id: Optional[str] = None,
        slow_rate_action: Optional[str] = None,
        slow_rate_threshold_period: Optional[int] = None,
        slow_rate_threshold_rate: Optional[int] = None) -> AppSecSlowPost
func GetAppSecSlowPost(ctx *Context, name string, id IDInput, state *AppSecSlowPostState, opts ...ResourceOption) (*AppSecSlowPost, error)
public static AppSecSlowPost Get(string name, Input<string> id, AppSecSlowPostState? state, CustomResourceOptions? opts = null)
public static AppSecSlowPost get(String name, Output<String> id, AppSecSlowPostState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
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

. Unique identifier of the security configuration associated with the slow POST settings being modified.

DurationThresholdTimeout int

. Maximum amount of time (in seconds) that the first eight kilobytes of the POST body must be received in to avoid triggering the specified action.

SecurityPolicyId string

. Unique identifier of the security policy associated with the slow POST settings being modified.

SlowRateAction string

. Action to be taken if slow POST protection is triggered. Allowed values are:

  • alert. Record the event.
  • abort. Block the request.
SlowRateThresholdPeriod int

. Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.

SlowRateThresholdRate int

. Average rate (in bytes per second over the specified time period) allowed before the specified action is triggered.

ConfigId int

. Unique identifier of the security configuration associated with the slow POST settings being modified.

DurationThresholdTimeout int

. Maximum amount of time (in seconds) that the first eight kilobytes of the POST body must be received in to avoid triggering the specified action.

SecurityPolicyId string

. Unique identifier of the security policy associated with the slow POST settings being modified.

SlowRateAction string

. Action to be taken if slow POST protection is triggered. Allowed values are:

  • alert. Record the event.
  • abort. Block the request.
SlowRateThresholdPeriod int

. Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.

SlowRateThresholdRate int

. Average rate (in bytes per second over the specified time period) allowed before the specified action is triggered.

configId Integer

. Unique identifier of the security configuration associated with the slow POST settings being modified.

durationThresholdTimeout Integer

. Maximum amount of time (in seconds) that the first eight kilobytes of the POST body must be received in to avoid triggering the specified action.

securityPolicyId String

. Unique identifier of the security policy associated with the slow POST settings being modified.

slowRateAction String

. Action to be taken if slow POST protection is triggered. Allowed values are:

  • alert. Record the event.
  • abort. Block the request.
slowRateThresholdPeriod Integer

. Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.

slowRateThresholdRate Integer

. Average rate (in bytes per second over the specified time period) allowed before the specified action is triggered.

configId number

. Unique identifier of the security configuration associated with the slow POST settings being modified.

durationThresholdTimeout number

. Maximum amount of time (in seconds) that the first eight kilobytes of the POST body must be received in to avoid triggering the specified action.

securityPolicyId string

. Unique identifier of the security policy associated with the slow POST settings being modified.

slowRateAction string

. Action to be taken if slow POST protection is triggered. Allowed values are:

  • alert. Record the event.
  • abort. Block the request.
slowRateThresholdPeriod number

. Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.

slowRateThresholdRate number

. Average rate (in bytes per second over the specified time period) allowed before the specified action is triggered.

config_id int

. Unique identifier of the security configuration associated with the slow POST settings being modified.

duration_threshold_timeout int

. Maximum amount of time (in seconds) that the first eight kilobytes of the POST body must be received in to avoid triggering the specified action.

security_policy_id str

. Unique identifier of the security policy associated with the slow POST settings being modified.

slow_rate_action str

. Action to be taken if slow POST protection is triggered. Allowed values are:

  • alert. Record the event.
  • abort. Block the request.
slow_rate_threshold_period int

. Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.

slow_rate_threshold_rate int

. Average rate (in bytes per second over the specified time period) allowed before the specified action is triggered.

configId Number

. Unique identifier of the security configuration associated with the slow POST settings being modified.

durationThresholdTimeout Number

. Maximum amount of time (in seconds) that the first eight kilobytes of the POST body must be received in to avoid triggering the specified action.

securityPolicyId String

. Unique identifier of the security policy associated with the slow POST settings being modified.

slowRateAction String

. Action to be taken if slow POST protection is triggered. Allowed values are:

  • alert. Record the event.
  • abort. Block the request.
slowRateThresholdPeriod Number

. Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.

slowRateThresholdRate Number

. Average rate (in bytes per second over the specified time period) allowed before the specified action is triggered.

Package Details

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

This Pulumi package is based on the akamai Terraform Provider.