akamai.getAppSecFailoverHostnames

Scopes: Security configuration

Returns a list of the failover hostnames in a configuration.

Related API Endpoint: /appsec/v1/configs/{configId}/failover-hostnames

Output Options

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

  • hostnames. List of the failover hostnames.
  • json. JSON-formatted list of the failover hostnames.

Example Usage

Basic usage

using System.Collections.Generic;
using Pulumi;
using Akamai = Pulumi.Akamai;

return await Deployment.RunAsync(() => 
{
    var configuration = Akamai.GetAppSecConfiguration.Invoke(new()
    {
        Name = "Documentation",
    });

    var failoverHostnamesAppSecFailoverHostnames = Akamai.GetAppSecFailoverHostnames.Invoke(new()
    {
        ConfigId = configuration.Apply(getAppSecConfigurationResult => getAppSecConfigurationResult.ConfigId),
    });

    return new Dictionary<string, object?>
    {
        ["failoverHostnames"] = failoverHostnamesAppSecFailoverHostnames.Apply(getAppSecFailoverHostnamesResult => getAppSecFailoverHostnamesResult.Hostnames),
        ["failoverHostnamesOutput"] = failoverHostnamesAppSecFailoverHostnames.Apply(getAppSecFailoverHostnamesResult => getAppSecFailoverHostnamesResult.OutputText),
        ["failoverHostnamesJson"] = failoverHostnamesAppSecFailoverHostnames.Apply(getAppSecFailoverHostnamesResult => getAppSecFailoverHostnamesResult.Json),
    };
});
package main

import (
	"github.com/pulumi/pulumi-akamai/sdk/v4/go/akamai"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		configuration, err := akamai.LookupAppSecConfiguration(ctx, &akamai.LookupAppSecConfigurationArgs{
			Name: pulumi.StringRef("Documentation"),
		}, nil)
		if err != nil {
			return err
		}
		failoverHostnamesAppSecFailoverHostnames, err := akamai.GetAppSecFailoverHostnames(ctx, &akamai.GetAppSecFailoverHostnamesArgs{
			ConfigId: configuration.ConfigId,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("failoverHostnames", failoverHostnamesAppSecFailoverHostnames.Hostnames)
		ctx.Export("failoverHostnamesOutput", failoverHostnamesAppSecFailoverHostnames.OutputText)
		ctx.Export("failoverHostnamesJson", failoverHostnamesAppSecFailoverHostnames.Json)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.akamai.AkamaiFunctions;
import com.pulumi.akamai.inputs.GetAppSecConfigurationArgs;
import com.pulumi.akamai.inputs.GetAppSecFailoverHostnamesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var configuration = AkamaiFunctions.getAppSecConfiguration(GetAppSecConfigurationArgs.builder()
            .name("Documentation")
            .build());

        final var failoverHostnamesAppSecFailoverHostnames = AkamaiFunctions.getAppSecFailoverHostnames(GetAppSecFailoverHostnamesArgs.builder()
            .configId(configuration.applyValue(getAppSecConfigurationResult -> getAppSecConfigurationResult.configId()))
            .build());

        ctx.export("failoverHostnames", failoverHostnamesAppSecFailoverHostnames.applyValue(getAppSecFailoverHostnamesResult -> getAppSecFailoverHostnamesResult.hostnames()));
        ctx.export("failoverHostnamesOutput", failoverHostnamesAppSecFailoverHostnames.applyValue(getAppSecFailoverHostnamesResult -> getAppSecFailoverHostnamesResult.outputText()));
        ctx.export("failoverHostnamesJson", failoverHostnamesAppSecFailoverHostnames.applyValue(getAppSecFailoverHostnamesResult -> getAppSecFailoverHostnamesResult.json()));
    }
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name="Documentation")
failover_hostnames_app_sec_failover_hostnames = akamai.get_app_sec_failover_hostnames(config_id=configuration.config_id)
pulumi.export("failoverHostnames", failover_hostnames_app_sec_failover_hostnames.hostnames)
pulumi.export("failoverHostnamesOutput", failover_hostnames_app_sec_failover_hostnames.output_text)
pulumi.export("failoverHostnamesJson", failover_hostnames_app_sec_failover_hostnames.json)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: "Documentation",
});
const failoverHostnamesAppSecFailoverHostnames = configuration.then(configuration => akamai.getAppSecFailoverHostnames({
    configId: configuration.configId,
}));
export const failoverHostnames = failoverHostnamesAppSecFailoverHostnames.then(failoverHostnamesAppSecFailoverHostnames => failoverHostnamesAppSecFailoverHostnames.hostnames);
export const failoverHostnamesOutput = failoverHostnamesAppSecFailoverHostnames.then(failoverHostnamesAppSecFailoverHostnames => failoverHostnamesAppSecFailoverHostnames.outputText);
export const failoverHostnamesJson = failoverHostnamesAppSecFailoverHostnames.then(failoverHostnamesAppSecFailoverHostnames => failoverHostnamesAppSecFailoverHostnames.json);
variables:
  configuration:
    fn::invoke:
      Function: akamai:getAppSecConfiguration
      Arguments:
        name: Documentation
  failoverHostnamesAppSecFailoverHostnames:
    fn::invoke:
      Function: akamai:getAppSecFailoverHostnames
      Arguments:
        configId: ${configuration.configId}
outputs:
  failoverHostnames: ${failoverHostnamesAppSecFailoverHostnames.hostnames}
  failoverHostnamesOutput: ${failoverHostnamesAppSecFailoverHostnames.outputText}
  failoverHostnamesJson: ${failoverHostnamesAppSecFailoverHostnames.json}

Using getAppSecFailoverHostnames

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 getAppSecFailoverHostnames(args: GetAppSecFailoverHostnamesArgs, opts?: InvokeOptions): Promise<GetAppSecFailoverHostnamesResult>
function getAppSecFailoverHostnamesOutput(args: GetAppSecFailoverHostnamesOutputArgs, opts?: InvokeOptions): Output<GetAppSecFailoverHostnamesResult>
def get_app_sec_failover_hostnames(config_id: Optional[int] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetAppSecFailoverHostnamesResult
def get_app_sec_failover_hostnames_output(config_id: Optional[pulumi.Input[int]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetAppSecFailoverHostnamesResult]
func GetAppSecFailoverHostnames(ctx *Context, args *GetAppSecFailoverHostnamesArgs, opts ...InvokeOption) (*GetAppSecFailoverHostnamesResult, error)
func GetAppSecFailoverHostnamesOutput(ctx *Context, args *GetAppSecFailoverHostnamesOutputArgs, opts ...InvokeOption) GetAppSecFailoverHostnamesResultOutput

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

public static class GetAppSecFailoverHostnames 
{
    public static Task<GetAppSecFailoverHostnamesResult> InvokeAsync(GetAppSecFailoverHostnamesArgs args, InvokeOptions? opts = null)
    public static Output<GetAppSecFailoverHostnamesResult> Invoke(GetAppSecFailoverHostnamesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAppSecFailoverHostnamesResult> getAppSecFailoverHostnames(GetAppSecFailoverHostnamesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: akamai:index/getAppSecFailoverHostnames:getAppSecFailoverHostnames
  arguments:
    # arguments dictionary

The following arguments are supported:

ConfigId int

. Unique identifier of the security configuration associated with the failover hosts.

ConfigId int

. Unique identifier of the security configuration associated with the failover hosts.

configId Integer

. Unique identifier of the security configuration associated with the failover hosts.

configId number

. Unique identifier of the security configuration associated with the failover hosts.

config_id int

. Unique identifier of the security configuration associated with the failover hosts.

configId Number

. Unique identifier of the security configuration associated with the failover hosts.

getAppSecFailoverHostnames Result

The following output properties are available:

ConfigId int
Hostnames List<string>
Id string

The provider-assigned unique ID for this managed resource.

Json string
OutputText string
ConfigId int
Hostnames []string
Id string

The provider-assigned unique ID for this managed resource.

Json string
OutputText string
configId Integer
hostnames List<String>
id String

The provider-assigned unique ID for this managed resource.

json String
outputText String
configId number
hostnames string[]
id string

The provider-assigned unique ID for this managed resource.

json string
outputText string
config_id int
hostnames Sequence[str]
id str

The provider-assigned unique ID for this managed resource.

json str
output_text str
configId Number
hostnames List<String>
id String

The provider-assigned unique ID for this managed resource.

json String
outputText String

Package Details

Repository
Akamai pulumi/pulumi-akamai
License
Apache-2.0
Notes

This Pulumi package is based on the akamai Terraform Provider.