getAppSecRatePolicies

Scopes: Security configuration; rate policy

Returns information about your rate policies. Rate polices help you monitor and moderate the number and rate of all the requests you receive; in turn, this helps you prevent your website from being overwhelmed by a dramatic, and unexpected, surge in traffic.

Related API Endpoint: /appsec/v1/configs/{configId}/versions/{versionNumber}/rate-policies

Output Options

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

  • output_text. Tabular report showing the ID and name of the rate policies.
  • json. JSON-formatted list of the rate policy 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 ratePolicies = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecRatePolicies.InvokeAsync(new Akamai.GetAppSecRatePoliciesArgs
        {
            ConfigId = configuration.ConfigId,
        })));
        this.RatePoliciesOutput = ratePolicies.Apply(ratePolicies => ratePolicies.OutputText);
        this.RatePoliciesJson = ratePolicies.Apply(ratePolicies => ratePolicies.Json);
        var ratePolicy = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecRatePolicies.InvokeAsync(new Akamai.GetAppSecRatePoliciesArgs
        {
            ConfigId = configuration.ConfigId,
            RatePolicyId = 122149,
        })));
        this.RatePolicyJson = ratePolicy.Apply(ratePolicy => ratePolicy.Json);
        this.RatePolicyOutput = ratePolicy.Apply(ratePolicy => ratePolicy.OutputText);
    }

    [Output("ratePoliciesOutput")]
    public Output<string> RatePoliciesOutput { get; set; }
    [Output("ratePoliciesJson")]
    public Output<string> RatePoliciesJson { get; set; }
    [Output("ratePolicyJson")]
    public Output<string> RatePolicyJson { get; set; }
    [Output("ratePolicyOutput")]
    public Output<string> RatePolicyOutput { 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
		}
		ratePolicies, err := akamai.GetAppSecRatePolicies(ctx, &GetAppSecRatePoliciesArgs{
			ConfigId: configuration.ConfigId,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("ratePoliciesOutput", ratePolicies.OutputText)
		ctx.Export("ratePoliciesJson", ratePolicies.Json)
		opt1 := 122149
		ratePolicy, err := akamai.GetAppSecRatePolicies(ctx, &GetAppSecRatePoliciesArgs{
			ConfigId:     configuration.ConfigId,
			RatePolicyId: &opt1,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("ratePolicyJson", ratePolicy.Json)
		ctx.Export("ratePolicyOutput", ratePolicy.OutputText)
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name="Documentation")
rate_policies = akamai.get_app_sec_rate_policies(config_id=configuration.config_id)
pulumi.export("ratePoliciesOutput", rate_policies.output_text)
pulumi.export("ratePoliciesJson", rate_policies.json)
rate_policy = akamai.get_app_sec_rate_policies(config_id=configuration.config_id,
    rate_policy_id=122149)
pulumi.export("ratePolicyJson", rate_policy.json)
pulumi.export("ratePolicyOutput", rate_policy.output_text)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: "Documentation",
});
const ratePolicies = configuration.then(configuration => akamai.getAppSecRatePolicies({
    configId: configuration.configId,
}));
export const ratePoliciesOutput = ratePolicies.then(ratePolicies => ratePolicies.outputText);
export const ratePoliciesJson = ratePolicies.then(ratePolicies => ratePolicies.json);
const ratePolicy = configuration.then(configuration => akamai.getAppSecRatePolicies({
    configId: configuration.configId,
    ratePolicyId: "122149",
}));
export const ratePolicyJson = ratePolicy.then(ratePolicy => ratePolicy.json);
export const ratePolicyOutput = ratePolicy.then(ratePolicy => ratePolicy.outputText);

Using getAppSecRatePolicies

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 getAppSecRatePolicies(args: GetAppSecRatePoliciesArgs, opts?: InvokeOptions): Promise<GetAppSecRatePoliciesResult>
function getAppSecRatePoliciesOutput(args: GetAppSecRatePoliciesOutputArgs, opts?: InvokeOptions): Output<GetAppSecRatePoliciesResult>
def get_app_sec_rate_policies(config_id: Optional[int] = None,
                              rate_policy_id: Optional[int] = None,
                              opts: Optional[InvokeOptions] = None) -> GetAppSecRatePoliciesResult
def get_app_sec_rate_policies_output(config_id: Optional[pulumi.Input[int]] = None,
                              rate_policy_id: Optional[pulumi.Input[int]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetAppSecRatePoliciesResult]
func GetAppSecRatePolicies(ctx *Context, args *GetAppSecRatePoliciesArgs, opts ...InvokeOption) (*GetAppSecRatePoliciesResult, error)
func GetAppSecRatePoliciesOutput(ctx *Context, args *GetAppSecRatePoliciesOutputArgs, opts ...InvokeOption) GetAppSecRatePoliciesResultOutput

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

public static class GetAppSecRatePolicies 
{
    public static Task<GetAppSecRatePoliciesResult> InvokeAsync(GetAppSecRatePoliciesArgs args, InvokeOptions? opts = null)
    public static Output<GetAppSecRatePoliciesResult> Invoke(GetAppSecRatePoliciesInvokeArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

ConfigId int
. Unique identifier of the security configuration associated with the rate policies.
RatePolicyId int
. Unique identifier of the rate policy you want to return information for. If not included, information is returned for all your rate policies.
ConfigId int
. Unique identifier of the security configuration associated with the rate policies.
RatePolicyId int
. Unique identifier of the rate policy you want to return information for. If not included, information is returned for all your rate policies.
configId number
. Unique identifier of the security configuration associated with the rate policies.
ratePolicyId number
. Unique identifier of the rate policy you want to return information for. If not included, information is returned for all your rate policies.
config_id int
. Unique identifier of the security configuration associated with the rate policies.
rate_policy_id int
. Unique identifier of the rate policy you want to return information for. If not included, information is returned for all your rate policies.

getAppSecRatePolicies Result

The following output properties are available:

ConfigId int
Id string
The provider-assigned unique ID for this managed resource.
Json string
OutputText string
RatePolicyId int
ConfigId int
Id string
The provider-assigned unique ID for this managed resource.
Json string
OutputText string
RatePolicyId int
configId number
id string
The provider-assigned unique ID for this managed resource.
json string
outputText string
ratePolicyId number
config_id int
id str
The provider-assigned unique ID for this managed resource.
json str
output_text str
rate_policy_id int

Package Details

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