getAppSecRatePolicies

Use the akamai.getAppSecRatePolicies data source to retrieve the rate policies for a specific security configuration, or a single rate policy.

Example Usage

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 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 = @var.Rate_policy_id,
        })));
        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 := _var.Security_configuration
		configuration, err := akamai.LookupAppSecConfiguration(ctx, &akamai.LookupAppSecConfigurationArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		ratePolicies, err := akamai.GetAppSecRatePolicies(ctx, &akamai.GetAppSecRatePoliciesArgs{
			ConfigId: configuration.ConfigId,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("ratePoliciesOutput", ratePolicies.OutputText)
		ctx.Export("ratePoliciesJson", ratePolicies.Json)
		opt1 := _var.Rate_policy_id
		ratePolicy, err := akamai.GetAppSecRatePolicies(ctx, &akamai.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=var["security_configuration"])
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=var["rate_policy_id"])
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: _var.security_configuration,
});
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: _var.rate_policy_id,
}));
export const ratePolicyJson = ratePolicy.then(ratePolicy => ratePolicy.json);
export const ratePolicyOutput = ratePolicy.then(ratePolicy => ratePolicy.outputText);

Using getAppSecRatePolicies

function getAppSecRatePolicies(args: GetAppSecRatePoliciesArgs, opts?: InvokeOptions): Promise<GetAppSecRatePoliciesResult>
def get_app_sec_rate_policies(config_id: Optional[int] = None,
                              rate_policy_id: Optional[int] = None,
                              opts: Optional[InvokeOptions] = None) -> GetAppSecRatePoliciesResult
func GetAppSecRatePolicies(ctx *Context, args *GetAppSecRatePoliciesArgs, opts ...InvokeOption) (*GetAppSecRatePoliciesResult, error)

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

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

The following arguments are supported:

ConfigId int
The ID of the security configuration to use.
RatePolicyId int
The ID of the rate policy to use. If this parameter is not supplied, information about all rate policies will be returned.
ConfigId int
The ID of the security configuration to use.
RatePolicyId int
The ID of the rate policy to use. If this parameter is not supplied, information about all rate policies will be returned.
configId number
The ID of the security configuration to use.
ratePolicyId number
The ID of the rate policy to use. If this parameter is not supplied, information about all rate policies will be returned.
config_id int
The ID of the security configuration to use.
rate_policy_id int
The ID of the rate policy to use. If this parameter is not supplied, information about all rate policies will be returned.

getAppSecRatePolicies Result

The following output properties are available:

ConfigId int
Id string
The provider-assigned unique ID for this managed resource.
Json string
A JSON-formatted list of the rate policy information.
OutputText string
A tabular display showing the ID and name of all rate policies associated with the specified security configuration.
RatePolicyId int
ConfigId int
Id string
The provider-assigned unique ID for this managed resource.
Json string
A JSON-formatted list of the rate policy information.
OutputText string
A tabular display showing the ID and name of all rate policies associated with the specified security configuration.
RatePolicyId int
configId number
id string
The provider-assigned unique ID for this managed resource.
json string
A JSON-formatted list of the rate policy information.
outputText string
A tabular display showing the ID and name of all rate policies associated with the specified security configuration.
ratePolicyId number
config_id int
id str
The provider-assigned unique ID for this managed resource.
json str
A JSON-formatted list of the rate policy information.
output_text str
A tabular display showing the ID and name of all rate policies associated with the specified security configuration.
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.