akamai.getAppSecCustomRuleActions

Scopes: Security policy; custom rule

Retrieve information about the actions defined for your custom rules. Custom rules are rules that you create yourself — these rules aren’t part of Akamai’s Kona Rule Set.

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

Output Options

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

  • output_text. Tabular report showing the ID, name, and action of the custom rules.

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 customRuleActionsAppSecCustomRuleActions = Akamai.GetAppSecCustomRuleActions.Invoke(new()
    {
        ConfigId = configuration.Apply(getAppSecConfigurationResult => getAppSecConfigurationResult.ConfigId),
        SecurityPolicyId = "gms1_134637",
    });

    return new Dictionary<string, object?>
    {
        ["customRuleActions"] = customRuleActionsAppSecCustomRuleActions.Apply(getAppSecCustomRuleActionsResult => getAppSecCustomRuleActionsResult.OutputText),
    };
});
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
		}
		customRuleActionsAppSecCustomRuleActions, err := akamai.GetAppSecCustomRuleActions(ctx, &akamai.GetAppSecCustomRuleActionsArgs{
			ConfigId:         configuration.ConfigId,
			SecurityPolicyId: "gms1_134637",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("customRuleActions", customRuleActionsAppSecCustomRuleActions.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.GetAppSecCustomRuleActionsArgs;
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 customRuleActionsAppSecCustomRuleActions = AkamaiFunctions.getAppSecCustomRuleActions(GetAppSecCustomRuleActionsArgs.builder()
            .configId(configuration.applyValue(getAppSecConfigurationResult -> getAppSecConfigurationResult.configId()))
            .securityPolicyId("gms1_134637")
            .build());

        ctx.export("customRuleActions", customRuleActionsAppSecCustomRuleActions.applyValue(getAppSecCustomRuleActionsResult -> getAppSecCustomRuleActionsResult.outputText()));
    }
}
import pulumi
import pulumi_akamai as akamai

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

const configuration = akamai.getAppSecConfiguration({
    name: "Documentation",
});
const customRuleActionsAppSecCustomRuleActions = configuration.then(configuration => akamai.getAppSecCustomRuleActions({
    configId: configuration.configId,
    securityPolicyId: "gms1_134637",
}));
export const customRuleActions = customRuleActionsAppSecCustomRuleActions.then(customRuleActionsAppSecCustomRuleActions => customRuleActionsAppSecCustomRuleActions.outputText);
variables:
  configuration:
    fn::invoke:
      Function: akamai:getAppSecConfiguration
      Arguments:
        name: Documentation
  customRuleActionsAppSecCustomRuleActions:
    fn::invoke:
      Function: akamai:getAppSecCustomRuleActions
      Arguments:
        configId: ${configuration.configId}
        securityPolicyId: gms1_134637
outputs:
  customRuleActions: ${customRuleActionsAppSecCustomRuleActions.outputText}

Using getAppSecCustomRuleActions

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 getAppSecCustomRuleActions(args: GetAppSecCustomRuleActionsArgs, opts?: InvokeOptions): Promise<GetAppSecCustomRuleActionsResult>
function getAppSecCustomRuleActionsOutput(args: GetAppSecCustomRuleActionsOutputArgs, opts?: InvokeOptions): Output<GetAppSecCustomRuleActionsResult>
def get_app_sec_custom_rule_actions(config_id: Optional[int] = None,
                                    custom_rule_id: Optional[int] = None,
                                    security_policy_id: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetAppSecCustomRuleActionsResult
def get_app_sec_custom_rule_actions_output(config_id: Optional[pulumi.Input[int]] = None,
                                    custom_rule_id: Optional[pulumi.Input[int]] = None,
                                    security_policy_id: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetAppSecCustomRuleActionsResult]
func GetAppSecCustomRuleActions(ctx *Context, args *GetAppSecCustomRuleActionsArgs, opts ...InvokeOption) (*GetAppSecCustomRuleActionsResult, error)
func GetAppSecCustomRuleActionsOutput(ctx *Context, args *GetAppSecCustomRuleActionsOutputArgs, opts ...InvokeOption) GetAppSecCustomRuleActionsResultOutput

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

public static class GetAppSecCustomRuleActions 
{
    public static Task<GetAppSecCustomRuleActionsResult> InvokeAsync(GetAppSecCustomRuleActionsArgs args, InvokeOptions? opts = null)
    public static Output<GetAppSecCustomRuleActionsResult> Invoke(GetAppSecCustomRuleActionsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAppSecCustomRuleActionsResult> getAppSecCustomRuleActions(GetAppSecCustomRuleActionsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: akamai:index/getAppSecCustomRuleActions:getAppSecCustomRuleActions
  arguments:
    # arguments dictionary

The following arguments are supported:

ConfigId int

. Unique identifier of the security configuration associated with the custom rules.

SecurityPolicyId string

. Unique identifier of the security policy associated with the custom rules.

CustomRuleId int

. Unique identifier of the custom rule you want to return information for. If not included, action information is returned for all your custom rules.

ConfigId int

. Unique identifier of the security configuration associated with the custom rules.

SecurityPolicyId string

. Unique identifier of the security policy associated with the custom rules.

CustomRuleId int

. Unique identifier of the custom rule you want to return information for. If not included, action information is returned for all your custom rules.

configId Integer

. Unique identifier of the security configuration associated with the custom rules.

securityPolicyId String

. Unique identifier of the security policy associated with the custom rules.

customRuleId Integer

. Unique identifier of the custom rule you want to return information for. If not included, action information is returned for all your custom rules.

configId number

. Unique identifier of the security configuration associated with the custom rules.

securityPolicyId string

. Unique identifier of the security policy associated with the custom rules.

customRuleId number

. Unique identifier of the custom rule you want to return information for. If not included, action information is returned for all your custom rules.

config_id int

. Unique identifier of the security configuration associated with the custom rules.

security_policy_id str

. Unique identifier of the security policy associated with the custom rules.

custom_rule_id int

. Unique identifier of the custom rule you want to return information for. If not included, action information is returned for all your custom rules.

configId Number

. Unique identifier of the security configuration associated with the custom rules.

securityPolicyId String

. Unique identifier of the security policy associated with the custom rules.

customRuleId Number

. Unique identifier of the custom rule you want to return information for. If not included, action information is returned for all your custom rules.

getAppSecCustomRuleActions Result

The following output properties are available:

ConfigId int
Id string

The provider-assigned unique ID for this managed resource.

OutputText string
SecurityPolicyId string
CustomRuleId int
ConfigId int
Id string

The provider-assigned unique ID for this managed resource.

OutputText string
SecurityPolicyId string
CustomRuleId int
configId Integer
id String

The provider-assigned unique ID for this managed resource.

outputText String
securityPolicyId String
customRuleId Integer
configId number
id string

The provider-assigned unique ID for this managed resource.

outputText string
securityPolicyId string
customRuleId number
config_id int
id str

The provider-assigned unique ID for this managed resource.

output_text str
security_policy_id str
custom_rule_id int
configId Number
id String

The provider-assigned unique ID for this managed resource.

outputText String
securityPolicyId String
customRuleId Number

Package Details

Repository
Akamai pulumi/pulumi-akamai
License
Apache-2.0
Notes

This Pulumi package is based on the akamai Terraform Provider.