getAppSecEvalRules

Use the akamai.getAppSecEvalRules data source to list the action and condition-exception information for a rule or rules you want to evaluate.

Example Usage

using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var configuration = Output.Create(Akamai.GetAppSecConfiguration.InvokeAsync(new Akamai.GetAppSecConfigurationArgs
        {
            Name = @var.Security_configuration,
        }));
        var evalRule = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecEvalRules.InvokeAsync(new Akamai.GetAppSecEvalRulesArgs
        {
            ConfigId = configuration.ConfigId,
            SecurityPolicyId = @var.Security_policy_id,
            RuleId = @var.Rule_id,
        })));
        this.EvalRuleAction = akamai_appsec_eval_rules.Eval_rule.Eval_rule_action;
        this.ConditionException = akamai_appsec_eval_rules.Eval_rule.Condition_exception;
        this.Json = akamai_appsec_eval_rules.Eval_rule.Json;
        this.OutputText = akamai_appsec_eval_rules.Eval_rule.Output_text;
    }

    [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 := _var.Security_configuration
		configuration, err := akamai.LookupAppSecConfiguration(ctx, &GetAppSecConfigurationArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		opt1 := _var.Rule_id
		_, err = akamai.GetAppSecEvalRules(ctx, &GetAppSecEvalRulesArgs{
			ConfigId:         configuration.ConfigId,
			SecurityPolicyId: _var.Security_policy_id,
			RuleId:           &opt1,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("evalRuleAction", akamai_appsec_eval_rules.Eval_rule.Eval_rule_action)
		ctx.Export("conditionException", akamai_appsec_eval_rules.Eval_rule.Condition_exception)
		ctx.Export("json", akamai_appsec_eval_rules.Eval_rule.Json)
		ctx.Export("outputText", akamai_appsec_eval_rules.Eval_rule.Output_text)
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name=var["security_configuration"])
eval_rule = akamai.get_app_sec_eval_rules(config_id=configuration.config_id,
    security_policy_id=var["security_policy_id"],
    rule_id=var["rule_id"])
pulumi.export("evalRuleAction", akamai_appsec_eval_rules["eval_rule"]["eval_rule_action"])
pulumi.export("conditionException", akamai_appsec_eval_rules["eval_rule"]["condition_exception"])
pulumi.export("json", akamai_appsec_eval_rules["eval_rule"]["json"])
pulumi.export("outputText", akamai_appsec_eval_rules["eval_rule"]["output_text"])
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: _var.security_configuration,
});
const evalRule = configuration.then(configuration => akamai.getAppSecEvalRules({
    configId: configuration.configId,
    securityPolicyId: _var.security_policy_id,
    ruleId: _var.rule_id,
}));
export const evalRuleAction = akamai_appsec_eval_rules.eval_rule.eval_rule_action;
export const conditionException = akamai_appsec_eval_rules.eval_rule.condition_exception;
export const json = akamai_appsec_eval_rules.eval_rule.json;
export const outputText = akamai_appsec_eval_rules.eval_rule.output_text;

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
The ID of the security configuration to use.
SecurityPolicyId string
The ID of the security policy to use.
RuleId int
The ID of the rule to use. If not specified, information about all rules will be returned.
ConfigId int
The ID of the security configuration to use.
SecurityPolicyId string
The ID of the security policy to use.
RuleId int
The ID of the rule to use. If not specified, information about all rules will be returned.
configId number
The ID of the security configuration to use.
securityPolicyId string
The ID of the security policy to use.
ruleId number
The ID of the rule to use. If not specified, information about all rules will be returned.
config_id int
The ID of the security configuration to use.
security_policy_id str
The ID of the security policy to use.
rule_id int
The ID of the rule to use. If not specified, information about all rules will be returned.

getAppSecEvalRules Result

The following output properties are available:

ConditionException string
The eval rule’s conditions and exceptions.
ConfigId int
EvalRuleAction string
The eval rule’s action, either alert, deny, or none.
Id string
The provider-assigned unique ID for this managed resource.
Json string
A JSON-formatted list of the action and condition-exception information for the specified eval rule. This output is only generated if an eval rule is specified.
OutputText string
A tabular display showing, for the specified eval rule or rules, the rule action and boolean values indicating whether conditions and exceptions are present.
SecurityPolicyId string
RuleId int
ConditionException string
The eval rule’s conditions and exceptions.
ConfigId int
EvalRuleAction string
The eval rule’s action, either alert, deny, or none.
Id string
The provider-assigned unique ID for this managed resource.
Json string
A JSON-formatted list of the action and condition-exception information for the specified eval rule. This output is only generated if an eval rule is specified.
OutputText string
A tabular display showing, for the specified eval rule or rules, the rule action and boolean values indicating whether conditions and exceptions are present.
SecurityPolicyId string
RuleId int
conditionException string
The eval rule’s conditions and exceptions.
configId number
evalRuleAction string
The eval rule’s action, either alert, deny, or none.
id string
The provider-assigned unique ID for this managed resource.
json string
A JSON-formatted list of the action and condition-exception information for the specified eval rule. This output is only generated if an eval rule is specified.
outputText string
A tabular display showing, for the specified eval rule or rules, the rule action and boolean values indicating whether conditions and exceptions are present.
securityPolicyId string
ruleId number
condition_exception str
The eval rule’s conditions and exceptions.
config_id int
eval_rule_action str
The eval rule’s action, either alert, deny, or none.
id str
The provider-assigned unique ID for this managed resource.
json str
A JSON-formatted list of the action and condition-exception information for the specified eval rule. This output is only generated if an eval rule is specified.
output_text str
A tabular display showing, for the specified eval rule or rules, the rule action and boolean values indicating whether conditions and exceptions are present.
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.