你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

New-AzFrontDoorCdnRoute

在指定的订阅、资源组、配置文件和 AzureFrontDoor 终结点下创建具有指定路由名称的新路由。

语法

CreateExpanded (默认值)

New-AzFrontDoorCdnRoute
    -Name <String>
    -EndpointName <String>
    -ProfileName <String>
    -ResourceGroupName <String>
    [-SubscriptionId <String>]
    [-CacheConfigurationQueryParameter <String>]
    [-CacheConfigurationQueryStringCachingBehavior <String>]
    [-CompressionSettingContentTypesToCompress <String[]>]
    [-CompressionSettingIsCompressionEnabled]
    [-CustomDomain <IActivatedResourceReference[]>]
    [-EnabledState <String>]
    [-ForwardingProtocol <String>]
    [-HttpsRedirect <String>]
    [-LinkToDefaultDomain <String>]
    [-OriginGroupId <String>]
    [-OriginPath <String>]
    [-PatternsToMatch <String[]>]
    [-RuleSet <IResourceReference[]>]
    [-SupportedProtocol <String[]>]
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

CreateViaIdentityProfile

New-AzFrontDoorCdnRoute
    -Name <String>
    -EndpointName <String>
    -ProfileInputObject <ICdnIdentity>
    -Route <IRoute>
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

CreateViaIdentityProfileExpanded

New-AzFrontDoorCdnRoute
    -Name <String>
    -EndpointName <String>
    -ProfileInputObject <ICdnIdentity>
    [-CacheConfigurationQueryParameter <String>]
    [-CacheConfigurationQueryStringCachingBehavior <String>]
    [-CompressionSettingContentTypesToCompress <String[]>]
    [-CompressionSettingIsCompressionEnabled]
    [-CustomDomain <IActivatedResourceReference[]>]
    [-EnabledState <String>]
    [-ForwardingProtocol <String>]
    [-HttpsRedirect <String>]
    [-LinkToDefaultDomain <String>]
    [-OriginGroupId <String>]
    [-OriginPath <String>]
    [-PatternsToMatch <String[]>]
    [-RuleSet <IResourceReference[]>]
    [-SupportedProtocol <String[]>]
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

CreateViaJsonFilePath

New-AzFrontDoorCdnRoute
    -Name <String>
    -EndpointName <String>
    -ProfileName <String>
    -ResourceGroupName <String>
    -JsonFilePath <String>
    [-SubscriptionId <String>]
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

CreateViaJsonString

New-AzFrontDoorCdnRoute
    -Name <String>
    -EndpointName <String>
    -ProfileName <String>
    -ResourceGroupName <String>
    -JsonString <String>
    [-SubscriptionId <String>]
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

CreateViaIdentityAfdEndpoint

New-AzFrontDoorCdnRoute
    -Name <String>
    -AfdEndpointInputObject <ICdnIdentity>
    -Route <IRoute>
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

CreateViaIdentityAfdEndpointExpanded

New-AzFrontDoorCdnRoute
    -Name <String>
    -AfdEndpointInputObject <ICdnIdentity>
    [-CacheConfigurationQueryParameter <String>]
    [-CacheConfigurationQueryStringCachingBehavior <String>]
    [-CompressionSettingContentTypesToCompress <String[]>]
    [-CompressionSettingIsCompressionEnabled]
    [-CustomDomain <IActivatedResourceReference[]>]
    [-EnabledState <String>]
    [-ForwardingProtocol <String>]
    [-HttpsRedirect <String>]
    [-LinkToDefaultDomain <String>]
    [-OriginGroupId <String>]
    [-OriginPath <String>]
    [-PatternsToMatch <String[]>]
    [-RuleSet <IResourceReference[]>]
    [-SupportedProtocol <String[]>]
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

说明

在指定的订阅、资源组、配置文件和 AzureFrontDoor 终结点下创建具有指定路由名称的新路由。

示例

示例 1:在 AzureFrontDoor 配置文件下创建 AzureFrontDoor 路由

$originGroup = Get-AzFrontDoorCdnOriginGroup -ResourceGroupName testps-rg-da16jm -ProfileName fdp-v542q6 -OriginGroupName org001
$ruleSet = Get-AzFrontDoorCdnRuleSet -ResourceGroupName testps-rg-da16jm -ProfileName fdp-v542q6 -RuleSetName ruleset001
$customdomain = Get-AzFrontDoorCdnCustomDomain -ResourceGroupName testps-rg-da16jm -ProfileName fdp-v542q6 -CustomDomainName domain001

$ruleSetResoure = New-AzFrontDoorCdnResourceReferenceObject -Id $ruleSet.Id
$customdomainResoure = New-AzFrontDoorCdnResourceReferenceObject -Id $customdomain.Id

New-AzFrontDoorCdnRoute -ResourceGroupName testps-rg-da16jm -ProfileName fdp-v542q6 -EndpointName end001 -Name route001 -OriginGroupId $originGroup.Id -RuleSet @($ruleSetResoure) -PatternsToMatch "/*" -LinkToDefaultDomain "Enabled" -EnabledState "Enabled" -CustomDomain @($customdomainResoure)
Name     ResourceGroupName
----     -----------------
route001 testps-rg-da16jm

在 AzureFrontDoor 配置文件下创建 AzureFrontDoor 路由

参数

-AfdEndpointInputObject

标识参数

参数属性

类型:ICdnIdentity
默认值:None
支持通配符:False
不显示:False

参数集

CreateViaIdentityAfdEndpoint
Position:Named
必需:True
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityAfdEndpointExpanded
Position:Named
必需:True
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-AsJob

以作业身份运行命令

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-CacheConfigurationQueryParameter

要包含或排除的查询参数(逗号分隔)。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

CreateExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityProfileExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityAfdEndpointExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-CacheConfigurationQueryStringCachingBehavior

定义 Frontdoor 如何缓存包含查询字符串的请求。 缓存、忽略特定查询字符串、使用唯一 URL 缓存每个请求或缓存特定查询字符串时,可以忽略任何查询字符串。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

CreateExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityProfileExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityAfdEndpointExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-CompressionSettingContentTypesToCompress

要对其应用压缩的内容类型的列表。 该值应为有效的 MIME 类型。

参数属性

类型:

String[]

默认值:None
支持通配符:False
不显示:False

参数集

CreateExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityProfileExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityAfdEndpointExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-CompressionSettingIsCompressionEnabled

指示是否在 AzureFrontDoor 上启用内容压缩。 默认值为 false。 如果启用了压缩,则如果用户请求压缩版本,内容将作为压缩。 当请求的内容小于 1 字节或大于 1 MB 时,不会在 AzureFrontDoor 上压缩内容。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

CreateExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityProfileExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityAfdEndpointExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Confirm

在运行 cmdlet 之前,提示你进行确认。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:cf

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-CustomDomain

此终结点引用的域。

参数属性

类型:

IActivatedResourceReference[]

默认值:None
支持通配符:False
不显示:False

参数集

CreateExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityProfileExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityAfdEndpointExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-DefaultProfile

DefaultProfile 参数不起作用。 如果对其他订阅执行 cmdlet,请使用 SubscriptionId 参数。

参数属性

类型:PSObject
默认值:None
支持通配符:False
不显示:False
别名:AzureRMContext, AzureCredential

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-EnabledState

是否启用此规则的使用。 允许的值为“Enabled”或“Disabled”

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

CreateExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityProfileExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityAfdEndpointExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-EndpointName

全局唯一的配置文件下的终结点的名称。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

CreateExpanded
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityProfile
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityProfileExpanded
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaJsonFilePath
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaJsonString
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ForwardingProtocol

将流量转发到后端时,此规则将使用协议。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

CreateExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityProfileExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityAfdEndpointExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-HttpsRedirect

是否自动将 HTTP 流量重定向到 HTTPS 流量。 请注意,这是设置此规则的一种简单方法,这将是执行的第一个规则。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

CreateExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityProfileExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityAfdEndpointExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-JsonFilePath

提供给“创建”操作的 Json 文件的路径

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

CreateViaJsonFilePath
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-JsonString

提供给“创建”操作的 Json 字符串

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

CreateViaJsonString
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-LinkToDefaultDomain

此路由是否将链接到默认终结点域。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

CreateExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityProfileExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityAfdEndpointExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Name

路由规则的名称。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False
别名:RouteName

参数集

(All)
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-NoWait

异步运行命令

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-OriginGroupId

资源 ID。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

CreateExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityProfileExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityAfdEndpointExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-OriginPath

AzureFrontDoor 可用于从源检索内容的目录路径,例如 contoso.cloudapp.net/originpath。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

CreateExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityProfileExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityAfdEndpointExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-PatternsToMatch

规则的路由模式。

参数属性

类型:

String[]

默认值:None
支持通配符:False
不显示:False

参数集

CreateExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityProfileExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityAfdEndpointExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ProfileInputObject

标识参数

参数属性

类型:ICdnIdentity
默认值:None
支持通配符:False
不显示:False

参数集

CreateViaIdentityProfile
Position:Named
必需:True
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityProfileExpanded
Position:Named
必需:True
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ProfileName

在资源组中唯一的 Azure Front Door 标准版或 Azure Front Door Premium 的名称。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

CreateExpanded
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaJsonFilePath
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaJsonString
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ResourceGroupName

Azure 订阅中的资源组的名称。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

CreateExpanded
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaJsonFilePath
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaJsonString
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Route

友好路由名称映射到任何路由或机密相关信息。

参数属性

类型:IRoute
默认值:None
支持通配符:False
不显示:False

参数集

CreateViaIdentityProfile
Position:Named
必需:True
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityAfdEndpoint
Position:Named
必需:True
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-RuleSet

此终结点引用的规则集。

参数属性

类型:

IResourceReference[]

默认值:None
支持通配符:False
不显示:False

参数集

CreateExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityProfileExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityAfdEndpointExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-SubscriptionId

Azure 订阅 ID。

参数属性

类型:String
默认值:(Get-AzContext).Subscription.Id
支持通配符:False
不显示:False

参数集

CreateExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaJsonFilePath
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaJsonString
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-SupportedProtocol

此路由支持的协议列表。

参数属性

类型:

String[]

默认值:None
支持通配符:False
不显示:False

参数集

CreateExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityProfileExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
CreateViaIdentityAfdEndpointExpanded
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-WhatIf

显示 cmdlet 运行时会发生什么情况。 命令脚本未运行。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:无线

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters

输入

ICdnIdentity

IRoute

输出

IRoute