Akamai

Pulumi Official
Package maintained by Pulumi
v2.9.0 published on Wednesday, Apr 6, 2022 by Pulumi

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_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_botman_controls. Returns true if Bot Manager 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_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

using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var configuration = Output.Create(Akamai.GetAppSecConfiguration.InvokeAsync(new Akamai.GetAppSecConfigurationArgs
        {
            Name = "Documentation",
        }));
        var protections = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecSecurityPolicyProtections.InvokeAsync(new Akamai.GetAppSecSecurityPolicyProtectionsArgs
        {
            ConfigId = configuration.ConfigId,
            SecurityPolicyId = "gms1_134637",
        })));
        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 {
		configuration, err := akamai.LookupAppSecConfiguration(ctx, &GetAppSecConfigurationArgs{
			Name: pulumi.StringRef("Documentation"),
		}, nil)
		if err != nil {
			return err
		}
		protections, err := akamai.GetAppSecSecurityPolicyProtections(ctx, &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("protectionsApplyNetworkLayerControls", protections.ApplyNetworkLayerControls)
		ctx.Export("protectionsApplyRateControls", protections.ApplyRateControls)
		ctx.Export("protectionsApplyReputationControls", protections.ApplyReputationControls)
		ctx.Export("protectionsApplySlowPostControls", protections.ApplySlowPostControls)
		return nil
	})
}

Coming soon!

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("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 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);

Coming soon!

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:

ConfigId int

. Unique identifier of the security configuration associated with the security policy protections.

SecurityPolicyId string

. Unique identifier of the security policy you want to return protections information for.

ConfigId int

. Unique identifier of the security configuration associated with the security policy protections.

SecurityPolicyId string

. Unique identifier of the security policy you want to return protections information for.

configId Integer

. Unique identifier of the security configuration associated with the security policy protections.

securityPolicyId String

. Unique identifier of the security policy you want to return protections information for.

configId number

. Unique identifier of the security configuration associated with the security policy protections.

securityPolicyId string

. 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_id str

. Unique identifier of the security policy you want to return protections information for.

configId Number

. Unique identifier of the security configuration associated with the security policy protections.

securityPolicyId String

. Unique identifier of the security policy you want to return protections information for.

getAppSecSecurityPolicyProtections Result

The following output properties are available:

applyApiConstraints Boolean
applyApplicationLayerControls Boolean
applyBotmanControls Boolean
applyNetworkLayerControls Boolean
applyRateControls Boolean
applyReputationControls Boolean
applySlowPostControls Boolean
configId Integer
id String

The provider-assigned unique ID for this managed resource.

json String
outputText String
securityPolicyId String
applyApiConstraints boolean
applyApplicationLayerControls boolean
applyBotmanControls boolean
applyNetworkLayerControls boolean
applyRateControls boolean
applyReputationControls boolean
applySlowPostControls boolean
configId number
id string

The provider-assigned unique ID for this managed resource.

json string
outputText string
securityPolicyId string
applyApiConstraints Boolean
applyApplicationLayerControls Boolean
applyBotmanControls Boolean
applyNetworkLayerControls Boolean
applyRateControls Boolean
applyReputationControls Boolean
applySlowPostControls Boolean
configId Number
id String

The provider-assigned unique ID for this managed resource.

json String
outputText String
securityPolicyId String

Package Details

Repository
https://github.com/pulumi/pulumi-akamai
License
Apache-2.0
Notes

This Pulumi package is based on the akamai Terraform Provider.