AppSecCustomDeny

The resource_akamai_appsec_custom_deny resource allows you to create a new custom deny action for a specific configuration.

Example Usage

using System.IO;
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 customDeny = new Akamai.AppSecCustomDeny("customDeny", new Akamai.AppSecCustomDenyArgs
        {
            ConfigId = configuration.Apply(configuration => configuration.ConfigId),
            CustomDeny = File.ReadAllText($"{path.Module}/custom_deny.json"),
        });
        this.CustomDenyId = customDeny.CustomDenyId;
    }

    [Output("customDenyId")]
    public Output<string> CustomDenyId { get; set; }
}

Coming soon!

import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name=var["security_configuration"])
custom_deny = akamai.AppSecCustomDeny("customDeny",
    config_id=configuration.config_id,
    custom_deny=(lambda path: open(path).read())(f"{path['module']}/custom_deny.json"))
pulumi.export("customDenyId", custom_deny.custom_deny_id)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";
import * from "fs";

const configuration = akamai.getAppSecConfiguration({
    name: _var.security_configuration,
});
const customDeny = new akamai.AppSecCustomDeny("customDeny", {
    configId: configuration.then(configuration => configuration.configId),
    customDeny: fs.readFileSync(`${path.module}/custom_deny.json`),
});
export const customDenyId = customDeny.customDenyId;

Create a AppSecCustomDeny Resource

new AppSecCustomDeny(name: string, args: AppSecCustomDenyArgs, opts?: CustomResourceOptions);
@overload
def AppSecCustomDeny(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     config_id: Optional[int] = None,
                     custom_deny: Optional[str] = None)
@overload
def AppSecCustomDeny(resource_name: str,
                     args: AppSecCustomDenyArgs,
                     opts: Optional[ResourceOptions] = None)
func NewAppSecCustomDeny(ctx *Context, name string, args AppSecCustomDenyArgs, opts ...ResourceOption) (*AppSecCustomDeny, error)
public AppSecCustomDeny(string name, AppSecCustomDenyArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args AppSecCustomDenyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args AppSecCustomDenyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args AppSecCustomDenyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AppSecCustomDenyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

AppSecCustomDeny Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The AppSecCustomDeny resource accepts the following input properties:

ConfigId int
The ID of the security configuration to use.
CustomDeny string
The JSON-formatted definition of the custom deny action (format).
ConfigId int
The ID of the security configuration to use.
CustomDeny string
The JSON-formatted definition of the custom deny action (format).
configId number
The ID of the security configuration to use.
customDeny string
The JSON-formatted definition of the custom deny action (format).
config_id int
The ID of the security configuration to use.
custom_deny str
The JSON-formatted definition of the custom deny action (format).

Outputs

All input properties are implicitly available as output properties. Additionally, the AppSecCustomDeny resource produces the following output properties:

CustomDenyId string
custom_deny_id
Id string
The provider-assigned unique ID for this managed resource.
CustomDenyId string
custom_deny_id
Id string
The provider-assigned unique ID for this managed resource.
customDenyId string
custom_deny_id
id string
The provider-assigned unique ID for this managed resource.
custom_deny_id str
custom_deny_id
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing AppSecCustomDeny Resource

Get an existing AppSecCustomDeny resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: AppSecCustomDenyState, opts?: CustomResourceOptions): AppSecCustomDeny
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config_id: Optional[int] = None,
        custom_deny: Optional[str] = None,
        custom_deny_id: Optional[str] = None) -> AppSecCustomDeny
func GetAppSecCustomDeny(ctx *Context, name string, id IDInput, state *AppSecCustomDenyState, opts ...ResourceOption) (*AppSecCustomDeny, error)
public static AppSecCustomDeny Get(string name, Input<string> id, AppSecCustomDenyState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

ConfigId int
The ID of the security configuration to use.
CustomDeny string
The JSON-formatted definition of the custom deny action (format).
CustomDenyId string
custom_deny_id
ConfigId int
The ID of the security configuration to use.
CustomDeny string
The JSON-formatted definition of the custom deny action (format).
CustomDenyId string
custom_deny_id
configId number
The ID of the security configuration to use.
customDeny string
The JSON-formatted definition of the custom deny action (format).
customDenyId string
custom_deny_id
config_id int
The ID of the security configuration to use.
custom_deny str
The JSON-formatted definition of the custom deny action (format).
custom_deny_id str
custom_deny_id

Package Details

Repository
https://github.com/pulumi/pulumi-akamai
License
Apache-2.0
Notes
This Pulumi package is based on the akamai Terraform Provider.