getAppSecSelectedHostnames

Use the akamai.AppSecSelectedHostnames data source to retrieve a list of the hostnames that are currently protected under a given security configuration version.

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 = Output.Tuple(configuration, configuration).Apply(values =>
        {
            var configuration = values.Item1;
            var configuration1 = values.Item2;
            return Output.Create(Akamai.GetAppSecSelectedHostnames.InvokeAsync(new Akamai.GetAppSecSelectedHostnamesArgs
            {
                ConfigId = configuration.ConfigId,
                Version = configuration1.LatestVersion,
            }));
        });
        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.GetAppSecConfiguration(ctx, &akamai.GetAppSecConfigurationArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		selectedHostnamesAppSecSelectedHostnames, err := akamai.LookupAppSecSelectedHostnames(ctx, &akamai.LookupAppSecSelectedHostnamesArgs{
			ConfigId: configuration.ConfigId,
			Version:  configuration.LatestVersion,
		}, 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,
    version=configuration.latest_version)
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 = Promise.all([configuration, configuration]).then(([configuration, configuration1]) => akamai.getAppSecSelectedHostnames({
    configId: configuration.configId,
    version: configuration1.latestVersion,
}));
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

function getAppSecSelectedHostnames(args: GetAppSecSelectedHostnamesArgs, opts?: InvokeOptions): Promise<GetAppSecSelectedHostnamesResult>
def get_app_sec_selected_hostnames(config_id: Optional[int] = None,
                                   version: Optional[int] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetAppSecSelectedHostnamesResult
func LookupAppSecSelectedHostnames(ctx *Context, args *LookupAppSecSelectedHostnamesArgs, opts ...InvokeOption) (*LookupAppSecSelectedHostnamesResult, error)

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

public static class GetAppSecSelectedHostnames {
    public static Task<GetAppSecSelectedHostnamesResult> InvokeAsync(GetAppSecSelectedHostnamesArgs 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.
ConfigId int
The ID of the security configuration to use.
Version int
The version number of the security configuration to use.
configId number
The ID of the security configuration to use.
version number
The version number of the security configuration to use.
config_id int
The ID of the security configuration to use.
version int
The version number 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.
Version int
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.
Version int
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.
version number
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.
version int

Package Details

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