AppSecRatePolicy

The resource_akamai_appsec_rate_policy resource allows you to create, modify or delete rate policies for a specific security 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 ratePolicy = new Akamai.AppSecRatePolicy("ratePolicy", new Akamai.AppSecRatePolicyArgs
        {
            ConfigId = configuration.Apply(configuration => configuration.ConfigId),
            RatePolicy = File.ReadAllText($"{path.Module}/rate_policy.json"),
        });
        this.RatePolicyId = ratePolicy.RatePolicyId;
    }

    [Output("ratePolicyId")]
    public Output<string> RatePolicyId { get; set; }
}

Coming soon!

import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name=var["security_configuration"])
rate_policy = akamai.AppSecRatePolicy("ratePolicy",
    config_id=configuration.config_id,
    rate_policy=(lambda path: open(path).read())(f"{path['module']}/rate_policy.json"))
pulumi.export("ratePolicyId", rate_policy.rate_policy_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 ratePolicy = new akamai.AppSecRatePolicy("ratePolicy", {
    configId: configuration.then(configuration => configuration.configId),
    ratePolicy: fs.readFileSync(`${path.module}/rate_policy.json`),
});
export const ratePolicyId = ratePolicy.ratePolicyId;

Create a AppSecRatePolicy Resource

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

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

ConfigId int
The ID of the security configuration to use.
RatePolicy string
The name of a file containing a JSON-formatted rate policy definition (format).
ConfigId int
The ID of the security configuration to use.
RatePolicy string
The name of a file containing a JSON-formatted rate policy definition (format).
configId number
The ID of the security configuration to use.
ratePolicy string
The name of a file containing a JSON-formatted rate policy definition (format).
config_id int
The ID of the security configuration to use.
rate_policy str
The name of a file containing a JSON-formatted rate policy definition (format).

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
RatePolicyId int
The ID of an existing rate policy to be modified.
Id string
The provider-assigned unique ID for this managed resource.
RatePolicyId int
The ID of an existing rate policy to be modified.
id string
The provider-assigned unique ID for this managed resource.
ratePolicyId number
The ID of an existing rate policy to be modified.
id str
The provider-assigned unique ID for this managed resource.
rate_policy_id int
The ID of an existing rate policy to be modified.

Look up an Existing AppSecRatePolicy Resource

Get an existing AppSecRatePolicy 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?: AppSecRatePolicyState, opts?: CustomResourceOptions): AppSecRatePolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config_id: Optional[int] = None,
        rate_policy: Optional[str] = None,
        rate_policy_id: Optional[int] = None) -> AppSecRatePolicy
func GetAppSecRatePolicy(ctx *Context, name string, id IDInput, state *AppSecRatePolicyState, opts ...ResourceOption) (*AppSecRatePolicy, error)
public static AppSecRatePolicy Get(string name, Input<string> id, AppSecRatePolicyState? 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.
RatePolicy string
The name of a file containing a JSON-formatted rate policy definition (format).
RatePolicyId int
The ID of an existing rate policy to be modified.
ConfigId int
The ID of the security configuration to use.
RatePolicy string
The name of a file containing a JSON-formatted rate policy definition (format).
RatePolicyId int
The ID of an existing rate policy to be modified.
configId number
The ID of the security configuration to use.
ratePolicy string
The name of a file containing a JSON-formatted rate policy definition (format).
ratePolicyId number
The ID of an existing rate policy to be modified.
config_id int
The ID of the security configuration to use.
rate_policy str
The name of a file containing a JSON-formatted rate policy definition (format).
rate_policy_id int
The ID of an existing rate policy to be modified.

Package Details

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