AppSecReputationProfile

Scopes: Security policy

Creates or modifies a reputation profile. Reputation profiles grade the security risk of an IP address based on previous activities associated with that address. Depending on the reputation score and how your configuration has been set up, requests from a specific IP address can trigger an alert or even be blocked.

Related API Endpoint: /appsec/v1/configs/{configId}/versions/{versionNumber}/reputation-profiles

Output Options

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

  • reputation_profile_id. ID of the newly-created or newly-modified reputation profile.

Example Usage

Basic usage

using System.IO;
using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var configuration = Output.Create(Akamai.GetAppSecConfiguration.InvokeAsync(new Akamai.GetAppSecConfigurationArgs
        {
            Name = "Documentation",
        }));
        var reputationProfile = new Akamai.AppSecReputationProfile("reputationProfile", new Akamai.AppSecReputationProfileArgs
        {
            ConfigId = configuration.Apply(configuration => configuration.ConfigId),
            ReputationProfile = File.ReadAllText($"{path.Module}/reputation_profile.json"),
        });
        this.ReputationProfileId = reputationProfile.ReputationProfileId;
    }

    [Output("reputationProfileId")]
    public Output<string> ReputationProfileId { get; set; }
}
package main

import (
	"fmt"
	"io/ioutil"

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

func readFileOrPanic(path string) pulumi.StringPtrInput {
	data, err := ioutil.ReadFile(path)
	if err != nil {
		panic(err.Error())
	}
	return pulumi.String(string(data))
}

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
		}
		reputationProfile, err := akamai.NewAppSecReputationProfile(ctx, "reputationProfile", &akamai.AppSecReputationProfileArgs{
			ConfigId:          pulumi.Int(configuration.ConfigId),
			ReputationProfile: readFileOrPanic(fmt.Sprintf("%v/reputation_profile.json", path.Module)),
		})
		if err != nil {
			return err
		}
		ctx.Export("reputationProfileId", reputationProfile.ReputationProfileId)
		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.AppSecReputationProfile;
import com.pulumi.akamai.AppSecReputationProfileArgs;
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());

        var reputationProfile = new AppSecReputationProfile("reputationProfile", AppSecReputationProfileArgs.builder()        
            .configId(configuration.applyValue(getAppSecConfigurationResult -> getAppSecConfigurationResult.configId()))
            .reputationProfile(Files.readString(Paths.get(String.format("%s/reputation_profile.json", path.module()))))
            .build());

        ctx.export("reputationProfileId", reputationProfile.reputationProfileId());
    }
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name="Documentation")
reputation_profile = akamai.AppSecReputationProfile("reputationProfile",
    config_id=configuration.config_id,
    reputation_profile=(lambda path: open(path).read())(f"{path['module']}/reputation_profile.json"))
pulumi.export("reputationProfileId", reputation_profile.reputation_profile_id)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";
import * as fs from "fs";

const configuration = akamai.getAppSecConfiguration({
    name: "Documentation",
});
const reputationProfile = new akamai.AppSecReputationProfile("reputationProfile", {
    configId: configuration.then(configuration => configuration.configId),
    reputationProfile: fs.readFileSync(`${path.module}/reputation_profile.json`),
});
export const reputationProfileId = reputationProfile.reputationProfileId;

Coming soon!

Create AppSecReputationProfile Resource

new AppSecReputationProfile(name: string, args: AppSecReputationProfileArgs, opts?: CustomResourceOptions);
@overload
def AppSecReputationProfile(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            config_id: Optional[int] = None,
                            reputation_profile: Optional[str] = None)
@overload
def AppSecReputationProfile(resource_name: str,
                            args: AppSecReputationProfileArgs,
                            opts: Optional[ResourceOptions] = None)
func NewAppSecReputationProfile(ctx *Context, name string, args AppSecReputationProfileArgs, opts ...ResourceOption) (*AppSecReputationProfile, error)
public AppSecReputationProfile(string name, AppSecReputationProfileArgs args, CustomResourceOptions? opts = null)
public AppSecReputationProfile(String name, AppSecReputationProfileArgs args)
public AppSecReputationProfile(String name, AppSecReputationProfileArgs args, CustomResourceOptions options)
type: akamai:AppSecReputationProfile
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AppSecReputationProfileArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args AppSecReputationProfileArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args AppSecReputationProfileArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AppSecReputationProfileArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AppSecReputationProfileArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

AppSecReputationProfile Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The AppSecReputationProfile resource accepts the following input properties:

ConfigId int

. Unique identifier of the security configuration associated with the reputation profile being modified.

ReputationProfile string

. Path to a JSON file containing a definition of the reputation profile.

ConfigId int

. Unique identifier of the security configuration associated with the reputation profile being modified.

ReputationProfile string

. Path to a JSON file containing a definition of the reputation profile.

configId Integer

. Unique identifier of the security configuration associated with the reputation profile being modified.

reputationProfile String

. Path to a JSON file containing a definition of the reputation profile.

configId number

. Unique identifier of the security configuration associated with the reputation profile being modified.

reputationProfile string

. Path to a JSON file containing a definition of the reputation profile.

config_id int

. Unique identifier of the security configuration associated with the reputation profile being modified.

reputation_profile str

. Path to a JSON file containing a definition of the reputation profile.

configId Number

. Unique identifier of the security configuration associated with the reputation profile being modified.

reputationProfile String

. Path to a JSON file containing a definition of the reputation profile.

Outputs

All input properties are implicitly available as output properties. Additionally, the AppSecReputationProfile resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

ReputationProfileId int

Unique identifer of the reputation profile

Id string

The provider-assigned unique ID for this managed resource.

ReputationProfileId int

Unique identifer of the reputation profile

id String

The provider-assigned unique ID for this managed resource.

reputationProfileId Integer

Unique identifer of the reputation profile

id string

The provider-assigned unique ID for this managed resource.

reputationProfileId number

Unique identifer of the reputation profile

id str

The provider-assigned unique ID for this managed resource.

reputation_profile_id int

Unique identifer of the reputation profile

id String

The provider-assigned unique ID for this managed resource.

reputationProfileId Number

Unique identifer of the reputation profile

Look up Existing AppSecReputationProfile Resource

Get an existing AppSecReputationProfile resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: AppSecReputationProfileState, opts?: CustomResourceOptions): AppSecReputationProfile
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config_id: Optional[int] = None,
        reputation_profile: Optional[str] = None,
        reputation_profile_id: Optional[int] = None) -> AppSecReputationProfile
func GetAppSecReputationProfile(ctx *Context, name string, id IDInput, state *AppSecReputationProfileState, opts ...ResourceOption) (*AppSecReputationProfile, error)
public static AppSecReputationProfile Get(string name, Input<string> id, AppSecReputationProfileState? state, CustomResourceOptions? opts = null)
public static AppSecReputationProfile get(String name, Output<String> id, AppSecReputationProfileState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ConfigId int

. Unique identifier of the security configuration associated with the reputation profile being modified.

ReputationProfile string

. Path to a JSON file containing a definition of the reputation profile.

ReputationProfileId int

Unique identifer of the reputation profile

ConfigId int

. Unique identifier of the security configuration associated with the reputation profile being modified.

ReputationProfile string

. Path to a JSON file containing a definition of the reputation profile.

ReputationProfileId int

Unique identifer of the reputation profile

configId Integer

. Unique identifier of the security configuration associated with the reputation profile being modified.

reputationProfile String

. Path to a JSON file containing a definition of the reputation profile.

reputationProfileId Integer

Unique identifer of the reputation profile

configId number

. Unique identifier of the security configuration associated with the reputation profile being modified.

reputationProfile string

. Path to a JSON file containing a definition of the reputation profile.

reputationProfileId number

Unique identifer of the reputation profile

config_id int

. Unique identifier of the security configuration associated with the reputation profile being modified.

reputation_profile str

. Path to a JSON file containing a definition of the reputation profile.

reputation_profile_id int

Unique identifer of the reputation profile

configId Number

. Unique identifier of the security configuration associated with the reputation profile being modified.

reputationProfile String

. Path to a JSON file containing a definition of the reputation profile.

reputationProfileId Number

Unique identifer of the reputation profile

Package Details

Repository
https://github.com/pulumi/pulumi-akamai
License
Apache-2.0
Notes

This Pulumi package is based on the akamai Terraform Provider.