getAppSecWafMode

Use the akamai.AppSecWafMode data source to retrieve the mode that indicates how the WAF rules of the given security configuration and security policy will be updated.

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 wafMode = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecWafMode.InvokeAsync(new Akamai.GetAppSecWafModeArgs
        {
            ConfigId = configuration.ConfigId,
            SecurityPolicyId = @var.Policy_id,
        })));
        this.WafModeMode = wafMode.Apply(wafMode => wafMode.Mode);
        this.WafModeCurrentRuleset = wafMode.Apply(wafMode => wafMode.CurrentRuleset);
        this.WafModeEvalStatus = wafMode.Apply(wafMode => wafMode.EvalStatus);
        this.WafModeEvalRuleset = wafMode.Apply(wafMode => wafMode.EvalRuleset);
        this.WafModeEvalExpirationDate = wafMode.Apply(wafMode => wafMode.EvalExpirationDate);
        this.WafModeText = wafMode.Apply(wafMode => wafMode.OutputText);
        this.WafModeJson = wafMode.Apply(wafMode => wafMode.Json);
    }

    [Output("wafModeMode")]
    public Output<string> WafModeMode { get; set; }
    [Output("wafModeCurrentRuleset")]
    public Output<string> WafModeCurrentRuleset { get; set; }
    [Output("wafModeEvalStatus")]
    public Output<string> WafModeEvalStatus { get; set; }
    [Output("wafModeEvalRuleset")]
    public Output<string> WafModeEvalRuleset { get; set; }
    [Output("wafModeEvalExpirationDate")]
    public Output<string> WafModeEvalExpirationDate { get; set; }
    [Output("wafModeText")]
    public Output<string> WafModeText { get; set; }
    [Output("wafModeJson")]
    public Output<string> WafModeJson { 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, &akamai.LookupAppSecConfigurationArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		wafMode, err := akamai.LookupAppSecWafMode(ctx, &akamai.LookupAppSecWafModeArgs{
			ConfigId:         configuration.ConfigId,
			SecurityPolicyId: _var.Policy_id,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("wafModeMode", wafMode.Mode)
		ctx.Export("wafModeCurrentRuleset", wafMode.CurrentRuleset)
		ctx.Export("wafModeEvalStatus", wafMode.EvalStatus)
		ctx.Export("wafModeEvalRuleset", wafMode.EvalRuleset)
		ctx.Export("wafModeEvalExpirationDate", wafMode.EvalExpirationDate)
		ctx.Export("wafModeText", wafMode.OutputText)
		ctx.Export("wafModeJson", wafMode.Json)
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name=var["security_configuration"])
waf_mode = akamai.get_app_sec_waf_mode(config_id=configuration.config_id,
    security_policy_id=var["policy_id"])
pulumi.export("wafModeMode", waf_mode.mode)
pulumi.export("wafModeCurrentRuleset", waf_mode.current_ruleset)
pulumi.export("wafModeEvalStatus", waf_mode.eval_status)
pulumi.export("wafModeEvalRuleset", waf_mode.eval_ruleset)
pulumi.export("wafModeEvalExpirationDate", waf_mode.eval_expiration_date)
pulumi.export("wafModeText", waf_mode.output_text)
pulumi.export("wafModeJson", waf_mode.json)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: _var.security_configuration,
});
const wafMode = configuration.then(configuration => akamai.getAppSecWafMode({
    configId: configuration.configId,
    securityPolicyId: _var.policy_id,
}));
export const wafModeMode = wafMode.then(wafMode => wafMode.mode);
export const wafModeCurrentRuleset = wafMode.then(wafMode => wafMode.currentRuleset);
export const wafModeEvalStatus = wafMode.then(wafMode => wafMode.evalStatus);
export const wafModeEvalRuleset = wafMode.then(wafMode => wafMode.evalRuleset);
export const wafModeEvalExpirationDate = wafMode.then(wafMode => wafMode.evalExpirationDate);
export const wafModeText = wafMode.then(wafMode => wafMode.outputText);
export const wafModeJson = wafMode.then(wafMode => wafMode.json);

Using getAppSecWafMode

function getAppSecWafMode(args: GetAppSecWafModeArgs, opts?: InvokeOptions): Promise<GetAppSecWafModeResult>
def get_app_sec_waf_mode(config_id: Optional[int] = None,
                         security_policy_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetAppSecWafModeResult
func LookupAppSecWafMode(ctx *Context, args *LookupAppSecWafModeArgs, opts ...InvokeOption) (*LookupAppSecWafModeResult, error)

Note: This function is named LookupAppSecWafMode in the Go SDK.

public static class GetAppSecWafMode {
    public static Task<GetAppSecWafModeResult> InvokeAsync(GetAppSecWafModeArgs 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.
ConfigId int
The ID of the security configuration to use.
SecurityPolicyId string
The ID of the security policy to use.
configId number
The ID of the security configuration to use.
securityPolicyId string
The ID of the security policy to use.
config_id int
The ID of the security configuration to use.
security_policy_id str
The ID of the security policy to use.

getAppSecWafMode Result

The following output properties are available:

ConfigId int
CurrentRuleset string
The current rule set version and the ISO 8601 date the rule set version was introduced; this date acts like a version number.
EvalExpirationDate string
The ISO 8601 time stamp when the evaluation is expiring. This value only appears when eval is set to “enabled”.
EvalRuleset string
The evaluation rule set version and the ISO 8601 date the evaluation starts.
EvalStatus string
Whether the evaluation mode is enabled or disabled."
Id string
The provider-assigned unique ID for this managed resource.
Json string
A JSON-formatted list of the mode information.
Mode string
The security policy mode, either KRS (update manually) or AAG (update automatically),
OutputText string
A tabular display of the mode information.
SecurityPolicyId string
ConfigId int
CurrentRuleset string
The current rule set version and the ISO 8601 date the rule set version was introduced; this date acts like a version number.
EvalExpirationDate string
The ISO 8601 time stamp when the evaluation is expiring. This value only appears when eval is set to “enabled”.
EvalRuleset string
The evaluation rule set version and the ISO 8601 date the evaluation starts.
EvalStatus string
Whether the evaluation mode is enabled or disabled."
Id string
The provider-assigned unique ID for this managed resource.
Json string
A JSON-formatted list of the mode information.
Mode string
The security policy mode, either KRS (update manually) or AAG (update automatically),
OutputText string
A tabular display of the mode information.
SecurityPolicyId string
configId number
currentRuleset string
The current rule set version and the ISO 8601 date the rule set version was introduced; this date acts like a version number.
evalExpirationDate string
The ISO 8601 time stamp when the evaluation is expiring. This value only appears when eval is set to “enabled”.
evalRuleset string
The evaluation rule set version and the ISO 8601 date the evaluation starts.
evalStatus string
Whether the evaluation mode is enabled or disabled."
id string
The provider-assigned unique ID for this managed resource.
json string
A JSON-formatted list of the mode information.
mode string
The security policy mode, either KRS (update manually) or AAG (update automatically),
outputText string
A tabular display of the mode information.
securityPolicyId string
config_id int
current_ruleset str
The current rule set version and the ISO 8601 date the rule set version was introduced; this date acts like a version number.
eval_expiration_date str
The ISO 8601 time stamp when the evaluation is expiring. This value only appears when eval is set to “enabled”.
eval_ruleset str
The evaluation rule set version and the ISO 8601 date the evaluation starts.
eval_status str
Whether the evaluation mode is enabled or disabled."
id str
The provider-assigned unique ID for this managed resource.
json str
A JSON-formatted list of the mode information.
mode str
The security policy mode, either KRS (update manually) or AAG (update automatically),
output_text str
A tabular display of the mode information.
security_policy_id str

Package Details

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