getAppSecSelectedHostnames

Scopes: Security configuration

Returns a list of the hostnames currently protected by the specified security configuration.

Related API Endpoint: /appsec/v1/configs/{configId}/versions/{versionNumber}/selected-hostnames

Output Options

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

  • hostnames. List of selected hostnames.
  • hostnames_json. JSON-formatted list of selected hostnames.
  • output_text. Tabular report of the selected 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 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 := "Documentation"
		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="Documentation")
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: "Documentation",
});
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
. Unique identifier of the security configuration associated with the protected hosts.
ConfigId int
. Unique identifier of the security configuration associated with the protected hosts.
configId number
. Unique identifier of the security configuration associated with the protected hosts.
config_id int
. Unique identifier of the security configuration associated with the protected hosts.

getAppSecSelectedHostnames Result

The following output properties are available:

ConfigId int
Hostnames List<string>
HostnamesJson string
Id string
The provider-assigned unique ID for this managed resource.
OutputText string
ConfigId int
Hostnames []string
HostnamesJson string
Id string
The provider-assigned unique ID for this managed resource.
OutputText string
configId number
hostnames string[]
hostnamesJson string
id string
The provider-assigned unique ID for this managed resource.
outputText string
config_id int
hostnames Sequence[str]
hostnames_json str
id str
The provider-assigned unique ID for this managed resource.
output_text str

Package Details

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