編集

次の方法で共有


New-AzFrontDoorCdnRoute

Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint.

Syntax

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

Description

Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint.

Examples

Example 1: Create an AzureFrontDoor route under the AzureFrontDoor profile

$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

Create an AzureFrontDoor route under the AzureFrontDoor profile

Parameters

-AsJob

Run the command as a job

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CacheConfigurationQueryParameter

query parameters to include or exclude (comma separated).

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CacheConfigurationQueryStringCachingBehavior

Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.

Type:AfdQueryStringCachingBehavior
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CompressionSettingContentTypesToCompress

List of content types on which compression applies. The value should be a valid MIME type.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CompressionSettingIsCompressionEnabled

Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CustomDomain

Domains referenced by this endpoint. To construct, see NOTES section for CUSTOMDOMAIN properties and create a hash table.

Type:IActivatedResourceReference[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EnabledState

Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'

Type:EnabledState
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EndpointName

Name of the endpoint under the profile which is unique globally.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ForwardingProtocol

Protocol this rule will use when forwarding traffic to backends.

Type:ForwardingProtocol
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HttpsRedirect

Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed.

Type:HttpsRedirect
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-LinkToDefaultDomain

whether this route will be linked to the default endpoint domain.

Type:LinkToDefaultDomain
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Name of the routing rule.

Type:String
Aliases:RouteName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-NoWait

Run the command asynchronously

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-OriginGroupId

Resource ID.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-OriginPath

A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PatternsToMatch

The route patterns of the rule.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ProfileName

Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Name of the Resource group within the Azure subscription.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-RuleSet

rule sets referenced by this endpoint. To construct, see NOTES section for RULESET properties and create a hash table.

Type:IResourceReference[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

Azure Subscription ID.

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SupportedProtocol

List of supported protocols for this route.

Type:AfdEndpointProtocols[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

IRoute