New-AzFrontDoorRulesEngineActionObject
Create an in-memory object for RulesEngineAction.
Syntax
ByFieldsWithForwardingParameterSet (Default)
New-AzFrontDoorRulesEngineActionObject
[-RequestHeaderAction <IHeaderAction[]>]
[-ResponseHeaderAction <IHeaderAction[]>]
[-RouteConfigurationOverride <IRouteConfiguration>]
[-BackendPoolName <String>]
[-FrontDoorName <String>]
[-ResourceGroupName <String>]
[-CacheDuration <TimeSpan>]
[-DynamicCompression <String>]
[-QueryParameter <String>]
[-QueryParameterStripDirective <String>]
[-CustomForwardingPath <String>]
[-ForwardingProtocol <String>]
[-EnableCaching <Boolean>]
[<CommonParameters>]
ByFieldsWithRedirectParameterSet
New-AzFrontDoorRulesEngineActionObject
[-RequestHeaderAction <IHeaderAction[]>]
[-ResponseHeaderAction <IHeaderAction[]>]
[-RouteConfigurationOverride <IRouteConfiguration>]
[-CustomFragment <String>]
[-CustomHost <String>]
[-CustomPath <String>]
[-CustomQueryString <String>]
[-RedirectProtocol <String>]
[-RedirectType <String>]
[<CommonParameters>]
Description
Create an in-memory object for RulesEngineAction.
Examples
Example 1: Create a rules engine action that append response header value and show how to view the properties of the rules engine action created.
$headerActions = New-AzFrontDoorHeaderActionObject -HeaderActionType "Append" -HeaderName "X-Content-Type-Options" -Value "nosniff"
Create a rules engine action that append response header value and show how to view the properties of the rules engine action created.
Example 2: Create a rules engine action that forwards the requests to a specific backend pool and show how to view the properties of the rules engine action created.
$rulesEngineAction = New-AzFrontDoorRulesEngineActionObject -RequestHeaderAction $headerActions -ForwardingProtocol HttpsOnly -BackendPoolName mybackendpool -ResourceGroupName Jessicl-Test-RG -FrontDoorName jessicl-test-myappfrontend -QueryParameterStripDirective StripNone -DynamicCompression Disabled -EnableCaching $true
Create a rules engine action that forwards the requests to a specific backend pool and show how to view the properties of the rules engine action created.
Example 3: Create a rules engine action that redirects the requests to another host and show how to view the properties of the rules engine action created.
$rulesEngineAction = New-AzFrontDoorRulesEngineActionObject -RedirectType Moved -RedirectProtocol MatchRequest -CustomHost www.contoso.com
Create a rules engine action that redirects the requests to another host and show how to view the properties of the rules engine action created.
Parameters
-BackendPoolName
Resource ID.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByFieldsWithForwardingParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-CacheDuration
The duration for which the content needs to be cached.
Allowed format is in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations ).
HTTP requires the value to be no more than a year.
Parameter properties
Type: TimeSpan
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByFieldsWithForwardingParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-CustomForwardingPath
A custom path used to rewrite resource paths matched by this rule.
Leave empty to use incoming path.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByFieldsWithForwardingParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-CustomFragment
Fragment to add to the redirect URL.
Fragment is the part of the URL that comes after #.
Do not include the #.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByFieldsWithRedirectParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-CustomHost
Host to redirect.
Leave empty to use the incoming host as the destination host.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByFieldsWithRedirectParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-CustomPath
The full path to redirect.
Path cannot be empty and must start with /.
Leave empty to use the incoming path as destination path.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByFieldsWithRedirectParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-CustomQueryString
The set of query strings to be placed in the redirect URL.
Setting this value would replace any existing query string; leave empty to preserve the incoming query string.
Query string must be in <key>=<value> format.
The first ? and & will be added automatically so do not include them in the front, but do separate multiple query strings with &.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByFieldsWithRedirectParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DynamicCompression
Whether to use dynamic compression for cached content.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByFieldsWithForwardingParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EnableCaching
Create an in-memory object for RulesEngineAction.
Parameter properties
Type: Boolean
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByFieldsWithForwardingParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ForwardingProtocol
Protocol this rule will use when forwarding traffic to backends.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByFieldsWithForwardingParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-FrontDoorName
The name of the Front Door to which this routing rule belongs.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByFieldsWithForwardingParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-QueryParameter
query parameters to include or exclude (comma separated).
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByFieldsWithForwardingParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-QueryParameterStripDirective
Treatment of URL query terms when forming the cache key.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByFieldsWithForwardingParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RedirectProtocol
The protocol of the destination to where the traffic is redirected.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByFieldsWithRedirectParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RedirectType
The redirect type the rule will use when redirecting traffic.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByFieldsWithRedirectParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
A list of header actions to apply from the request from AFD to the origin.
Type: IHeaderAction [ ]
Default value: None
Supports wildcards: False
DontShow: False
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The resource group name that the RoutingRule will be created in.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByFieldsWithForwardingParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
A list of header actions to apply from the response from AFD to the client.
Type: IHeaderAction [ ]
Default value: None
Supports wildcards: False
DontShow: False
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RouteConfigurationOverride
Override the route configuration.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs