編集

次の方法で共有


Update-AzCdnEndpoint

Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the Update Custom Domain operation.

Syntax

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

Description

Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the Update Custom Domain operation.

Examples

Example 1: Update an AzureCDN Endpoint under the AzureCDN profile

$tags = @{
    Tag1 = 11
    Tag2 = 22
}
Update-AzCdnEndpoint -ResourceGroupName testps-rg-da16jm -ProfileName cdn001 -Name endptest001 -Tag $tags -DefaultOriginGroupId $originGroup.Id

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

Update an AzureCDN Endpoint under the AzureCDN profile

Example 2: Update an AzureCDN Endpoint under the AzureCDN profile via identity

$tags = @{
    Tag1 = 11
    Tag2 = 22
}
Get-AzCdnEndpoint -ResourceGroupName testps-rg-da16jm -ProfileName cdn001 -Name endptest001 | Update-AzCdnEndpoint -Tag $tags -DefaultOriginGroupId $originGroup.Id

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

Update an AzureCDN Endpoint under the AzureCDN profile via identity

Example 3: Update an AzureCDN Endpoint under the AzureCDN profile, enabled content compression

Update-AzCdnEndpoint -Name cdntestcert -ProfileName classicCDNtest -ResourceGroupName yaoshitest -IsCompressionEnabled:$true

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

Update an AzureCDN Endpoint under the AzureCDN profile, enabled content compression

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

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Type:ICdnIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
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

-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

-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

Endpoint 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

Inputs

ICdnIdentity

Outputs

IEndpoint