getAppSecSelectedHostnames

Use the akamai.AppSecSelectedHostnames data source to retrieve a list of the hostnames that are currently protected under a given 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 selectedHostnamesAppSecSelectedHostnames = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecSelectedHostnames.InvokeAsync(new Akamai.GetAppSecSelectedHostnamesArgs
        {
            ConfigId = configuration.ConfigId,
        })));
        this.SelectedHostnames = selectedHostnamesAppSecSelectedHostnames.Apply(selectedHostnamesAppSecSelectedHostnames => selectedHostnamesAppSecSelectedHostnames.Hostnames);
        this.SelectedHostnamesJson = selectedHostnamesAppSecSelectedHostnames.Apply(selectedHostnamesAppSecSelectedHostnames => selectedHostnamesAppSecSelectedHostnames.HostnamesJson);
        this.SelectedHostnamesOutputText = selectedHostnamesAppSecSelectedHostnames.Apply(selectedHostnamesAppSecSelectedHostnames => selectedHostnamesAppSecSelectedHostnames.OutputText);
    }

    [Output("selectedHostnames")]
    public Output<string> SelectedHostnames { get; set; }
    [Output("selectedHostnamesJson")]
    public Output<string> SelectedHostnamesJson { get; set; }
    [Output("selectedHostnamesOutputText")]
    public Output<string> SelectedHostnamesOutputText { 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
		}
		selectedHostnamesAppSecSelectedHostnames, err := akamai.LookupAppSecSelectedHostnames(ctx, &GetAppSecSelectedHostnamesArgs{
			ConfigId: configuration.ConfigId,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("selectedHostnames", selectedHostnamesAppSecSelectedHostnames.Hostnames)
		ctx.Export("selectedHostnamesJson", selectedHostnamesAppSecSelectedHostnames.HostnamesJson)
		ctx.Export("selectedHostnamesOutputText", selectedHostnamesAppSecSelectedHostnames.OutputText)
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name="Akamai Tools")
selected_hostnames_app_sec_selected_hostnames = akamai.get_app_sec_selected_hostnames(config_id=configuration.config_id)
pulumi.export("selectedHostnames", selected_hostnames_app_sec_selected_hostnames.hostnames)
pulumi.export("selectedHostnamesJson", selected_hostnames_app_sec_selected_hostnames.hostnames_json)
pulumi.export("selectedHostnamesOutputText", selected_hostnames_app_sec_selected_hostnames.output_text)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: "Akamai Tools",
});
const selectedHostnamesAppSecSelectedHostnames = configuration.then(configuration => akamai.getAppSecSelectedHostnames({
    configId: configuration.configId,
}));
export const selectedHostnames = selectedHostnamesAppSecSelectedHostnames.then(selectedHostnamesAppSecSelectedHostnames => selectedHostnamesAppSecSelectedHostnames.hostnames);
export const selectedHostnamesJson = selectedHostnamesAppSecSelectedHostnames.then(selectedHostnamesAppSecSelectedHostnames => selectedHostnamesAppSecSelectedHostnames.hostnamesJson);
export const selectedHostnamesOutputText = selectedHostnamesAppSecSelectedHostnames.then(selectedHostnamesAppSecSelectedHostnames => selectedHostnamesAppSecSelectedHostnames.outputText);

Using getAppSecSelectedHostnames

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 getAppSecSelectedHostnames(args: GetAppSecSelectedHostnamesArgs, opts?: InvokeOptions): Promise<GetAppSecSelectedHostnamesResult>
function getAppSecSelectedHostnamesOutput(args: GetAppSecSelectedHostnamesOutputArgs, opts?: InvokeOptions): Output<GetAppSecSelectedHostnamesResult>
def get_app_sec_selected_hostnames(config_id: Optional[int] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetAppSecSelectedHostnamesResult
def get_app_sec_selected_hostnames_output(config_id: Optional[pulumi.Input[int]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetAppSecSelectedHostnamesResult]
func LookupAppSecSelectedHostnames(ctx *Context, args *LookupAppSecSelectedHostnamesArgs, opts ...InvokeOption) (*LookupAppSecSelectedHostnamesResult, error)
func LookupAppSecSelectedHostnamesOutput(ctx *Context, args *LookupAppSecSelectedHostnamesOutputArgs, opts ...InvokeOption) LookupAppSecSelectedHostnamesResultOutput

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

public static class GetAppSecSelectedHostnames 
{
    public static Task<GetAppSecSelectedHostnamesResult> InvokeAsync(GetAppSecSelectedHostnamesArgs args, InvokeOptions? opts = null)
    public static Output<GetAppSecSelectedHostnamesResult> Invoke(GetAppSecSelectedHostnamesInvokeArgs 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.

getAppSecSelectedHostnames Result

The following output properties are available:

ConfigId int
Hostnames List<string>
The list of selected hostnames.
HostnamesJson string
The list of selected hostnames in JSON format.
Id string
The provider-assigned unique ID for this managed resource.
OutputText string
A tabular display of the selected hostnames.
ConfigId int
Hostnames []string
The list of selected hostnames.
HostnamesJson string
The list of selected hostnames in JSON format.
Id string
The provider-assigned unique ID for this managed resource.
OutputText string
A tabular display of the selected hostnames.
configId number
hostnames string[]
The list of selected hostnames.
hostnamesJson string
The list of selected hostnames in JSON format.
id string
The provider-assigned unique ID for this managed resource.
outputText string
A tabular display of the selected hostnames.
config_id int
hostnames Sequence[str]
The list of selected hostnames.
hostnames_json str
The list of selected hostnames in JSON format.
id str
The provider-assigned unique ID for this managed resource.
output_text str
A tabular display of the selected hostnames.

Package Details

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