Bearbeiten

Freigeben über


New-AzCdnEndpoint

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

Syntax

New-AzCdnEndpoint
   -Name <String>
   -ProfileName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   -Location <String>
   [-ContentTypesToCompress <String[]>]
   [-DefaultOriginGroupId <String>]
   [-DeliveryPolicyDescription <String>]
   [-DeliveryPolicyRule <IDeliveryRule[]>]
   [-GeoFilter <IGeoFilter[]>]
   [-IsCompressionEnabled]
   [-IsHttpAllowed]
   [-IsHttpsAllowed]
   [-OptimizationType <OptimizationType>]
   [-Origin <IDeepCreatedOrigin[]>]
   [-OriginGroup <IDeepCreatedOriginGroup[]>]
   [-OriginHostHeader <String>]
   [-OriginPath <String>]
   [-ProbePath <String>]
   [-QueryStringCachingBehavior <QueryStringCachingBehavior>]
   [-Tag <Hashtable>]
   [-UrlSigningKey <IUrlSigningKey[]>]
   [-WebApplicationFirewallPolicyLinkId <String>]
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

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

Examples

Example 1: Create an AzureCDN Endpoint under the AzureCDN profile

$origin = @{
    Name = "origin1"
    HostName = "host1.hello.com"
};
New-AzCdnEndpoint -ResourceGroupName testps-rg-da16jm -ProfileName cdn001 -Name endptest001 -Location westus -Origin $origin

Location Name        ResourceGroupName
-------- ----        -----------------
WestUs   endptest001 testps-rg-da16jm

Create an AzureCDN Endpoint under the AzureCDN 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

-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

-ContentTypesToCompress

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

-DefaultOriginGroupId

Resource ID.

Type:String
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

-DeliveryPolicyDescription

User-friendly description of the policy.

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

-DeliveryPolicyRule

A list of the delivery rules. To construct, see NOTES section for DELIVERYPOLICYRULE properties and create a hash table.

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

-GeoFilter

List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/ To construct, see NOTES section for GEOFILTER properties and create a hash table.

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

-IsCompressionEnabled

Indicates whether content compression is enabled on CDN. 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 CDN 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

-IsHttpAllowed

Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.

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

-IsHttpsAllowed

Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.

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

-Location

Resource location.

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

-Name

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

Type:String
Aliases:EndpointName
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

-OptimizationType

Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization.

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

-Origin

The source of the content being delivered via CDN. To construct, see NOTES section for ORIGIN properties and create a hash table.

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

-OriginGroup

The origin groups comprising of origins that are used for load balancing the traffic based on availability. To construct, see NOTES section for ORIGINGROUP properties and create a hash table.

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

-OriginHostHeader

The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default.

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 CDN 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

-ProbePath

Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin.

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

-ProfileName

Name of the CDN 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

-QueryStringCachingBehavior

Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL.

Type:QueryStringCachingBehavior
Position:Named
Default value:None
Required:False
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

-SubscriptionId

Azure Subscription ID.

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

-Tag

Resource tags.

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

-UrlSigningKey

List of keys used to validate the signed URL hashes. To construct, see NOTES section for URLSIGNINGKEY properties and create a hash table.

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

-WebApplicationFirewallPolicyLinkId

Resource ID.

Type:String
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

IEndpoint