getAppSecEvalRules

Scopes: Security policy; evaluation rule

Returns the action and the condition-exception information for a rule or set of rules being used in evaluation mode.

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

Output Options

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

  • eval_rule_action. Action taken anytime the evaluation rule is triggered. Valid values are:
    • alert. Record the event,
    • deny. Reject the request.
    • deny_custom_{custom_deny_id}. The action defined by the custom deny is taken.
    • none. Take no action.
  • condition_exception. Conditions and exceptions associated with the rule.
  • json. JSON-formatted list of the action and the condition-exception information for the rule. This output is only generated if the rule_id argument is included.
  • output_text. Tabular report showing the rule action as well as Boolean values indicating whether conditions and exceptions have been configured for the 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 = "Documentation",
        }));
        var evalRule = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecEvalRules.InvokeAsync(new Akamai.GetAppSecEvalRulesArgs
        {
            ConfigId = configuration.ConfigId,
            SecurityPolicyId = "gms1_134637",
            RuleId = 60029316,
        })));
        this.EvalRuleAction = evalRule.Apply(evalRule => evalRule.EvalRuleAction);
        this.ConditionException = evalRule.Apply(evalRule => evalRule.ConditionException);
        this.Json = evalRule.Apply(evalRule => evalRule.Json);
        this.OutputText = evalRule.Apply(evalRule => evalRule.OutputText);
    }

    [Output("evalRuleAction")]
    public Output<string> EvalRuleAction { get; set; }
    [Output("conditionException")]
    public Output<string> ConditionException { get; set; }
    [Output("json")]
    public Output<string> Json { get; set; }
    [Output("outputText")]
    public Output<string> OutputText { 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 := "Documentation"
		configuration, err := akamai.LookupAppSecConfiguration(ctx, &GetAppSecConfigurationArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		opt1 := 60029316
		evalRule, err := akamai.GetAppSecEvalRules(ctx, &GetAppSecEvalRulesArgs{
			ConfigId:         configuration.ConfigId,
			SecurityPolicyId: "gms1_134637",
			RuleId:           &opt1,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("evalRuleAction", evalRule.EvalRuleAction)
		ctx.Export("conditionException", evalRule.ConditionException)
		ctx.Export("json", evalRule.Json)
		ctx.Export("outputText", evalRule.OutputText)
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name="Documentation")
eval_rule = akamai.get_app_sec_eval_rules(config_id=configuration.config_id,
    security_policy_id="gms1_134637",
    rule_id=60029316)
pulumi.export("evalRuleAction", eval_rule.eval_rule_action)
pulumi.export("conditionException", eval_rule.condition_exception)
pulumi.export("json", eval_rule.json)
pulumi.export("outputText", eval_rule.output_text)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: "Documentation",
});
const evalRule = configuration.then(configuration => akamai.getAppSecEvalRules({
    configId: configuration.configId,
    securityPolicyId: "gms1_134637",
    ruleId: "60029316",
}));
export const evalRuleAction = evalRule.then(evalRule => evalRule.evalRuleAction);
export const conditionException = evalRule.then(evalRule => evalRule.conditionException);
export const json = evalRule.then(evalRule => evalRule.json);
export const outputText = evalRule.then(evalRule => evalRule.outputText);

Using getAppSecEvalRules

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 getAppSecEvalRules(args: GetAppSecEvalRulesArgs, opts?: InvokeOptions): Promise<GetAppSecEvalRulesResult>
function getAppSecEvalRulesOutput(args: GetAppSecEvalRulesOutputArgs, opts?: InvokeOptions): Output<GetAppSecEvalRulesResult>
def get_app_sec_eval_rules(config_id: Optional[int] = None,
                           rule_id: Optional[int] = None,
                           security_policy_id: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetAppSecEvalRulesResult
def get_app_sec_eval_rules_output(config_id: Optional[pulumi.Input[int]] = None,
                           rule_id: Optional[pulumi.Input[int]] = None,
                           security_policy_id: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetAppSecEvalRulesResult]
func GetAppSecEvalRules(ctx *Context, args *GetAppSecEvalRulesArgs, opts ...InvokeOption) (*GetAppSecEvalRulesResult, error)
func GetAppSecEvalRulesOutput(ctx *Context, args *GetAppSecEvalRulesOutputArgs, opts ...InvokeOption) GetAppSecEvalRulesResultOutput

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

public static class GetAppSecEvalRules 
{
    public static Task<GetAppSecEvalRulesResult> InvokeAsync(GetAppSecEvalRulesArgs args, InvokeOptions? opts = null)
    public static Output<GetAppSecEvalRulesResult> Invoke(GetAppSecEvalRulesInvokeArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

ConfigId int
. Unique identifier of the security configuration running in evaluation mode.
SecurityPolicyId string
. Unique identifier of the security policy associated with the evaluation rule.
RuleId int
. Unique identifier of the evaluation rule you want to return information for. If not included, information is returned for all your evaluation rules.
ConfigId int
. Unique identifier of the security configuration running in evaluation mode.
SecurityPolicyId string
. Unique identifier of the security policy associated with the evaluation rule.
RuleId int
. Unique identifier of the evaluation rule you want to return information for. If not included, information is returned for all your evaluation rules.
configId number
. Unique identifier of the security configuration running in evaluation mode.
securityPolicyId string
. Unique identifier of the security policy associated with the evaluation rule.
ruleId number
. Unique identifier of the evaluation rule you want to return information for. If not included, information is returned for all your evaluation rules.
config_id int
. Unique identifier of the security configuration running in evaluation mode.
security_policy_id str
. Unique identifier of the security policy associated with the evaluation rule.
rule_id int
. Unique identifier of the evaluation rule you want to return information for. If not included, information is returned for all your evaluation rules.

getAppSecEvalRules Result

The following output properties are available:

ConditionException string
ConfigId int
EvalRuleAction string
Id string
The provider-assigned unique ID for this managed resource.
Json string
OutputText string
SecurityPolicyId string
RuleId int
ConditionException string
ConfigId int
EvalRuleAction string
Id string
The provider-assigned unique ID for this managed resource.
Json string
OutputText string
SecurityPolicyId string
RuleId int
conditionException string
configId number
evalRuleAction string
id string
The provider-assigned unique ID for this managed resource.
json string
outputText string
securityPolicyId string
ruleId number
condition_exception str
config_id int
eval_rule_action str
id str
The provider-assigned unique ID for this managed resource.
json str
output_text str
security_policy_id str
rule_id int

Package Details

Repository
https://github.com/pulumi/pulumi-akamai
License
Apache-2.0
Notes
This Pulumi package is based on the akamai Terraform Provider.