getNetworkLists

Use the akamai.getNetworkLists data source to retrieve information about the available network lists, optionally filtered by list type or based on a search string. The information available is described here.

Example Usage

using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var networkLists = Output.Create(Akamai.GetNetworkLists.InvokeAsync());
        this.NetworkListsText = networkLists.Apply(networkLists => networkLists.OutputText);
        this.NetworkListsJson = networkLists.Apply(networkLists => networkLists.Json);
        this.NetworkListsList = networkLists.Apply(networkLists => networkLists.Lists);
        var networkListsFilter = Output.Create(Akamai.GetNetworkLists.InvokeAsync(new Akamai.GetNetworkListsArgs
        {
            Name = "Test Whitelist",
            Type = "IP",
        }));
        this.NetworkListsFilterText = networkListsFilter.Apply(networkListsFilter => networkListsFilter.OutputText);
        this.NetworkListsFilterJson = networkListsFilter.Apply(networkListsFilter => networkListsFilter.Json);
        this.NetworkListsFilterList = networkListsFilter.Apply(networkListsFilter => networkListsFilter.Lists);
    }

    [Output("networkListsText")]
    public Output<string> NetworkListsText { get; set; }
    [Output("networkListsJson")]
    public Output<string> NetworkListsJson { get; set; }
    [Output("networkListsList")]
    public Output<string> NetworkListsList { get; set; }
    [Output("networkListsFilterText")]
    public Output<string> NetworkListsFilterText { get; set; }
    [Output("networkListsFilterJson")]
    public Output<string> NetworkListsFilterJson { get; set; }
    [Output("networkListsFilterList")]
    public Output<string> NetworkListsFilterList { 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 {
		networkLists, err := akamai.GetNetworkLists(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("networkListsText", networkLists.OutputText)
		ctx.Export("networkListsJson", networkLists.Json)
		ctx.Export("networkListsList", networkLists.Lists)
		opt0 := "Test Whitelist"
		opt1 := "IP"
		networkListsFilter, err := akamai.GetNetworkLists(ctx, &GetNetworkListsArgs{
			Name: &opt0,
			Type: &opt1,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("networkListsFilterText", networkListsFilter.OutputText)
		ctx.Export("networkListsFilterJson", networkListsFilter.Json)
		ctx.Export("networkListsFilterList", networkListsFilter.Lists)
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

network_lists = akamai.get_network_lists()
pulumi.export("networkListsText", network_lists.output_text)
pulumi.export("networkListsJson", network_lists.json)
pulumi.export("networkListsList", network_lists.lists)
network_lists_filter = akamai.get_network_lists(name="Test Whitelist",
    type="IP")
pulumi.export("networkListsFilterText", network_lists_filter.output_text)
pulumi.export("networkListsFilterJson", network_lists_filter.json)
pulumi.export("networkListsFilterList", network_lists_filter.lists)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const networkLists = akamai.getNetworkLists({});
export const networkListsText = networkLists.then(networkLists => networkLists.outputText);
export const networkListsJson = networkLists.then(networkLists => networkLists.json);
export const networkListsList = networkLists.then(networkLists => networkLists.lists);
const networkListsFilter = akamai.getNetworkLists({
    name: "Test Whitelist",
    type: "IP",
});
export const networkListsFilterText = networkListsFilter.then(networkListsFilter => networkListsFilter.outputText);
export const networkListsFilterJson = networkListsFilter.then(networkListsFilter => networkListsFilter.json);
export const networkListsFilterList = networkListsFilter.then(networkListsFilter => networkListsFilter.lists);

Using getNetworkLists

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 getNetworkLists(args: GetNetworkListsArgs, opts?: InvokeOptions): Promise<GetNetworkListsResult>
function getNetworkListsOutput(args: GetNetworkListsOutputArgs, opts?: InvokeOptions): Output<GetNetworkListsResult>
def get_network_lists(name: Optional[str] = None,
                      type: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetNetworkListsResult
def get_network_lists_output(name: Optional[pulumi.Input[str]] = None,
                      type: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetNetworkListsResult]
func GetNetworkLists(ctx *Context, args *GetNetworkListsArgs, opts ...InvokeOption) (*GetNetworkListsResult, error)
func GetNetworkListsOutput(ctx *Context, args *GetNetworkListsOutputArgs, opts ...InvokeOption) GetNetworkListsResultOutput

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

public static class GetNetworkLists 
{
    public static Task<GetNetworkListsResult> InvokeAsync(GetNetworkListsArgs args, InvokeOptions? opts = null)
    public static Output<GetNetworkListsResult> Invoke(GetNetworkListsInvokeArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string
The name of a specific network list to retrieve. If not supplied, information about all network lists will be returned.
Type string
The type of network lists to be retrieved; must be either “IP” or “GEO”. If not supplied, information about both types will be returned.
Name string
The name of a specific network list to retrieve. If not supplied, information about all network lists will be returned.
Type string
The type of network lists to be retrieved; must be either “IP” or “GEO”. If not supplied, information about both types will be returned.
name string
The name of a specific network list to retrieve. If not supplied, information about all network lists will be returned.
type string
The type of network lists to be retrieved; must be either “IP” or “GEO”. If not supplied, information about both types will be returned.
name str
The name of a specific network list to retrieve. If not supplied, information about all network lists will be returned.
type str
The type of network lists to be retrieved; must be either “IP” or “GEO”. If not supplied, information about both types will be returned.

getNetworkLists Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Json string
A JSON-formatted list of information about the specified network list(s).
Lists List<string>
A list containing the IDs of the specified network lists(s).
OutputText string
A tabular display showing the network list information.
Uniqueid string
The ID of the indicated list (if the name argument was supplied).
Name string
Type string
Id string
The provider-assigned unique ID for this managed resource.
Json string
A JSON-formatted list of information about the specified network list(s).
Lists []string
A list containing the IDs of the specified network lists(s).
OutputText string
A tabular display showing the network list information.
Uniqueid string
The ID of the indicated list (if the name argument was supplied).
Name string
Type string
id string
The provider-assigned unique ID for this managed resource.
json string
A JSON-formatted list of information about the specified network list(s).
lists string[]
A list containing the IDs of the specified network lists(s).
outputText string
A tabular display showing the network list information.
uniqueid string
The ID of the indicated list (if the name argument was supplied).
name string
type string
id str
The provider-assigned unique ID for this managed resource.
json str
A JSON-formatted list of information about the specified network list(s).
lists Sequence[str]
A list containing the IDs of the specified network lists(s).
output_text str
A tabular display showing the network list information.
uniqueid str
The ID of the indicated list (if the name argument was supplied).
name str
type 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.