Akamai
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 {
configuration, err := akamai.LookupAppSecConfiguration(ctx, &GetAppSecConfigurationArgs{
Name: pulumi.StringRef("Documentation"),
}, 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)
customDeny, err := akamai.LookupAppSecCustomDeny(ctx, &GetAppSecCustomDenyArgs{
ConfigId: configuration.ConfigId,
CustomDenyId: pulumi.StringRef("deny_custom_64386"),
}, nil)
if err != nil {
return err
}
ctx.Export("customDenyJson", customDeny.Json)
ctx.Export("customDenyOutput", customDeny.OutputText)
return nil
})
}
Coming soon!
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);
Coming soon!
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)
}
public static CompletableFuture<GetAppSecCustomDenyResult> getAppSecCustomDeny(GetAppSecCustomDenyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
Function: akamai:index/getAppSecCustomDeny:getAppSecCustomDeny
Arguments:
# Arguments dictionary
The following arguments are supported:
- Config
Id int . Unique identifier of the security configuration associated with the custom denies.
- Custom
Deny stringId . 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 stringId . 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 Integer . Unique identifier of the security configuration associated with the custom denies.
- custom
Deny StringId . 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 number . Unique identifier of the security configuration associated with the custom denies.
- custom
Deny stringId . 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_ strid . 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 Number . Unique identifier of the security configuration associated with the custom denies.
- custom
Deny StringId . 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:
- Config
Id int - Id string
The provider-assigned unique ID for this managed resource.
- Json string
- Output
Text string - Custom
Deny stringId
- Config
Id int - Id string
The provider-assigned unique ID for this managed resource.
- Json string
- Output
Text string - Custom
Deny stringId
- config
Id Integer - id String
The provider-assigned unique ID for this managed resource.
- json String
- output
Text String - custom
Deny StringId
- config
Id number - id string
The provider-assigned unique ID for this managed resource.
- json string
- output
Text string - custom
Deny stringId
- config_
id int - id str
The provider-assigned unique ID for this managed resource.
- json str
- output_
text str - custom_
deny_ strid
- config
Id Number - id String
The provider-assigned unique ID for this managed resource.
- json String
- output
Text String - custom
Deny StringId
Package Details
- Repository
- https://github.com/pulumi/pulumi-akamai
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
akamai
Terraform Provider.