akamai.getAppSecSecurityPolicyProtections
Scopes: Security policy
Returns information about the protections in effect for the specified security policy.
Related API Endpoint: /appsec/v1/configs/{configId}/versions/{versionNumber}/security-policies/{policyId}/protections
Output Options
The following options can be used to determine the information returned and how that returned information is formatted:
apply_application_layer_controls
. Returns true if application layer controls are enabled; returns false if they are not.apply_api_constraints
. Returns true if API constraints are enabled; returns false if they are not.apply_botman_controls
. Returns true if Bot Manager controls are enabled; returns false if they are not.apply_malware_controls
. Returns true if malware controls are enabled; returns false if they are not.apply_network_layer_controls
. Returns true if network layer controls are enabled; returns false if they are not.apply_rate_controls
. Returns true if rate controls are enabled; returns false if they are not.apply_reputation_controls
. Returns true if reputation controls are enabled; returns false if they are not.apply_slow_post_controls
. Returns true if slow POST controls are enabled; returns false if they are not.json
. JSON-formatted list showing the status of the protection settings.output_text
. Tabular report showing the status of the protection settings.
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 protections = Akamai.GetAppSecSecurityPolicyProtections.Invoke(new()
{
ConfigId = configuration.Apply(getAppSecConfigurationResult => getAppSecConfigurationResult.ConfigId),
SecurityPolicyId = "gms1_134637",
});
return new Dictionary<string, object?>
{
["protectionsJson"] = protections.Apply(getAppSecSecurityPolicyProtectionsResult => getAppSecSecurityPolicyProtectionsResult.Json),
["protectionsApplyApiConstraints"] = protections.Apply(getAppSecSecurityPolicyProtectionsResult => getAppSecSecurityPolicyProtectionsResult.ApplyApiConstraints),
["protectionsApplyApplicationLayerControls"] = protections.Apply(getAppSecSecurityPolicyProtectionsResult => getAppSecSecurityPolicyProtectionsResult.ApplyApplicationLayerControls),
["protectionsApplyBotmanControls"] = protections.Apply(getAppSecSecurityPolicyProtectionsResult => getAppSecSecurityPolicyProtectionsResult.ApplyBotmanControls),
["protectionsApplyMalwareControls"] = protections.Apply(getAppSecSecurityPolicyProtectionsResult => getAppSecSecurityPolicyProtectionsResult.ApplyMalwareControls),
["protectionsApplyNetworkLayerControls"] = protections.Apply(getAppSecSecurityPolicyProtectionsResult => getAppSecSecurityPolicyProtectionsResult.ApplyNetworkLayerControls),
["protectionsApplyRateControls"] = protections.Apply(getAppSecSecurityPolicyProtectionsResult => getAppSecSecurityPolicyProtectionsResult.ApplyRateControls),
["protectionsApplyReputationControls"] = protections.Apply(getAppSecSecurityPolicyProtectionsResult => getAppSecSecurityPolicyProtectionsResult.ApplyReputationControls),
["protectionsApplySlowPostControls"] = protections.Apply(getAppSecSecurityPolicyProtectionsResult => getAppSecSecurityPolicyProtectionsResult.ApplySlowPostControls),
};
});
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
}
protections, err := akamai.GetAppSecSecurityPolicyProtections(ctx, &akamai.GetAppSecSecurityPolicyProtectionsArgs{
ConfigId: configuration.ConfigId,
SecurityPolicyId: "gms1_134637",
}, nil)
if err != nil {
return err
}
ctx.Export("protectionsJson", protections.Json)
ctx.Export("protectionsApplyApiConstraints", protections.ApplyApiConstraints)
ctx.Export("protectionsApplyApplicationLayerControls", protections.ApplyApplicationLayerControls)
ctx.Export("protectionsApplyBotmanControls", protections.ApplyBotmanControls)
ctx.Export("protectionsApplyMalwareControls", protections.ApplyMalwareControls)
ctx.Export("protectionsApplyNetworkLayerControls", protections.ApplyNetworkLayerControls)
ctx.Export("protectionsApplyRateControls", protections.ApplyRateControls)
ctx.Export("protectionsApplyReputationControls", protections.ApplyReputationControls)
ctx.Export("protectionsApplySlowPostControls", protections.ApplySlowPostControls)
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.GetAppSecSecurityPolicyProtectionsArgs;
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 protections = AkamaiFunctions.getAppSecSecurityPolicyProtections(GetAppSecSecurityPolicyProtectionsArgs.builder()
.configId(configuration.applyValue(getAppSecConfigurationResult -> getAppSecConfigurationResult.configId()))
.securityPolicyId("gms1_134637")
.build());
ctx.export("protectionsJson", protections.applyValue(getAppSecSecurityPolicyProtectionsResult -> getAppSecSecurityPolicyProtectionsResult.json()));
ctx.export("protectionsApplyApiConstraints", protections.applyValue(getAppSecSecurityPolicyProtectionsResult -> getAppSecSecurityPolicyProtectionsResult.applyApiConstraints()));
ctx.export("protectionsApplyApplicationLayerControls", protections.applyValue(getAppSecSecurityPolicyProtectionsResult -> getAppSecSecurityPolicyProtectionsResult.applyApplicationLayerControls()));
ctx.export("protectionsApplyBotmanControls", protections.applyValue(getAppSecSecurityPolicyProtectionsResult -> getAppSecSecurityPolicyProtectionsResult.applyBotmanControls()));
ctx.export("protectionsApplyMalwareControls", protections.applyValue(getAppSecSecurityPolicyProtectionsResult -> getAppSecSecurityPolicyProtectionsResult.applyMalwareControls()));
ctx.export("protectionsApplyNetworkLayerControls", protections.applyValue(getAppSecSecurityPolicyProtectionsResult -> getAppSecSecurityPolicyProtectionsResult.applyNetworkLayerControls()));
ctx.export("protectionsApplyRateControls", protections.applyValue(getAppSecSecurityPolicyProtectionsResult -> getAppSecSecurityPolicyProtectionsResult.applyRateControls()));
ctx.export("protectionsApplyReputationControls", protections.applyValue(getAppSecSecurityPolicyProtectionsResult -> getAppSecSecurityPolicyProtectionsResult.applyReputationControls()));
ctx.export("protectionsApplySlowPostControls", protections.applyValue(getAppSecSecurityPolicyProtectionsResult -> getAppSecSecurityPolicyProtectionsResult.applySlowPostControls()));
}
}
import pulumi
import pulumi_akamai as akamai
configuration = akamai.get_app_sec_configuration(name="Documentation")
protections = akamai.get_app_sec_security_policy_protections(config_id=configuration.config_id,
security_policy_id="gms1_134637")
pulumi.export("protectionsJson", protections.json)
pulumi.export("protectionsApplyApiConstraints", protections.apply_api_constraints)
pulumi.export("protectionsApplyApplicationLayerControls", protections.apply_application_layer_controls)
pulumi.export("protectionsApplyBotmanControls", protections.apply_botman_controls)
pulumi.export("protectionsApplyMalwareControls", protections.apply_malware_controls)
pulumi.export("protectionsApplyNetworkLayerControls", protections.apply_network_layer_controls)
pulumi.export("protectionsApplyRateControls", protections.apply_rate_controls)
pulumi.export("protectionsApplyReputationControls", protections.apply_reputation_controls)
pulumi.export("protectionsApplySlowPostControls", protections.apply_slow_post_controls)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";
const configuration = akamai.getAppSecConfiguration({
name: "Documentation",
});
const protections = configuration.then(configuration => akamai.getAppSecSecurityPolicyProtections({
configId: configuration.configId,
securityPolicyId: "gms1_134637",
}));
export const protectionsJson = protections.then(protections => protections.json);
export const protectionsApplyApiConstraints = protections.then(protections => protections.applyApiConstraints);
export const protectionsApplyApplicationLayerControls = protections.then(protections => protections.applyApplicationLayerControls);
export const protectionsApplyBotmanControls = protections.then(protections => protections.applyBotmanControls);
export const protectionsApplyMalwareControls = protections.then(protections => protections.applyMalwareControls);
export const protectionsApplyNetworkLayerControls = protections.then(protections => protections.applyNetworkLayerControls);
export const protectionsApplyRateControls = protections.then(protections => protections.applyRateControls);
export const protectionsApplyReputationControls = protections.then(protections => protections.applyReputationControls);
export const protectionsApplySlowPostControls = protections.then(protections => protections.applySlowPostControls);
variables:
configuration:
fn::invoke:
Function: akamai:getAppSecConfiguration
Arguments:
name: Documentation
protections:
fn::invoke:
Function: akamai:getAppSecSecurityPolicyProtections
Arguments:
configId: ${configuration.configId}
securityPolicyId: gms1_134637
outputs:
protectionsJson: ${protections.json}
protectionsApplyApiConstraints: ${protections.applyApiConstraints}
protectionsApplyApplicationLayerControls: ${protections.applyApplicationLayerControls}
protectionsApplyBotmanControls: ${protections.applyBotmanControls}
protectionsApplyMalwareControls: ${protections.applyMalwareControls}
protectionsApplyNetworkLayerControls: ${protections.applyNetworkLayerControls}
protectionsApplyRateControls: ${protections.applyRateControls}
protectionsApplyReputationControls: ${protections.applyReputationControls}
protectionsApplySlowPostControls: ${protections.applySlowPostControls}
Using getAppSecSecurityPolicyProtections
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 getAppSecSecurityPolicyProtections(args: GetAppSecSecurityPolicyProtectionsArgs, opts?: InvokeOptions): Promise<GetAppSecSecurityPolicyProtectionsResult>
function getAppSecSecurityPolicyProtectionsOutput(args: GetAppSecSecurityPolicyProtectionsOutputArgs, opts?: InvokeOptions): Output<GetAppSecSecurityPolicyProtectionsResult>
def get_app_sec_security_policy_protections(config_id: Optional[int] = None,
security_policy_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAppSecSecurityPolicyProtectionsResult
def get_app_sec_security_policy_protections_output(config_id: Optional[pulumi.Input[int]] = None,
security_policy_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAppSecSecurityPolicyProtectionsResult]
func GetAppSecSecurityPolicyProtections(ctx *Context, args *GetAppSecSecurityPolicyProtectionsArgs, opts ...InvokeOption) (*GetAppSecSecurityPolicyProtectionsResult, error)
func GetAppSecSecurityPolicyProtectionsOutput(ctx *Context, args *GetAppSecSecurityPolicyProtectionsOutputArgs, opts ...InvokeOption) GetAppSecSecurityPolicyProtectionsResultOutput
> Note: This function is named GetAppSecSecurityPolicyProtections
in the Go SDK.
public static class GetAppSecSecurityPolicyProtections
{
public static Task<GetAppSecSecurityPolicyProtectionsResult> InvokeAsync(GetAppSecSecurityPolicyProtectionsArgs args, InvokeOptions? opts = null)
public static Output<GetAppSecSecurityPolicyProtectionsResult> Invoke(GetAppSecSecurityPolicyProtectionsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAppSecSecurityPolicyProtectionsResult> getAppSecSecurityPolicyProtections(GetAppSecSecurityPolicyProtectionsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: akamai:index/getAppSecSecurityPolicyProtections:getAppSecSecurityPolicyProtections
arguments:
# arguments dictionary
The following arguments are supported:
- Config
Id int . Unique identifier of the security configuration associated with the security policy protections.
- Security
Policy stringId . Unique identifier of the security policy you want to return protections information for.
- Config
Id int . Unique identifier of the security configuration associated with the security policy protections.
- Security
Policy stringId . Unique identifier of the security policy you want to return protections information for.
- config
Id Integer . Unique identifier of the security configuration associated with the security policy protections.
- security
Policy StringId . Unique identifier of the security policy you want to return protections information for.
- config
Id number . Unique identifier of the security configuration associated with the security policy protections.
- security
Policy stringId . Unique identifier of the security policy you want to return protections information for.
- config_
id int . Unique identifier of the security configuration associated with the security policy protections.
- security_
policy_ strid . Unique identifier of the security policy you want to return protections information for.
- config
Id Number . Unique identifier of the security configuration associated with the security policy protections.
- security
Policy StringId . Unique identifier of the security policy you want to return protections information for.
getAppSecSecurityPolicyProtections Result
The following output properties are available:
- Apply
Api boolConstraints - Apply
Application boolLayer Controls - Apply
Botman boolControls - Apply
Malware boolControls - Apply
Network boolLayer Controls - Apply
Rate boolControls - Apply
Reputation boolControls - Apply
Slow boolPost Controls - Config
Id int - Id string
The provider-assigned unique ID for this managed resource.
- Json string
- Output
Text string - Security
Policy stringId
- Apply
Api boolConstraints - Apply
Application boolLayer Controls - Apply
Botman boolControls - Apply
Malware boolControls - Apply
Network boolLayer Controls - Apply
Rate boolControls - Apply
Reputation boolControls - Apply
Slow boolPost Controls - Config
Id int - Id string
The provider-assigned unique ID for this managed resource.
- Json string
- Output
Text string - Security
Policy stringId
- apply
Api BooleanConstraints - apply
Application BooleanLayer Controls - apply
Botman BooleanControls - apply
Malware BooleanControls - apply
Network BooleanLayer Controls - apply
Rate BooleanControls - apply
Reputation BooleanControls - apply
Slow BooleanPost Controls - config
Id Integer - id String
The provider-assigned unique ID for this managed resource.
- json String
- output
Text String - security
Policy StringId
- apply
Api booleanConstraints - apply
Application booleanLayer Controls - apply
Botman booleanControls - apply
Malware booleanControls - apply
Network booleanLayer Controls - apply
Rate booleanControls - apply
Reputation booleanControls - apply
Slow booleanPost Controls - config
Id number - id string
The provider-assigned unique ID for this managed resource.
- json string
- output
Text string - security
Policy stringId
- apply_
api_ boolconstraints - apply_
application_ boollayer_ controls - apply_
botman_ boolcontrols - apply_
malware_ boolcontrols - apply_
network_ boollayer_ controls - apply_
rate_ boolcontrols - apply_
reputation_ boolcontrols - apply_
slow_ boolpost_ controls - config_
id int - id str
The provider-assigned unique ID for this managed resource.
- json str
- output_
text str - security_
policy_ strid
- apply
Api BooleanConstraints - apply
Application BooleanLayer Controls - apply
Botman BooleanControls - apply
Malware BooleanControls - apply
Network BooleanLayer Controls - apply
Rate BooleanControls - apply
Reputation BooleanControls - apply
Slow BooleanPost Controls - config
Id Number - id String
The provider-assigned unique ID for this managed resource.
- json String
- output
Text String - security
Policy StringId
Package Details
- Repository
- Akamai pulumi/pulumi-akamai
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
akamai
Terraform Provider.