getAppSecSecurityPolicyProtections

Use the akamai.getAppSecSecurityPolicyProtections data source to retrieve the protections in effect for a given security policy.

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 protections = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecSecurityPolicyProtections.InvokeAsync(new Akamai.GetAppSecSecurityPolicyProtectionsArgs
        {
            ConfigId = configuration.ConfigId,
            SecurityPolicyId = @var.Security_policy_id,
        })));
        this.ProtectionsJson = protections.Apply(protections => protections.Json);
        this.ProtectionsApplyApiConstraints = protections.Apply(protections => protections.ApplyApiConstraints);
        this.ProtectionsApplyApplicationLayerControls = protections.Apply(protections => protections.ApplyApplicationLayerControls);
        this.ProtectionsApplyBotmanControls = protections.Apply(protections => protections.ApplyBotmanControls);
        this.ProtectionsApplyNetworkLayerControls = protections.Apply(protections => protections.ApplyNetworkLayerControls);
        this.ProtectionsApplyRateControls = protections.Apply(protections => protections.ApplyRateControls);
        this.ProtectionsApplyReputationControls = protections.Apply(protections => protections.ApplyReputationControls);
        this.ProtectionsApplySlowPostControls = protections.Apply(protections => protections.ApplySlowPostControls);
    }

    [Output("protectionsJson")]
    public Output<string> ProtectionsJson { get; set; }
    [Output("protectionsApplyApiConstraints")]
    public Output<string> ProtectionsApplyApiConstraints { get; set; }
    [Output("protectionsApplyApplicationLayerControls")]
    public Output<string> ProtectionsApplyApplicationLayerControls { get; set; }
    [Output("protectionsApplyBotmanControls")]
    public Output<string> ProtectionsApplyBotmanControls { get; set; }
    [Output("protectionsApplyNetworkLayerControls")]
    public Output<string> ProtectionsApplyNetworkLayerControls { get; set; }
    [Output("protectionsApplyRateControls")]
    public Output<string> ProtectionsApplyRateControls { get; set; }
    [Output("protectionsApplyReputationControls")]
    public Output<string> ProtectionsApplyReputationControls { get; set; }
    [Output("protectionsApplySlowPostControls")]
    public Output<string> ProtectionsApplySlowPostControls { 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
		}
		protections, err := akamai.GetAppSecSecurityPolicyProtections(ctx, &akamai.GetAppSecSecurityPolicyProtectionsArgs{
			ConfigId:         configuration.ConfigId,
			SecurityPolicyId: _var.Security_policy_id,
		}, 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("protectionsApplyNetworkLayerControls", protections.ApplyNetworkLayerControls)
		ctx.Export("protectionsApplyRateControls", protections.ApplyRateControls)
		ctx.Export("protectionsApplyReputationControls", protections.ApplyReputationControls)
		ctx.Export("protectionsApplySlowPostControls", protections.ApplySlowPostControls)
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name=var["security_configuration"])
protections = akamai.get_app_sec_security_policy_protections(config_id=configuration.config_id,
    security_policy_id=var["security_policy_id"])
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("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: _var.security_configuration,
});
const protections = configuration.then(configuration => akamai.getAppSecSecurityPolicyProtections({
    configId: configuration.configId,
    securityPolicyId: _var.security_policy_id,
}));
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 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);

Using getAppSecSecurityPolicyProtections

function getAppSecSecurityPolicyProtections(args: GetAppSecSecurityPolicyProtectionsArgs, opts?: InvokeOptions): Promise<GetAppSecSecurityPolicyProtectionsResult>
def get_app_sec_security_policy_protections(config_id: Optional[int] = None,
                                            security_policy_id: Optional[str] = None,
                                            opts: Optional[InvokeOptions] = None) -> GetAppSecSecurityPolicyProtectionsResult
func GetAppSecSecurityPolicyProtections(ctx *Context, args *GetAppSecSecurityPolicyProtectionsArgs, opts ...InvokeOption) (*GetAppSecSecurityPolicyProtectionsResult, error)

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

public static class GetAppSecSecurityPolicyProtections {
    public static Task<GetAppSecSecurityPolicyProtectionsResult> InvokeAsync(GetAppSecSecurityPolicyProtectionsArgs 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.

getAppSecSecurityPolicyProtections Result

The following output properties are available:

ApplyApiConstraints bool
true or false, indicating whether API constraints are in effect.
ApplyApplicationLayerControls bool
true or false, indicating whether application layer controls are in effect.
ApplyBotmanControls bool
true or false, indicating whether botman controls are in effect.
ApplyNetworkLayerControls bool
true or false, indicating whether network layer controls are in effect.
ApplyRateControls bool
true or false, indicating whether rate controls are in effect.
ApplyReputationControls bool
true or false, indicating whether reputation controls are in effect.
ApplySlowPostControls bool
true or false, indicating whether slow post controls are in effect.
ConfigId int
Id string
The provider-assigned unique ID for this managed resource.
Json string
a JSON-formatted list showing the status of the protection settings
OutputText string
a tabular display showing the status of the protection settings
SecurityPolicyId string
ApplyApiConstraints bool
true or false, indicating whether API constraints are in effect.
ApplyApplicationLayerControls bool
true or false, indicating whether application layer controls are in effect.
ApplyBotmanControls bool
true or false, indicating whether botman controls are in effect.
ApplyNetworkLayerControls bool
true or false, indicating whether network layer controls are in effect.
ApplyRateControls bool
true or false, indicating whether rate controls are in effect.
ApplyReputationControls bool
true or false, indicating whether reputation controls are in effect.
ApplySlowPostControls bool
true or false, indicating whether slow post controls are in effect.
ConfigId int
Id string
The provider-assigned unique ID for this managed resource.
Json string
a JSON-formatted list showing the status of the protection settings
OutputText string
a tabular display showing the status of the protection settings
SecurityPolicyId string
applyApiConstraints boolean
true or false, indicating whether API constraints are in effect.
applyApplicationLayerControls boolean
true or false, indicating whether application layer controls are in effect.
applyBotmanControls boolean
true or false, indicating whether botman controls are in effect.
applyNetworkLayerControls boolean
true or false, indicating whether network layer controls are in effect.
applyRateControls boolean
true or false, indicating whether rate controls are in effect.
applyReputationControls boolean
true or false, indicating whether reputation controls are in effect.
applySlowPostControls boolean
true or false, indicating whether slow post controls are in effect.
configId number
id string
The provider-assigned unique ID for this managed resource.
json string
a JSON-formatted list showing the status of the protection settings
outputText string
a tabular display showing the status of the protection settings
securityPolicyId string
apply_api_constraints bool
true or false, indicating whether API constraints are in effect.
apply_application_layer_controls bool
true or false, indicating whether application layer controls are in effect.
apply_botman_controls bool
true or false, indicating whether botman controls are in effect.
apply_network_layer_controls bool
true or false, indicating whether network layer controls are in effect.
apply_rate_controls bool
true or false, indicating whether rate controls are in effect.
apply_reputation_controls bool
true or false, indicating whether reputation controls are in effect.
apply_slow_post_controls bool
true or false, indicating whether slow post controls are in effect.
config_id int
id str
The provider-assigned unique ID for this managed resource.
json str
a JSON-formatted list showing the status of the protection settings
output_text str
a tabular display showing the status of the protection settings
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.