getAppSecSecurityPolicy

Use the akamai.AppSecSecurityPolicy data source to retrieve information about the security policies associated with a specific security configuration, or about a specific security 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 = "Akamai Tools",
        }));
        var securityPolicies = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecSecurityPolicy.InvokeAsync(new Akamai.GetAppSecSecurityPolicyArgs
        {
            ConfigId = configuration.ConfigId,
        })));
        this.SecurityPoliciesList = securityPolicies.Apply(securityPolicies => securityPolicies.SecurityPolicyIdLists);
        this.SecurityPoliciesText = securityPolicies.Apply(securityPolicies => securityPolicies.OutputText);
        var specificSecurityPolicy = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecSecurityPolicy.InvokeAsync(new Akamai.GetAppSecSecurityPolicyArgs
        {
            ConfigId = configuration.ConfigId,
            SecurityPolicyName = "APIs",
        })));
        this.SpecificSecurityPolicyId = specificSecurityPolicy.Apply(specificSecurityPolicy => specificSecurityPolicy.SecurityPolicyId);
    }

    [Output("securityPoliciesList")]
    public Output<string> SecurityPoliciesList { get; set; }
    [Output("securityPoliciesText")]
    public Output<string> SecurityPoliciesText { get; set; }
    [Output("specificSecurityPolicyId")]
    public Output<string> SpecificSecurityPolicyId { 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.LookupAppSecConfiguration(ctx, &GetAppSecConfigurationArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		securityPolicies, err := akamai.LookupAppSecSecurityPolicy(ctx, &GetAppSecSecurityPolicyArgs{
			ConfigId: configuration.ConfigId,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("securityPoliciesList", securityPolicies.SecurityPolicyIdLists)
		ctx.Export("securityPoliciesText", securityPolicies.OutputText)
		opt1 := "APIs"
		specificSecurityPolicy, err := akamai.LookupAppSecSecurityPolicy(ctx, &GetAppSecSecurityPolicyArgs{
			ConfigId:           configuration.ConfigId,
			SecurityPolicyName: &opt1,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("specificSecurityPolicyId", specificSecurityPolicy.SecurityPolicyId)
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name="Akamai Tools")
security_policies = akamai.get_app_sec_security_policy(config_id=configuration.config_id)
pulumi.export("securityPoliciesList", security_policies.security_policy_id_lists)
pulumi.export("securityPoliciesText", security_policies.output_text)
specific_security_policy = akamai.get_app_sec_security_policy(config_id=configuration.config_id,
    security_policy_name="APIs")
pulumi.export("specificSecurityPolicyId", specific_security_policy.security_policy_id)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: "Akamai Tools",
});
const securityPolicies = configuration.then(configuration => akamai.getAppSecSecurityPolicy({
    configId: configuration.configId,
}));
export const securityPoliciesList = securityPolicies.then(securityPolicies => securityPolicies.securityPolicyIdLists);
export const securityPoliciesText = securityPolicies.then(securityPolicies => securityPolicies.outputText);
const specificSecurityPolicy = configuration.then(configuration => akamai.getAppSecSecurityPolicy({
    configId: configuration.configId,
    securityPolicyName: "APIs",
}));
export const specificSecurityPolicyId = specificSecurityPolicy.then(specificSecurityPolicy => specificSecurityPolicy.securityPolicyId);

Using getAppSecSecurityPolicy

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 getAppSecSecurityPolicy(args: GetAppSecSecurityPolicyArgs, opts?: InvokeOptions): Promise<GetAppSecSecurityPolicyResult>
function getAppSecSecurityPolicyOutput(args: GetAppSecSecurityPolicyOutputArgs, opts?: InvokeOptions): Output<GetAppSecSecurityPolicyResult>
def get_app_sec_security_policy(config_id: Optional[int] = None,
                                security_policy_name: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetAppSecSecurityPolicyResult
def get_app_sec_security_policy_output(config_id: Optional[pulumi.Input[int]] = None,
                                security_policy_name: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetAppSecSecurityPolicyResult]
func LookupAppSecSecurityPolicy(ctx *Context, args *LookupAppSecSecurityPolicyArgs, opts ...InvokeOption) (*LookupAppSecSecurityPolicyResult, error)
func LookupAppSecSecurityPolicyOutput(ctx *Context, args *LookupAppSecSecurityPolicyOutputArgs, opts ...InvokeOption) LookupAppSecSecurityPolicyResultOutput

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

public static class GetAppSecSecurityPolicy 
{
    public static Task<GetAppSecSecurityPolicyResult> InvokeAsync(GetAppSecSecurityPolicyArgs args, InvokeOptions? opts = null)
    public static Output<GetAppSecSecurityPolicyResult> Invoke(GetAppSecSecurityPolicyInvokeArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

ConfigId int
The ID of the security configuration to use.
SecurityPolicyName string
The name of the security policy to use. If not supplied, information about all security policies is returned.
ConfigId int
The ID of the security configuration to use.
SecurityPolicyName string
The name of the security policy to use. If not supplied, information about all security policies is returned.
configId number
The ID of the security configuration to use.
securityPolicyName string
The name of the security policy to use. If not supplied, information about all security policies is returned.
config_id int
The ID of the security configuration to use.
security_policy_name str
The name of the security policy to use. If not supplied, information about all security policies is returned.

getAppSecSecurityPolicy 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 all security policies.
SecurityPolicyId string
The ID of the security policy. Included only if security_policy_name was specified.
SecurityPolicyIdLists List<string>
A list of the IDs of all security policies.
SecurityPolicyName string
ConfigId int
Id string
The provider-assigned unique ID for this managed resource.
OutputText string
A tabular display showing the ID and name of all security policies.
SecurityPolicyId string
The ID of the security policy. Included only if security_policy_name was specified.
SecurityPolicyIdLists []string
A list of the IDs of all security policies.
SecurityPolicyName string
configId number
id string
The provider-assigned unique ID for this managed resource.
outputText string
A tabular display showing the ID and name of all security policies.
securityPolicyId string
The ID of the security policy. Included only if security_policy_name was specified.
securityPolicyIdLists string[]
A list of the IDs of all security policies.
securityPolicyName string
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 all security policies.
security_policy_id str
The ID of the security policy. Included only if security_policy_name was specified.
security_policy_id_lists Sequence[str]
A list of the IDs of all security policies.
security_policy_name 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.