getAppSecCustomRules

Use the akamai.getAppSecCustomRules data source to retrieve a list of the custom rules defined for a security configuration.

Example Usage

using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var configuration = Output.Create(Akamai.GetAppSecConfiguration.InvokeAsync(new Akamai.GetAppSecConfigurationArgs
        {
            Name = "Akamai Tools",
        }));
        var customRules = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecCustomRules.InvokeAsync(new Akamai.GetAppSecCustomRulesArgs
        {
            ConfigId = configuration.ConfigId,
        })));
        this.CustomRulesList = customRules.Apply(customRules => customRules.OutputText);
    }

    [Output("customRulesList")]
    public Output<string> CustomRulesList { 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 := "Akamai Tools"
		configuration, err := akamai.GetAppSecConfiguration(ctx, &akamai.GetAppSecConfigurationArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		customRules, err := akamai.GetAppSecCustomRules(ctx, &akamai.GetAppSecCustomRulesArgs{
			ConfigId: configuration.ConfigId,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("customRulesList", customRules.OutputText)
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name="Akamai Tools")
custom_rules = akamai.get_app_sec_custom_rules(config_id=configuration.config_id)
pulumi.export("customRulesList", custom_rules.output_text)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: "Akamai Tools",
});
const customRules = configuration.then(configuration => akamai.getAppSecCustomRules({
    configId: configuration.configId,
}));
export const customRulesList = customRules.then(customRules => customRules.outputText);

Using getAppSecCustomRules

function getAppSecCustomRules(args: GetAppSecCustomRulesArgs, opts?: InvokeOptions): Promise<GetAppSecCustomRulesResult>
def get_app_sec_custom_rules(config_id: Optional[int] = None,
                             opts: Optional[InvokeOptions] = None) -> GetAppSecCustomRulesResult
func GetAppSecCustomRules(ctx *Context, args *GetAppSecCustomRulesArgs, opts ...InvokeOption) (*GetAppSecCustomRulesResult, error)

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

public static class GetAppSecCustomRules {
    public static Task<GetAppSecCustomRulesResult> InvokeAsync(GetAppSecCustomRulesArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

ConfigId int
The ID of the security configuration to use.
ConfigId int
The ID of the security configuration to use.
configId number
The ID of the security configuration to use.
config_id int
The ID of the security configuration to use.

getAppSecCustomRules Result

The following output properties are available:

ConfigId int
Id string
The provider-assigned unique ID for this managed resource.
OutputText string
A tabular display showing the ID and name of the custom rules defined for the security configuration.
ConfigId int
Id string
The provider-assigned unique ID for this managed resource.
OutputText string
A tabular display showing the ID and name of the custom rules defined for the security configuration.
configId number
id string
The provider-assigned unique ID for this managed resource.
outputText string
A tabular display showing the ID and name of the custom rules defined for the security configuration.
config_id int
id str
The provider-assigned unique ID for this managed resource.
output_text str
A tabular display showing the ID and name of the custom rules defined for the security configuration.

Package Details

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