getAppSecSecurityPolicy

Use the akamai.getAppSecSecurityPolicy data source to retrieve information about the security policies associated with a specific security configuration version, 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 = Output.Tuple(configuration, configuration).Apply(values =>
        {
            var configuration = values.Item1;
            var configuration1 = values.Item2;
            return Output.Create(Akamai.GetAppSecSecurityPolicy.InvokeAsync(new Akamai.GetAppSecSecurityPolicyArgs
            {
                ConfigId = configuration.ConfigId,
                Version = configuration1.LatestVersion,
            }));
        });
        this.SecurityPoliciesList = securityPolicies.Apply(securityPolicies => securityPolicies.PolicyLists);
        this.SecurityPoliciesText = securityPolicies.Apply(securityPolicies => securityPolicies.OutputText);
        var specificSecurityPolicy = Output.Tuple(configuration, configuration).Apply(values =>
        {
            var configuration = values.Item1;
            var configuration1 = values.Item2;
            return Output.Create(Akamai.GetAppSecSecurityPolicy.InvokeAsync(new Akamai.GetAppSecSecurityPolicyArgs
            {
                ConfigId = configuration.ConfigId,
                Version = configuration1.LatestVersion,
                Name = "APIs",
            }));
        });
        this.SpecificSecurityPolicyId = specificSecurityPolicy.Apply(specificSecurityPolicy => specificSecurityPolicy.PolicyId);
    }

    [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.GetAppSecConfiguration(ctx, &akamai.GetAppSecConfigurationArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		securityPolicies, err := akamai.GetAppSecSecurityPolicy(ctx, &akamai.GetAppSecSecurityPolicyArgs{
			ConfigId: configuration.ConfigId,
			Version:  configuration.LatestVersion,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("securityPoliciesList", securityPolicies.PolicyLists)
		ctx.Export("securityPoliciesText", securityPolicies.OutputText)
		opt1 := "APIs"
		specificSecurityPolicy, err := akamai.GetAppSecSecurityPolicy(ctx, &akamai.GetAppSecSecurityPolicyArgs{
			ConfigId: configuration.ConfigId,
			Version:  configuration.LatestVersion,
			Name:     &opt1,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("specificSecurityPolicyId", specificSecurityPolicy.PolicyId)
		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,
    version=configuration.latest_version)
pulumi.export("securityPoliciesList", security_policies.policy_lists)
pulumi.export("securityPoliciesText", security_policies.output_text)
specific_security_policy = akamai.get_app_sec_security_policy(config_id=configuration.config_id,
    version=configuration.latest_version,
    name="APIs")
pulumi.export("specificSecurityPolicyId", specific_security_policy.policy_id)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: "Akamai Tools",
});
const securityPolicies = Promise.all([configuration, configuration]).then(([configuration, configuration1]) => akamai.getAppSecSecurityPolicy({
    configId: configuration.configId,
    version: configuration1.latestVersion,
}));
export const securityPoliciesList = securityPolicies.then(securityPolicies => securityPolicies.policyLists);
export const securityPoliciesText = securityPolicies.then(securityPolicies => securityPolicies.outputText);
const specificSecurityPolicy = Promise.all([configuration, configuration]).then(([configuration, configuration1]) => akamai.getAppSecSecurityPolicy({
    configId: configuration.configId,
    version: configuration1.latestVersion,
    name: "APIs",
}));
export const specificSecurityPolicyId = specificSecurityPolicy.then(specificSecurityPolicy => specificSecurityPolicy.policyId);

Using getAppSecSecurityPolicy

function getAppSecSecurityPolicy(args: GetAppSecSecurityPolicyArgs, opts?: InvokeOptions): Promise<GetAppSecSecurityPolicyResult>
def get_app_sec_security_policy(config_id: Optional[int] = None,
                                name: Optional[str] = None,
                                version: Optional[int] = None,
                                opts: Optional[InvokeOptions] = None) -> GetAppSecSecurityPolicyResult
func GetAppSecSecurityPolicy(ctx *Context, args *GetAppSecSecurityPolicyArgs, opts ...InvokeOption) (*GetAppSecSecurityPolicyResult, error)

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

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

The following arguments are supported:

ConfigId int
The ID of the security configuration to use.
Version int
The version number of the security configuration to use.
Name 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.
Version int
The version number of the security configuration to use.
Name 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.
version number
The version number of the security configuration to use.
name 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.
version int
The version number of the security configuration to use.
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.
PolicyId string
The ID of the security policy. Included only if name was specified.
PolicyLists List<string>
A list of the IDs of all security policies.
Version int
Name 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.
PolicyId string
The ID of the security policy. Included only if name was specified.
PolicyLists []string
A list of the IDs of all security policies.
Version int
Name 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.
policyId string
The ID of the security policy. Included only if name was specified.
policyLists string[]
A list of the IDs of all security policies.
version number
name 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.
policy_id str
The ID of the security policy. Included only if name was specified.
policy_lists Sequence[str]
A list of the IDs of all security policies.
version int
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.