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

incapsula.SimplifiedRedirectRulesConfiguration

Explore with Pulumi AI

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

    Provides simplified redirect rules. The functionality is similar to REDIRECT rules in incapsula.DeliveryRulesConfiguration but with the following limitations:

    • They cannot specify a filter (logical predicate tested before executing the rule)
    • There cannot be 2 rules with the same origin (from) argument
    • Wildcards cannot be used in the origin (from) argument
    • Consequently, they cannot be assigned a priority value, since there can be at most one rule for any origin URL

    Due to their simplicity, the limits of simplified redirect rules per sites is much higher than normal rules (currently 20,000, compared to only 500 for other delivery rules).

    Notes:

    • Simplified redirect rules should be enabled in the account settings before being able to use them.
    • This resource replaces all simplified rules of the site, so existing rules that are not specified in the configuration will be deleted. In particular, this resource cannot cannot be used with incapsula.IncapRule to configure simplified redirect rules for the same site.

    Create SimplifiedRedirectRulesConfiguration Resource

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

    Constructor syntax

    new SimplifiedRedirectRulesConfiguration(name: string, args: SimplifiedRedirectRulesConfigurationArgs, opts?: CustomResourceOptions);
    @overload
    def SimplifiedRedirectRulesConfiguration(resource_name: str,
                                             args: SimplifiedRedirectRulesConfigurationArgs,
                                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def SimplifiedRedirectRulesConfiguration(resource_name: str,
                                             opts: Optional[ResourceOptions] = None,
                                             site_id: Optional[str] = None,
                                             rules: Optional[Sequence[SimplifiedRedirectRulesConfigurationRuleArgs]] = None,
                                             simplified_redirect_rules_configuration_id: Optional[str] = None)
    func NewSimplifiedRedirectRulesConfiguration(ctx *Context, name string, args SimplifiedRedirectRulesConfigurationArgs, opts ...ResourceOption) (*SimplifiedRedirectRulesConfiguration, error)
    public SimplifiedRedirectRulesConfiguration(string name, SimplifiedRedirectRulesConfigurationArgs args, CustomResourceOptions? opts = null)
    public SimplifiedRedirectRulesConfiguration(String name, SimplifiedRedirectRulesConfigurationArgs args)
    public SimplifiedRedirectRulesConfiguration(String name, SimplifiedRedirectRulesConfigurationArgs args, CustomResourceOptions options)
    
    type: incapsula:SimplifiedRedirectRulesConfiguration
    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 SimplifiedRedirectRulesConfigurationArgs
    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 SimplifiedRedirectRulesConfigurationArgs
    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 SimplifiedRedirectRulesConfigurationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SimplifiedRedirectRulesConfigurationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SimplifiedRedirectRulesConfigurationArgs
    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 simplifiedRedirectRulesConfigurationResource = new Incapsula.SimplifiedRedirectRulesConfiguration("simplifiedRedirectRulesConfigurationResource", new()
    {
        SiteId = "string",
        Rules = new[]
        {
            new Incapsula.Inputs.SimplifiedRedirectRulesConfigurationRuleArgs
            {
                From = "string",
                ResponseCode = 0,
                RuleName = "string",
                To = "string",
                Enabled = false,
            },
        },
        SimplifiedRedirectRulesConfigurationId = "string",
    });
    
    example, err := incapsula.NewSimplifiedRedirectRulesConfiguration(ctx, "simplifiedRedirectRulesConfigurationResource", &incapsula.SimplifiedRedirectRulesConfigurationArgs{
    	SiteId: pulumi.String("string"),
    	Rules: incapsula.SimplifiedRedirectRulesConfigurationRuleArray{
    		&incapsula.SimplifiedRedirectRulesConfigurationRuleArgs{
    			From:         pulumi.String("string"),
    			ResponseCode: pulumi.Float64(0),
    			RuleName:     pulumi.String("string"),
    			To:           pulumi.String("string"),
    			Enabled:      pulumi.Bool(false),
    		},
    	},
    	SimplifiedRedirectRulesConfigurationId: pulumi.String("string"),
    })
    
    var simplifiedRedirectRulesConfigurationResource = new SimplifiedRedirectRulesConfiguration("simplifiedRedirectRulesConfigurationResource", SimplifiedRedirectRulesConfigurationArgs.builder()
        .siteId("string")
        .rules(SimplifiedRedirectRulesConfigurationRuleArgs.builder()
            .from("string")
            .responseCode(0)
            .ruleName("string")
            .to("string")
            .enabled(false)
            .build())
        .simplifiedRedirectRulesConfigurationId("string")
        .build());
    
    simplified_redirect_rules_configuration_resource = incapsula.SimplifiedRedirectRulesConfiguration("simplifiedRedirectRulesConfigurationResource",
        site_id="string",
        rules=[{
            "from_": "string",
            "response_code": 0,
            "rule_name": "string",
            "to": "string",
            "enabled": False,
        }],
        simplified_redirect_rules_configuration_id="string")
    
    const simplifiedRedirectRulesConfigurationResource = new incapsula.SimplifiedRedirectRulesConfiguration("simplifiedRedirectRulesConfigurationResource", {
        siteId: "string",
        rules: [{
            from: "string",
            responseCode: 0,
            ruleName: "string",
            to: "string",
            enabled: false,
        }],
        simplifiedRedirectRulesConfigurationId: "string",
    });
    
    type: incapsula:SimplifiedRedirectRulesConfiguration
    properties:
        rules:
            - enabled: false
              from: string
              responseCode: 0
              ruleName: string
              to: string
        simplifiedRedirectRulesConfigurationId: string
        siteId: string
    

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

    SiteId string
    Numeric identifier of the site to operate on.
    Rules List<SimplifiedRedirectRulesConfigurationRule>
    List of simplified redirect rules
    SimplifiedRedirectRulesConfigurationId string
    SiteId string
    Numeric identifier of the site to operate on.
    Rules []SimplifiedRedirectRulesConfigurationRuleArgs
    List of simplified redirect rules
    SimplifiedRedirectRulesConfigurationId string
    siteId String
    Numeric identifier of the site to operate on.
    rules List<SimplifiedRedirectRulesConfigurationRule>
    List of simplified redirect rules
    simplifiedRedirectRulesConfigurationId String
    siteId string
    Numeric identifier of the site to operate on.
    rules SimplifiedRedirectRulesConfigurationRule[]
    List of simplified redirect rules
    simplifiedRedirectRulesConfigurationId string
    site_id str
    Numeric identifier of the site to operate on.
    rules Sequence[SimplifiedRedirectRulesConfigurationRuleArgs]
    List of simplified redirect rules
    simplified_redirect_rules_configuration_id str
    siteId String
    Numeric identifier of the site to operate on.
    rules List<Property Map>
    List of simplified redirect rules
    simplifiedRedirectRulesConfigurationId String

    Outputs

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

    Get an existing SimplifiedRedirectRulesConfiguration 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?: SimplifiedRedirectRulesConfigurationState, opts?: CustomResourceOptions): SimplifiedRedirectRulesConfiguration
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            rules: Optional[Sequence[SimplifiedRedirectRulesConfigurationRuleArgs]] = None,
            simplified_redirect_rules_configuration_id: Optional[str] = None,
            site_id: Optional[str] = None) -> SimplifiedRedirectRulesConfiguration
    func GetSimplifiedRedirectRulesConfiguration(ctx *Context, name string, id IDInput, state *SimplifiedRedirectRulesConfigurationState, opts ...ResourceOption) (*SimplifiedRedirectRulesConfiguration, error)
    public static SimplifiedRedirectRulesConfiguration Get(string name, Input<string> id, SimplifiedRedirectRulesConfigurationState? state, CustomResourceOptions? opts = null)
    public static SimplifiedRedirectRulesConfiguration get(String name, Output<String> id, SimplifiedRedirectRulesConfigurationState state, CustomResourceOptions options)
    resources:  _:    type: incapsula:SimplifiedRedirectRulesConfiguration    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:
    Rules List<SimplifiedRedirectRulesConfigurationRule>
    List of simplified redirect rules
    SimplifiedRedirectRulesConfigurationId string
    SiteId string
    Numeric identifier of the site to operate on.
    Rules []SimplifiedRedirectRulesConfigurationRuleArgs
    List of simplified redirect rules
    SimplifiedRedirectRulesConfigurationId string
    SiteId string
    Numeric identifier of the site to operate on.
    rules List<SimplifiedRedirectRulesConfigurationRule>
    List of simplified redirect rules
    simplifiedRedirectRulesConfigurationId String
    siteId String
    Numeric identifier of the site to operate on.
    rules SimplifiedRedirectRulesConfigurationRule[]
    List of simplified redirect rules
    simplifiedRedirectRulesConfigurationId string
    siteId string
    Numeric identifier of the site to operate on.
    rules Sequence[SimplifiedRedirectRulesConfigurationRuleArgs]
    List of simplified redirect rules
    simplified_redirect_rules_configuration_id str
    site_id str
    Numeric identifier of the site to operate on.
    rules List<Property Map>
    List of simplified redirect rules
    simplifiedRedirectRulesConfigurationId String
    siteId String
    Numeric identifier of the site to operate on.

    Supporting Types

    SimplifiedRedirectRulesConfigurationRule, SimplifiedRedirectRulesConfigurationRuleArgs

    From string
    From value
    ResponseCode double
    Rule's response code
    RuleName string
    The rule name
    To string
    To value
    Enabled bool
    Boolean that enables the rule
    From string
    From value
    ResponseCode float64
    Rule's response code
    RuleName string
    The rule name
    To string
    To value
    Enabled bool
    Boolean that enables the rule
    from String
    From value
    responseCode Double
    Rule's response code
    ruleName String
    The rule name
    to String
    To value
    enabled Boolean
    Boolean that enables the rule
    from string
    From value
    responseCode number
    Rule's response code
    ruleName string
    The rule name
    to string
    To value
    enabled boolean
    Boolean that enables the rule
    from_ str
    From value
    response_code float
    Rule's response code
    rule_name str
    The rule name
    to str
    To value
    enabled bool
    Boolean that enables the rule
    from String
    From value
    responseCode Number
    Rule's response code
    ruleName String
    The rule name
    to String
    To value
    enabled Boolean
    Boolean that enables the rule

    Import

    Simplified redirect rules configuration can be imported using the site_id, e.g.:

    $ pulumi import incapsula:index/simplifiedRedirectRulesConfiguration:SimplifiedRedirectRulesConfiguration demo site_id
    

    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