1. Packages
  2. Azure Classic
  3. API Docs
  4. frontdoor
  5. RulesEngine

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

azure.frontdoor.RulesEngine

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

    !> IMPORTANT This deploys an Azure Front Door (classic) resource which has been deprecated and will receive security updates only. Please migrate your existing Azure Front Door (classic) deployments to the new Azure Front Door (standard/premium) resources. For your convenience, the service team has exposed a Front Door Classic to Front Door Standard/Premium migration tool to allow you to migrate your existing Front Door Classic instances to the new Front Door Standard/Premium product tiers.

    Manages an Azure Front Door (classic) Rules Engine configuration and rules.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-rg",
        location: "West Europe",
    });
    const exampleFrontdoor = new azure.frontdoor.Frontdoor("example", {
        name: "example",
        resourceGroupName: example.name,
        backendPools: [{
            name: "exampleBackendBing",
            loadBalancingName: "exampleLoadBalancingSettings1",
            healthProbeName: "exampleHealthProbeSetting1",
            backends: [{
                hostHeader: "www.bing.com",
                address: "www.bing.com",
                httpPort: 80,
                httpsPort: 443,
            }],
        }],
        backendPoolHealthProbes: [{
            name: "exampleHealthProbeSetting1",
        }],
        backendPoolLoadBalancings: [{
            name: "exampleLoadBalancingSettings1",
        }],
        frontendEndpoints: [{
            name: "exampleFrontendEndpoint1",
            hostName: "example-FrontDoor.azurefd.net",
        }],
        routingRules: [{
            name: "exampleRoutingRule1",
            acceptedProtocols: [
                "Http",
                "Https",
            ],
            patternsToMatches: ["/*"],
            frontendEndpoints: ["exampleFrontendEndpoint1"],
        }],
    });
    const exampleRulesEngine = new azure.frontdoor.RulesEngine("example_rules_engine", {
        name: "exampleRulesEngineConfig1",
        frontdoorName: exampleFrontdoor.name,
        resourceGroupName: exampleFrontdoor.resourceGroupName,
        rules: [
            {
                name: "debuggingoutput",
                priority: 1,
                action: {
                    responseHeaders: [{
                        headerActionType: "Append",
                        headerName: "X-TEST-HEADER",
                        value: "Append Header Rule",
                    }],
                },
            },
            {
                name: "overwriteorigin",
                priority: 2,
                matchConditions: [{
                    variable: "RequestMethod",
                    operator: "Equal",
                    values: [
                        "GET",
                        "POST",
                    ],
                }],
                action: {
                    responseHeaders: [
                        {
                            headerActionType: "Overwrite",
                            headerName: "Access-Control-Allow-Origin",
                            value: "*",
                        },
                        {
                            headerActionType: "Overwrite",
                            headerName: "Access-Control-Allow-Credentials",
                            value: "true",
                        },
                    ],
                },
            },
        ],
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-rg",
        location="West Europe")
    example_frontdoor = azure.frontdoor.Frontdoor("example",
        name="example",
        resource_group_name=example.name,
        backend_pools=[azure.frontdoor.FrontdoorBackendPoolArgs(
            name="exampleBackendBing",
            load_balancing_name="exampleLoadBalancingSettings1",
            health_probe_name="exampleHealthProbeSetting1",
            backends=[azure.frontdoor.FrontdoorBackendPoolBackendArgs(
                host_header="www.bing.com",
                address="www.bing.com",
                http_port=80,
                https_port=443,
            )],
        )],
        backend_pool_health_probes=[azure.frontdoor.FrontdoorBackendPoolHealthProbeArgs(
            name="exampleHealthProbeSetting1",
        )],
        backend_pool_load_balancings=[azure.frontdoor.FrontdoorBackendPoolLoadBalancingArgs(
            name="exampleLoadBalancingSettings1",
        )],
        frontend_endpoints=[azure.frontdoor.FrontdoorFrontendEndpointArgs(
            name="exampleFrontendEndpoint1",
            host_name="example-FrontDoor.azurefd.net",
        )],
        routing_rules=[azure.frontdoor.FrontdoorRoutingRuleArgs(
            name="exampleRoutingRule1",
            accepted_protocols=[
                "Http",
                "Https",
            ],
            patterns_to_matches=["/*"],
            frontend_endpoints=["exampleFrontendEndpoint1"],
        )])
    example_rules_engine = azure.frontdoor.RulesEngine("example_rules_engine",
        name="exampleRulesEngineConfig1",
        frontdoor_name=example_frontdoor.name,
        resource_group_name=example_frontdoor.resource_group_name,
        rules=[
            azure.frontdoor.RulesEngineRuleArgs(
                name="debuggingoutput",
                priority=1,
                action=azure.frontdoor.RulesEngineRuleActionArgs(
                    response_headers=[azure.frontdoor.RulesEngineRuleActionResponseHeaderArgs(
                        header_action_type="Append",
                        header_name="X-TEST-HEADER",
                        value="Append Header Rule",
                    )],
                ),
            ),
            azure.frontdoor.RulesEngineRuleArgs(
                name="overwriteorigin",
                priority=2,
                match_conditions=[azure.frontdoor.RulesEngineRuleMatchConditionArgs(
                    variable="RequestMethod",
                    operator="Equal",
                    values=[
                        "GET",
                        "POST",
                    ],
                )],
                action=azure.frontdoor.RulesEngineRuleActionArgs(
                    response_headers=[
                        azure.frontdoor.RulesEngineRuleActionResponseHeaderArgs(
                            header_action_type="Overwrite",
                            header_name="Access-Control-Allow-Origin",
                            value="*",
                        ),
                        azure.frontdoor.RulesEngineRuleActionResponseHeaderArgs(
                            header_action_type="Overwrite",
                            header_name="Access-Control-Allow-Credentials",
                            value="true",
                        ),
                    ],
                ),
            ),
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/frontdoor"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-rg"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleFrontdoor, err := frontdoor.NewFrontdoor(ctx, "example", &frontdoor.FrontdoorArgs{
    			Name:              pulumi.String("example"),
    			ResourceGroupName: example.Name,
    			BackendPools: frontdoor.FrontdoorBackendPoolArray{
    				&frontdoor.FrontdoorBackendPoolArgs{
    					Name:              pulumi.String("exampleBackendBing"),
    					LoadBalancingName: pulumi.String("exampleLoadBalancingSettings1"),
    					HealthProbeName:   pulumi.String("exampleHealthProbeSetting1"),
    					Backends: frontdoor.FrontdoorBackendPoolBackendArray{
    						&frontdoor.FrontdoorBackendPoolBackendArgs{
    							HostHeader: pulumi.String("www.bing.com"),
    							Address:    pulumi.String("www.bing.com"),
    							HttpPort:   pulumi.Int(80),
    							HttpsPort:  pulumi.Int(443),
    						},
    					},
    				},
    			},
    			BackendPoolHealthProbes: frontdoor.FrontdoorBackendPoolHealthProbeArray{
    				&frontdoor.FrontdoorBackendPoolHealthProbeArgs{
    					Name: pulumi.String("exampleHealthProbeSetting1"),
    				},
    			},
    			BackendPoolLoadBalancings: frontdoor.FrontdoorBackendPoolLoadBalancingArray{
    				&frontdoor.FrontdoorBackendPoolLoadBalancingArgs{
    					Name: pulumi.String("exampleLoadBalancingSettings1"),
    				},
    			},
    			FrontendEndpoints: frontdoor.FrontdoorFrontendEndpointArray{
    				&frontdoor.FrontdoorFrontendEndpointArgs{
    					Name:     pulumi.String("exampleFrontendEndpoint1"),
    					HostName: pulumi.String("example-FrontDoor.azurefd.net"),
    				},
    			},
    			RoutingRules: frontdoor.FrontdoorRoutingRuleArray{
    				&frontdoor.FrontdoorRoutingRuleArgs{
    					Name: pulumi.String("exampleRoutingRule1"),
    					AcceptedProtocols: pulumi.StringArray{
    						pulumi.String("Http"),
    						pulumi.String("Https"),
    					},
    					PatternsToMatches: pulumi.StringArray{
    						pulumi.String("/*"),
    					},
    					FrontendEndpoints: pulumi.StringArray{
    						pulumi.String("exampleFrontendEndpoint1"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = frontdoor.NewRulesEngine(ctx, "example_rules_engine", &frontdoor.RulesEngineArgs{
    			Name:              pulumi.String("exampleRulesEngineConfig1"),
    			FrontdoorName:     exampleFrontdoor.Name,
    			ResourceGroupName: exampleFrontdoor.ResourceGroupName,
    			Rules: frontdoor.RulesEngineRuleArray{
    				&frontdoor.RulesEngineRuleArgs{
    					Name:     pulumi.String("debuggingoutput"),
    					Priority: pulumi.Int(1),
    					Action: &frontdoor.RulesEngineRuleActionArgs{
    						ResponseHeaders: frontdoor.RulesEngineRuleActionResponseHeaderArray{
    							&frontdoor.RulesEngineRuleActionResponseHeaderArgs{
    								HeaderActionType: pulumi.String("Append"),
    								HeaderName:       pulumi.String("X-TEST-HEADER"),
    								Value:            pulumi.String("Append Header Rule"),
    							},
    						},
    					},
    				},
    				&frontdoor.RulesEngineRuleArgs{
    					Name:     pulumi.String("overwriteorigin"),
    					Priority: pulumi.Int(2),
    					MatchConditions: frontdoor.RulesEngineRuleMatchConditionArray{
    						&frontdoor.RulesEngineRuleMatchConditionArgs{
    							Variable: pulumi.String("RequestMethod"),
    							Operator: pulumi.String("Equal"),
    							Values: pulumi.StringArray{
    								pulumi.String("GET"),
    								pulumi.String("POST"),
    							},
    						},
    					},
    					Action: &frontdoor.RulesEngineRuleActionArgs{
    						ResponseHeaders: frontdoor.RulesEngineRuleActionResponseHeaderArray{
    							&frontdoor.RulesEngineRuleActionResponseHeaderArgs{
    								HeaderActionType: pulumi.String("Overwrite"),
    								HeaderName:       pulumi.String("Access-Control-Allow-Origin"),
    								Value:            pulumi.String("*"),
    							},
    							&frontdoor.RulesEngineRuleActionResponseHeaderArgs{
    								HeaderActionType: pulumi.String("Overwrite"),
    								HeaderName:       pulumi.String("Access-Control-Allow-Credentials"),
    								Value:            pulumi.String("true"),
    							},
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-rg",
            Location = "West Europe",
        });
    
        var exampleFrontdoor = new Azure.FrontDoor.Frontdoor("example", new()
        {
            Name = "example",
            ResourceGroupName = example.Name,
            BackendPools = new[]
            {
                new Azure.FrontDoor.Inputs.FrontdoorBackendPoolArgs
                {
                    Name = "exampleBackendBing",
                    LoadBalancingName = "exampleLoadBalancingSettings1",
                    HealthProbeName = "exampleHealthProbeSetting1",
                    Backends = new[]
                    {
                        new Azure.FrontDoor.Inputs.FrontdoorBackendPoolBackendArgs
                        {
                            HostHeader = "www.bing.com",
                            Address = "www.bing.com",
                            HttpPort = 80,
                            HttpsPort = 443,
                        },
                    },
                },
            },
            BackendPoolHealthProbes = new[]
            {
                new Azure.FrontDoor.Inputs.FrontdoorBackendPoolHealthProbeArgs
                {
                    Name = "exampleHealthProbeSetting1",
                },
            },
            BackendPoolLoadBalancings = new[]
            {
                new Azure.FrontDoor.Inputs.FrontdoorBackendPoolLoadBalancingArgs
                {
                    Name = "exampleLoadBalancingSettings1",
                },
            },
            FrontendEndpoints = new[]
            {
                new Azure.FrontDoor.Inputs.FrontdoorFrontendEndpointArgs
                {
                    Name = "exampleFrontendEndpoint1",
                    HostName = "example-FrontDoor.azurefd.net",
                },
            },
            RoutingRules = new[]
            {
                new Azure.FrontDoor.Inputs.FrontdoorRoutingRuleArgs
                {
                    Name = "exampleRoutingRule1",
                    AcceptedProtocols = new[]
                    {
                        "Http",
                        "Https",
                    },
                    PatternsToMatches = new[]
                    {
                        "/*",
                    },
                    FrontendEndpoints = new[]
                    {
                        "exampleFrontendEndpoint1",
                    },
                },
            },
        });
    
        var exampleRulesEngine = new Azure.FrontDoor.RulesEngine("example_rules_engine", new()
        {
            Name = "exampleRulesEngineConfig1",
            FrontdoorName = exampleFrontdoor.Name,
            ResourceGroupName = exampleFrontdoor.ResourceGroupName,
            Rules = new[]
            {
                new Azure.FrontDoor.Inputs.RulesEngineRuleArgs
                {
                    Name = "debuggingoutput",
                    Priority = 1,
                    Action = new Azure.FrontDoor.Inputs.RulesEngineRuleActionArgs
                    {
                        ResponseHeaders = new[]
                        {
                            new Azure.FrontDoor.Inputs.RulesEngineRuleActionResponseHeaderArgs
                            {
                                HeaderActionType = "Append",
                                HeaderName = "X-TEST-HEADER",
                                Value = "Append Header Rule",
                            },
                        },
                    },
                },
                new Azure.FrontDoor.Inputs.RulesEngineRuleArgs
                {
                    Name = "overwriteorigin",
                    Priority = 2,
                    MatchConditions = new[]
                    {
                        new Azure.FrontDoor.Inputs.RulesEngineRuleMatchConditionArgs
                        {
                            Variable = "RequestMethod",
                            Operator = "Equal",
                            Values = new[]
                            {
                                "GET",
                                "POST",
                            },
                        },
                    },
                    Action = new Azure.FrontDoor.Inputs.RulesEngineRuleActionArgs
                    {
                        ResponseHeaders = new[]
                        {
                            new Azure.FrontDoor.Inputs.RulesEngineRuleActionResponseHeaderArgs
                            {
                                HeaderActionType = "Overwrite",
                                HeaderName = "Access-Control-Allow-Origin",
                                Value = "*",
                            },
                            new Azure.FrontDoor.Inputs.RulesEngineRuleActionResponseHeaderArgs
                            {
                                HeaderActionType = "Overwrite",
                                HeaderName = "Access-Control-Allow-Credentials",
                                Value = "true",
                            },
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.frontdoor.Frontdoor;
    import com.pulumi.azure.frontdoor.FrontdoorArgs;
    import com.pulumi.azure.frontdoor.inputs.FrontdoorBackendPoolArgs;
    import com.pulumi.azure.frontdoor.inputs.FrontdoorBackendPoolHealthProbeArgs;
    import com.pulumi.azure.frontdoor.inputs.FrontdoorBackendPoolLoadBalancingArgs;
    import com.pulumi.azure.frontdoor.inputs.FrontdoorFrontendEndpointArgs;
    import com.pulumi.azure.frontdoor.inputs.FrontdoorRoutingRuleArgs;
    import com.pulumi.azure.frontdoor.RulesEngine;
    import com.pulumi.azure.frontdoor.RulesEngineArgs;
    import com.pulumi.azure.frontdoor.inputs.RulesEngineRuleArgs;
    import com.pulumi.azure.frontdoor.inputs.RulesEngineRuleActionArgs;
    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 example = new ResourceGroup("example", ResourceGroupArgs.builder()        
                .name("example-rg")
                .location("West Europe")
                .build());
    
            var exampleFrontdoor = new Frontdoor("exampleFrontdoor", FrontdoorArgs.builder()        
                .name("example")
                .resourceGroupName(example.name())
                .backendPools(FrontdoorBackendPoolArgs.builder()
                    .name("exampleBackendBing")
                    .loadBalancingName("exampleLoadBalancingSettings1")
                    .healthProbeName("exampleHealthProbeSetting1")
                    .backends(FrontdoorBackendPoolBackendArgs.builder()
                        .hostHeader("www.bing.com")
                        .address("www.bing.com")
                        .httpPort(80)
                        .httpsPort(443)
                        .build())
                    .build())
                .backendPoolHealthProbes(FrontdoorBackendPoolHealthProbeArgs.builder()
                    .name("exampleHealthProbeSetting1")
                    .build())
                .backendPoolLoadBalancings(FrontdoorBackendPoolLoadBalancingArgs.builder()
                    .name("exampleLoadBalancingSettings1")
                    .build())
                .frontendEndpoints(FrontdoorFrontendEndpointArgs.builder()
                    .name("exampleFrontendEndpoint1")
                    .hostName("example-FrontDoor.azurefd.net")
                    .build())
                .routingRules(FrontdoorRoutingRuleArgs.builder()
                    .name("exampleRoutingRule1")
                    .acceptedProtocols(                
                        "Http",
                        "Https")
                    .patternsToMatches("/*")
                    .frontendEndpoints("exampleFrontendEndpoint1")
                    .build())
                .build());
    
            var exampleRulesEngine = new RulesEngine("exampleRulesEngine", RulesEngineArgs.builder()        
                .name("exampleRulesEngineConfig1")
                .frontdoorName(exampleFrontdoor.name())
                .resourceGroupName(exampleFrontdoor.resourceGroupName())
                .rules(            
                    RulesEngineRuleArgs.builder()
                        .name("debuggingoutput")
                        .priority(1)
                        .action(RulesEngineRuleActionArgs.builder()
                            .responseHeaders(RulesEngineRuleActionResponseHeaderArgs.builder()
                                .headerActionType("Append")
                                .headerName("X-TEST-HEADER")
                                .value("Append Header Rule")
                                .build())
                            .build())
                        .build(),
                    RulesEngineRuleArgs.builder()
                        .name("overwriteorigin")
                        .priority(2)
                        .matchConditions(RulesEngineRuleMatchConditionArgs.builder()
                            .variable("RequestMethod")
                            .operator("Equal")
                            .values(                        
                                "GET",
                                "POST")
                            .build())
                        .action(RulesEngineRuleActionArgs.builder()
                            .responseHeaders(                        
                                RulesEngineRuleActionResponseHeaderArgs.builder()
                                    .headerActionType("Overwrite")
                                    .headerName("Access-Control-Allow-Origin")
                                    .value("*")
                                    .build(),
                                RulesEngineRuleActionResponseHeaderArgs.builder()
                                    .headerActionType("Overwrite")
                                    .headerName("Access-Control-Allow-Credentials")
                                    .value("true")
                                    .build())
                            .build())
                        .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-rg
          location: West Europe
      exampleFrontdoor:
        type: azure:frontdoor:Frontdoor
        name: example
        properties:
          name: example
          resourceGroupName: ${example.name}
          backendPools:
            - name: exampleBackendBing
              loadBalancingName: exampleLoadBalancingSettings1
              healthProbeName: exampleHealthProbeSetting1
              backends:
                - hostHeader: www.bing.com
                  address: www.bing.com
                  httpPort: 80
                  httpsPort: 443
          backendPoolHealthProbes:
            - name: exampleHealthProbeSetting1
          backendPoolLoadBalancings:
            - name: exampleLoadBalancingSettings1
          frontendEndpoints:
            - name: exampleFrontendEndpoint1
              hostName: example-FrontDoor.azurefd.net
          routingRules:
            - name: exampleRoutingRule1
              acceptedProtocols:
                - Http
                - Https
              patternsToMatches:
                - /*
              frontendEndpoints:
                - exampleFrontendEndpoint1
      exampleRulesEngine:
        type: azure:frontdoor:RulesEngine
        name: example_rules_engine
        properties:
          name: exampleRulesEngineConfig1
          frontdoorName: ${exampleFrontdoor.name}
          resourceGroupName: ${exampleFrontdoor.resourceGroupName}
          rules:
            - name: debuggingoutput
              priority: 1
              action:
                responseHeaders:
                  - headerActionType: Append
                    headerName: X-TEST-HEADER
                    value: Append Header Rule
            - name: overwriteorigin
              priority: 2
              matchConditions:
                - variable: RequestMethod
                  operator: Equal
                  values:
                    - GET
                    - POST
              action:
                responseHeaders:
                  - headerActionType: Overwrite
                    headerName: Access-Control-Allow-Origin
                    value: '*'
                  - headerActionType: Overwrite
                    headerName: Access-Control-Allow-Credentials
                    value: 'true'
    

    Create RulesEngine Resource

    new RulesEngine(name: string, args: RulesEngineArgs, opts?: CustomResourceOptions);
    @overload
    def RulesEngine(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    enabled: Optional[bool] = None,
                    frontdoor_name: Optional[str] = None,
                    name: Optional[str] = None,
                    resource_group_name: Optional[str] = None,
                    rules: Optional[Sequence[RulesEngineRuleArgs]] = None)
    @overload
    def RulesEngine(resource_name: str,
                    args: RulesEngineArgs,
                    opts: Optional[ResourceOptions] = None)
    func NewRulesEngine(ctx *Context, name string, args RulesEngineArgs, opts ...ResourceOption) (*RulesEngine, error)
    public RulesEngine(string name, RulesEngineArgs args, CustomResourceOptions? opts = null)
    public RulesEngine(String name, RulesEngineArgs args)
    public RulesEngine(String name, RulesEngineArgs args, CustomResourceOptions options)
    
    type: azure:frontdoor:RulesEngine
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args RulesEngineArgs
    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 RulesEngineArgs
    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 RulesEngineArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RulesEngineArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RulesEngineArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    RulesEngine Resource Properties

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

    Inputs

    The RulesEngine resource accepts the following input properties:

    FrontdoorName string
    The name of the Front Door instance. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group. Changing this forces a new resource to be created.
    Enabled bool
    Whether this Rules engine configuration is enabled? Defaults to true.
    Name string
    The name of the Rules engine configuration. Changing this forces a new resource to be created.
    Rules List<RulesEngineRule>
    A rule block as defined below.
    FrontdoorName string
    The name of the Front Door instance. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group. Changing this forces a new resource to be created.
    Enabled bool
    Whether this Rules engine configuration is enabled? Defaults to true.
    Name string
    The name of the Rules engine configuration. Changing this forces a new resource to be created.
    Rules []RulesEngineRuleArgs
    A rule block as defined below.
    frontdoorName String
    The name of the Front Door instance. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group. Changing this forces a new resource to be created.
    enabled Boolean
    Whether this Rules engine configuration is enabled? Defaults to true.
    name String
    The name of the Rules engine configuration. Changing this forces a new resource to be created.
    rules List<RulesEngineRule>
    A rule block as defined below.
    frontdoorName string
    The name of the Front Door instance. Changing this forces a new resource to be created.
    resourceGroupName string
    The name of the resource group. Changing this forces a new resource to be created.
    enabled boolean
    Whether this Rules engine configuration is enabled? Defaults to true.
    name string
    The name of the Rules engine configuration. Changing this forces a new resource to be created.
    rules RulesEngineRule[]
    A rule block as defined below.
    frontdoor_name str
    The name of the Front Door instance. Changing this forces a new resource to be created.
    resource_group_name str
    The name of the resource group. Changing this forces a new resource to be created.
    enabled bool
    Whether this Rules engine configuration is enabled? Defaults to true.
    name str
    The name of the Rules engine configuration. Changing this forces a new resource to be created.
    rules Sequence[RulesEngineRuleArgs]
    A rule block as defined below.
    frontdoorName String
    The name of the Front Door instance. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group. Changing this forces a new resource to be created.
    enabled Boolean
    Whether this Rules engine configuration is enabled? Defaults to true.
    name String
    The name of the Rules engine configuration. Changing this forces a new resource to be created.
    rules List<Property Map>
    A rule block as defined below.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    id String
    The provider-assigned unique ID for this managed resource.
    location String

    Look up Existing RulesEngine Resource

    Get an existing RulesEngine 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?: RulesEngineState, opts?: CustomResourceOptions): RulesEngine
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            enabled: Optional[bool] = None,
            frontdoor_name: Optional[str] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            rules: Optional[Sequence[RulesEngineRuleArgs]] = None) -> RulesEngine
    func GetRulesEngine(ctx *Context, name string, id IDInput, state *RulesEngineState, opts ...ResourceOption) (*RulesEngine, error)
    public static RulesEngine Get(string name, Input<string> id, RulesEngineState? state, CustomResourceOptions? opts = null)
    public static RulesEngine get(String name, Output<String> id, RulesEngineState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Enabled bool
    Whether this Rules engine configuration is enabled? Defaults to true.
    FrontdoorName string
    The name of the Front Door instance. Changing this forces a new resource to be created.
    Location string
    Name string
    The name of the Rules engine configuration. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group. Changing this forces a new resource to be created.
    Rules List<RulesEngineRule>
    A rule block as defined below.
    Enabled bool
    Whether this Rules engine configuration is enabled? Defaults to true.
    FrontdoorName string
    The name of the Front Door instance. Changing this forces a new resource to be created.
    Location string
    Name string
    The name of the Rules engine configuration. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group. Changing this forces a new resource to be created.
    Rules []RulesEngineRuleArgs
    A rule block as defined below.
    enabled Boolean
    Whether this Rules engine configuration is enabled? Defaults to true.
    frontdoorName String
    The name of the Front Door instance. Changing this forces a new resource to be created.
    location String
    name String
    The name of the Rules engine configuration. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group. Changing this forces a new resource to be created.
    rules List<RulesEngineRule>
    A rule block as defined below.
    enabled boolean
    Whether this Rules engine configuration is enabled? Defaults to true.
    frontdoorName string
    The name of the Front Door instance. Changing this forces a new resource to be created.
    location string
    name string
    The name of the Rules engine configuration. Changing this forces a new resource to be created.
    resourceGroupName string
    The name of the resource group. Changing this forces a new resource to be created.
    rules RulesEngineRule[]
    A rule block as defined below.
    enabled bool
    Whether this Rules engine configuration is enabled? Defaults to true.
    frontdoor_name str
    The name of the Front Door instance. Changing this forces a new resource to be created.
    location str
    name str
    The name of the Rules engine configuration. Changing this forces a new resource to be created.
    resource_group_name str
    The name of the resource group. Changing this forces a new resource to be created.
    rules Sequence[RulesEngineRuleArgs]
    A rule block as defined below.
    enabled Boolean
    Whether this Rules engine configuration is enabled? Defaults to true.
    frontdoorName String
    The name of the Front Door instance. Changing this forces a new resource to be created.
    location String
    name String
    The name of the Rules engine configuration. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group. Changing this forces a new resource to be created.
    rules List<Property Map>
    A rule block as defined below.

    Supporting Types

    RulesEngineRule, RulesEngineRuleArgs

    Name string
    The name of the rule.
    Priority int
    Priority of the rule, must be unique per rules engine definition.
    Action RulesEngineRuleAction
    An action block as defined below.
    MatchConditions List<RulesEngineRuleMatchCondition>
    One or more match_condition block as defined below.
    Name string
    The name of the rule.
    Priority int
    Priority of the rule, must be unique per rules engine definition.
    Action RulesEngineRuleAction
    An action block as defined below.
    MatchConditions []RulesEngineRuleMatchCondition
    One or more match_condition block as defined below.
    name String
    The name of the rule.
    priority Integer
    Priority of the rule, must be unique per rules engine definition.
    action RulesEngineRuleAction
    An action block as defined below.
    matchConditions List<RulesEngineRuleMatchCondition>
    One or more match_condition block as defined below.
    name string
    The name of the rule.
    priority number
    Priority of the rule, must be unique per rules engine definition.
    action RulesEngineRuleAction
    An action block as defined below.
    matchConditions RulesEngineRuleMatchCondition[]
    One or more match_condition block as defined below.
    name str
    The name of the rule.
    priority int
    Priority of the rule, must be unique per rules engine definition.
    action RulesEngineRuleAction
    An action block as defined below.
    match_conditions Sequence[RulesEngineRuleMatchCondition]
    One or more match_condition block as defined below.
    name String
    The name of the rule.
    priority Number
    Priority of the rule, must be unique per rules engine definition.
    action Property Map
    An action block as defined below.
    matchConditions List<Property Map>
    One or more match_condition block as defined below.

    RulesEngineRuleAction, RulesEngineRuleActionArgs

    RequestHeaders List<RulesEngineRuleActionRequestHeader>
    A request_header block as defined below.
    ResponseHeaders List<RulesEngineRuleActionResponseHeader>
    A response_header block as defined below.
    RequestHeaders []RulesEngineRuleActionRequestHeader
    A request_header block as defined below.
    ResponseHeaders []RulesEngineRuleActionResponseHeader
    A response_header block as defined below.
    requestHeaders List<RulesEngineRuleActionRequestHeader>
    A request_header block as defined below.
    responseHeaders List<RulesEngineRuleActionResponseHeader>
    A response_header block as defined below.
    requestHeaders RulesEngineRuleActionRequestHeader[]
    A request_header block as defined below.
    responseHeaders RulesEngineRuleActionResponseHeader[]
    A response_header block as defined below.
    request_headers Sequence[RulesEngineRuleActionRequestHeader]
    A request_header block as defined below.
    response_headers Sequence[RulesEngineRuleActionResponseHeader]
    A response_header block as defined below.
    requestHeaders List<Property Map>
    A request_header block as defined below.
    responseHeaders List<Property Map>
    A response_header block as defined below.

    RulesEngineRuleActionRequestHeader, RulesEngineRuleActionRequestHeaderArgs

    HeaderActionType string
    can be set to Overwrite, Append or Delete.
    HeaderName string
    header name (string).
    Value string
    value name (string).
    HeaderActionType string
    can be set to Overwrite, Append or Delete.
    HeaderName string
    header name (string).
    Value string
    value name (string).
    headerActionType String
    can be set to Overwrite, Append or Delete.
    headerName String
    header name (string).
    value String
    value name (string).
    headerActionType string
    can be set to Overwrite, Append or Delete.
    headerName string
    header name (string).
    value string
    value name (string).
    header_action_type str
    can be set to Overwrite, Append or Delete.
    header_name str
    header name (string).
    value str
    value name (string).
    headerActionType String
    can be set to Overwrite, Append or Delete.
    headerName String
    header name (string).
    value String
    value name (string).

    RulesEngineRuleActionResponseHeader, RulesEngineRuleActionResponseHeaderArgs

    HeaderActionType string
    can be set to Overwrite, Append or Delete.
    HeaderName string
    header name (string).
    Value string
    value name (string).
    HeaderActionType string
    can be set to Overwrite, Append or Delete.
    HeaderName string
    header name (string).
    Value string
    value name (string).
    headerActionType String
    can be set to Overwrite, Append or Delete.
    headerName String
    header name (string).
    value String
    value name (string).
    headerActionType string
    can be set to Overwrite, Append or Delete.
    headerName string
    header name (string).
    value string
    value name (string).
    header_action_type str
    can be set to Overwrite, Append or Delete.
    header_name str
    header name (string).
    value str
    value name (string).
    headerActionType String
    can be set to Overwrite, Append or Delete.
    headerName String
    header name (string).
    value String
    value name (string).

    RulesEngineRuleMatchCondition, RulesEngineRuleMatchConditionArgs

    Operator string
    can be set to Any, IPMatch, GeoMatch, Equal, Contains, LessThan, GreaterThan, LessThanOrEqual, GreaterThanOrEqual, BeginsWith or EndsWith
    NegateCondition bool
    can be set to true or false to negate the given condition. Defaults to false.
    Selector string
    match against a specific key when variable is set to PostArgs or RequestHeader. It cannot be used with QueryString and RequestMethod.
    Transforms List<string>
    can be set to one or more values out of Lowercase, RemoveNulls, Trim, Uppercase, UrlDecode and UrlEncode
    Values List<string>
    (array) can contain one or more strings.
    Variable string
    can be set to IsMobile, RemoteAddr, RequestMethod, QueryString, PostArgs, RequestURI, RequestPath, RequestFilename, RequestFilenameExtension,RequestHeader,RequestBody or RequestScheme.
    Operator string
    can be set to Any, IPMatch, GeoMatch, Equal, Contains, LessThan, GreaterThan, LessThanOrEqual, GreaterThanOrEqual, BeginsWith or EndsWith
    NegateCondition bool
    can be set to true or false to negate the given condition. Defaults to false.
    Selector string
    match against a specific key when variable is set to PostArgs or RequestHeader. It cannot be used with QueryString and RequestMethod.
    Transforms []string
    can be set to one or more values out of Lowercase, RemoveNulls, Trim, Uppercase, UrlDecode and UrlEncode
    Values []string
    (array) can contain one or more strings.
    Variable string
    can be set to IsMobile, RemoteAddr, RequestMethod, QueryString, PostArgs, RequestURI, RequestPath, RequestFilename, RequestFilenameExtension,RequestHeader,RequestBody or RequestScheme.
    operator String
    can be set to Any, IPMatch, GeoMatch, Equal, Contains, LessThan, GreaterThan, LessThanOrEqual, GreaterThanOrEqual, BeginsWith or EndsWith
    negateCondition Boolean
    can be set to true or false to negate the given condition. Defaults to false.
    selector String
    match against a specific key when variable is set to PostArgs or RequestHeader. It cannot be used with QueryString and RequestMethod.
    transforms List<String>
    can be set to one or more values out of Lowercase, RemoveNulls, Trim, Uppercase, UrlDecode and UrlEncode
    values List<String>
    (array) can contain one or more strings.
    variable String
    can be set to IsMobile, RemoteAddr, RequestMethod, QueryString, PostArgs, RequestURI, RequestPath, RequestFilename, RequestFilenameExtension,RequestHeader,RequestBody or RequestScheme.
    operator string
    can be set to Any, IPMatch, GeoMatch, Equal, Contains, LessThan, GreaterThan, LessThanOrEqual, GreaterThanOrEqual, BeginsWith or EndsWith
    negateCondition boolean
    can be set to true or false to negate the given condition. Defaults to false.
    selector string
    match against a specific key when variable is set to PostArgs or RequestHeader. It cannot be used with QueryString and RequestMethod.
    transforms string[]
    can be set to one or more values out of Lowercase, RemoveNulls, Trim, Uppercase, UrlDecode and UrlEncode
    values string[]
    (array) can contain one or more strings.
    variable string
    can be set to IsMobile, RemoteAddr, RequestMethod, QueryString, PostArgs, RequestURI, RequestPath, RequestFilename, RequestFilenameExtension,RequestHeader,RequestBody or RequestScheme.
    operator str
    can be set to Any, IPMatch, GeoMatch, Equal, Contains, LessThan, GreaterThan, LessThanOrEqual, GreaterThanOrEqual, BeginsWith or EndsWith
    negate_condition bool
    can be set to true or false to negate the given condition. Defaults to false.
    selector str
    match against a specific key when variable is set to PostArgs or RequestHeader. It cannot be used with QueryString and RequestMethod.
    transforms Sequence[str]
    can be set to one or more values out of Lowercase, RemoveNulls, Trim, Uppercase, UrlDecode and UrlEncode
    values Sequence[str]
    (array) can contain one or more strings.
    variable str
    can be set to IsMobile, RemoteAddr, RequestMethod, QueryString, PostArgs, RequestURI, RequestPath, RequestFilename, RequestFilenameExtension,RequestHeader,RequestBody or RequestScheme.
    operator String
    can be set to Any, IPMatch, GeoMatch, Equal, Contains, LessThan, GreaterThan, LessThanOrEqual, GreaterThanOrEqual, BeginsWith or EndsWith
    negateCondition Boolean
    can be set to true or false to negate the given condition. Defaults to false.
    selector String
    match against a specific key when variable is set to PostArgs or RequestHeader. It cannot be used with QueryString and RequestMethod.
    transforms List<String>
    can be set to one or more values out of Lowercase, RemoveNulls, Trim, Uppercase, UrlDecode and UrlEncode
    values List<String>
    (array) can contain one or more strings.
    variable String
    can be set to IsMobile, RemoteAddr, RequestMethod, QueryString, PostArgs, RequestURI, RequestPath, RequestFilename, RequestFilenameExtension,RequestHeader,RequestBody or RequestScheme.

    Import

    Azure Front Door Rules Engine’s can be imported using the resource id, e.g.

    $ pulumi import azure:frontdoor/rulesEngine:RulesEngine example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Network/frontdoors/frontdoor1/rulesEngines/rule1
    

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi