akamai.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
Basic usage
using System.Collections.Generic;
using Pulumi;
using Akamai = Pulumi.Akamai;
return await Deployment.RunAsync(() =>
{
var configuration = Akamai.GetAppSecConfiguration.Invoke(new()
{
Name = "Documentation",
});
var slowPost = new Akamai.AppSecSlowPost("slowPost", new()
{
ConfigId = configuration.Apply(getAppSecConfigurationResult => getAppSecConfigurationResult.ConfigId),
SecurityPolicyId = "gms1_134637",
SlowRateAction = "alert",
SlowRateThresholdRate = 10,
SlowRateThresholdPeriod = 30,
DurationThresholdTimeout = 20,
});
});
package main
import (
"github.com/pulumi/pulumi-akamai/sdk/v4/go/akamai"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
configuration, err := akamai.LookupAppSecConfiguration(ctx, &akamai.LookupAppSecConfigurationArgs{
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 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:
- Config
Id int . Unique identifier of the security configuration associated with the slow POST settings being modified.
- Security
Policy stringId . Unique identifier of the security policy associated with the slow POST settings being modified.
- Slow
Rate stringAction . Action to be taken if slow POST protection is triggered. Allowed values are:
- alert. Record the event.
- abort. Block the request.
- Duration
Threshold intTimeout . 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 intThreshold Period . Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.
- Slow
Rate intThreshold Rate . 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 stringId . Unique identifier of the security policy associated with the slow POST settings being modified.
- Slow
Rate stringAction . Action to be taken if slow POST protection is triggered. Allowed values are:
- alert. Record the event.
- abort. Block the request.
- Duration
Threshold intTimeout . 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 intThreshold Period . Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.
- Slow
Rate intThreshold Rate . Average rate (in bytes per second over the specified time period) allowed before the specified action is triggered.
- config
Id Integer . Unique identifier of the security configuration associated with the slow POST settings being modified.
- security
Policy StringId . Unique identifier of the security policy associated with the slow POST settings being modified.
- slow
Rate StringAction . Action to be taken if slow POST protection is triggered. Allowed values are:
- alert. Record the event.
- abort. Block the request.
- duration
Threshold IntegerTimeout . 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 IntegerThreshold Period . Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.
- slow
Rate IntegerThreshold Rate . Average rate (in bytes per second over the specified time period) allowed before the specified action is triggered.
- config
Id number . Unique identifier of the security configuration associated with the slow POST settings being modified.
- security
Policy stringId . Unique identifier of the security policy associated with the slow POST settings being modified.
- slow
Rate stringAction . Action to be taken if slow POST protection is triggered. Allowed values are:
- alert. Record the event.
- abort. Block the request.
- duration
Threshold numberTimeout . 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 numberThreshold Period . Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.
- slow
Rate numberThreshold Rate . 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_ strid . Unique identifier of the security policy associated with the slow POST settings being modified.
- slow_
rate_ straction . Action to be taken if slow POST protection is triggered. Allowed values are:
- alert. Record the event.
- abort. Block the request.
- duration_
threshold_ inttimeout . 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_ intthreshold_ period . Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.
- slow_
rate_ intthreshold_ rate . Average rate (in bytes per second over the specified time period) allowed before the specified action is triggered.
- config
Id Number . Unique identifier of the security configuration associated with the slow POST settings being modified.
- security
Policy StringId . Unique identifier of the security policy associated with the slow POST settings being modified.
- slow
Rate StringAction . Action to be taken if slow POST protection is triggered. Allowed values are:
- alert. Record the event.
- abort. Block the request.
- duration
Threshold NumberTimeout . 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 NumberThreshold Period . Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.
- slow
Rate NumberThreshold Rate . 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 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.
- Config
Id int . Unique identifier of the security configuration associated with the slow POST settings being modified.
- Duration
Threshold intTimeout . 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 stringId . Unique identifier of the security policy associated with the slow POST settings being modified.
- Slow
Rate stringAction . Action to be taken if slow POST protection is triggered. Allowed values are:
- alert. Record the event.
- abort. Block the request.
- Slow
Rate intThreshold Period . Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.
- Slow
Rate intThreshold Rate . 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 intTimeout . 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 stringId . Unique identifier of the security policy associated with the slow POST settings being modified.
- Slow
Rate stringAction . Action to be taken if slow POST protection is triggered. Allowed values are:
- alert. Record the event.
- abort. Block the request.
- Slow
Rate intThreshold Period . Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.
- Slow
Rate intThreshold Rate . Average rate (in bytes per second over the specified time period) allowed before the specified action is triggered.
- config
Id Integer . Unique identifier of the security configuration associated with the slow POST settings being modified.
- duration
Threshold IntegerTimeout . 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 StringId . Unique identifier of the security policy associated with the slow POST settings being modified.
- slow
Rate StringAction . Action to be taken if slow POST protection is triggered. Allowed values are:
- alert. Record the event.
- abort. Block the request.
- slow
Rate IntegerThreshold Period . Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.
- slow
Rate IntegerThreshold Rate . Average rate (in bytes per second over the specified time period) allowed before the specified action is triggered.
- config
Id number . Unique identifier of the security configuration associated with the slow POST settings being modified.
- duration
Threshold numberTimeout . 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 stringId . Unique identifier of the security policy associated with the slow POST settings being modified.
- slow
Rate stringAction . Action to be taken if slow POST protection is triggered. Allowed values are:
- alert. Record the event.
- abort. Block the request.
- slow
Rate numberThreshold Period . Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.
- slow
Rate numberThreshold Rate . 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_ inttimeout . 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_ strid . Unique identifier of the security policy associated with the slow POST settings being modified.
- slow_
rate_ straction . Action to be taken if slow POST protection is triggered. Allowed values are:
- alert. Record the event.
- abort. Block the request.
- slow_
rate_ intthreshold_ period . Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.
- slow_
rate_ intthreshold_ rate . Average rate (in bytes per second over the specified time period) allowed before the specified action is triggered.
- config
Id Number . Unique identifier of the security configuration associated with the slow POST settings being modified.
- duration
Threshold NumberTimeout . 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 StringId . Unique identifier of the security policy associated with the slow POST settings being modified.
- slow
Rate StringAction . Action to be taken if slow POST protection is triggered. Allowed values are:
- alert. Record the event.
- abort. Block the request.
- slow
Rate NumberThreshold Period . Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.
- slow
Rate NumberThreshold Rate . Average rate (in bytes per second over the specified time period) allowed before the specified action is triggered.
Package Details
- Repository
- Akamai pulumi/pulumi-akamai
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
akamai
Terraform Provider.