Akamai

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

getAppSecSlowPost

Scopes: Security policy

Returns the slow POST protection settings for the specified security configuration and 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

Output Options

The following options can be used to determine the information returned, and how that returned information is formatted:

  • output_text. Tabular report including the following:
    • ACTION. Action taken any time slow POST protection is triggered. Valid values are:
      • alert. Record the event.
      • abort. Block the request.
    • SLOW_RATE_THRESHOLD RATE. Average rate (in bytes per second over the specified time period) allowed before the specified action is triggered.
    • SLOW_RATE_THRESHOLD PERIOD. Amount of time (in seconds) that the server should allow a request before marking the request as being too slow.
    • DURATION_THRESHOLD TIMEOUT. Maximum amount of time (in seconds) that the first eight kilobytes of the POST body must be received in order to avoid triggering the specified action.

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 = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecSlowPost.InvokeAsync(new Akamai.GetAppSecSlowPostArgs
        {
            ConfigId = configuration.ConfigId,
            SecurityPolicyId = "gms1_134637",
        })));
        this.SlowPostOutputText = slowPost.Apply(slowPost => slowPost.OutputText);
    }

    [Output("slowPostOutputText")]
    public Output<string> SlowPostOutputText { get; set; }
}
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
		}
		slowPost, err := akamai.LookupAppSecSlowPost(ctx, &GetAppSecSlowPostArgs{
			ConfigId:         configuration.ConfigId,
			SecurityPolicyId: "gms1_134637",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("slowPostOutputText", slowPost.OutputText)
		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.inputs.GetAppSecSlowPostArgs;
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());

        final var slowPost = AkamaiFunctions.getAppSecSlowPost(GetAppSecSlowPostArgs.builder()
            .configId(configuration.applyValue(getAppSecConfigurationResult -> getAppSecConfigurationResult.configId()))
            .securityPolicyId("gms1_134637")
            .build());

        ctx.export("slowPostOutputText", slowPost.applyValue(getAppSecSlowPostResult -> getAppSecSlowPostResult.outputText()));
    }
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name="Documentation")
slow_post = akamai.get_app_sec_slow_post(config_id=configuration.config_id,
    security_policy_id="gms1_134637")
pulumi.export("slowPostOutputText", slow_post.output_text)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: "Documentation",
});
const slowPost = configuration.then(configuration => akamai.getAppSecSlowPost({
    configId: configuration.configId,
    securityPolicyId: "gms1_134637",
}));
export const slowPostOutputText = slowPost.then(slowPost => slowPost.outputText);
variables:
  configuration:
    Fn::Invoke:
      Function: akamai:getAppSecConfiguration
      Arguments:
        name: Documentation
  slowPost:
    Fn::Invoke:
      Function: akamai:getAppSecSlowPost
      Arguments:
        configId: ${configuration.configId}
        securityPolicyId: gms1_134637
outputs:
  slowPostOutputText: ${slowPost.outputText}

Using getAppSecSlowPost

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getAppSecSlowPost(args: GetAppSecSlowPostArgs, opts?: InvokeOptions): Promise<GetAppSecSlowPostResult>
function getAppSecSlowPostOutput(args: GetAppSecSlowPostOutputArgs, opts?: InvokeOptions): Output<GetAppSecSlowPostResult>
def get_app_sec_slow_post(config_id: Optional[int] = None,
                          security_policy_id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetAppSecSlowPostResult
def get_app_sec_slow_post_output(config_id: Optional[pulumi.Input[int]] = None,
                          security_policy_id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetAppSecSlowPostResult]
func LookupAppSecSlowPost(ctx *Context, args *LookupAppSecSlowPostArgs, opts ...InvokeOption) (*LookupAppSecSlowPostResult, error)
func LookupAppSecSlowPostOutput(ctx *Context, args *LookupAppSecSlowPostOutputArgs, opts ...InvokeOption) LookupAppSecSlowPostResultOutput

> Note: This function is named LookupAppSecSlowPost in the Go SDK.

public static class GetAppSecSlowPost 
{
    public static Task<GetAppSecSlowPostResult> InvokeAsync(GetAppSecSlowPostArgs args, InvokeOptions? opts = null)
    public static Output<GetAppSecSlowPostResult> Invoke(GetAppSecSlowPostInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAppSecSlowPostResult> getAppSecSlowPost(GetAppSecSlowPostArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: akamai:index/getAppSecSlowPost:getAppSecSlowPost
  Arguments:
    # Arguments dictionary

The following arguments are supported:

ConfigId int

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

SecurityPolicyId string

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

ConfigId int

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

SecurityPolicyId string

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

configId Integer

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

securityPolicyId String

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

configId number

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

securityPolicyId string

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

config_id int

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

security_policy_id str

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

configId Number

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

securityPolicyId String

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

getAppSecSlowPost Result

The following output properties are available:

ConfigId int
Id string

The provider-assigned unique ID for this managed resource.

Json string
OutputText string
SecurityPolicyId string
ConfigId int
Id string

The provider-assigned unique ID for this managed resource.

Json string
OutputText string
SecurityPolicyId string
configId Integer
id String

The provider-assigned unique ID for this managed resource.

json String
outputText String
securityPolicyId String
configId number
id string

The provider-assigned unique ID for this managed resource.

json string
outputText string
securityPolicyId string
config_id int
id str

The provider-assigned unique ID for this managed resource.

json str
output_text str
security_policy_id str
configId Number
id String

The provider-assigned unique ID for this managed resource.

json String
outputText String
securityPolicyId String

Package Details

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

This Pulumi package is based on the akamai Terraform Provider.