1. Packages
  2. Incapsula Provider
  3. API Docs
  4. DeliveryRulesConfiguration
incapsula 3.33.0 published on Wednesday, Apr 30, 2025 by imperva

incapsula.DeliveryRulesConfiguration

Explore with Pulumi AI

incapsula logo
incapsula 3.33.0 published on Wednesday, Apr 30, 2025 by imperva

    Provides the delivery rules configuration for a specific site. The order of rules execution (a.k.a. priority) is the same as the order they are defined in the resource configuration.

    Currently there are 5 possible types of delivery rule:

    • REDIRECT - Redirect requests with 30X response.
    • REWRITE - Modify, add, and remove different request attributes such as URL, headers and cookies.
    • REWRITE_RESPONSE - Modify, add, and remove different response attributes such as headers, statuc code and error responses.
    • FORWARD - Forward the request to a specific data-center or port.
    • SIMPLIFIED_REDIRECT - Available as a separate resource: simplified_redirect_rules_configuration

    Important Notes:

    • When using this resource, the rule names within each category must be unique. When multiple rules have the same name, the update would fail with an error message specifying the index of the offending rules.
    • This resource replaces all rules within the specified category, so existing rules that are not specified in the configuration will be deleted. In particular, this resource cannot be used with incapsula.IncapRule to configure rules for the same category type.

    REWRITE_RESPONSE RULES

    import * as pulumi from "@pulumi/pulumi";
    import * as incapsula from "@pulumi/incapsula";
    
    const rewrite_response_rules = new incapsula.DeliveryRulesConfiguration("rewrite-response-rules", {
        category: "REWRITE_RESPONSE",
        siteId: incapsula_site["example-site"].id,
        rules: [
            {
                filter: "ASN == 1",
                headerName: "abc",
                multipleHeadersDeletion: false,
                ruleName: "New delivery rule",
                action: "RULE_ACTION_RESPONSE_DELETE_HEADER",
                enabled: true,
            },
            {
                filter: "ASN == 1",
                headerName: "abc",
                from: "header1",
                to: "header2",
                rewriteExisting: true,
                addIfMissing: false,
                ruleName: "New delivery rule",
                action: "RULE_ACTION_RESPONSE_REWRITE_HEADER",
                enabled: true,
            },
            {
                filter: "ASN == 1",
                responseCode: 302,
                ruleName: "New delivery rule",
                action: "RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE",
                enabled: true,
            },
            {
                filter: "ASN == 1",
                errorResponseFormat: "[JSON|XML]",
                errorResponseData: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
                errorType: "error.type.all",
                responseCode: 400,
                ruleName: "New delivery rule",
                action: "RULE_ACTION_CUSTOM_ERROR_RESPONSE",
                enabled: true,
            },
        ],
    });
    
    import pulumi
    import pulumi_incapsula as incapsula
    
    rewrite_response_rules = incapsula.DeliveryRulesConfiguration("rewrite-response-rules",
        category="REWRITE_RESPONSE",
        site_id=incapsula_site["example-site"]["id"],
        rules=[
            {
                "filter": "ASN == 1",
                "header_name": "abc",
                "multiple_headers_deletion": False,
                "rule_name": "New delivery rule",
                "action": "RULE_ACTION_RESPONSE_DELETE_HEADER",
                "enabled": True,
            },
            {
                "filter": "ASN == 1",
                "header_name": "abc",
                "from_": "header1",
                "to": "header2",
                "rewrite_existing": True,
                "add_if_missing": False,
                "rule_name": "New delivery rule",
                "action": "RULE_ACTION_RESPONSE_REWRITE_HEADER",
                "enabled": True,
            },
            {
                "filter": "ASN == 1",
                "response_code": 302,
                "rule_name": "New delivery rule",
                "action": "RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE",
                "enabled": True,
            },
            {
                "filter": "ASN == 1",
                "error_response_format": "[JSON|XML]",
                "error_response_data": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
                "error_type": "error.type.all",
                "response_code": 400,
                "rule_name": "New delivery rule",
                "action": "RULE_ACTION_CUSTOM_ERROR_RESPONSE",
                "enabled": True,
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/incapsula/v3/incapsula"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := incapsula.NewDeliveryRulesConfiguration(ctx, "rewrite-response-rules", &incapsula.DeliveryRulesConfigurationArgs{
    			Category: pulumi.String("REWRITE_RESPONSE"),
    			SiteId:   pulumi.Any(incapsula_site.ExampleSite.Id),
    			Rules: incapsula.DeliveryRulesConfigurationRuleArray{
    				&incapsula.DeliveryRulesConfigurationRuleArgs{
    					Filter:                  pulumi.String("ASN == 1"),
    					HeaderName:              pulumi.String("abc"),
    					MultipleHeadersDeletion: pulumi.Bool(false),
    					RuleName:                pulumi.String("New delivery rule"),
    					Action:                  pulumi.String("RULE_ACTION_RESPONSE_DELETE_HEADER"),
    					Enabled:                 pulumi.Bool(true),
    				},
    				&incapsula.DeliveryRulesConfigurationRuleArgs{
    					Filter:          pulumi.String("ASN == 1"),
    					HeaderName:      pulumi.String("abc"),
    					From:            pulumi.String("header1"),
    					To:              pulumi.String("header2"),
    					RewriteExisting: pulumi.Bool(true),
    					AddIfMissing:    pulumi.Bool(false),
    					RuleName:        pulumi.String("New delivery rule"),
    					Action:          pulumi.String("RULE_ACTION_RESPONSE_REWRITE_HEADER"),
    					Enabled:         pulumi.Bool(true),
    				},
    				&incapsula.DeliveryRulesConfigurationRuleArgs{
    					Filter:       pulumi.String("ASN == 1"),
    					ResponseCode: pulumi.Float64(302),
    					RuleName:     pulumi.String("New delivery rule"),
    					Action:       pulumi.String("RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE"),
    					Enabled:      pulumi.Bool(true),
    				},
    				&incapsula.DeliveryRulesConfigurationRuleArgs{
    					Filter:              pulumi.String("ASN == 1"),
    					ErrorResponseFormat: pulumi.String("[JSON|XML]"),
    					ErrorResponseData:   pulumi.String("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"),
    					ErrorType:           pulumi.String("error.type.all"),
    					ResponseCode:        pulumi.Float64(400),
    					RuleName:            pulumi.String("New delivery rule"),
    					Action:              pulumi.String("RULE_ACTION_CUSTOM_ERROR_RESPONSE"),
    					Enabled:             pulumi.Bool(true),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Incapsula = Pulumi.Incapsula;
    
    return await Deployment.RunAsync(() => 
    {
        var rewrite_response_rules = new Incapsula.DeliveryRulesConfiguration("rewrite-response-rules", new()
        {
            Category = "REWRITE_RESPONSE",
            SiteId = incapsula_site.Example_site.Id,
            Rules = new[]
            {
                new Incapsula.Inputs.DeliveryRulesConfigurationRuleArgs
                {
                    Filter = "ASN == 1",
                    HeaderName = "abc",
                    MultipleHeadersDeletion = false,
                    RuleName = "New delivery rule",
                    Action = "RULE_ACTION_RESPONSE_DELETE_HEADER",
                    Enabled = true,
                },
                new Incapsula.Inputs.DeliveryRulesConfigurationRuleArgs
                {
                    Filter = "ASN == 1",
                    HeaderName = "abc",
                    From = "header1",
                    To = "header2",
                    RewriteExisting = true,
                    AddIfMissing = false,
                    RuleName = "New delivery rule",
                    Action = "RULE_ACTION_RESPONSE_REWRITE_HEADER",
                    Enabled = true,
                },
                new Incapsula.Inputs.DeliveryRulesConfigurationRuleArgs
                {
                    Filter = "ASN == 1",
                    ResponseCode = 302,
                    RuleName = "New delivery rule",
                    Action = "RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE",
                    Enabled = true,
                },
                new Incapsula.Inputs.DeliveryRulesConfigurationRuleArgs
                {
                    Filter = "ASN == 1",
                    ErrorResponseFormat = "[JSON|XML]",
                    ErrorResponseData = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
                    ErrorType = "error.type.all",
                    ResponseCode = 400,
                    RuleName = "New delivery rule",
                    Action = "RULE_ACTION_CUSTOM_ERROR_RESPONSE",
                    Enabled = true,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.incapsula.DeliveryRulesConfiguration;
    import com.pulumi.incapsula.DeliveryRulesConfigurationArgs;
    import com.pulumi.incapsula.inputs.DeliveryRulesConfigurationRuleArgs;
    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 rewrite_response_rules = new DeliveryRulesConfiguration("rewrite-response-rules", DeliveryRulesConfigurationArgs.builder()
                .category("REWRITE_RESPONSE")
                .siteId(incapsula_site.example-site().id())
                .rules(            
                    DeliveryRulesConfigurationRuleArgs.builder()
                        .filter("ASN == 1")
                        .headerName("abc")
                        .multipleHeadersDeletion("false")
                        .ruleName("New delivery rule")
                        .action("RULE_ACTION_RESPONSE_DELETE_HEADER")
                        .enabled("true")
                        .build(),
                    DeliveryRulesConfigurationRuleArgs.builder()
                        .filter("ASN == 1")
                        .headerName("abc")
                        .from("header1")
                        .to("header2")
                        .rewriteExisting("true")
                        .addIfMissing("false")
                        .ruleName("New delivery rule")
                        .action("RULE_ACTION_RESPONSE_REWRITE_HEADER")
                        .enabled("true")
                        .build(),
                    DeliveryRulesConfigurationRuleArgs.builder()
                        .filter("ASN == 1")
                        .responseCode("302")
                        .ruleName("New delivery rule")
                        .action("RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE")
                        .enabled("true")
                        .build(),
                    DeliveryRulesConfigurationRuleArgs.builder()
                        .filter("ASN == 1")
                        .errorResponseFormat("[JSON|XML]")
                        .errorResponseData("<?xml version=\"1.0\" encoding=\"UTF-8\"?>")
                        .errorType("error.type.all")
                        .responseCode("400")
                        .ruleName("New delivery rule")
                        .action("RULE_ACTION_CUSTOM_ERROR_RESPONSE")
                        .enabled("true")
                        .build())
                .build());
    
        }
    }
    
    resources:
      rewrite-response-rules:
        type: incapsula:DeliveryRulesConfiguration
        properties:
          category: REWRITE_RESPONSE
          siteId: ${incapsula_site"example-site"[%!s(MISSING)].id}
          rules:
            - filter: ASN == 1
              headerName: abc
              multipleHeadersDeletion: 'false'
              ruleName: New delivery rule
              action: RULE_ACTION_RESPONSE_DELETE_HEADER
              enabled: 'true'
            - filter: ASN == 1
              headerName: abc
              from: header1
              to: header2
              rewriteExisting: 'true'
              addIfMissing: 'false'
              ruleName: New delivery rule
              action: RULE_ACTION_RESPONSE_REWRITE_HEADER
              enabled: 'true'
            - filter: ASN == 1
              responseCode: '302'
              ruleName: New delivery rule
              action: RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE
              enabled: 'true'
            - filter: ASN == 1
              errorResponseFormat: '[JSON|XML]'
              errorResponseData: <?xml version="1.0" encoding="UTF-8"?>
              errorType: error.type.all
              responseCode: '400'
              ruleName: New delivery rule
              action: RULE_ACTION_CUSTOM_ERROR_RESPONSE
              enabled: 'true'
    

    Argument Reference

    • site_id - (Required) Numeric identifier of the site to operate on.
    • category - (Required) Category of rules - REWRITE.
    • rule_name - (Required) Rule name.
    • action - (Required) Rule action. Possible values:
      • RULE_ACTION_RESPONSE_REWRITE_HEADER - Modify header of outgoing response
      • RULE_ACTION_RESPONSE_DELETE_HEADER - Remove header from outgoing response
      • RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE - Modify HTTP status code of outgoing response
      • RULE_ACTION_CUSTOM_ERROR_RESPONSE - Set custom template for various error responses
    • filter - (Optional) The filter defines the conditions that trigger the rule action.
    • header_name - (Required) The header name that the rules applies to.
    • from - (Optional) Header pattern to rewrite.
    • to - (Required) Header pattern to change to.
    • add_missing - (Optional) When rewriting a header, add it if it doesn’t exist.
    • rewrite_existing - (Optional) Rewrite a header even it if it exists already.
    • multiple_headers_deletion - (Optional) Delete all header occurrences.
    • response_code - (Required) HTTP status code. For RULE_ACTION_CUSTOM_ERROR_RESPONSE, values are limited to 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 419, 420, 422, 423, 424, 500, 501, 502, 503, 504, 505, 507, 200.
    • error_type - (Optional) The error that triggers the rule. error.type.all triggers the rule regardless of the error type. Possible values: error.type.all, error.type.connection_timeout, error.type.access_denied, error.type.parse_req_error, error.type.parse_resp_error, error.type.connection_failed, error.type.deny_and_retry, error.type.ssl_failed, error.type.deny_and_captcha, error.type.2fa_required, error.type.no_ssl_config, error.type.no_ipv6_config, error.type.waiting_room.
    • error_response_format - (Optional) The format of the given error response in the error_response_data field. Possible values: json, xml.
    • error_response_data - (Optional) The response returned when the request matches the filter and is blocked.
    • enabled - (Optional) Boolean that enables the rule. Default value is true.

    Create DeliveryRulesConfiguration Resource

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

    Constructor syntax

    new DeliveryRulesConfiguration(name: string, args: DeliveryRulesConfigurationArgs, opts?: CustomResourceOptions);
    @overload
    def DeliveryRulesConfiguration(resource_name: str,
                                   args: DeliveryRulesConfigurationArgs,
                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def DeliveryRulesConfiguration(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   category: Optional[str] = None,
                                   site_id: Optional[str] = None,
                                   delivery_rules_configuration_id: Optional[str] = None,
                                   rules: Optional[Sequence[DeliveryRulesConfigurationRuleArgs]] = None)
    func NewDeliveryRulesConfiguration(ctx *Context, name string, args DeliveryRulesConfigurationArgs, opts ...ResourceOption) (*DeliveryRulesConfiguration, error)
    public DeliveryRulesConfiguration(string name, DeliveryRulesConfigurationArgs args, CustomResourceOptions? opts = null)
    public DeliveryRulesConfiguration(String name, DeliveryRulesConfigurationArgs args)
    public DeliveryRulesConfiguration(String name, DeliveryRulesConfigurationArgs args, CustomResourceOptions options)
    
    type: incapsula:DeliveryRulesConfiguration
    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 DeliveryRulesConfigurationArgs
    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 DeliveryRulesConfigurationArgs
    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 DeliveryRulesConfigurationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DeliveryRulesConfigurationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DeliveryRulesConfigurationArgs
    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 deliveryRulesConfigurationResource = new Incapsula.DeliveryRulesConfiguration("deliveryRulesConfigurationResource", new()
    {
        Category = "string",
        SiteId = "string",
        DeliveryRulesConfigurationId = "string",
        Rules = new[]
        {
            new Incapsula.Inputs.DeliveryRulesConfigurationRuleArgs
            {
                Action = "string",
                RuleName = "string",
                Filter = "string",
                From = "string",
                Enabled = false,
                ErrorResponseData = "string",
                ErrorResponseFormat = "string",
                ErrorType = "string",
                CookieName = "string",
                DcId = 0,
                HeaderName = "string",
                MultipleHeadersDeletion = false,
                PortForwardingContext = "string",
                PortForwardingValue = "string",
                ResponseCode = 0,
                RewriteExisting = false,
                AddIfMissing = false,
                To = "string",
            },
        },
    });
    
    example, err := incapsula.NewDeliveryRulesConfiguration(ctx, "deliveryRulesConfigurationResource", &incapsula.DeliveryRulesConfigurationArgs{
    	Category:                     pulumi.String("string"),
    	SiteId:                       pulumi.String("string"),
    	DeliveryRulesConfigurationId: pulumi.String("string"),
    	Rules: incapsula.DeliveryRulesConfigurationRuleArray{
    		&incapsula.DeliveryRulesConfigurationRuleArgs{
    			Action:                  pulumi.String("string"),
    			RuleName:                pulumi.String("string"),
    			Filter:                  pulumi.String("string"),
    			From:                    pulumi.String("string"),
    			Enabled:                 pulumi.Bool(false),
    			ErrorResponseData:       pulumi.String("string"),
    			ErrorResponseFormat:     pulumi.String("string"),
    			ErrorType:               pulumi.String("string"),
    			CookieName:              pulumi.String("string"),
    			DcId:                    pulumi.Float64(0),
    			HeaderName:              pulumi.String("string"),
    			MultipleHeadersDeletion: pulumi.Bool(false),
    			PortForwardingContext:   pulumi.String("string"),
    			PortForwardingValue:     pulumi.String("string"),
    			ResponseCode:            pulumi.Float64(0),
    			RewriteExisting:         pulumi.Bool(false),
    			AddIfMissing:            pulumi.Bool(false),
    			To:                      pulumi.String("string"),
    		},
    	},
    })
    
    var deliveryRulesConfigurationResource = new DeliveryRulesConfiguration("deliveryRulesConfigurationResource", DeliveryRulesConfigurationArgs.builder()
        .category("string")
        .siteId("string")
        .deliveryRulesConfigurationId("string")
        .rules(DeliveryRulesConfigurationRuleArgs.builder()
            .action("string")
            .ruleName("string")
            .filter("string")
            .from("string")
            .enabled(false)
            .errorResponseData("string")
            .errorResponseFormat("string")
            .errorType("string")
            .cookieName("string")
            .dcId(0)
            .headerName("string")
            .multipleHeadersDeletion(false)
            .portForwardingContext("string")
            .portForwardingValue("string")
            .responseCode(0)
            .rewriteExisting(false)
            .addIfMissing(false)
            .to("string")
            .build())
        .build());
    
    delivery_rules_configuration_resource = incapsula.DeliveryRulesConfiguration("deliveryRulesConfigurationResource",
        category="string",
        site_id="string",
        delivery_rules_configuration_id="string",
        rules=[{
            "action": "string",
            "rule_name": "string",
            "filter": "string",
            "from_": "string",
            "enabled": False,
            "error_response_data": "string",
            "error_response_format": "string",
            "error_type": "string",
            "cookie_name": "string",
            "dc_id": 0,
            "header_name": "string",
            "multiple_headers_deletion": False,
            "port_forwarding_context": "string",
            "port_forwarding_value": "string",
            "response_code": 0,
            "rewrite_existing": False,
            "add_if_missing": False,
            "to": "string",
        }])
    
    const deliveryRulesConfigurationResource = new incapsula.DeliveryRulesConfiguration("deliveryRulesConfigurationResource", {
        category: "string",
        siteId: "string",
        deliveryRulesConfigurationId: "string",
        rules: [{
            action: "string",
            ruleName: "string",
            filter: "string",
            from: "string",
            enabled: false,
            errorResponseData: "string",
            errorResponseFormat: "string",
            errorType: "string",
            cookieName: "string",
            dcId: 0,
            headerName: "string",
            multipleHeadersDeletion: false,
            portForwardingContext: "string",
            portForwardingValue: "string",
            responseCode: 0,
            rewriteExisting: false,
            addIfMissing: false,
            to: "string",
        }],
    });
    
    type: incapsula:DeliveryRulesConfiguration
    properties:
        category: string
        deliveryRulesConfigurationId: string
        rules:
            - action: string
              addIfMissing: false
              cookieName: string
              dcId: 0
              enabled: false
              errorResponseData: string
              errorResponseFormat: string
              errorType: string
              filter: string
              from: string
              headerName: string
              multipleHeadersDeletion: false
              portForwardingContext: string
              portForwardingValue: string
              responseCode: 0
              rewriteExisting: false
              ruleName: string
              to: string
        siteId: string
    

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

    Category string
    How to load balance between multiple Data Centers.
    SiteId string
    Numeric identifier of the site to operate on.
    DeliveryRulesConfigurationId string
    Rules List<DeliveryRulesConfigurationRule>
    List of delivery rules
    Category string
    How to load balance between multiple Data Centers.
    SiteId string
    Numeric identifier of the site to operate on.
    DeliveryRulesConfigurationId string
    Rules []DeliveryRulesConfigurationRuleArgs
    List of delivery rules
    category String
    How to load balance between multiple Data Centers.
    siteId String
    Numeric identifier of the site to operate on.
    deliveryRulesConfigurationId String
    rules List<DeliveryRulesConfigurationRule>
    List of delivery rules
    category string
    How to load balance between multiple Data Centers.
    siteId string
    Numeric identifier of the site to operate on.
    deliveryRulesConfigurationId string
    rules DeliveryRulesConfigurationRule[]
    List of delivery rules
    category str
    How to load balance between multiple Data Centers.
    site_id str
    Numeric identifier of the site to operate on.
    delivery_rules_configuration_id str
    rules Sequence[DeliveryRulesConfigurationRuleArgs]
    List of delivery rules
    category String
    How to load balance between multiple Data Centers.
    siteId String
    Numeric identifier of the site to operate on.
    deliveryRulesConfigurationId String
    rules List<Property Map>
    List of delivery rules

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DeliveryRulesConfiguration 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 DeliveryRulesConfiguration Resource

    Get an existing DeliveryRulesConfiguration 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?: DeliveryRulesConfigurationState, opts?: CustomResourceOptions): DeliveryRulesConfiguration
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            category: Optional[str] = None,
            delivery_rules_configuration_id: Optional[str] = None,
            rules: Optional[Sequence[DeliveryRulesConfigurationRuleArgs]] = None,
            site_id: Optional[str] = None) -> DeliveryRulesConfiguration
    func GetDeliveryRulesConfiguration(ctx *Context, name string, id IDInput, state *DeliveryRulesConfigurationState, opts ...ResourceOption) (*DeliveryRulesConfiguration, error)
    public static DeliveryRulesConfiguration Get(string name, Input<string> id, DeliveryRulesConfigurationState? state, CustomResourceOptions? opts = null)
    public static DeliveryRulesConfiguration get(String name, Output<String> id, DeliveryRulesConfigurationState state, CustomResourceOptions options)
    resources:  _:    type: incapsula:DeliveryRulesConfiguration    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:
    Category string
    How to load balance between multiple Data Centers.
    DeliveryRulesConfigurationId string
    Rules List<DeliveryRulesConfigurationRule>
    List of delivery rules
    SiteId string
    Numeric identifier of the site to operate on.
    Category string
    How to load balance between multiple Data Centers.
    DeliveryRulesConfigurationId string
    Rules []DeliveryRulesConfigurationRuleArgs
    List of delivery rules
    SiteId string
    Numeric identifier of the site to operate on.
    category String
    How to load balance between multiple Data Centers.
    deliveryRulesConfigurationId String
    rules List<DeliveryRulesConfigurationRule>
    List of delivery rules
    siteId String
    Numeric identifier of the site to operate on.
    category string
    How to load balance between multiple Data Centers.
    deliveryRulesConfigurationId string
    rules DeliveryRulesConfigurationRule[]
    List of delivery rules
    siteId string
    Numeric identifier of the site to operate on.
    category str
    How to load balance between multiple Data Centers.
    delivery_rules_configuration_id str
    rules Sequence[DeliveryRulesConfigurationRuleArgs]
    List of delivery rules
    site_id str
    Numeric identifier of the site to operate on.
    category String
    How to load balance between multiple Data Centers.
    deliveryRulesConfigurationId String
    rules List<Property Map>
    List of delivery rules
    siteId String
    Numeric identifier of the site to operate on.

    Supporting Types

    DeliveryRulesConfigurationRule, DeliveryRulesConfigurationRuleArgs

    Action string
    Rule action
    RuleName string
    The rule name
    AddIfMissing bool
    Rewrite rule would add the header/cookie if it's missing
    CookieName string
    Name of cookie to modify
    DcId double
    Data center ID to forward the request to
    Enabled bool
    Boolean that enables the rule
    ErrorResponseData string
    The response returned when the request matches the filter and is blocked
    ErrorResponseFormat string
    The format of the given error response in the error_response_data field
    ErrorType string
    The error that triggers the rule
    Filter string
    Defines the conditions that trigger the rule action
    From string
    From value
    HeaderName string
    Name of header to modify
    MultipleHeadersDeletion bool
    Delete multiple header occurrences
    PortForwardingContext string
    Context for port forwarding
    PortForwardingValue string
    Port number or header name for port forwarding
    ResponseCode double
    Rule's response code
    RewriteExisting bool
    Apply rewrite rule even if the header/cookie already exists
    To string
    To value
    Action string
    Rule action
    RuleName string
    The rule name
    AddIfMissing bool
    Rewrite rule would add the header/cookie if it's missing
    CookieName string
    Name of cookie to modify
    DcId float64
    Data center ID to forward the request to
    Enabled bool
    Boolean that enables the rule
    ErrorResponseData string
    The response returned when the request matches the filter and is blocked
    ErrorResponseFormat string
    The format of the given error response in the error_response_data field
    ErrorType string
    The error that triggers the rule
    Filter string
    Defines the conditions that trigger the rule action
    From string
    From value
    HeaderName string
    Name of header to modify
    MultipleHeadersDeletion bool
    Delete multiple header occurrences
    PortForwardingContext string
    Context for port forwarding
    PortForwardingValue string
    Port number or header name for port forwarding
    ResponseCode float64
    Rule's response code
    RewriteExisting bool
    Apply rewrite rule even if the header/cookie already exists
    To string
    To value
    action String
    Rule action
    ruleName String
    The rule name
    addIfMissing Boolean
    Rewrite rule would add the header/cookie if it's missing
    cookieName String
    Name of cookie to modify
    dcId Double
    Data center ID to forward the request to
    enabled Boolean
    Boolean that enables the rule
    errorResponseData String
    The response returned when the request matches the filter and is blocked
    errorResponseFormat String
    The format of the given error response in the error_response_data field
    errorType String
    The error that triggers the rule
    filter String
    Defines the conditions that trigger the rule action
    from String
    From value
    headerName String
    Name of header to modify
    multipleHeadersDeletion Boolean
    Delete multiple header occurrences
    portForwardingContext String
    Context for port forwarding
    portForwardingValue String
    Port number or header name for port forwarding
    responseCode Double
    Rule's response code
    rewriteExisting Boolean
    Apply rewrite rule even if the header/cookie already exists
    to String
    To value
    action string
    Rule action
    ruleName string
    The rule name
    addIfMissing boolean
    Rewrite rule would add the header/cookie if it's missing
    cookieName string
    Name of cookie to modify
    dcId number
    Data center ID to forward the request to
    enabled boolean
    Boolean that enables the rule
    errorResponseData string
    The response returned when the request matches the filter and is blocked
    errorResponseFormat string
    The format of the given error response in the error_response_data field
    errorType string
    The error that triggers the rule
    filter string
    Defines the conditions that trigger the rule action
    from string
    From value
    headerName string
    Name of header to modify
    multipleHeadersDeletion boolean
    Delete multiple header occurrences
    portForwardingContext string
    Context for port forwarding
    portForwardingValue string
    Port number or header name for port forwarding
    responseCode number
    Rule's response code
    rewriteExisting boolean
    Apply rewrite rule even if the header/cookie already exists
    to string
    To value
    action str
    Rule action
    rule_name str
    The rule name
    add_if_missing bool
    Rewrite rule would add the header/cookie if it's missing
    cookie_name str
    Name of cookie to modify
    dc_id float
    Data center ID to forward the request to
    enabled bool
    Boolean that enables the rule
    error_response_data str
    The response returned when the request matches the filter and is blocked
    error_response_format str
    The format of the given error response in the error_response_data field
    error_type str
    The error that triggers the rule
    filter str
    Defines the conditions that trigger the rule action
    from_ str
    From value
    header_name str
    Name of header to modify
    multiple_headers_deletion bool
    Delete multiple header occurrences
    port_forwarding_context str
    Context for port forwarding
    port_forwarding_value str
    Port number or header name for port forwarding
    response_code float
    Rule's response code
    rewrite_existing bool
    Apply rewrite rule even if the header/cookie already exists
    to str
    To value
    action String
    Rule action
    ruleName String
    The rule name
    addIfMissing Boolean
    Rewrite rule would add the header/cookie if it's missing
    cookieName String
    Name of cookie to modify
    dcId Number
    Data center ID to forward the request to
    enabled Boolean
    Boolean that enables the rule
    errorResponseData String
    The response returned when the request matches the filter and is blocked
    errorResponseFormat String
    The format of the given error response in the error_response_data field
    errorType String
    The error that triggers the rule
    filter String
    Defines the conditions that trigger the rule action
    from String
    From value
    headerName String
    Name of header to modify
    multipleHeadersDeletion Boolean
    Delete multiple header occurrences
    portForwardingContext String
    Context for port forwarding
    portForwardingValue String
    Port number or header name for port forwarding
    responseCode Number
    Rule's response code
    rewriteExisting Boolean
    Apply rewrite rule even if the header/cookie already exists
    to String
    To value

    Import

    Delivery rules configuration can be imported using the site_id and category separated by /, e.g.:

    $ pulumi import incapsula:index/deliveryRulesConfiguration:DeliveryRulesConfiguration demo site_id/category
    

    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.33.0 published on Wednesday, Apr 30, 2025 by imperva