getAppSecApiRequestConstraints

Use the akamai.AppSecApiRequestConstraints data source to retrieve a list of APIs with their constraints and associated actions, or the constraints and actions for a particular API. The information available is described here.

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 apisRequestConstraints = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecApiRequestConstraints.InvokeAsync(new Akamai.GetAppSecApiRequestConstraintsArgs
        {
            ConfigId = configuration.ConfigId,
            SecurityPolicyId = @var.Security_policy_id,
        })));
        this.ApisConstraintsText = apisRequestConstraints.Apply(apisRequestConstraints => apisRequestConstraints.OutputText);
        this.ApisConstraintsJson = apisRequestConstraints.Apply(apisRequestConstraints => apisRequestConstraints.Json);
        var apiRequestConstraints = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecApiRequestConstraints.InvokeAsync(new Akamai.GetAppSecApiRequestConstraintsArgs
        {
            ConfigId = configuration.ConfigId,
            SecurityPolicyId = @var.Security_policy_id,
            ApiId = @var.Api_id,
        })));
        this.ApiConstraintsText = apiRequestConstraints.Apply(apiRequestConstraints => apiRequestConstraints.OutputText);
        this.ApiConstraintsJson = apiRequestConstraints.Apply(apiRequestConstraints => apiRequestConstraints.Json);
    }

    [Output("apisConstraintsText")]
    public Output<string> ApisConstraintsText { get; set; }
    [Output("apisConstraintsJson")]
    public Output<string> ApisConstraintsJson { get; set; }
    [Output("apiConstraintsText")]
    public Output<string> ApiConstraintsText { get; set; }
    [Output("apiConstraintsJson")]
    public Output<string> ApiConstraintsJson { 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
		}
		apisRequestConstraints, err := akamai.LookupAppSecApiRequestConstraints(ctx, &akamai.LookupAppSecApiRequestConstraintsArgs{
			ConfigId:         configuration.ConfigId,
			SecurityPolicyId: _var.Security_policy_id,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("apisConstraintsText", apisRequestConstraints.OutputText)
		ctx.Export("apisConstraintsJson", apisRequestConstraints.Json)
		opt1 := _var.Api_id
		apiRequestConstraints, err := akamai.LookupAppSecApiRequestConstraints(ctx, &akamai.LookupAppSecApiRequestConstraintsArgs{
			ConfigId:         configuration.ConfigId,
			SecurityPolicyId: _var.Security_policy_id,
			ApiId:            &opt1,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("apiConstraintsText", apiRequestConstraints.OutputText)
		ctx.Export("apiConstraintsJson", apiRequestConstraints.Json)
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name=var["security_configuration"])
apis_request_constraints = akamai.get_app_sec_api_request_constraints(config_id=configuration.config_id,
    security_policy_id=var["security_policy_id"])
pulumi.export("apisConstraintsText", apis_request_constraints.output_text)
pulumi.export("apisConstraintsJson", apis_request_constraints.json)
api_request_constraints = akamai.get_app_sec_api_request_constraints(config_id=configuration.config_id,
    security_policy_id=var["security_policy_id"],
    api_id=var["api_id"])
pulumi.export("apiConstraintsText", api_request_constraints.output_text)
pulumi.export("apiConstraintsJson", api_request_constraints.json)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: _var.security_configuration,
});
const apisRequestConstraints = configuration.then(configuration => akamai.getAppSecApiRequestConstraints({
    configId: configuration.configId,
    securityPolicyId: _var.security_policy_id,
}));
export const apisConstraintsText = apisRequestConstraints.then(apisRequestConstraints => apisRequestConstraints.outputText);
export const apisConstraintsJson = apisRequestConstraints.then(apisRequestConstraints => apisRequestConstraints.json);
const apiRequestConstraints = configuration.then(configuration => akamai.getAppSecApiRequestConstraints({
    configId: configuration.configId,
    securityPolicyId: _var.security_policy_id,
    apiId: _var.api_id,
}));
export const apiConstraintsText = apiRequestConstraints.then(apiRequestConstraints => apiRequestConstraints.outputText);
export const apiConstraintsJson = apiRequestConstraints.then(apiRequestConstraints => apiRequestConstraints.json);

Using getAppSecApiRequestConstraints

function getAppSecApiRequestConstraints(args: GetAppSecApiRequestConstraintsArgs, opts?: InvokeOptions): Promise<GetAppSecApiRequestConstraintsResult>
def get_app_sec_api_request_constraints(api_id: Optional[int] = None,
                                        config_id: Optional[int] = None,
                                        security_policy_id: Optional[str] = None,
                                        opts: Optional[InvokeOptions] = None) -> GetAppSecApiRequestConstraintsResult
func LookupAppSecApiRequestConstraints(ctx *Context, args *LookupAppSecApiRequestConstraintsArgs, opts ...InvokeOption) (*LookupAppSecApiRequestConstraintsResult, error)

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

public static class GetAppSecApiRequestConstraints {
    public static Task<GetAppSecApiRequestConstraintsResult> InvokeAsync(GetAppSecApiRequestConstraintsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

ConfigId int
The configuration ID to use.
SecurityPolicyId string
The ID of the security policy to use.
ApiId int
The ID of a specific API for which to retrieve constraint information.
ConfigId int
The configuration ID to use.
SecurityPolicyId string
The ID of the security policy to use.
ApiId int
The ID of a specific API for which to retrieve constraint information.
configId number
The configuration ID to use.
securityPolicyId string
The ID of the security policy to use.
apiId number
The ID of a specific API for which to retrieve constraint information.
config_id int
The configuration ID to use.
security_policy_id str
The ID of the security policy to use.
api_id int
The ID of a specific API for which to retrieve constraint information.

getAppSecApiRequestConstraints Result

The following output properties are available:

ConfigId int
Id string
The provider-assigned unique ID for this managed resource.
Json string
A JSON-formatted list of information about the APIs and their constraints and actions.
OutputText string
A tabular display showing the APIs and their constraints and actions.
SecurityPolicyId string
ApiId int
ConfigId int
Id string
The provider-assigned unique ID for this managed resource.
Json string
A JSON-formatted list of information about the APIs and their constraints and actions.
OutputText string
A tabular display showing the APIs and their constraints and actions.
SecurityPolicyId string
ApiId int
configId number
id string
The provider-assigned unique ID for this managed resource.
json string
A JSON-formatted list of information about the APIs and their constraints and actions.
outputText string
A tabular display showing the APIs and their constraints and actions.
securityPolicyId string
apiId number
config_id int
id str
The provider-assigned unique ID for this managed resource.
json str
A JSON-formatted list of information about the APIs and their constraints and actions.
output_text str
A tabular display showing the APIs and their constraints and actions.
security_policy_id str
api_id int

Package Details

Repository
https://github.com/pulumi/pulumi-akamai
License
Apache-2.0
Notes
This Pulumi package is based on the akamai Terraform Provider.