Akamai

Pulumi Official
Package maintained by Pulumi
v2.9.0 published on Wednesday, Apr 6, 2022 by Pulumi

getAppSecWapSelectedHostnames

Scopes: Security policy

Returns hostnames currently protected or being evaluated by a configuration and security policy. This resource is available only to organizations running Web Application Protector (WAP). Note that the WAP selected hostnames feature is currently in beta. Please contact your Akamai representative for more information.

Output Options

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

  • protected_hostnames. List of hostnames currently protected under the security configuration and security policy.
  • evaluated_hostnames. List of hostnames currently being evaluated under the security configuration and security policy.
  • hostnames_json. JSON-formatted report of the protected and evaluated hostnames.
  • output_text. Tabular reports of the protected and evaluated hostnames.

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 wapSelectedHostnames = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecWapSelectedHostnames.InvokeAsync(new Akamai.GetAppSecWapSelectedHostnamesArgs
        {
            ConfigId = configuration.ConfigId,
            SecurityPolicyId = "gms1_134637",
        })));
        this.ProtectedHostnames = wapSelectedHostnames.Apply(wapSelectedHostnames => wapSelectedHostnames.ProtectedHosts);
        this.EvaluatedHostnames = wapSelectedHostnames.Apply(wapSelectedHostnames => wapSelectedHostnames.EvaluatedHosts);
    }

    [Output("protectedHostnames")]
    public Output<string> ProtectedHostnames { get; set; }
    [Output("evaluatedHostnames")]
    public Output<string> EvaluatedHostnames { 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 {
		configuration, err := akamai.LookupAppSecConfiguration(ctx, &GetAppSecConfigurationArgs{
			Name: pulumi.StringRef("Documentation"),
		}, nil)
		if err != nil {
			return err
		}
		wapSelectedHostnames, err := akamai.LookupAppSecWapSelectedHostnames(ctx, &GetAppSecWapSelectedHostnamesArgs{
			ConfigId:         configuration.ConfigId,
			SecurityPolicyId: "gms1_134637",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("protectedHostnames", wapSelectedHostnames.ProtectedHosts)
		ctx.Export("evaluatedHostnames", wapSelectedHostnames.EvaluatedHosts)
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name="Documentation")
wap_selected_hostnames = akamai.get_app_sec_wap_selected_hostnames(config_id=configuration.config_id,
    security_policy_id="gms1_134637")
pulumi.export("protectedHostnames", wap_selected_hostnames.protected_hosts)
pulumi.export("evaluatedHostnames", wap_selected_hostnames.evaluated_hosts)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: "Documentation",
});
const wapSelectedHostnames = configuration.then(configuration => akamai.getAppSecWapSelectedHostnames({
    configId: configuration.configId,
    securityPolicyId: "gms1_134637",
}));
export const protectedHostnames = wapSelectedHostnames.then(wapSelectedHostnames => wapSelectedHostnames.protectedHosts);
export const evaluatedHostnames = wapSelectedHostnames.then(wapSelectedHostnames => wapSelectedHostnames.evaluatedHosts);

Coming soon!

Using getAppSecWapSelectedHostnames

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 getAppSecWapSelectedHostnames(args: GetAppSecWapSelectedHostnamesArgs, opts?: InvokeOptions): Promise<GetAppSecWapSelectedHostnamesResult>
function getAppSecWapSelectedHostnamesOutput(args: GetAppSecWapSelectedHostnamesOutputArgs, opts?: InvokeOptions): Output<GetAppSecWapSelectedHostnamesResult>
def get_app_sec_wap_selected_hostnames(config_id: Optional[int] = None,
                                       security_policy_id: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetAppSecWapSelectedHostnamesResult
def get_app_sec_wap_selected_hostnames_output(config_id: Optional[pulumi.Input[int]] = None,
                                       security_policy_id: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetAppSecWapSelectedHostnamesResult]
func LookupAppSecWapSelectedHostnames(ctx *Context, args *LookupAppSecWapSelectedHostnamesArgs, opts ...InvokeOption) (*LookupAppSecWapSelectedHostnamesResult, error)
func LookupAppSecWapSelectedHostnamesOutput(ctx *Context, args *LookupAppSecWapSelectedHostnamesOutputArgs, opts ...InvokeOption) LookupAppSecWapSelectedHostnamesResultOutput

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

public static class GetAppSecWapSelectedHostnames 
{
    public static Task<GetAppSecWapSelectedHostnamesResult> InvokeAsync(GetAppSecWapSelectedHostnamesArgs args, InvokeOptions? opts = null)
    public static Output<GetAppSecWapSelectedHostnamesResult> Invoke(GetAppSecWapSelectedHostnamesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAppSecWapSelectedHostnamesResult> getAppSecWapSelectedHostnames(GetAppSecWapSelectedHostnamesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: akamai:index/getAppSecWapSelectedHostnames:getAppSecWapSelectedHostnames
  Arguments:
    # Arguments dictionary

The following arguments are supported:

ConfigId int

. Unique identifier of the security configuration associated with the hostnames.

SecurityPolicyId string

. Unique identifier of the security policy associated with the hostnames.

ConfigId int

. Unique identifier of the security configuration associated with the hostnames.

SecurityPolicyId string

. Unique identifier of the security policy associated with the hostnames.

configId Integer

. Unique identifier of the security configuration associated with the hostnames.

securityPolicyId String

. Unique identifier of the security policy associated with the hostnames.

configId number

. Unique identifier of the security configuration associated with the hostnames.

securityPolicyId string

. Unique identifier of the security policy associated with the hostnames.

config_id int

. Unique identifier of the security configuration associated with the hostnames.

security_policy_id str

. Unique identifier of the security policy associated with the hostnames.

configId Number

. Unique identifier of the security configuration associated with the hostnames.

securityPolicyId String

. Unique identifier of the security policy associated with the hostnames.

getAppSecWapSelectedHostnames Result

The following output properties are available:

ConfigId int
EvaluatedHosts List<string>
Id string

The provider-assigned unique ID for this managed resource.

Json string
MatchTargets string
OutputText string
ProtectedHosts List<string>
SecurityPolicyId string
SelectedHosts List<string>
ConfigId int
EvaluatedHosts []string
Id string

The provider-assigned unique ID for this managed resource.

Json string
MatchTargets string
OutputText string
ProtectedHosts []string
SecurityPolicyId string
SelectedHosts []string
configId Integer
evaluatedHosts List
id String

The provider-assigned unique ID for this managed resource.

json String
matchTargets String
outputText String
protectedHosts List
securityPolicyId String
selectedHosts List
configId number
evaluatedHosts string[]
id string

The provider-assigned unique ID for this managed resource.

json string
matchTargets string
outputText string
protectedHosts string[]
securityPolicyId string
selectedHosts string[]
config_id int
evaluated_hosts Sequence[str]
id str

The provider-assigned unique ID for this managed resource.

json str
match_targets str
output_text str
protected_hosts Sequence[str]
security_policy_id str
selected_hosts Sequence[str]
configId Number
evaluatedHosts List
id String

The provider-assigned unique ID for this managed resource.

json String
matchTargets String
outputText String
protectedHosts List
securityPolicyId String
selectedHosts List

Package Details

Repository
https://github.com/pulumi/pulumi-akamai
License
Apache-2.0
Notes

This Pulumi package is based on the akamai Terraform Provider.