akamai.getAppSecHostnameCoverage

Scopes: Individual account

Returns information about the hostnames associated with your account. The returned data includes the hostname’s protections, activation status, and other summary information.

Related API Endpoint: /appsec/v1/hostname-coverage

Output Options

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

  • json. JSON-formatted list of the hostname coverage information.
  • output_text. Tabular report of the hostname coverage information.

Example Usage

Basic usage

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

return await Deployment.RunAsync(() => 
{
    var hostnameCoverage = Akamai.GetAppSecHostnameCoverage.Invoke();

    return new Dictionary<string, object?>
    {
        ["hostnameCoverageListJson"] = hostnameCoverage.Apply(getAppSecHostnameCoverageResult => getAppSecHostnameCoverageResult.Json),
        ["hostnameCoverageListOutput"] = hostnameCoverage.Apply(getAppSecHostnameCoverageResult => getAppSecHostnameCoverageResult.OutputText),
    };
});
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 {
		hostnameCoverage, err := akamai.GetAppSecHostnameCoverage(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("hostnameCoverageListJson", hostnameCoverage.Json)
		ctx.Export("hostnameCoverageListOutput", hostnameCoverage.OutputText)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.akamai.AkamaiFunctions;
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 hostnameCoverage = AkamaiFunctions.getAppSecHostnameCoverage();

        ctx.export("hostnameCoverageListJson", hostnameCoverage.applyValue(getAppSecHostnameCoverageResult -> getAppSecHostnameCoverageResult.json()));
        ctx.export("hostnameCoverageListOutput", hostnameCoverage.applyValue(getAppSecHostnameCoverageResult -> getAppSecHostnameCoverageResult.outputText()));
    }
}
import pulumi
import pulumi_akamai as akamai

hostname_coverage = akamai.get_app_sec_hostname_coverage()
pulumi.export("hostnameCoverageListJson", hostname_coverage.json)
pulumi.export("hostnameCoverageListOutput", hostname_coverage.output_text)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const hostnameCoverage = akamai.getAppSecHostnameCoverage({});
export const hostnameCoverageListJson = hostnameCoverage.then(hostnameCoverage => hostnameCoverage.json);
export const hostnameCoverageListOutput = hostnameCoverage.then(hostnameCoverage => hostnameCoverage.outputText);
variables:
  hostnameCoverage:
    fn::invoke:
      Function: akamai:getAppSecHostnameCoverage
      Arguments: {}
outputs:
  hostnameCoverageListJson: ${hostnameCoverage.json} # USE CASE: User wants to display the returned data in a table.
  hostnameCoverageListOutput: ${hostnameCoverage.outputText}

Using getAppSecHostnameCoverage

function getAppSecHostnameCoverage(opts?: InvokeOptions): Promise<GetAppSecHostnameCoverageResult>
def get_app_sec_hostname_coverage(opts: Optional[InvokeOptions] = None) -> GetAppSecHostnameCoverageResult
func GetAppSecHostnameCoverage(ctx *Context, opts ...InvokeOption) (*GetAppSecHostnameCoverageResult, error)

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

public static class GetAppSecHostnameCoverage 
{
    public static Task<GetAppSecHostnameCoverageResult> InvokeAsync(InvokeOptions? opts = null)
}
public static CompletableFuture<GetAppSecHostnameCoverageResult> getAppSecHostnameCoverage(InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: akamai:index/getAppSecHostnameCoverage:getAppSecHostnameCoverage
  arguments:
    # arguments dictionary

getAppSecHostnameCoverage Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Json string
OutputText string
Id string

The provider-assigned unique ID for this managed resource.

Json string
OutputText string
id String

The provider-assigned unique ID for this managed resource.

json String
outputText String
id string

The provider-assigned unique ID for this managed resource.

json string
outputText string
id str

The provider-assigned unique ID for this managed resource.

json str
output_text str
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.