getAppSecCustomDeny

Scopes: Security configuration; custom deny

Returns information about custom deny actions: the returned information is described in the CustomDeny members section of the Application Security API. Custom denies allow you to craft your own error messages or redirect pages to use when HTTP requests are denied.

Related API Endpoint: /appsec/v1/configs/{configId}/versions/{versionNumber}/security-policies/{policyId}/custom-rules

Output Options

The following options can be used to determine the information returned, and how that returned information is formatted:

  • json. JSON-formatted list of custom deny information.
  • output_text. Tabular report of the custom deny information.

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 customDenyList = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecCustomDeny.InvokeAsync(new Akamai.GetAppSecCustomDenyArgs
        {
            ConfigId = configuration.ConfigId,
        })));
        this.CustomDenyListOutput = customDenyList.Apply(customDenyList => customDenyList.OutputText);
        this.CustomDenyListJson = customDenyList.Apply(customDenyList => customDenyList.Json);
        var customDeny = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecCustomDeny.InvokeAsync(new Akamai.GetAppSecCustomDenyArgs
        {
            ConfigId = configuration.ConfigId,
            CustomDenyId = "deny_custom_64386",
        })));
        this.CustomDenyJson = customDeny.Apply(customDeny => customDeny.Json);
        this.CustomDenyOutput = customDeny.Apply(customDeny => customDeny.OutputText);
    }

    [Output("customDenyListOutput")]
    public Output<string> CustomDenyListOutput { get; set; }
    [Output("customDenyListJson")]
    public Output<string> CustomDenyListJson { get; set; }
    [Output("customDenyJson")]
    public Output<string> CustomDenyJson { get; set; }
    [Output("customDenyOutput")]
    public Output<string> CustomDenyOutput { 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 := "Documentation"
		configuration, err := akamai.LookupAppSecConfiguration(ctx, &GetAppSecConfigurationArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		customDenyList, err := akamai.LookupAppSecCustomDeny(ctx, &GetAppSecCustomDenyArgs{
			ConfigId: configuration.ConfigId,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("customDenyListOutput", customDenyList.OutputText)
		ctx.Export("customDenyListJson", customDenyList.Json)
		opt1 := "deny_custom_64386"
		customDeny, err := akamai.LookupAppSecCustomDeny(ctx, &GetAppSecCustomDenyArgs{
			ConfigId:     configuration.ConfigId,
			CustomDenyId: &opt1,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("customDenyJson", customDeny.Json)
		ctx.Export("customDenyOutput", customDeny.OutputText)
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name="Documentation")
custom_deny_list = akamai.get_app_sec_custom_deny(config_id=configuration.config_id)
pulumi.export("customDenyListOutput", custom_deny_list.output_text)
pulumi.export("customDenyListJson", custom_deny_list.json)
custom_deny = akamai.get_app_sec_custom_deny(config_id=configuration.config_id,
    custom_deny_id="deny_custom_64386")
pulumi.export("customDenyJson", custom_deny.json)
pulumi.export("customDenyOutput", custom_deny.output_text)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: "Documentation",
});
const customDenyList = configuration.then(configuration => akamai.getAppSecCustomDeny({
    configId: configuration.configId,
}));
export const customDenyListOutput = customDenyList.then(customDenyList => customDenyList.outputText);
export const customDenyListJson = customDenyList.then(customDenyList => customDenyList.json);
const customDeny = configuration.then(configuration => akamai.getAppSecCustomDeny({
    configId: configuration.configId,
    customDenyId: "deny_custom_64386",
}));
export const customDenyJson = customDeny.then(customDeny => customDeny.json);
export const customDenyOutput = customDeny.then(customDeny => customDeny.outputText);

Using getAppSecCustomDeny

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 getAppSecCustomDeny(args: GetAppSecCustomDenyArgs, opts?: InvokeOptions): Promise<GetAppSecCustomDenyResult>
function getAppSecCustomDenyOutput(args: GetAppSecCustomDenyOutputArgs, opts?: InvokeOptions): Output<GetAppSecCustomDenyResult>
def get_app_sec_custom_deny(config_id: Optional[int] = None,
                            custom_deny_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetAppSecCustomDenyResult
def get_app_sec_custom_deny_output(config_id: Optional[pulumi.Input[int]] = None,
                            custom_deny_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetAppSecCustomDenyResult]
func LookupAppSecCustomDeny(ctx *Context, args *LookupAppSecCustomDenyArgs, opts ...InvokeOption) (*LookupAppSecCustomDenyResult, error)
func LookupAppSecCustomDenyOutput(ctx *Context, args *LookupAppSecCustomDenyOutputArgs, opts ...InvokeOption) LookupAppSecCustomDenyResultOutput

> Note: This function is named LookupAppSecCustomDeny in the Go SDK.

public static class GetAppSecCustomDeny 
{
    public static Task<GetAppSecCustomDenyResult> InvokeAsync(GetAppSecCustomDenyArgs args, InvokeOptions? opts = null)
    public static Output<GetAppSecCustomDenyResult> Invoke(GetAppSecCustomDenyInvokeArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

ConfigId int
. Unique identifier of the security configuration associated with the custom denies.
CustomDenyId string
. Unique identifier of the custom deny you want to return information for. If not included. information is returned for all your custom denies.
ConfigId int
. Unique identifier of the security configuration associated with the custom denies.
CustomDenyId string
. Unique identifier of the custom deny you want to return information for. If not included. information is returned for all your custom denies.
configId number
. Unique identifier of the security configuration associated with the custom denies.
customDenyId string
. Unique identifier of the custom deny you want to return information for. If not included. information is returned for all your custom denies.
config_id int
. Unique identifier of the security configuration associated with the custom denies.
custom_deny_id str
. Unique identifier of the custom deny you want to return information for. If not included. information is returned for all your custom denies.

getAppSecCustomDeny Result

The following output properties are available:

ConfigId int
Id string
The provider-assigned unique ID for this managed resource.
Json string
OutputText string
CustomDenyId string
ConfigId int
Id string
The provider-assigned unique ID for this managed resource.
Json string
OutputText string
CustomDenyId string
configId number
id string
The provider-assigned unique ID for this managed resource.
json string
outputText string
customDenyId string
config_id int
id str
The provider-assigned unique ID for this managed resource.
json str
output_text str
custom_deny_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.