New-AzFrontDoorRulesEngineActionObject
Create a PSRulesEngineAction object for creating a rules engine rule.
Sintaxe
ByFieldsWithRegularActionParameterSet (Padrão)
New-AzFrontDoorRulesEngineActionObject
[-RequestHeaderAction <System.Collections.Generic.List`1[Microsoft.Azure.Commands.FrontDoor.Models.PSHeaderAction]>]
[-ResponseHeaderAction <System.Collections.Generic.List`1[Microsoft.Azure.Commands.FrontDoor.Models.PSHeaderAction]>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByFieldsWithForwardingParameterSet
New-AzFrontDoorRulesEngineActionObject
-ResourceGroupName <String>
-FrontDoorName <String>
-BackendPoolName <String>
[-RequestHeaderAction <System.Collections.Generic.List`1[Microsoft.Azure.Commands.FrontDoor.Models.PSHeaderAction]>]
[-ResponseHeaderAction <System.Collections.Generic.List`1[Microsoft.Azure.Commands.FrontDoor.Models.PSHeaderAction]>]
[-CustomForwardingPath <String>]
[-ForwardingProtocol <String>]
[-EnableCaching <Boolean>]
[-QueryParameterStripDirective <String>]
[-DynamicCompression <PSEnabledState>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByFieldsWithRedirectParameterSet
New-AzFrontDoorRulesEngineActionObject
[-RequestHeaderAction <System.Collections.Generic.List`1[Microsoft.Azure.Commands.FrontDoor.Models.PSHeaderAction]>]
[-ResponseHeaderAction <System.Collections.Generic.List`1[Microsoft.Azure.Commands.FrontDoor.Models.PSHeaderAction]>]
[-RedirectType <String>]
[-RedirectProtocol <String>]
[-CustomHost <String>]
[-CustomPath <String>]
[-CustomFragment <String>]
[-CustomQueryString <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Create a PSRulesEngineAction object for creating a rules engine rule.
Use cmdlet "New-AzFrontDoorHeaderActionObject" to create PSHeaderObjects to pass into the parameters "-RequestHeaderActions" and "-ResponseHeaderActions".
Exemplos
Example 1
$headerActions = New-AzFrontDoorHeaderActionObject -HeaderActionType "Append" -HeaderName "X-Content-Type-Options" -Value "nosniff"
$headerActions
HeaderName HeaderActionType Value
---------- ---------------- -----
X-Content-Type-Options Append nosniff
$rulesEngineAction = New-AzFrontDoorRulesEngineActionObject -ResponseHeaderAction $headerActions
$rulesEngineAction
RequestHeaderActions ResponseHeaderActions RouteConfigurationOverride
-------------------- --------------------- --------------------------
{} {X-Content-Type-Options}
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
$rulesEngineAction = New-AzFrontDoorRulesEngineActionObject -RequestHeaderAction $headerActions -ForwardingProtocol HttpsOnly -BackendPoolName mybackendpool -ResourceGroupName Jessicl-Test-RG -FrontDoorName jessicl-test-myappfrontend -QueryParameterStripDirective StripNone -DynamicCompression Disabled -EnableCaching $true
$rulesEngineAction
RequestHeaderAction ResponseHeaderAction RouteConfigurationOverride
------------------- -------------------- --------------------------
{headeraction1, headeraction2} {} Microsoft.Azure.Commands.FrontDoor.Models.PSForwardingConfiguration
$rulesEngineAction.RequestHeaderAction
HeaderName HeaderActionType Value
---------- ---------------- -----
headeraction1 Overwrite
headeraction2 Append
$rulesEngineAction.ResponseHeaderAction
$rulesEngineAction.RouteConfigurationOverride
CustomForwardingPath :
ForwardingProtocol : HttpsOnly
BackendPoolId : /subscriptions/47f4bc68-6fe4-43a2-be8b-dfd0e290efa2/resourceGroups/myresourcegroup/provi
ders/Microsoft.Network/frontDoors/myfrontdoor/BackendPools/mybackendpool
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
$rulesEngineAction = New-AzFrontDoorRulesEngineActionObject -RedirectType Moved -RedirectProtocol MatchRequest -CustomHost www.contoso.com
$rulesEngineAction
RequestHeaderActions ResponseHeaderActions RouteConfigurationOverride
-------------------- --------------------- --------------------------
{} {} Microsoft.Azure.Commands.FrontDoor.Models.PSRedirectConfiguration
$rulesEngineAction.RouteConfigurationOverride
RedirectType : Moved
RedirectProtocol : MatchRequest
CustomHost : www.contoso.com
CustomPath :
CustomFragment :
CustomQueryString :
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.
Parâmetros
-BackendPoolName
The name of the BackendPool which this rule routes to
Propriedades do parâmetro
Tipo: String
Valor padrão: None
Dá suporte a curingas: False
DontShow: False
Conjuntos de parâmetros
ByFieldsWithForwardingParameterSet
Cargo: Named
Obrigatório: True
Valor do pipeline: False
Valor do pipeline pelo nome da propriedade: False
Valor dos argumentos restantes: False
-CustomForwardingPath
The custom path used to rewrite resource paths matched by this rule.
Leave empty to use incoming path.
Propriedades do parâmetro
Tipo: String
Valor padrão: None
Dá suporte a curingas: False
DontShow: False
Conjuntos de parâmetros
ByFieldsWithForwardingParameterSet
Cargo: Named
Obrigatório: False
Valor do pipeline: False
Valor do pipeline pelo nome da propriedade: False
Valor dos argumentos restantes: False
-CustomFragment
Fragment to add to the redirect URL.
Fragment is the part of the URL that comes after #.
Do not include the #.
Propriedades do parâmetro
Tipo: String
Valor padrão: None
Dá suporte a curingas: False
DontShow: False
Conjuntos de parâmetros
ByFieldsWithRedirectParameterSet
Cargo: Named
Obrigatório: False
Valor do pipeline: False
Valor do pipeline pelo nome da propriedade: False
Valor dos argumentos restantes: False
-CustomHost
Host to redirect.
Leave empty to use the incoming host as the destination host.
Propriedades do parâmetro
Tipo: String
Valor padrão: None
Dá suporte a curingas: False
DontShow: False
Conjuntos de parâmetros
ByFieldsWithRedirectParameterSet
Cargo: Named
Obrigatório: False
Valor do pipeline: False
Valor do pipeline pelo nome da propriedade: False
Valor dos argumentos restantes: 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.
Propriedades do parâmetro
Tipo: String
Valor padrão: None
Dá suporte a curingas: False
DontShow: False
Conjuntos de parâmetros
ByFieldsWithRedirectParameterSet
Cargo: Named
Obrigatório: False
Valor do pipeline: False
Valor do pipeline pelo nome da propriedade: False
Valor dos argumentos restantes: 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 &.
Propriedades do parâmetro
Tipo: String
Valor padrão: None
Dá suporte a curingas: False
DontShow: False
Conjuntos de parâmetros
ByFieldsWithRedirectParameterSet
Cargo: Named
Obrigatório: False
Valor do pipeline: False
Valor do pipeline pelo nome da propriedade: False
Valor dos argumentos restantes: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Propriedades do parâmetro
Tipo: IAzureContextContainer
Valor padrão: None
Dá suporte a curingas: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Conjuntos de parâmetros
(All)
Cargo: Named
Obrigatório: False
Valor do pipeline: False
Valor do pipeline pelo nome da propriedade: False
Valor dos argumentos restantes: False
-DynamicCompression
Whether to enable dynamic compression for cached content.
Default value is Enabled
Propriedades do parâmetro
Tipo: PSEnabledState
Valor padrão: None
Valores aceitos: Enabled, Disabled
Dá suporte a curingas: False
DontShow: False
Conjuntos de parâmetros
ByFieldsWithForwardingParameterSet
Cargo: Named
Obrigatório: False
Valor do pipeline: False
Valor do pipeline pelo nome da propriedade: False
Valor dos argumentos restantes: False
-EnableCaching
Whether to enable caching for this route.
Default value is false
Propriedades do parâmetro
Tipo: Boolean
Valor padrão: None
Dá suporte a curingas: False
DontShow: False
Conjuntos de parâmetros
ByFieldsWithForwardingParameterSet
Cargo: Named
Obrigatório: False
Valor do pipeline: False
Valor do pipeline pelo nome da propriedade: False
Valor dos argumentos restantes: False
-ForwardingProtocol
The protocol this rule will use when forwarding traffic to backends.
Default value is MatchRequest
Propriedades do parâmetro
Tipo: String
Valor padrão: None
Dá suporte a curingas: False
DontShow: False
Conjuntos de parâmetros
ByFieldsWithForwardingParameterSet
Cargo: Named
Obrigatório: False
Valor do pipeline: False
Valor do pipeline pelo nome da propriedade: False
Valor dos argumentos restantes: False
-FrontDoorName
The name of the Front Door to which this routing rule belongs.
Propriedades do parâmetro
Tipo: String
Valor padrão: None
Dá suporte a curingas: False
DontShow: False
Conjuntos de parâmetros
ByFieldsWithForwardingParameterSet
Cargo: Named
Obrigatório: True
Valor do pipeline: False
Valor do pipeline pelo nome da propriedade: False
Valor dos argumentos restantes: False
-QueryParameterStripDirective
The treatment of URL query terms when forming the cache key.
Default value is StripAll
Propriedades do parâmetro
Tipo: String
Valor padrão: None
Dá suporte a curingas: False
DontShow: False
Conjuntos de parâmetros
ByFieldsWithForwardingParameterSet
Cargo: Named
Obrigatório: False
Valor do pipeline: False
Valor do pipeline pelo nome da propriedade: False
Valor dos argumentos restantes: False
-RedirectProtocol
The protocol of the destination to where the traffic is redirected.
Default value is MatchRequest
Propriedades do parâmetro
Tipo: String
Valor padrão: None
Dá suporte a curingas: False
DontShow: False
Conjuntos de parâmetros
ByFieldsWithRedirectParameterSet
Cargo: Named
Obrigatório: False
Valor do pipeline: False
Valor do pipeline pelo nome da propriedade: False
Valor dos argumentos restantes: False
-RedirectType
The redirect type the rule will use when redirecting traffic.
Default Value is Moved
Propriedades do parâmetro
Tipo: String
Valor padrão: None
Dá suporte a curingas: False
DontShow: False
Conjuntos de parâmetros
ByFieldsWithRedirectParameterSet
Cargo: Named
Obrigatório: False
Valor do pipeline: False
Valor do pipeline pelo nome da propriedade: False
Valor dos argumentos restantes: False
A list of header actions to apply from the request from AFD to the origin.
(All)
Cargo: Named
Obrigatório: False
Valor do pipeline: False
Valor do pipeline pelo nome da propriedade: False
Valor dos argumentos restantes: False
-ResourceGroupName
The resource group name that the RoutingRule will be created in.
Propriedades do parâmetro
Tipo: String
Valor padrão: None
Dá suporte a curingas: False
DontShow: False
Conjuntos de parâmetros
ByFieldsWithForwardingParameterSet
Cargo: Named
Obrigatório: True
Valor do pipeline: False
Valor do pipeline pelo nome da propriedade: False
Valor dos argumentos restantes: False
A list of header actions to apply from the response from AFD to the client.
(All)
Cargo: Named
Obrigatório: False
Valor do pipeline: False
Valor do pipeline pelo nome da propriedade: False
Valor dos argumentos restantes: 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 .
None
Saídas