getAppSecSelectableHostnames

Use the akamai.getAppSecSelectableHostnames data source to retrieve the list of hostnames that may be 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 selectableHostnamesAppSecSelectableHostnames = Output.Tuple(configuration, configuration).Apply(values =>
        {
            var configuration = values.Item1;
            var configuration1 = values.Item2;
            return Output.Create(Akamai.GetAppSecSelectableHostnames.InvokeAsync(new Akamai.GetAppSecSelectableHostnamesArgs
            {
                ConfigId = configuration.ConfigId,
                Version = configuration1.LatestVersion,
            }));
        });
        this.SelectableHostnames = selectableHostnamesAppSecSelectableHostnames.Apply(selectableHostnamesAppSecSelectableHostnames => selectableHostnamesAppSecSelectableHostnames.Hostnames);
        this.SelectableHostnamesJson = selectableHostnamesAppSecSelectableHostnames.Apply(selectableHostnamesAppSecSelectableHostnames => selectableHostnamesAppSecSelectableHostnames.HostnamesJson);
        this.SelectableHostnamesOutputText = selectableHostnamesAppSecSelectableHostnames.Apply(selectableHostnamesAppSecSelectableHostnames => selectableHostnamesAppSecSelectableHostnames.OutputText);
    }

    [Output("selectableHostnames")]
    public Output<string> SelectableHostnames { get; set; }
    [Output("selectableHostnamesJson")]
    public Output<string> SelectableHostnamesJson { get; set; }
    [Output("selectableHostnamesOutputText")]
    public Output<string> SelectableHostnamesOutputText { 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
		}
		selectableHostnamesAppSecSelectableHostnames, err := akamai.GetAppSecSelectableHostnames(ctx, &akamai.GetAppSecSelectableHostnamesArgs{
			ConfigId: configuration.ConfigId,
			Version:  configuration.LatestVersion,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("selectableHostnames", selectableHostnamesAppSecSelectableHostnames.Hostnames)
		ctx.Export("selectableHostnamesJson", selectableHostnamesAppSecSelectableHostnames.HostnamesJson)
		ctx.Export("selectableHostnamesOutputText", selectableHostnamesAppSecSelectableHostnames.OutputText)
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name="Akamai Tools")
selectable_hostnames_app_sec_selectable_hostnames = akamai.get_app_sec_selectable_hostnames(config_id=configuration.config_id,
    version=configuration.latest_version)
pulumi.export("selectableHostnames", selectable_hostnames_app_sec_selectable_hostnames.hostnames)
pulumi.export("selectableHostnamesJson", selectable_hostnames_app_sec_selectable_hostnames.hostnames_json)
pulumi.export("selectableHostnamesOutputText", selectable_hostnames_app_sec_selectable_hostnames.output_text)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: "Akamai Tools",
});
const selectableHostnamesAppSecSelectableHostnames = Promise.all([configuration, configuration]).then(([configuration, configuration1]) => akamai.getAppSecSelectableHostnames({
    configId: configuration.configId,
    version: configuration1.latestVersion,
}));
export const selectableHostnames = selectableHostnamesAppSecSelectableHostnames.then(selectableHostnamesAppSecSelectableHostnames => selectableHostnamesAppSecSelectableHostnames.hostnames);
export const selectableHostnamesJson = selectableHostnamesAppSecSelectableHostnames.then(selectableHostnamesAppSecSelectableHostnames => selectableHostnamesAppSecSelectableHostnames.hostnamesJson);
export const selectableHostnamesOutputText = selectableHostnamesAppSecSelectableHostnames.then(selectableHostnamesAppSecSelectableHostnames => selectableHostnamesAppSecSelectableHostnames.outputText);

Using getAppSecSelectableHostnames

function getAppSecSelectableHostnames(args: GetAppSecSelectableHostnamesArgs, opts?: InvokeOptions): Promise<GetAppSecSelectableHostnamesResult>
def get_app_sec_selectable_hostnames(active_in_production: Optional[bool] = None,
                                     active_in_staging: Optional[bool] = None,
                                     config_id: Optional[int] = None,
                                     version: Optional[int] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetAppSecSelectableHostnamesResult
func GetAppSecSelectableHostnames(ctx *Context, args *GetAppSecSelectableHostnamesArgs, opts ...InvokeOption) (*GetAppSecSelectableHostnamesResult, error)

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

public static class GetAppSecSelectableHostnames {
    public static Task<GetAppSecSelectableHostnamesResult> InvokeAsync(GetAppSecSelectableHostnamesArgs 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.
ActiveInProduction bool
ActiveInStaging bool
ConfigId int
The ID of the security configuration to use.
Version int
The version number of the security configuration to use.
ActiveInProduction bool
ActiveInStaging bool
configId number
The ID of the security configuration to use.
version number
The version number of the security configuration to use.
activeInProduction boolean
activeInStaging boolean
config_id int
The ID of the security configuration to use.
version int
The version number of the security configuration to use.
active_in_production bool
active_in_staging bool

getAppSecSelectableHostnames Result

The following output properties are available:

ConfigId int
Hostnames List<string>
The list of selectable hostnames.
HostnamesJson string
The list of selectable hostnames in json format.
Id string
The provider-assigned unique ID for this managed resource.
OutputText string
A tabular display of the selectable hostnames showing the name and config_id of the security configuration under which the host is protected in production, or ‘-’ if the host is not protected in production.
Version int
ActiveInProduction bool
ActiveInStaging bool
ConfigId int
Hostnames []string
The list of selectable hostnames.
HostnamesJson string
The list of selectable hostnames in json format.
Id string
The provider-assigned unique ID for this managed resource.
OutputText string
A tabular display of the selectable hostnames showing the name and config_id of the security configuration under which the host is protected in production, or ‘-’ if the host is not protected in production.
Version int
ActiveInProduction bool
ActiveInStaging bool
configId number
hostnames string[]
The list of selectable hostnames.
hostnamesJson string
The list of selectable hostnames in json format.
id string
The provider-assigned unique ID for this managed resource.
outputText string
A tabular display of the selectable hostnames showing the name and config_id of the security configuration under which the host is protected in production, or ‘-’ if the host is not protected in production.
version number
activeInProduction boolean
activeInStaging boolean
config_id int
hostnames Sequence[str]
The list of selectable hostnames.
hostnames_json str
The list of selectable hostnames in json format.
id str
The provider-assigned unique ID for this managed resource.
output_text str
A tabular display of the selectable hostnames showing the name and config_id of the security configuration under which the host is protected in production, or ‘-’ if the host is not protected in production.
version int
active_in_production bool
active_in_staging bool

Package Details

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