Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

AppSecApiConstraintsProtection

Use the akamai.AppSecApiConstraintsProtection resource to enable or disable API constraints protection for a given configuration and security policy.

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 protection = new Akamai.AppSecApiConstraintsProtection("protection", new Akamai.AppSecApiConstraintsProtectionArgs
        {
            ConfigId = configuration.Apply(configuration => configuration.ConfigId),
            SecurityPolicyId = @var.Security_policy_id,
            Enabled = @var.Enabled,
        });
    }

}
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, &GetAppSecConfigurationArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		_, err = akamai.NewAppSecApiConstraintsProtection(ctx, "protection", &akamai.AppSecApiConstraintsProtectionArgs{
			ConfigId:         pulumi.Int(configuration.ConfigId),
			SecurityPolicyId: pulumi.Any(_var.Security_policy_id),
			Enabled:          pulumi.Any(_var.Enabled),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name=var["security_configuration"])
protection = akamai.AppSecApiConstraintsProtection("protection",
    config_id=configuration.config_id,
    security_policy_id=var["security_policy_id"],
    enabled=var["enabled"])
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: _var.security_configuration,
});
const protection = new akamai.AppSecApiConstraintsProtection("protection", {
    configId: configuration.then(configuration => configuration.configId),
    securityPolicyId: _var.security_policy_id,
    enabled: _var.enabled,
});

Create a AppSecApiConstraintsProtection Resource

new AppSecApiConstraintsProtection(name: string, args: AppSecApiConstraintsProtectionArgs, opts?: CustomResourceOptions);
@overload
def AppSecApiConstraintsProtection(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   config_id: Optional[int] = None,
                                   enabled: Optional[bool] = None,
                                   security_policy_id: Optional[str] = None)
@overload
def AppSecApiConstraintsProtection(resource_name: str,
                                   args: AppSecApiConstraintsProtectionArgs,
                                   opts: Optional[ResourceOptions] = None)
func NewAppSecApiConstraintsProtection(ctx *Context, name string, args AppSecApiConstraintsProtectionArgs, opts ...ResourceOption) (*AppSecApiConstraintsProtection, error)
public AppSecApiConstraintsProtection(string name, AppSecApiConstraintsProtectionArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args AppSecApiConstraintsProtectionArgs
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 AppSecApiConstraintsProtectionArgs
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 AppSecApiConstraintsProtectionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AppSecApiConstraintsProtectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

AppSecApiConstraintsProtection 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 AppSecApiConstraintsProtection resource accepts the following input properties:

ConfigId int
The ID of the security configuration to use.
Enabled bool
Whether to enable API constraints protection: either true or false.
SecurityPolicyId string
The ID of the security policy to use.
ConfigId int
The ID of the security configuration to use.
Enabled bool
Whether to enable API constraints protection: either true or false.
SecurityPolicyId string
The ID of the security policy to use.
configId number
The ID of the security configuration to use.
enabled boolean
Whether to enable API constraints protection: either true or false.
securityPolicyId string
The ID of the security policy to use.
config_id int
The ID of the security configuration to use.
enabled bool
Whether to enable API constraints protection: either true or false.
security_policy_id str
The ID of the security policy to use.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
OutputText string
A tabular display showing the current protection settings.
Id string
The provider-assigned unique ID for this managed resource.
OutputText string
A tabular display showing the current protection settings.
id string
The provider-assigned unique ID for this managed resource.
outputText string
A tabular display showing the current protection settings.
id str
The provider-assigned unique ID for this managed resource.
output_text str
A tabular display showing the current protection settings.

Look up an Existing AppSecApiConstraintsProtection Resource

Get an existing AppSecApiConstraintsProtection 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?: AppSecApiConstraintsProtectionState, opts?: CustomResourceOptions): AppSecApiConstraintsProtection
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config_id: Optional[int] = None,
        enabled: Optional[bool] = None,
        output_text: Optional[str] = None,
        security_policy_id: Optional[str] = None) -> AppSecApiConstraintsProtection
func GetAppSecApiConstraintsProtection(ctx *Context, name string, id IDInput, state *AppSecApiConstraintsProtectionState, opts ...ResourceOption) (*AppSecApiConstraintsProtection, error)
public static AppSecApiConstraintsProtection Get(string name, Input<string> id, AppSecApiConstraintsProtectionState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

ConfigId int
The ID of the security configuration to use.
Enabled bool
Whether to enable API constraints protection: either true or false.
OutputText string
A tabular display showing the current protection settings.
SecurityPolicyId string
The ID of the security policy to use.
ConfigId int
The ID of the security configuration to use.
Enabled bool
Whether to enable API constraints protection: either true or false.
OutputText string
A tabular display showing the current protection settings.
SecurityPolicyId string
The ID of the security policy to use.
configId number
The ID of the security configuration to use.
enabled boolean
Whether to enable API constraints protection: either true or false.
outputText string
A tabular display showing the current protection settings.
securityPolicyId string
The ID of the security policy to use.
config_id int
The ID of the security configuration to use.
enabled bool
Whether to enable API constraints protection: either true or false.
output_text str
A tabular display showing the current protection settings.
security_policy_id str
The ID of the security policy to use.

Package Details

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