Akamai

v3.0.0 published on Monday, Jul 25, 2022 by Pulumi

getAppSecFailoverHostnames

Scopes: Security configuration

Returns a list of the failover hostnames in a configuration. The returned information is described in the List failover hostnames section of the Application Security API.

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

using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var configuration = Output.Create(Akamai.GetAppSecConfiguration.InvokeAsync(new Akamai.GetAppSecConfigurationArgs
        {
            Name = "Documentation",
        }));
        var failoverHostnamesAppSecFailoverHostnames = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecFailoverHostnames.InvokeAsync(new Akamai.GetAppSecFailoverHostnamesArgs
        {
            ConfigId = configuration.ConfigId,
        })));
        this.FailoverHostnames = failoverHostnamesAppSecFailoverHostnames.Apply(failoverHostnamesAppSecFailoverHostnames => failoverHostnamesAppSecFailoverHostnames.Hostnames);
        this.FailoverHostnamesOutput = failoverHostnamesAppSecFailoverHostnames.Apply(failoverHostnamesAppSecFailoverHostnames => failoverHostnamesAppSecFailoverHostnames.OutputText);
        this.FailoverHostnamesJson = failoverHostnamesAppSecFailoverHostnames.Apply(failoverHostnamesAppSecFailoverHostnames => failoverHostnamesAppSecFailoverHostnames.Json);
    }

    [Output("failoverHostnames")]
    public Output<string> FailoverHostnames { get; set; }
    [Output("failoverHostnamesOutput")]
    public Output<string> FailoverHostnamesOutput { get; set; }
    [Output("failoverHostnamesJson")]
    public Output<string> FailoverHostnamesJson { get; set; }
}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		configuration, err := akamai.LookupAppSecConfiguration(ctx, &GetAppSecConfigurationArgs{
			Name: pulumi.StringRef("Documentation"),
		}, nil)
		if err != nil {
			return err
		}
		failoverHostnamesAppSecFailoverHostnames, err := akamai.GetAppSecFailoverHostnames(ctx, &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
https://github.com/pulumi/pulumi-akamai
License
Apache-2.0
Notes

This Pulumi package is based on the akamai Terraform Provider.