Akamai

v3.0.0 published on Monday, Jul 25, 2022 by Pulumi

getAppSecMatchTargets

Scopes: Security configuration; match target

Returns information about your match targets. Match targets determine which security policy should apply to an API, hostname, or path.

Related API Endpoint: /appsec/v1/configs/{configId}/versions/{versionNumber}/match-targets{?policyId,includeChildObjectName}

Output Options

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

  • output_text. Tabular report showing the ID and security policy ID of your match targets.
  • json. JSON-formatted list of the match target information.

Example Usage

using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var configuration = Output.Create(Akamai.GetAppSecConfiguration.InvokeAsync(new Akamai.GetAppSecConfigurationArgs
        {
            Name = "Documentation",
        }));
        var matchTargetsAppSecMatchTargets = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecMatchTargets.InvokeAsync(new Akamai.GetAppSecMatchTargetsArgs
        {
            ConfigId = configuration.ConfigId,
        })));
        this.MatchTargets = matchTargetsAppSecMatchTargets.Apply(matchTargetsAppSecMatchTargets => matchTargetsAppSecMatchTargets.OutputText);
        var matchTarget = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecMatchTargets.InvokeAsync(new Akamai.GetAppSecMatchTargetsArgs
        {
            ConfigId = configuration.ConfigId,
            MatchTargetId = 2712938,
        })));
        this.MatchTargetOutput = matchTarget.Apply(matchTarget => matchTarget.OutputText);
    }

    [Output("matchTargets")]
    public Output<string> MatchTargets { get; set; }
    [Output("matchTargetOutput")]
    public Output<string> MatchTargetOutput { get; set; }
}
package main

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

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
		}
		matchTargetsAppSecMatchTargets, err := akamai.GetAppSecMatchTargets(ctx, &GetAppSecMatchTargetsArgs{
			ConfigId: configuration.ConfigId,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("matchTargets", matchTargetsAppSecMatchTargets.OutputText)
		matchTarget, err := akamai.GetAppSecMatchTargets(ctx, &GetAppSecMatchTargetsArgs{
			ConfigId:      configuration.ConfigId,
			MatchTargetId: pulumi.IntRef(2712938),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("matchTargetOutput", matchTarget.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 com.pulumi.akamai.inputs.GetAppSecConfigurationArgs;
import com.pulumi.akamai.inputs.GetAppSecMatchTargetsArgs;
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());

        final var matchTargetsAppSecMatchTargets = AkamaiFunctions.getAppSecMatchTargets(GetAppSecMatchTargetsArgs.builder()
            .configId(configuration.applyValue(getAppSecConfigurationResult -> getAppSecConfigurationResult.configId()))
            .build());

        ctx.export("matchTargets", matchTargetsAppSecMatchTargets.applyValue(getAppSecMatchTargetsResult -> getAppSecMatchTargetsResult.outputText()));
        final var matchTarget = AkamaiFunctions.getAppSecMatchTargets(GetAppSecMatchTargetsArgs.builder()
            .configId(configuration.applyValue(getAppSecConfigurationResult -> getAppSecConfigurationResult.configId()))
            .matchTargetId("2712938")
            .build());

        ctx.export("matchTargetOutput", matchTarget.applyValue(getAppSecMatchTargetsResult -> getAppSecMatchTargetsResult.outputText()));
    }
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name="Documentation")
match_targets_app_sec_match_targets = akamai.get_app_sec_match_targets(config_id=configuration.config_id)
pulumi.export("matchTargets", match_targets_app_sec_match_targets.output_text)
match_target = akamai.get_app_sec_match_targets(config_id=configuration.config_id,
    match_target_id=2712938)
pulumi.export("matchTargetOutput", match_target.output_text)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: "Documentation",
});
const matchTargetsAppSecMatchTargets = configuration.then(configuration => akamai.getAppSecMatchTargets({
    configId: configuration.configId,
}));
export const matchTargets = matchTargetsAppSecMatchTargets.then(matchTargetsAppSecMatchTargets => matchTargetsAppSecMatchTargets.outputText);
const matchTarget = configuration.then(configuration => akamai.getAppSecMatchTargets({
    configId: configuration.configId,
    matchTargetId: 2712938,
}));
export const matchTargetOutput = matchTarget.then(matchTarget => matchTarget.outputText);
variables:
  configuration:
    Fn::Invoke:
      Function: akamai:getAppSecConfiguration
      Arguments:
        name: Documentation
  matchTargetsAppSecMatchTargets:
    Fn::Invoke:
      Function: akamai:getAppSecMatchTargets
      Arguments:
        configId: ${configuration.configId}
  matchTarget:
    Fn::Invoke:
      Function: akamai:getAppSecMatchTargets
      Arguments:
        configId: ${configuration.configId}
        matchTargetId: 2712938
outputs:
  matchTargets: ${matchTargetsAppSecMatchTargets.outputText} # USE CASE: User wants to view a single match target.
  matchTargetOutput: ${matchTarget.outputText}

Using getAppSecMatchTargets

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 getAppSecMatchTargets(args: GetAppSecMatchTargetsArgs, opts?: InvokeOptions): Promise<GetAppSecMatchTargetsResult>
function getAppSecMatchTargetsOutput(args: GetAppSecMatchTargetsOutputArgs, opts?: InvokeOptions): Output<GetAppSecMatchTargetsResult>
def get_app_sec_match_targets(config_id: Optional[int] = None,
                              match_target_id: Optional[int] = None,
                              opts: Optional[InvokeOptions] = None) -> GetAppSecMatchTargetsResult
def get_app_sec_match_targets_output(config_id: Optional[pulumi.Input[int]] = None,
                              match_target_id: Optional[pulumi.Input[int]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetAppSecMatchTargetsResult]
func GetAppSecMatchTargets(ctx *Context, args *GetAppSecMatchTargetsArgs, opts ...InvokeOption) (*GetAppSecMatchTargetsResult, error)
func GetAppSecMatchTargetsOutput(ctx *Context, args *GetAppSecMatchTargetsOutputArgs, opts ...InvokeOption) GetAppSecMatchTargetsResultOutput

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

public static class GetAppSecMatchTargets 
{
    public static Task<GetAppSecMatchTargetsResult> InvokeAsync(GetAppSecMatchTargetsArgs args, InvokeOptions? opts = null)
    public static Output<GetAppSecMatchTargetsResult> Invoke(GetAppSecMatchTargetsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAppSecMatchTargetsResult> getAppSecMatchTargets(GetAppSecMatchTargetsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: akamai:index/getAppSecMatchTargets:getAppSecMatchTargets
  Arguments:
    # Arguments dictionary

The following arguments are supported:

ConfigId int

. Unique identifier of the security configuration associated with the match targets.

MatchTargetId int

. Unique identifier of the match target you want to return information for. If not included, information is returned for all your match targets.

ConfigId int

. Unique identifier of the security configuration associated with the match targets.

MatchTargetId int

. Unique identifier of the match target you want to return information for. If not included, information is returned for all your match targets.

configId Integer

. Unique identifier of the security configuration associated with the match targets.

matchTargetId Integer

. Unique identifier of the match target you want to return information for. If not included, information is returned for all your match targets.

configId number

. Unique identifier of the security configuration associated with the match targets.

matchTargetId number

. Unique identifier of the match target you want to return information for. If not included, information is returned for all your match targets.

config_id int

. Unique identifier of the security configuration associated with the match targets.

match_target_id int

. Unique identifier of the match target you want to return information for. If not included, information is returned for all your match targets.

configId Number

. Unique identifier of the security configuration associated with the match targets.

matchTargetId Number

. Unique identifier of the match target you want to return information for. If not included, information is returned for all your match targets.

getAppSecMatchTargets Result

The following output properties are available:

ConfigId int
Id string

The provider-assigned unique ID for this managed resource.

Json string
OutputText string
MatchTargetId int
ConfigId int
Id string

The provider-assigned unique ID for this managed resource.

Json string
OutputText string
MatchTargetId int
configId Integer
id String

The provider-assigned unique ID for this managed resource.

json String
outputText String
matchTargetId Integer
configId number
id string

The provider-assigned unique ID for this managed resource.

json string
outputText string
matchTargetId number
config_id int
id str

The provider-assigned unique ID for this managed resource.

json str
output_text str
match_target_id int
configId Number
id String

The provider-assigned unique ID for this managed resource.

json String
outputText String
matchTargetId Number

Package Details

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

This Pulumi package is based on the akamai Terraform Provider.