incapsula.SimplifiedRedirectRulesConfiguration
Explore with Pulumi AI
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:
- Site
Id string - Numeric identifier of the site to operate on.
- Rules
List<Simplified
Redirect Rules Configuration Rule> - List of simplified redirect rules
- Simplified
Redirect stringRules Configuration Id
- Site
Id string - Numeric identifier of the site to operate on.
- Rules
[]Simplified
Redirect Rules Configuration Rule Args - List of simplified redirect rules
- Simplified
Redirect stringRules Configuration Id
- site
Id String - Numeric identifier of the site to operate on.
- rules
List<Simplified
Redirect Rules Configuration Rule> - List of simplified redirect rules
- simplified
Redirect StringRules Configuration Id
- site
Id string - Numeric identifier of the site to operate on.
- rules
Simplified
Redirect Rules Configuration Rule[] - List of simplified redirect rules
- simplified
Redirect stringRules Configuration Id
- site_
id str - Numeric identifier of the site to operate on.
- rules
Sequence[Simplified
Redirect Rules Configuration Rule Args] - List of simplified redirect rules
- simplified_
redirect_ strrules_ configuration_ id
- site
Id String - Numeric identifier of the site to operate on.
- rules List<Property Map>
- List of simplified redirect rules
- simplified
Redirect StringRules Configuration Id
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.
- Rules
List<Simplified
Redirect Rules Configuration Rule> - List of simplified redirect rules
- Simplified
Redirect stringRules Configuration Id - Site
Id string - Numeric identifier of the site to operate on.
- Rules
[]Simplified
Redirect Rules Configuration Rule Args - List of simplified redirect rules
- Simplified
Redirect stringRules Configuration Id - Site
Id string - Numeric identifier of the site to operate on.
- rules
List<Simplified
Redirect Rules Configuration Rule> - List of simplified redirect rules
- simplified
Redirect StringRules Configuration Id - site
Id String - Numeric identifier of the site to operate on.
- rules
Simplified
Redirect Rules Configuration Rule[] - List of simplified redirect rules
- simplified
Redirect stringRules Configuration Id - site
Id string - Numeric identifier of the site to operate on.
- rules
Sequence[Simplified
Redirect Rules Configuration Rule Args] - List of simplified redirect rules
- simplified_
redirect_ strrules_ configuration_ id - site_
id str - Numeric identifier of the site to operate on.
- rules List<Property Map>
- List of simplified redirect rules
- simplified
Redirect StringRules Configuration Id - site
Id String - Numeric identifier of the site to operate on.
Supporting Types
SimplifiedRedirectRulesConfigurationRule, SimplifiedRedirectRulesConfigurationRuleArgs
- From string
- From value
- Response
Code double - Rule's response code
- Rule
Name string - The rule name
- To string
- To value
- Enabled bool
- Boolean that enables the rule
- From string
- From value
- Response
Code float64 - Rule's response code
- Rule
Name string - The rule name
- To string
- To value
- Enabled bool
- Boolean that enables the rule
- from String
- From value
- response
Code Double - Rule's response code
- rule
Name String - The rule name
- to String
- To value
- enabled Boolean
- Boolean that enables the rule
- from string
- From value
- response
Code number - Rule's response code
- rule
Name 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
- response
Code Number - Rule's response code
- rule
Name 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.