AppSecRatePolicyAction

The resource_akamai_appsec_rate_policy_action resource allows you to create, modify or delete the actions in a rate policy.

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 appsecRatePolicy = new Akamai.AppSecRatePolicy("appsecRatePolicy", new Akamai.AppSecRatePolicyArgs
        {
            ConfigId = configuration.Apply(configuration => configuration.ConfigId),
            RatePolicy = File.ReadAllText($"{path.Module}/rate_policy.json"),
        });
        var appsecRatePolicyAction = new Akamai.AppSecRatePolicyAction("appsecRatePolicyAction", new Akamai.AppSecRatePolicyActionArgs
        {
            ConfigId = configuration.Apply(configuration => configuration.ConfigId),
            SecurityPolicyId = @var.Security_policy_id,
            RatePolicyId = appsecRatePolicy.RatePolicyId,
            Ipv4Action = "deny",
            Ipv6Action = "deny",
        });
    }

}

Coming soon!

import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name=var["security_configuration"])
appsec_rate_policy = akamai.AppSecRatePolicy("appsecRatePolicy",
    config_id=configuration.config_id,
    rate_policy=(lambda path: open(path).read())(f"{path['module']}/rate_policy.json"))
appsec_rate_policy_action = akamai.AppSecRatePolicyAction("appsecRatePolicyAction",
    config_id=configuration.config_id,
    security_policy_id=var["security_policy_id"],
    rate_policy_id=appsec_rate_policy.rate_policy_id,
    ipv4_action="deny",
    ipv6_action="deny")
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";
import * from "fs";

const configuration = akamai.getAppSecConfiguration({
    name: _var.security_configuration,
});
const appsecRatePolicy = new akamai.AppSecRatePolicy("appsecRatePolicy", {
    configId: configuration.then(configuration => configuration.configId),
    ratePolicy: fs.readFileSync(`${path.module}/rate_policy.json`),
});
const appsecRatePolicyAction = new akamai.AppSecRatePolicyAction("appsecRatePolicyAction", {
    configId: configuration.then(configuration => configuration.configId),
    securityPolicyId: _var.security_policy_id,
    ratePolicyId: appsecRatePolicy.ratePolicyId,
    ipv4Action: "deny",
    ipv6Action: "deny",
});

Create a AppSecRatePolicyAction Resource

new AppSecRatePolicyAction(name: string, args: AppSecRatePolicyActionArgs, opts?: CustomResourceOptions);
@overload
def AppSecRatePolicyAction(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           config_id: Optional[int] = None,
                           ipv4_action: Optional[str] = None,
                           ipv6_action: Optional[str] = None,
                           rate_policy_id: Optional[int] = None,
                           security_policy_id: Optional[str] = None)
@overload
def AppSecRatePolicyAction(resource_name: str,
                           args: AppSecRatePolicyActionArgs,
                           opts: Optional[ResourceOptions] = None)
func NewAppSecRatePolicyAction(ctx *Context, name string, args AppSecRatePolicyActionArgs, opts ...ResourceOption) (*AppSecRatePolicyAction, error)
public AppSecRatePolicyAction(string name, AppSecRatePolicyActionArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args AppSecRatePolicyActionArgs
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 AppSecRatePolicyActionArgs
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 AppSecRatePolicyActionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AppSecRatePolicyActionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

AppSecRatePolicyAction 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 AppSecRatePolicyAction resource accepts the following input properties:

ConfigId int
The ID of the security configuration to use.
Ipv4Action string
The ipv4 action to assign to this rate policy, either alert, deny, deny_custom_{custom_deny_id}, or none. If the action is none, the rate policy is inactive in the policy.
Ipv6Action string
The ipv6 action to assign to this rate policy, either alert, deny, deny_custom_{custom_deny_id}, or none. If the action is none, the rate policy is inactive in the policy.
RatePolicyId int
The ID of the rate policy to use.
SecurityPolicyId string
ConfigId int
The ID of the security configuration to use.
Ipv4Action string
The ipv4 action to assign to this rate policy, either alert, deny, deny_custom_{custom_deny_id}, or none. If the action is none, the rate policy is inactive in the policy.
Ipv6Action string
The ipv6 action to assign to this rate policy, either alert, deny, deny_custom_{custom_deny_id}, or none. If the action is none, the rate policy is inactive in the policy.
RatePolicyId int
The ID of the rate policy to use.
SecurityPolicyId string
configId number
The ID of the security configuration to use.
ipv4Action string
The ipv4 action to assign to this rate policy, either alert, deny, deny_custom_{custom_deny_id}, or none. If the action is none, the rate policy is inactive in the policy.
ipv6Action string
The ipv6 action to assign to this rate policy, either alert, deny, deny_custom_{custom_deny_id}, or none. If the action is none, the rate policy is inactive in the policy.
ratePolicyId number
The ID of the rate policy to use.
securityPolicyId string
config_id int
The ID of the security configuration to use.
ipv4_action str
The ipv4 action to assign to this rate policy, either alert, deny, deny_custom_{custom_deny_id}, or none. If the action is none, the rate policy is inactive in the policy.
ipv6_action str
The ipv6 action to assign to this rate policy, either alert, deny, deny_custom_{custom_deny_id}, or none. If the action is none, the rate policy is inactive in the policy.
rate_policy_id int
The ID of the rate policy to use.
security_policy_id str

Outputs

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

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

Look up an Existing AppSecRatePolicyAction Resource

Get an existing AppSecRatePolicyAction 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?: AppSecRatePolicyActionState, opts?: CustomResourceOptions): AppSecRatePolicyAction
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config_id: Optional[int] = None,
        ipv4_action: Optional[str] = None,
        ipv6_action: Optional[str] = None,
        rate_policy_id: Optional[int] = None,
        security_policy_id: Optional[str] = None) -> AppSecRatePolicyAction
func GetAppSecRatePolicyAction(ctx *Context, name string, id IDInput, state *AppSecRatePolicyActionState, opts ...ResourceOption) (*AppSecRatePolicyAction, error)
public static AppSecRatePolicyAction Get(string name, Input<string> id, AppSecRatePolicyActionState? 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.
Ipv4Action string
The ipv4 action to assign to this rate policy, either alert, deny, deny_custom_{custom_deny_id}, or none. If the action is none, the rate policy is inactive in the policy.
Ipv6Action string
The ipv6 action to assign to this rate policy, either alert, deny, deny_custom_{custom_deny_id}, or none. If the action is none, the rate policy is inactive in the policy.
RatePolicyId int
The ID of the rate policy to use.
SecurityPolicyId string
ConfigId int
The ID of the security configuration to use.
Ipv4Action string
The ipv4 action to assign to this rate policy, either alert, deny, deny_custom_{custom_deny_id}, or none. If the action is none, the rate policy is inactive in the policy.
Ipv6Action string
The ipv6 action to assign to this rate policy, either alert, deny, deny_custom_{custom_deny_id}, or none. If the action is none, the rate policy is inactive in the policy.
RatePolicyId int
The ID of the rate policy to use.
SecurityPolicyId string
configId number
The ID of the security configuration to use.
ipv4Action string
The ipv4 action to assign to this rate policy, either alert, deny, deny_custom_{custom_deny_id}, or none. If the action is none, the rate policy is inactive in the policy.
ipv6Action string
The ipv6 action to assign to this rate policy, either alert, deny, deny_custom_{custom_deny_id}, or none. If the action is none, the rate policy is inactive in the policy.
ratePolicyId number
The ID of the rate policy to use.
securityPolicyId string
config_id int
The ID of the security configuration to use.
ipv4_action str
The ipv4 action to assign to this rate policy, either alert, deny, deny_custom_{custom_deny_id}, or none. If the action is none, the rate policy is inactive in the policy.
ipv6_action str
The ipv6 action to assign to this rate policy, either alert, deny, deny_custom_{custom_deny_id}, or none. If the action is none, the rate policy is inactive in the policy.
rate_policy_id int
The ID of the rate policy to use.
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.