akamai.AppSecMatchTargetSequence
Scopes: Security configuration
Specifies the order in which match targets are applied within a security configuration. As a general rule, you should process broader and more-general match targets first, gradually working your way down to more granular and highly-specific targets.
Related API Endpoint: /appsec/v1/configs/{configId}/versions/{versionNumber}/match-targets/sequence
Example Usage
Basic usage
using System.Collections.Generic;
using System.IO;
using Pulumi;
using Akamai = Pulumi.Akamai;
return await Deployment.RunAsync(() =>
{
var configuration = Akamai.GetAppSecConfiguration.Invoke(new()
{
Name = "Documentation",
});
var matchTargetSequence = new Akamai.AppSecMatchTargetSequence("matchTargetSequence", new()
{
ConfigId = configuration.Apply(getAppSecConfigurationResult => getAppSecConfigurationResult.ConfigId),
MatchTargetSequence = File.ReadAllText($"{path.Module}/match_targets_sequence.json"),
});
});
package main
import (
"fmt"
"io/ioutil"
"github.com/pulumi/pulumi-akamai/sdk/v4/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, &akamai.LookupAppSecConfigurationArgs{
Name: pulumi.StringRef("Documentation"),
}, nil)
if err != nil {
return err
}
_, err = akamai.NewAppSecMatchTargetSequence(ctx, "matchTargetSequence", &akamai.AppSecMatchTargetSequenceArgs{
ConfigId: *pulumi.Int(configuration.ConfigId),
MatchTargetSequence: readFileOrPanic(fmt.Sprintf("%v/match_targets_sequence.json", path.Module)),
})
if err != nil {
return err
}
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.AppSecMatchTargetSequence;
import com.pulumi.akamai.AppSecMatchTargetSequenceArgs;
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 matchTargetSequence = new AppSecMatchTargetSequence("matchTargetSequence", AppSecMatchTargetSequenceArgs.builder()
.configId(configuration.applyValue(getAppSecConfigurationResult -> getAppSecConfigurationResult.configId()))
.matchTargetSequence(Files.readString(Paths.get(String.format("%s/match_targets_sequence.json", path.module()))))
.build());
}
}
import pulumi
import pulumi_akamai as akamai
configuration = akamai.get_app_sec_configuration(name="Documentation")
match_target_sequence = akamai.AppSecMatchTargetSequence("matchTargetSequence",
config_id=configuration.config_id,
match_target_sequence=(lambda path: open(path).read())(f"{path['module']}/match_targets_sequence.json"))
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";
import * as fs from "fs";
const configuration = akamai.getAppSecConfiguration({
name: "Documentation",
});
const matchTargetSequence = new akamai.AppSecMatchTargetSequence("matchTargetSequence", {
configId: configuration.then(configuration => configuration.configId),
matchTargetSequence: fs.readFileSync(`${path.module}/match_targets_sequence.json`),
});
resources:
matchTargetSequence:
type: akamai:AppSecMatchTargetSequence
properties:
configId: ${configuration.configId}
matchTargetSequence:
fn::readFile: ${path.module}/match_targets_sequence.json
variables:
configuration:
fn::invoke:
Function: akamai:getAppSecConfiguration
Arguments:
name: Documentation
Create AppSecMatchTargetSequence Resource
new AppSecMatchTargetSequence(name: string, args: AppSecMatchTargetSequenceArgs, opts?: CustomResourceOptions);
@overload
def AppSecMatchTargetSequence(resource_name: str,
opts: Optional[ResourceOptions] = None,
config_id: Optional[int] = None,
match_target_sequence: Optional[str] = None)
@overload
def AppSecMatchTargetSequence(resource_name: str,
args: AppSecMatchTargetSequenceArgs,
opts: Optional[ResourceOptions] = None)
func NewAppSecMatchTargetSequence(ctx *Context, name string, args AppSecMatchTargetSequenceArgs, opts ...ResourceOption) (*AppSecMatchTargetSequence, error)
public AppSecMatchTargetSequence(string name, AppSecMatchTargetSequenceArgs args, CustomResourceOptions? opts = null)
public AppSecMatchTargetSequence(String name, AppSecMatchTargetSequenceArgs args)
public AppSecMatchTargetSequence(String name, AppSecMatchTargetSequenceArgs args, CustomResourceOptions options)
type: akamai:AppSecMatchTargetSequence
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AppSecMatchTargetSequenceArgs
- 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 AppSecMatchTargetSequenceArgs
- 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 AppSecMatchTargetSequenceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AppSecMatchTargetSequenceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AppSecMatchTargetSequenceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
AppSecMatchTargetSequence 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 AppSecMatchTargetSequence resource accepts the following input properties:
- Config
Id int . Unique identifier of the security configuration associated with the match target sequence being modified.
- Match
Target stringSequence . Path to a JSON file containing the processing sequence for all the match targets defined for the security configuration. You can find a sample match target sequence JSON file in the Modify match target order section of the Application Security API documentation.
- Config
Id int . Unique identifier of the security configuration associated with the match target sequence being modified.
- Match
Target stringSequence . Path to a JSON file containing the processing sequence for all the match targets defined for the security configuration. You can find a sample match target sequence JSON file in the Modify match target order section of the Application Security API documentation.
- config
Id Integer . Unique identifier of the security configuration associated with the match target sequence being modified.
- match
Target StringSequence . Path to a JSON file containing the processing sequence for all the match targets defined for the security configuration. You can find a sample match target sequence JSON file in the Modify match target order section of the Application Security API documentation.
- config
Id number . Unique identifier of the security configuration associated with the match target sequence being modified.
- match
Target stringSequence . Path to a JSON file containing the processing sequence for all the match targets defined for the security configuration. You can find a sample match target sequence JSON file in the Modify match target order section of the Application Security API documentation.
- config_
id int . Unique identifier of the security configuration associated with the match target sequence being modified.
- match_
target_ strsequence . Path to a JSON file containing the processing sequence for all the match targets defined for the security configuration. You can find a sample match target sequence JSON file in the Modify match target order section of the Application Security API documentation.
- config
Id Number . Unique identifier of the security configuration associated with the match target sequence being modified.
- match
Target StringSequence . Path to a JSON file containing the processing sequence for all the match targets defined for the security configuration. You can find a sample match target sequence JSON file in the Modify match target order section of the Application Security API documentation.
Outputs
All input properties are implicitly available as output properties. Additionally, the AppSecMatchTargetSequence resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing AppSecMatchTargetSequence Resource
Get an existing AppSecMatchTargetSequence 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?: AppSecMatchTargetSequenceState, opts?: CustomResourceOptions): AppSecMatchTargetSequence
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
config_id: Optional[int] = None,
match_target_sequence: Optional[str] = None) -> AppSecMatchTargetSequence
func GetAppSecMatchTargetSequence(ctx *Context, name string, id IDInput, state *AppSecMatchTargetSequenceState, opts ...ResourceOption) (*AppSecMatchTargetSequence, error)
public static AppSecMatchTargetSequence Get(string name, Input<string> id, AppSecMatchTargetSequenceState? state, CustomResourceOptions? opts = null)
public static AppSecMatchTargetSequence get(String name, Output<String> id, AppSecMatchTargetSequenceState 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.
- Config
Id int . Unique identifier of the security configuration associated with the match target sequence being modified.
- Match
Target stringSequence . Path to a JSON file containing the processing sequence for all the match targets defined for the security configuration. You can find a sample match target sequence JSON file in the Modify match target order section of the Application Security API documentation.
- Config
Id int . Unique identifier of the security configuration associated with the match target sequence being modified.
- Match
Target stringSequence . Path to a JSON file containing the processing sequence for all the match targets defined for the security configuration. You can find a sample match target sequence JSON file in the Modify match target order section of the Application Security API documentation.
- config
Id Integer . Unique identifier of the security configuration associated with the match target sequence being modified.
- match
Target StringSequence . Path to a JSON file containing the processing sequence for all the match targets defined for the security configuration. You can find a sample match target sequence JSON file in the Modify match target order section of the Application Security API documentation.
- config
Id number . Unique identifier of the security configuration associated with the match target sequence being modified.
- match
Target stringSequence . Path to a JSON file containing the processing sequence for all the match targets defined for the security configuration. You can find a sample match target sequence JSON file in the Modify match target order section of the Application Security API documentation.
- config_
id int . Unique identifier of the security configuration associated with the match target sequence being modified.
- match_
target_ strsequence . Path to a JSON file containing the processing sequence for all the match targets defined for the security configuration. You can find a sample match target sequence JSON file in the Modify match target order section of the Application Security API documentation.
- config
Id Number . Unique identifier of the security configuration associated with the match target sequence being modified.
- match
Target StringSequence . Path to a JSON file containing the processing sequence for all the match targets defined for the security configuration. You can find a sample match target sequence JSON file in the Modify match target order section of the Application Security API documentation.
Package Details
- Repository
- Akamai pulumi/pulumi-akamai
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
akamai
Terraform Provider.