akamai.getAppSecAttackGroups
Scopes: Security policy; attack group
Returns the action and the condition-exception information for an attack group or set of attack groups. Attack groups are collections of Kona Rule Set rules used to streamline the management of website protections.
Related API Endpoint: /appsec/v1/configs/{configId}/versions/{versionNumber}/security-policies/{policyId}/attack-groups
Output Options
The following options can be used to determine the information returned, and how that returned information is formatted:
attack_group_action
. Action taken anytime the attack group is triggered. This information is returned only when a single attack group is retrieved. Valid values are:- alert. The event is recorded.
- deny. The request is blocked.
- deny_custom_{custom_deny_id}. The action defined by the custom deny is taken.
- none. No action is taken.
condition_exception
. Conditions and exceptions assigned to the attack group. This information is returned only when a single attack group is retrieved.json
. JSON-formatted list of the action and the condition-exception information for the attack group. This information is returned only when a single attack group is retrieved.output_text
. Tabular report showing the attack group’s action as well as Boolean values indicating whether conditions and exceptions have been configured for the group.
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 attackGroup = Akamai.GetAppSecAttackGroups.Invoke(new()
{
ConfigId = configuration.Apply(getAppSecConfigurationResult => getAppSecConfigurationResult.ConfigId),
SecurityPolicyId = "gms1_134637",
AttackGroup = "SQL",
});
return new Dictionary<string, object?>
{
["attackGroupAction"] = attackGroup.Apply(getAppSecAttackGroupsResult => getAppSecAttackGroupsResult.AttackGroupAction),
["conditionException"] = attackGroup.Apply(getAppSecAttackGroupsResult => getAppSecAttackGroupsResult.ConditionException),
["json"] = attackGroup.Apply(getAppSecAttackGroupsResult => getAppSecAttackGroupsResult.Json),
["outputText"] = attackGroup.Apply(getAppSecAttackGroupsResult => getAppSecAttackGroupsResult.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
}
attackGroup, err := akamai.GetAppSecAttackGroups(ctx, &akamai.GetAppSecAttackGroupsArgs{
ConfigId: configuration.ConfigId,
SecurityPolicyId: "gms1_134637",
AttackGroup: pulumi.StringRef("SQL"),
}, nil)
if err != nil {
return err
}
ctx.Export("attackGroupAction", attackGroup.AttackGroupAction)
ctx.Export("conditionException", attackGroup.ConditionException)
ctx.Export("json", attackGroup.Json)
ctx.Export("outputText", attackGroup.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.GetAppSecAttackGroupsArgs;
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 attackGroup = AkamaiFunctions.getAppSecAttackGroups(GetAppSecAttackGroupsArgs.builder()
.configId(configuration.applyValue(getAppSecConfigurationResult -> getAppSecConfigurationResult.configId()))
.securityPolicyId("gms1_134637")
.attackGroup("SQL")
.build());
ctx.export("attackGroupAction", attackGroup.applyValue(getAppSecAttackGroupsResult -> getAppSecAttackGroupsResult.attackGroupAction()));
ctx.export("conditionException", attackGroup.applyValue(getAppSecAttackGroupsResult -> getAppSecAttackGroupsResult.conditionException()));
ctx.export("json", attackGroup.applyValue(getAppSecAttackGroupsResult -> getAppSecAttackGroupsResult.json()));
ctx.export("outputText", attackGroup.applyValue(getAppSecAttackGroupsResult -> getAppSecAttackGroupsResult.outputText()));
}
}
import pulumi
import pulumi_akamai as akamai
configuration = akamai.get_app_sec_configuration(name="Documentation")
attack_group = akamai.get_app_sec_attack_groups(config_id=configuration.config_id,
security_policy_id="gms1_134637",
attack_group="SQL")
pulumi.export("attackGroupAction", attack_group.attack_group_action)
pulumi.export("conditionException", attack_group.condition_exception)
pulumi.export("json", attack_group.json)
pulumi.export("outputText", attack_group.output_text)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";
const configuration = akamai.getAppSecConfiguration({
name: "Documentation",
});
const attackGroup = configuration.then(configuration => akamai.getAppSecAttackGroups({
configId: configuration.configId,
securityPolicyId: "gms1_134637",
attackGroup: "SQL",
}));
export const attackGroupAction = attackGroup.then(attackGroup => attackGroup.attackGroupAction);
export const conditionException = attackGroup.then(attackGroup => attackGroup.conditionException);
export const json = attackGroup.then(attackGroup => attackGroup.json);
export const outputText = attackGroup.then(attackGroup => attackGroup.outputText);
variables:
configuration:
fn::invoke:
Function: akamai:getAppSecConfiguration
Arguments:
name: Documentation
attackGroup:
fn::invoke:
Function: akamai:getAppSecAttackGroups
Arguments:
configId: ${configuration.configId}
securityPolicyId: gms1_134637
attackGroup: SQL
outputs:
attackGroupAction: ${attackGroup.attackGroupAction}
conditionException: ${attackGroup.conditionException}
json: ${attackGroup.json}
outputText: ${attackGroup.outputText}
Using getAppSecAttackGroups
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 getAppSecAttackGroups(args: GetAppSecAttackGroupsArgs, opts?: InvokeOptions): Promise<GetAppSecAttackGroupsResult>
function getAppSecAttackGroupsOutput(args: GetAppSecAttackGroupsOutputArgs, opts?: InvokeOptions): Output<GetAppSecAttackGroupsResult>
def get_app_sec_attack_groups(attack_group: Optional[str] = None,
config_id: Optional[int] = None,
security_policy_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAppSecAttackGroupsResult
def get_app_sec_attack_groups_output(attack_group: Optional[pulumi.Input[str]] = None,
config_id: Optional[pulumi.Input[int]] = None,
security_policy_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAppSecAttackGroupsResult]
func GetAppSecAttackGroups(ctx *Context, args *GetAppSecAttackGroupsArgs, opts ...InvokeOption) (*GetAppSecAttackGroupsResult, error)
func GetAppSecAttackGroupsOutput(ctx *Context, args *GetAppSecAttackGroupsOutputArgs, opts ...InvokeOption) GetAppSecAttackGroupsResultOutput
> Note: This function is named GetAppSecAttackGroups
in the Go SDK.
public static class GetAppSecAttackGroups
{
public static Task<GetAppSecAttackGroupsResult> InvokeAsync(GetAppSecAttackGroupsArgs args, InvokeOptions? opts = null)
public static Output<GetAppSecAttackGroupsResult> Invoke(GetAppSecAttackGroupsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAppSecAttackGroupsResult> getAppSecAttackGroups(GetAppSecAttackGroupsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: akamai:index/getAppSecAttackGroups:getAppSecAttackGroups
arguments:
# arguments dictionary
The following arguments are supported:
- Config
Id int . Unique identifier of the security configuration associated with the attack group.
- Security
Policy stringId . Unique identifier of the security policy associated with the attack group.
- Attack
Group string . Unique name of the attack group you want to return information for. If not included, information is returned for all your attack groups.
- Config
Id int . Unique identifier of the security configuration associated with the attack group.
- Security
Policy stringId . Unique identifier of the security policy associated with the attack group.
- Attack
Group string . Unique name of the attack group you want to return information for. If not included, information is returned for all your attack groups.
- config
Id Integer . Unique identifier of the security configuration associated with the attack group.
- security
Policy StringId . Unique identifier of the security policy associated with the attack group.
- attack
Group String . Unique name of the attack group you want to return information for. If not included, information is returned for all your attack groups.
- config
Id number . Unique identifier of the security configuration associated with the attack group.
- security
Policy stringId . Unique identifier of the security policy associated with the attack group.
- attack
Group string . Unique name of the attack group you want to return information for. If not included, information is returned for all your attack groups.
- config_
id int . Unique identifier of the security configuration associated with the attack group.
- security_
policy_ strid . Unique identifier of the security policy associated with the attack group.
- attack_
group str . Unique name of the attack group you want to return information for. If not included, information is returned for all your attack groups.
- config
Id Number . Unique identifier of the security configuration associated with the attack group.
- security
Policy StringId . Unique identifier of the security policy associated with the attack group.
- attack
Group String . Unique name of the attack group you want to return information for. If not included, information is returned for all your attack groups.
getAppSecAttackGroups Result
The following output properties are available:
- Attack
Group stringAction - Condition
Exception string - Config
Id int - Id string
The provider-assigned unique ID for this managed resource.
- Json string
- Output
Text string - Security
Policy stringId - Attack
Group string
- Attack
Group stringAction - Condition
Exception string - Config
Id int - Id string
The provider-assigned unique ID for this managed resource.
- Json string
- Output
Text string - Security
Policy stringId - Attack
Group string
- attack
Group StringAction - condition
Exception String - config
Id Integer - id String
The provider-assigned unique ID for this managed resource.
- json String
- output
Text String - security
Policy StringId - attack
Group String
- attack
Group stringAction - condition
Exception string - config
Id number - id string
The provider-assigned unique ID for this managed resource.
- json string
- output
Text string - security
Policy stringId - attack
Group string
- attack_
group_ straction - condition_
exception str - config_
id int - id str
The provider-assigned unique ID for this managed resource.
- json str
- output_
text str - security_
policy_ strid - attack_
group str
- attack
Group StringAction - condition
Exception String - config
Id Number - id String
The provider-assigned unique ID for this managed resource.
- json String
- output
Text String - security
Policy StringId - attack
Group String
Package Details
- Repository
- Akamai pulumi/pulumi-akamai
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
akamai
Terraform Provider.