getAppSecSelectableHostnames

Use the akamai.getAppSecSelectableHostnames data source to retrieve the list of hostnames that may be protected under a given security configuration. You can specify the list to be retrieved either by supplying the name of a security configuration, or by supplying a group ID and contract ID.

Example Usage

using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var configuration = Output.Create(Akamai.GetAppSecConfiguration.InvokeAsync(new Akamai.GetAppSecConfigurationArgs
        {
            Name = @var.Security_configuration,
        }));
        var selectableHostnamesAppSecSelectableHostnames = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecSelectableHostnames.InvokeAsync(new Akamai.GetAppSecSelectableHostnamesArgs
        {
            ConfigId = configuration.ConfigId,
        })));
        this.SelectableHostnames = selectableHostnamesAppSecSelectableHostnames.Apply(selectableHostnamesAppSecSelectableHostnames => selectableHostnamesAppSecSelectableHostnames.Hostnames);
        this.SelectableHostnamesJson = selectableHostnamesAppSecSelectableHostnames.Apply(selectableHostnamesAppSecSelectableHostnames => selectableHostnamesAppSecSelectableHostnames.HostnamesJson);
        this.SelectableHostnamesOutputText = selectableHostnamesAppSecSelectableHostnames.Apply(selectableHostnamesAppSecSelectableHostnames => selectableHostnamesAppSecSelectableHostnames.OutputText);
        var selectableHostnamesForCreateConfigurationAppSecSelectableHostnames = Output.Create(Akamai.GetAppSecSelectableHostnames.InvokeAsync(new Akamai.GetAppSecSelectableHostnamesArgs
        {
            Contractid = @var.Contractid,
            Groupid = @var.Groupid,
        }));
        this.SelectableHostnamesForCreateConfiguration = selectableHostnamesForCreateConfigurationAppSecSelectableHostnames.Apply(selectableHostnamesForCreateConfigurationAppSecSelectableHostnames => selectableHostnamesForCreateConfigurationAppSecSelectableHostnames.Hostnames);
        this.SelectableHostnamesForCreateConfigurationJson = selectableHostnamesForCreateConfigurationAppSecSelectableHostnames.Apply(selectableHostnamesForCreateConfigurationAppSecSelectableHostnames => selectableHostnamesForCreateConfigurationAppSecSelectableHostnames.HostnamesJson);
        this.SelectableHostnamesForCreateConfigurationOutputText = selectableHostnamesForCreateConfigurationAppSecSelectableHostnames.Apply(selectableHostnamesForCreateConfigurationAppSecSelectableHostnames => selectableHostnamesForCreateConfigurationAppSecSelectableHostnames.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; }
    [Output("selectableHostnamesForCreateConfiguration")]
    public Output<string> SelectableHostnamesForCreateConfiguration { get; set; }
    [Output("selectableHostnamesForCreateConfigurationJson")]
    public Output<string> SelectableHostnamesForCreateConfigurationJson { get; set; }
    [Output("selectableHostnamesForCreateConfigurationOutputText")]
    public Output<string> SelectableHostnamesForCreateConfigurationOutputText { 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 := _var.Security_configuration
		configuration, err := akamai.LookupAppSecConfiguration(ctx, &GetAppSecConfigurationArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		opt1 := configuration.ConfigId
		selectableHostnamesAppSecSelectableHostnames, err := akamai.GetAppSecSelectableHostnames(ctx, &GetAppSecSelectableHostnamesArgs{
			ConfigId: &opt1,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("selectableHostnames", selectableHostnamesAppSecSelectableHostnames.Hostnames)
		ctx.Export("selectableHostnamesJson", selectableHostnamesAppSecSelectableHostnames.HostnamesJson)
		ctx.Export("selectableHostnamesOutputText", selectableHostnamesAppSecSelectableHostnames.OutputText)
		opt2 := _var.Contractid
		opt3 := _var.Groupid
		selectableHostnamesForCreateConfigurationAppSecSelectableHostnames, err := akamai.GetAppSecSelectableHostnames(ctx, &GetAppSecSelectableHostnamesArgs{
			Contractid: &opt2,
			Groupid:    &opt3,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("selectableHostnamesForCreateConfiguration", selectableHostnamesForCreateConfigurationAppSecSelectableHostnames.Hostnames)
		ctx.Export("selectableHostnamesForCreateConfigurationJson", selectableHostnamesForCreateConfigurationAppSecSelectableHostnames.HostnamesJson)
		ctx.Export("selectableHostnamesForCreateConfigurationOutputText", selectableHostnamesForCreateConfigurationAppSecSelectableHostnames.OutputText)
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name=var["security_configuration"])
selectable_hostnames_app_sec_selectable_hostnames = akamai.get_app_sec_selectable_hostnames(config_id=configuration.config_id)
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)
selectable_hostnames_for_create_configuration_app_sec_selectable_hostnames = akamai.get_app_sec_selectable_hostnames(contractid=var["contractid"],
    groupid=var["groupid"])
pulumi.export("selectableHostnamesForCreateConfiguration", selectable_hostnames_for_create_configuration_app_sec_selectable_hostnames.hostnames)
pulumi.export("selectableHostnamesForCreateConfigurationJson", selectable_hostnames_for_create_configuration_app_sec_selectable_hostnames.hostnames_json)
pulumi.export("selectableHostnamesForCreateConfigurationOutputText", selectable_hostnames_for_create_configuration_app_sec_selectable_hostnames.output_text)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: _var.security_configuration,
});
const selectableHostnamesAppSecSelectableHostnames = configuration.then(configuration => akamai.getAppSecSelectableHostnames({
    configId: configuration.configId,
}));
export const selectableHostnames = selectableHostnamesAppSecSelectableHostnames.then(selectableHostnamesAppSecSelectableHostnames => selectableHostnamesAppSecSelectableHostnames.hostnames);
export const selectableHostnamesJson = selectableHostnamesAppSecSelectableHostnames.then(selectableHostnamesAppSecSelectableHostnames => selectableHostnamesAppSecSelectableHostnames.hostnamesJson);
export const selectableHostnamesOutputText = selectableHostnamesAppSecSelectableHostnames.then(selectableHostnamesAppSecSelectableHostnames => selectableHostnamesAppSecSelectableHostnames.outputText);
const selectableHostnamesForCreateConfigurationAppSecSelectableHostnames = akamai.getAppSecSelectableHostnames({
    contractid: _var.contractid,
    groupid: _var.groupid,
});
export const selectableHostnamesForCreateConfiguration = selectableHostnamesForCreateConfigurationAppSecSelectableHostnames.then(selectableHostnamesForCreateConfigurationAppSecSelectableHostnames => selectableHostnamesForCreateConfigurationAppSecSelectableHostnames.hostnames);
export const selectableHostnamesForCreateConfigurationJson = selectableHostnamesForCreateConfigurationAppSecSelectableHostnames.then(selectableHostnamesForCreateConfigurationAppSecSelectableHostnames => selectableHostnamesForCreateConfigurationAppSecSelectableHostnames.hostnamesJson);
export const selectableHostnamesForCreateConfigurationOutputText = selectableHostnamesForCreateConfigurationAppSecSelectableHostnames.then(selectableHostnamesForCreateConfigurationAppSecSelectableHostnames => selectableHostnamesForCreateConfigurationAppSecSelectableHostnames.outputText);

Using getAppSecSelectableHostnames

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 getAppSecSelectableHostnames(args: GetAppSecSelectableHostnamesArgs, opts?: InvokeOptions): Promise<GetAppSecSelectableHostnamesResult>
function getAppSecSelectableHostnamesOutput(args: GetAppSecSelectableHostnamesOutputArgs, opts?: InvokeOptions): Output<GetAppSecSelectableHostnamesResult>
def get_app_sec_selectable_hostnames(active_in_production: Optional[bool] = None,
                                     active_in_staging: Optional[bool] = None,
                                     config_id: Optional[int] = None,
                                     contractid: Optional[str] = None,
                                     groupid: Optional[int] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetAppSecSelectableHostnamesResult
def get_app_sec_selectable_hostnames_output(active_in_production: Optional[pulumi.Input[bool]] = None,
                                     active_in_staging: Optional[pulumi.Input[bool]] = None,
                                     config_id: Optional[pulumi.Input[int]] = None,
                                     contractid: Optional[pulumi.Input[str]] = None,
                                     groupid: Optional[pulumi.Input[int]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetAppSecSelectableHostnamesResult]
func GetAppSecSelectableHostnames(ctx *Context, args *GetAppSecSelectableHostnamesArgs, opts ...InvokeOption) (*GetAppSecSelectableHostnamesResult, error)
func GetAppSecSelectableHostnamesOutput(ctx *Context, args *GetAppSecSelectableHostnamesOutputArgs, opts ...InvokeOption) GetAppSecSelectableHostnamesResultOutput

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

public static class GetAppSecSelectableHostnames 
{
    public static Task<GetAppSecSelectableHostnamesResult> InvokeAsync(GetAppSecSelectableHostnamesArgs args, InvokeOptions? opts = null)
    public static Output<GetAppSecSelectableHostnamesResult> Invoke(GetAppSecSelectableHostnamesInvokeArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

ActiveInProduction bool
ActiveInStaging bool
ConfigId int
The ID of the security configuration to use.
Contractid string
The ID of the contract to use.
Groupid int
The ID of the group to use.
ActiveInProduction bool
ActiveInStaging bool
ConfigId int
The ID of the security configuration to use.
Contractid string
The ID of the contract to use.
Groupid int
The ID of the group to use.
activeInProduction boolean
activeInStaging boolean
configId number
The ID of the security configuration to use.
contractid string
The ID of the contract to use.
groupid number
The ID of the group to use.
active_in_production bool
active_in_staging bool
config_id int
The ID of the security configuration to use.
contractid str
The ID of the contract to use.
groupid int
The ID of the group to use.

getAppSecSelectableHostnames Result

The following output properties are available:

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.
ActiveInProduction bool
ActiveInStaging bool
ConfigId int
Contractid string
Groupid 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.
ActiveInProduction bool
ActiveInStaging bool
ConfigId int
Contractid string
Groupid 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.
activeInProduction boolean
activeInStaging boolean
configId number
contractid string
groupid number
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.
active_in_production bool
active_in_staging bool
config_id int
contractid str
groupid 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.