getAppSecIPGeo

Use the akamai.AppSecIPGeo data source to retrieve information about which network lists are used in the IP/Geo Firewall settings.

Example Usage

using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var configuration = Output.Create(Akamai.GetAppSecConfiguration.InvokeAsync(new Akamai.GetAppSecConfigurationArgs
        {
            Name = @var.Security_configuration,
        }));
        var ipGeo = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecIPGeo.InvokeAsync(new Akamai.GetAppSecIPGeoArgs
        {
            ConfigId = configuration.ConfigId,
            SecurityPolicyId = @var.Security_policy_id,
        })));
        this.IpGeoMode = ipGeo.Apply(ipGeo => ipGeo.Mode);
        this.GeoNetworkLists = ipGeo.Apply(ipGeo => ipGeo.GeoNetworkLists);
        this.IpNetworkLists = ipGeo.Apply(ipGeo => ipGeo.IpNetworkLists);
        this.ExceptionIpNetworkLists = ipGeo.Apply(ipGeo => ipGeo.ExceptionIpNetworkLists);
    }

    [Output("ipGeoMode")]
    public Output<string> IpGeoMode { get; set; }
    [Output("geoNetworkLists")]
    public Output<string> GeoNetworkLists { get; set; }
    [Output("ipNetworkLists")]
    public Output<string> IpNetworkLists { get; set; }
    [Output("exceptionIpNetworkLists")]
    public Output<string> ExceptionIpNetworkLists { 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 := _var.Security_configuration
		configuration, err := akamai.LookupAppSecConfiguration(ctx, &akamai.LookupAppSecConfigurationArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		ipGeo, err := akamai.LookupAppSecIPGeo(ctx, &akamai.LookupAppSecIPGeoArgs{
			ConfigId:         configuration.ConfigId,
			SecurityPolicyId: _var.Security_policy_id,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("ipGeoMode", ipGeo.Mode)
		ctx.Export("geoNetworkLists", ipGeo.GeoNetworkLists)
		ctx.Export("ipNetworkLists", ipGeo.IpNetworkLists)
		ctx.Export("exceptionIpNetworkLists", ipGeo.ExceptionIpNetworkLists)
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name=var["security_configuration"])
ip_geo = akamai.get_app_sec_ip_geo(config_id=configuration.config_id,
    security_policy_id=var["security_policy_id"])
pulumi.export("ipGeoMode", ip_geo.mode)
pulumi.export("geoNetworkLists", ip_geo.geo_network_lists)
pulumi.export("ipNetworkLists", ip_geo.ip_network_lists)
pulumi.export("exceptionIpNetworkLists", ip_geo.exception_ip_network_lists)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: _var.security_configuration,
});
const ipGeo = configuration.then(configuration => akamai.getAppSecIPGeo({
    configId: configuration.configId,
    securityPolicyId: _var.security_policy_id,
}));
export const ipGeoMode = ipGeo.then(ipGeo => ipGeo.mode);
export const geoNetworkLists = ipGeo.then(ipGeo => ipGeo.geoNetworkLists);
export const ipNetworkLists = ipGeo.then(ipGeo => ipGeo.ipNetworkLists);
export const exceptionIpNetworkLists = ipGeo.then(ipGeo => ipGeo.exceptionIpNetworkLists);

Using getAppSecIPGeo

function getAppSecIPGeo(args: GetAppSecIPGeoArgs, opts?: InvokeOptions): Promise<GetAppSecIPGeoResult>
def get_app_sec_ip_geo(config_id: Optional[int] = None,
                       security_policy_id: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetAppSecIPGeoResult
func LookupAppSecIPGeo(ctx *Context, args *LookupAppSecIPGeoArgs, opts ...InvokeOption) (*LookupAppSecIPGeoResult, error)

Note: This function is named LookupAppSecIPGeo in the Go SDK.

public static class GetAppSecIPGeo {
    public static Task<GetAppSecIPGeoResult> InvokeAsync(GetAppSecIPGeoArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

ConfigId int
The ID of the security configuration to use.
SecurityPolicyId string
The ID of the security policy to use.
ConfigId int
The ID of the security configuration to use.
SecurityPolicyId string
The ID of the security policy to use.
configId number
The ID of the security configuration to use.
securityPolicyId string
The ID of the security policy to use.
config_id int
The ID of the security configuration to use.
security_policy_id str
The ID of the security policy to use.

getAppSecIPGeo Result

The following output properties are available:

ConfigId int
ExceptionIpNetworkLists List<string>
The network lists to be allowed regardless of mode, geo_network_lists, and ip_network_lists parameters.
GeoNetworkLists List<string>
The network lists to be blocked or allowed geographically.
Id string
The provider-assigned unique ID for this managed resource.
IpNetworkLists List<string>
The network lists to be blocked or allowd by IP address.
Mode string
The mode used for IP/Geo firewall blocking: block to block specific IPs, geographies or network lists, or allow to allow specific IPs or geographies to be let through while blocking the rest.
OutputText string
A tabular display of the IP/Geo firewall settings.
SecurityPolicyId string
ConfigId int
ExceptionIpNetworkLists []string
The network lists to be allowed regardless of mode, geo_network_lists, and ip_network_lists parameters.
GeoNetworkLists []string
The network lists to be blocked or allowed geographically.
Id string
The provider-assigned unique ID for this managed resource.
IpNetworkLists []string
The network lists to be blocked or allowd by IP address.
Mode string
The mode used for IP/Geo firewall blocking: block to block specific IPs, geographies or network lists, or allow to allow specific IPs or geographies to be let through while blocking the rest.
OutputText string
A tabular display of the IP/Geo firewall settings.
SecurityPolicyId string
configId number
exceptionIpNetworkLists string[]
The network lists to be allowed regardless of mode, geo_network_lists, and ip_network_lists parameters.
geoNetworkLists string[]
The network lists to be blocked or allowed geographically.
id string
The provider-assigned unique ID for this managed resource.
ipNetworkLists string[]
The network lists to be blocked or allowd by IP address.
mode string
The mode used for IP/Geo firewall blocking: block to block specific IPs, geographies or network lists, or allow to allow specific IPs or geographies to be let through while blocking the rest.
outputText string
A tabular display of the IP/Geo firewall settings.
securityPolicyId string
config_id int
exception_ip_network_lists Sequence[str]
The network lists to be allowed regardless of mode, geo_network_lists, and ip_network_lists parameters.
geo_network_lists Sequence[str]
The network lists to be blocked or allowed geographically.
id str
The provider-assigned unique ID for this managed resource.
ip_network_lists Sequence[str]
The network lists to be blocked or allowd by IP address.
mode str
The mode used for IP/Geo firewall blocking: block to block specific IPs, geographies or network lists, or allow to allow specific IPs or geographies to be let through while blocking the rest.
output_text str
A tabular display of the IP/Geo firewall settings.
security_policy_id 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.