1. Packages
  2. Incapsula Provider
  3. API Docs
  4. ApiSecurityApiConfig
incapsula 3.32.1 published on Monday, Apr 14, 2025 by imperva

incapsula.ApiSecurityApiConfig

Explore with Pulumi AI

incapsula logo
incapsula 3.32.1 published on Monday, Apr 14, 2025 by imperva

    Provides an Incapsula API Security API Config resource.

    API Security API Config include violation actions set for specific API.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as fs from "fs";
    import * as incapsula from "@pulumi/incapsula";
    
    const demo_terraform_api_security_api_config = new incapsula.ApiSecurityApiConfig("demo-terraform-api-security-api-config", {
        siteId: incapsula_site["example-site"].id,
        apiSpecification: fs.readFileSync("path/to/your/swagger/file.yaml", "utf8"),
        invalidUrlViolationAction: "IGNORE",
        invalidMethodViolationAction: "BLOCK_USER",
        missingParamViolationAction: "BLOCK_IP",
        invalidParamValueViolationAction: "BLOCK_REQUEST",
        invalidParamNameViolationAction: "ALERT_ONLY",
        description: "your site API description",
        basePath: "/base/path",
    });
    
    import pulumi
    import pulumi_incapsula as incapsula
    
    demo_terraform_api_security_api_config = incapsula.ApiSecurityApiConfig("demo-terraform-api-security-api-config",
        site_id=incapsula_site["example-site"]["id"],
        api_specification=(lambda path: open(path).read())("path/to/your/swagger/file.yaml"),
        invalid_url_violation_action="IGNORE",
        invalid_method_violation_action="BLOCK_USER",
        missing_param_violation_action="BLOCK_IP",
        invalid_param_value_violation_action="BLOCK_REQUEST",
        invalid_param_name_violation_action="ALERT_ONLY",
        description="your site API description",
        base_path="/base/path")
    
    package main
    
    import (
    	"os"
    
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/incapsula/v3/incapsula"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func readFileOrPanic(path string) pulumi.StringPtrInput {
    	data, err := os.ReadFile(path)
    	if err != nil {
    		panic(err.Error())
    	}
    	return pulumi.String(string(data))
    }
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := incapsula.NewApiSecurityApiConfig(ctx, "demo-terraform-api-security-api-config", &incapsula.ApiSecurityApiConfigArgs{
    			SiteId:                           pulumi.Any(incapsula_site.ExampleSite.Id),
    			ApiSpecification:                 pulumi.String(readFileOrPanic("path/to/your/swagger/file.yaml")),
    			InvalidUrlViolationAction:        pulumi.String("IGNORE"),
    			InvalidMethodViolationAction:     pulumi.String("BLOCK_USER"),
    			MissingParamViolationAction:      pulumi.String("BLOCK_IP"),
    			InvalidParamValueViolationAction: pulumi.String("BLOCK_REQUEST"),
    			InvalidParamNameViolationAction:  pulumi.String("ALERT_ONLY"),
    			Description:                      pulumi.String("your site API description"),
    			BasePath:                         pulumi.String("/base/path"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using Pulumi;
    using Incapsula = Pulumi.Incapsula;
    
    return await Deployment.RunAsync(() => 
    {
        var demo_terraform_api_security_api_config = new Incapsula.ApiSecurityApiConfig("demo-terraform-api-security-api-config", new()
        {
            SiteId = incapsula_site.Example_site.Id,
            ApiSpecification = File.ReadAllText("path/to/your/swagger/file.yaml"),
            InvalidUrlViolationAction = "IGNORE",
            InvalidMethodViolationAction = "BLOCK_USER",
            MissingParamViolationAction = "BLOCK_IP",
            InvalidParamValueViolationAction = "BLOCK_REQUEST",
            InvalidParamNameViolationAction = "ALERT_ONLY",
            Description = "your site API description",
            BasePath = "/base/path",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.incapsula.ApiSecurityApiConfig;
    import com.pulumi.incapsula.ApiSecurityApiConfigArgs;
    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) {
            var demo_terraform_api_security_api_config = new ApiSecurityApiConfig("demo-terraform-api-security-api-config", ApiSecurityApiConfigArgs.builder()
                .siteId(incapsula_site.example-site().id())
                .apiSpecification(Files.readString(Paths.get("path/to/your/swagger/file.yaml")))
                .invalidUrlViolationAction("IGNORE")
                .invalidMethodViolationAction("BLOCK_USER")
                .missingParamViolationAction("BLOCK_IP")
                .invalidParamValueViolationAction("BLOCK_REQUEST")
                .invalidParamNameViolationAction("ALERT_ONLY")
                .description("your site API description")
                .basePath("/base/path")
                .build());
    
        }
    }
    
    resources:
      demo-terraform-api-security-api-config:
        type: incapsula:ApiSecurityApiConfig
        properties:
          siteId: ${incapsula_site"example-site"[%!s(MISSING)].id}
          apiSpecification:
            fn::readFile: path/to/your/swagger/file.yaml
          invalidUrlViolationAction: IGNORE
          invalidMethodViolationAction: BLOCK_USER
          missingParamViolationAction: BLOCK_IP
          invalidParamValueViolationAction: BLOCK_REQUEST
          invalidParamNameViolationAction: ALERT_ONLY
          description: your site API description
          basePath: /base/path
    

    Create ApiSecurityApiConfig Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ApiSecurityApiConfig(name: string, args: ApiSecurityApiConfigArgs, opts?: CustomResourceOptions);
    @overload
    def ApiSecurityApiConfig(resource_name: str,
                             args: ApiSecurityApiConfigArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApiSecurityApiConfig(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             api_specification: Optional[str] = None,
                             site_id: Optional[float] = None,
                             api_security_api_config_id: Optional[str] = None,
                             base_path: Optional[str] = None,
                             description: Optional[str] = None,
                             invalid_method_violation_action: Optional[str] = None,
                             invalid_param_name_violation_action: Optional[str] = None,
                             invalid_param_value_violation_action: Optional[str] = None,
                             invalid_url_violation_action: Optional[str] = None,
                             missing_param_violation_action: Optional[str] = None)
    func NewApiSecurityApiConfig(ctx *Context, name string, args ApiSecurityApiConfigArgs, opts ...ResourceOption) (*ApiSecurityApiConfig, error)
    public ApiSecurityApiConfig(string name, ApiSecurityApiConfigArgs args, CustomResourceOptions? opts = null)
    public ApiSecurityApiConfig(String name, ApiSecurityApiConfigArgs args)
    public ApiSecurityApiConfig(String name, ApiSecurityApiConfigArgs args, CustomResourceOptions options)
    
    type: incapsula:ApiSecurityApiConfig
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ApiSecurityApiConfigArgs
    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 ApiSecurityApiConfigArgs
    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 ApiSecurityApiConfigArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApiSecurityApiConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApiSecurityApiConfigArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var apiSecurityApiConfigResource = new Incapsula.ApiSecurityApiConfig("apiSecurityApiConfigResource", new()
    {
        ApiSpecification = "string",
        SiteId = 0,
        ApiSecurityApiConfigId = "string",
        BasePath = "string",
        Description = "string",
        InvalidMethodViolationAction = "string",
        InvalidParamNameViolationAction = "string",
        InvalidParamValueViolationAction = "string",
        InvalidUrlViolationAction = "string",
        MissingParamViolationAction = "string",
    });
    
    example, err := incapsula.NewApiSecurityApiConfig(ctx, "apiSecurityApiConfigResource", &incapsula.ApiSecurityApiConfigArgs{
    	ApiSpecification:                 pulumi.String("string"),
    	SiteId:                           pulumi.Float64(0),
    	ApiSecurityApiConfigId:           pulumi.String("string"),
    	BasePath:                         pulumi.String("string"),
    	Description:                      pulumi.String("string"),
    	InvalidMethodViolationAction:     pulumi.String("string"),
    	InvalidParamNameViolationAction:  pulumi.String("string"),
    	InvalidParamValueViolationAction: pulumi.String("string"),
    	InvalidUrlViolationAction:        pulumi.String("string"),
    	MissingParamViolationAction:      pulumi.String("string"),
    })
    
    var apiSecurityApiConfigResource = new ApiSecurityApiConfig("apiSecurityApiConfigResource", ApiSecurityApiConfigArgs.builder()
        .apiSpecification("string")
        .siteId(0)
        .apiSecurityApiConfigId("string")
        .basePath("string")
        .description("string")
        .invalidMethodViolationAction("string")
        .invalidParamNameViolationAction("string")
        .invalidParamValueViolationAction("string")
        .invalidUrlViolationAction("string")
        .missingParamViolationAction("string")
        .build());
    
    api_security_api_config_resource = incapsula.ApiSecurityApiConfig("apiSecurityApiConfigResource",
        api_specification="string",
        site_id=0,
        api_security_api_config_id="string",
        base_path="string",
        description="string",
        invalid_method_violation_action="string",
        invalid_param_name_violation_action="string",
        invalid_param_value_violation_action="string",
        invalid_url_violation_action="string",
        missing_param_violation_action="string")
    
    const apiSecurityApiConfigResource = new incapsula.ApiSecurityApiConfig("apiSecurityApiConfigResource", {
        apiSpecification: "string",
        siteId: 0,
        apiSecurityApiConfigId: "string",
        basePath: "string",
        description: "string",
        invalidMethodViolationAction: "string",
        invalidParamNameViolationAction: "string",
        invalidParamValueViolationAction: "string",
        invalidUrlViolationAction: "string",
        missingParamViolationAction: "string",
    });
    
    type: incapsula:ApiSecurityApiConfig
    properties:
        apiSecurityApiConfigId: string
        apiSpecification: string
        basePath: string
        description: string
        invalidMethodViolationAction: string
        invalidParamNameViolationAction: string
        invalidParamValueViolationAction: string
        invalidUrlViolationAction: string
        missingParamViolationAction: string
        siteId: 0
    

    ApiSecurityApiConfig Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ApiSecurityApiConfig resource accepts the following input properties:

    ApiSpecification string
    The API specification document content. The supported format is OAS2 or OAS3.
    SiteId double
    Numeric identifier of the site to operate on.
    ApiSecurityApiConfigId string
    Unique identifier in the API for the API Security Site Configuration.
    BasePath string
    Override the spec basePath / server base path with this value.
    Description string
    A description that will help recognize the API in the dashboard.
    InvalidMethodViolationAction string
    The action taken when an invalid method Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    InvalidParamNameViolationAction string
    The action taken when an invalid parameter value Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT.
    InvalidParamValueViolationAction string

    The action taken when an invalid parameter value Violation occurs. Assigning DEFAULT will inherit the action from parent object. Possible values: ALERT_ONLY, BLOCK_REQUEST , BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.

    NOTE: invalid_param_name_violation_action parameter is currently not supported. Please do not use/change value.

    InvalidUrlViolationAction string
    The action taken when an invalid URL Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    MissingParamViolationAction string
    The action taken when a missing parameter Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    ApiSpecification string
    The API specification document content. The supported format is OAS2 or OAS3.
    SiteId float64
    Numeric identifier of the site to operate on.
    ApiSecurityApiConfigId string
    Unique identifier in the API for the API Security Site Configuration.
    BasePath string
    Override the spec basePath / server base path with this value.
    Description string
    A description that will help recognize the API in the dashboard.
    InvalidMethodViolationAction string
    The action taken when an invalid method Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    InvalidParamNameViolationAction string
    The action taken when an invalid parameter value Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT.
    InvalidParamValueViolationAction string

    The action taken when an invalid parameter value Violation occurs. Assigning DEFAULT will inherit the action from parent object. Possible values: ALERT_ONLY, BLOCK_REQUEST , BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.

    NOTE: invalid_param_name_violation_action parameter is currently not supported. Please do not use/change value.

    InvalidUrlViolationAction string
    The action taken when an invalid URL Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    MissingParamViolationAction string
    The action taken when a missing parameter Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    apiSpecification String
    The API specification document content. The supported format is OAS2 or OAS3.
    siteId Double
    Numeric identifier of the site to operate on.
    apiSecurityApiConfigId String
    Unique identifier in the API for the API Security Site Configuration.
    basePath String
    Override the spec basePath / server base path with this value.
    description String
    A description that will help recognize the API in the dashboard.
    invalidMethodViolationAction String
    The action taken when an invalid method Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    invalidParamNameViolationAction String
    The action taken when an invalid parameter value Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT.
    invalidParamValueViolationAction String

    The action taken when an invalid parameter value Violation occurs. Assigning DEFAULT will inherit the action from parent object. Possible values: ALERT_ONLY, BLOCK_REQUEST , BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.

    NOTE: invalid_param_name_violation_action parameter is currently not supported. Please do not use/change value.

    invalidUrlViolationAction String
    The action taken when an invalid URL Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    missingParamViolationAction String
    The action taken when a missing parameter Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    apiSpecification string
    The API specification document content. The supported format is OAS2 or OAS3.
    siteId number
    Numeric identifier of the site to operate on.
    apiSecurityApiConfigId string
    Unique identifier in the API for the API Security Site Configuration.
    basePath string
    Override the spec basePath / server base path with this value.
    description string
    A description that will help recognize the API in the dashboard.
    invalidMethodViolationAction string
    The action taken when an invalid method Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    invalidParamNameViolationAction string
    The action taken when an invalid parameter value Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT.
    invalidParamValueViolationAction string

    The action taken when an invalid parameter value Violation occurs. Assigning DEFAULT will inherit the action from parent object. Possible values: ALERT_ONLY, BLOCK_REQUEST , BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.

    NOTE: invalid_param_name_violation_action parameter is currently not supported. Please do not use/change value.

    invalidUrlViolationAction string
    The action taken when an invalid URL Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    missingParamViolationAction string
    The action taken when a missing parameter Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    api_specification str
    The API specification document content. The supported format is OAS2 or OAS3.
    site_id float
    Numeric identifier of the site to operate on.
    api_security_api_config_id str
    Unique identifier in the API for the API Security Site Configuration.
    base_path str
    Override the spec basePath / server base path with this value.
    description str
    A description that will help recognize the API in the dashboard.
    invalid_method_violation_action str
    The action taken when an invalid method Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    invalid_param_name_violation_action str
    The action taken when an invalid parameter value Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT.
    invalid_param_value_violation_action str

    The action taken when an invalid parameter value Violation occurs. Assigning DEFAULT will inherit the action from parent object. Possible values: ALERT_ONLY, BLOCK_REQUEST , BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.

    NOTE: invalid_param_name_violation_action parameter is currently not supported. Please do not use/change value.

    invalid_url_violation_action str
    The action taken when an invalid URL Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    missing_param_violation_action str
    The action taken when a missing parameter Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    apiSpecification String
    The API specification document content. The supported format is OAS2 or OAS3.
    siteId Number
    Numeric identifier of the site to operate on.
    apiSecurityApiConfigId String
    Unique identifier in the API for the API Security Site Configuration.
    basePath String
    Override the spec basePath / server base path with this value.
    description String
    A description that will help recognize the API in the dashboard.
    invalidMethodViolationAction String
    The action taken when an invalid method Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    invalidParamNameViolationAction String
    The action taken when an invalid parameter value Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT.
    invalidParamValueViolationAction String

    The action taken when an invalid parameter value Violation occurs. Assigning DEFAULT will inherit the action from parent object. Possible values: ALERT_ONLY, BLOCK_REQUEST , BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.

    NOTE: invalid_param_name_violation_action parameter is currently not supported. Please do not use/change value.

    invalidUrlViolationAction String
    The action taken when an invalid URL Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    missingParamViolationAction String
    The action taken when a missing parameter Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.

    Outputs

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

    HostName string
    The API's host name
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModified double
    (Optional) The last modified timestamp.
    HostName string
    The API's host name
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModified float64
    (Optional) The last modified timestamp.
    hostName String
    The API's host name
    id String
    The provider-assigned unique ID for this managed resource.
    lastModified Double
    (Optional) The last modified timestamp.
    hostName string
    The API's host name
    id string
    The provider-assigned unique ID for this managed resource.
    lastModified number
    (Optional) The last modified timestamp.
    host_name str
    The API's host name
    id str
    The provider-assigned unique ID for this managed resource.
    last_modified float
    (Optional) The last modified timestamp.
    hostName String
    The API's host name
    id String
    The provider-assigned unique ID for this managed resource.
    lastModified Number
    (Optional) The last modified timestamp.

    Look up Existing ApiSecurityApiConfig Resource

    Get an existing ApiSecurityApiConfig 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?: ApiSecurityApiConfigState, opts?: CustomResourceOptions): ApiSecurityApiConfig
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            api_security_api_config_id: Optional[str] = None,
            api_specification: Optional[str] = None,
            base_path: Optional[str] = None,
            description: Optional[str] = None,
            host_name: Optional[str] = None,
            invalid_method_violation_action: Optional[str] = None,
            invalid_param_name_violation_action: Optional[str] = None,
            invalid_param_value_violation_action: Optional[str] = None,
            invalid_url_violation_action: Optional[str] = None,
            last_modified: Optional[float] = None,
            missing_param_violation_action: Optional[str] = None,
            site_id: Optional[float] = None) -> ApiSecurityApiConfig
    func GetApiSecurityApiConfig(ctx *Context, name string, id IDInput, state *ApiSecurityApiConfigState, opts ...ResourceOption) (*ApiSecurityApiConfig, error)
    public static ApiSecurityApiConfig Get(string name, Input<string> id, ApiSecurityApiConfigState? state, CustomResourceOptions? opts = null)
    public static ApiSecurityApiConfig get(String name, Output<String> id, ApiSecurityApiConfigState state, CustomResourceOptions options)
    resources:  _:    type: incapsula:ApiSecurityApiConfig    get:      id: ${id}
    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:
    ApiSecurityApiConfigId string
    Unique identifier in the API for the API Security Site Configuration.
    ApiSpecification string
    The API specification document content. The supported format is OAS2 or OAS3.
    BasePath string
    Override the spec basePath / server base path with this value.
    Description string
    A description that will help recognize the API in the dashboard.
    HostName string
    The API's host name
    InvalidMethodViolationAction string
    The action taken when an invalid method Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    InvalidParamNameViolationAction string
    The action taken when an invalid parameter value Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT.
    InvalidParamValueViolationAction string

    The action taken when an invalid parameter value Violation occurs. Assigning DEFAULT will inherit the action from parent object. Possible values: ALERT_ONLY, BLOCK_REQUEST , BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.

    NOTE: invalid_param_name_violation_action parameter is currently not supported. Please do not use/change value.

    InvalidUrlViolationAction string
    The action taken when an invalid URL Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    LastModified double
    (Optional) The last modified timestamp.
    MissingParamViolationAction string
    The action taken when a missing parameter Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    SiteId double
    Numeric identifier of the site to operate on.
    ApiSecurityApiConfigId string
    Unique identifier in the API for the API Security Site Configuration.
    ApiSpecification string
    The API specification document content. The supported format is OAS2 or OAS3.
    BasePath string
    Override the spec basePath / server base path with this value.
    Description string
    A description that will help recognize the API in the dashboard.
    HostName string
    The API's host name
    InvalidMethodViolationAction string
    The action taken when an invalid method Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    InvalidParamNameViolationAction string
    The action taken when an invalid parameter value Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT.
    InvalidParamValueViolationAction string

    The action taken when an invalid parameter value Violation occurs. Assigning DEFAULT will inherit the action from parent object. Possible values: ALERT_ONLY, BLOCK_REQUEST , BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.

    NOTE: invalid_param_name_violation_action parameter is currently not supported. Please do not use/change value.

    InvalidUrlViolationAction string
    The action taken when an invalid URL Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    LastModified float64
    (Optional) The last modified timestamp.
    MissingParamViolationAction string
    The action taken when a missing parameter Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    SiteId float64
    Numeric identifier of the site to operate on.
    apiSecurityApiConfigId String
    Unique identifier in the API for the API Security Site Configuration.
    apiSpecification String
    The API specification document content. The supported format is OAS2 or OAS3.
    basePath String
    Override the spec basePath / server base path with this value.
    description String
    A description that will help recognize the API in the dashboard.
    hostName String
    The API's host name
    invalidMethodViolationAction String
    The action taken when an invalid method Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    invalidParamNameViolationAction String
    The action taken when an invalid parameter value Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT.
    invalidParamValueViolationAction String

    The action taken when an invalid parameter value Violation occurs. Assigning DEFAULT will inherit the action from parent object. Possible values: ALERT_ONLY, BLOCK_REQUEST , BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.

    NOTE: invalid_param_name_violation_action parameter is currently not supported. Please do not use/change value.

    invalidUrlViolationAction String
    The action taken when an invalid URL Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    lastModified Double
    (Optional) The last modified timestamp.
    missingParamViolationAction String
    The action taken when a missing parameter Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    siteId Double
    Numeric identifier of the site to operate on.
    apiSecurityApiConfigId string
    Unique identifier in the API for the API Security Site Configuration.
    apiSpecification string
    The API specification document content. The supported format is OAS2 or OAS3.
    basePath string
    Override the spec basePath / server base path with this value.
    description string
    A description that will help recognize the API in the dashboard.
    hostName string
    The API's host name
    invalidMethodViolationAction string
    The action taken when an invalid method Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    invalidParamNameViolationAction string
    The action taken when an invalid parameter value Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT.
    invalidParamValueViolationAction string

    The action taken when an invalid parameter value Violation occurs. Assigning DEFAULT will inherit the action from parent object. Possible values: ALERT_ONLY, BLOCK_REQUEST , BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.

    NOTE: invalid_param_name_violation_action parameter is currently not supported. Please do not use/change value.

    invalidUrlViolationAction string
    The action taken when an invalid URL Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    lastModified number
    (Optional) The last modified timestamp.
    missingParamViolationAction string
    The action taken when a missing parameter Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    siteId number
    Numeric identifier of the site to operate on.
    api_security_api_config_id str
    Unique identifier in the API for the API Security Site Configuration.
    api_specification str
    The API specification document content. The supported format is OAS2 or OAS3.
    base_path str
    Override the spec basePath / server base path with this value.
    description str
    A description that will help recognize the API in the dashboard.
    host_name str
    The API's host name
    invalid_method_violation_action str
    The action taken when an invalid method Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    invalid_param_name_violation_action str
    The action taken when an invalid parameter value Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT.
    invalid_param_value_violation_action str

    The action taken when an invalid parameter value Violation occurs. Assigning DEFAULT will inherit the action from parent object. Possible values: ALERT_ONLY, BLOCK_REQUEST , BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.

    NOTE: invalid_param_name_violation_action parameter is currently not supported. Please do not use/change value.

    invalid_url_violation_action str
    The action taken when an invalid URL Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    last_modified float
    (Optional) The last modified timestamp.
    missing_param_violation_action str
    The action taken when a missing parameter Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    site_id float
    Numeric identifier of the site to operate on.
    apiSecurityApiConfigId String
    Unique identifier in the API for the API Security Site Configuration.
    apiSpecification String
    The API specification document content. The supported format is OAS2 or OAS3.
    basePath String
    Override the spec basePath / server base path with this value.
    description String
    A description that will help recognize the API in the dashboard.
    hostName String
    The API's host name
    invalidMethodViolationAction String
    The action taken when an invalid method Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    invalidParamNameViolationAction String
    The action taken when an invalid parameter value Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT.
    invalidParamValueViolationAction String

    The action taken when an invalid parameter value Violation occurs. Assigning DEFAULT will inherit the action from parent object. Possible values: ALERT_ONLY, BLOCK_REQUEST , BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.

    NOTE: invalid_param_name_violation_action parameter is currently not supported. Please do not use/change value.

    invalidUrlViolationAction String
    The action taken when an invalid URL Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE, DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    lastModified Number
    (Optional) The last modified timestamp.
    missingParamViolationAction String
    The action taken when a missing parameter Violation occurs. Possible values: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP, IGNORE,DEFAULT. Assigning DEFAULT will inherit the action from parent object.
    siteId Number
    Numeric identifier of the site to operate on.

    Import

    API Security API Configuration can be imported using the site_id and then api_id (id) separated by /, e.g.:

    $ pulumi import incapsula:index/apiSecurityApiConfig:ApiSecurityApiConfig example-terraform-api-security-api-config 1234/100200
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    incapsula imperva/terraform-provider-incapsula
    License
    Notes
    This Pulumi package is based on the incapsula Terraform Provider.
    incapsula logo
    incapsula 3.32.1 published on Monday, Apr 14, 2025 by imperva