【问题标题】:Azure CDN purge command issueAzure CDN 清除命令问题
【发布时间】:2021-02-19 13:28:20
【问题描述】:

我在资源组“rgDev”中创建了一个名为“cdn-profile”的 CDN。在 CDN 中,创建的端点是“webqa.azureedge.net”。在其中,我创建了一个自定义域“qa.example.com”。我想清除 CDN 缓存。下面是我运行的命令。

$ResourceGroupName='rgDev'
$EndpointName='qa.example.com'
$ProfileName='cdn-profile'
$CDNEndPointName='webqa.azureedge.net'

 az cdn endpoint purge -g $ResourceGroupName -n $EndpointName --profile-name $ProfileName --content-paths '/*' --name $CDNEndPointName

这给了我以下错误: 未找到端点。请验证资源、组或其父资源是否存在。

我在这里错过了什么?

【问题讨论】:

    标签: azure cdn azure-cli


    【解决方案1】:

    在 Azure CLI 命令az cdn endpoint purge 中,CDN 端点的名称是 webqa(它是资源组中类型为 Endpoint 的资源的名称。)而不是主机名 webqa.azureedge.net 或 @987654324 @。

    你应该这样使用它:

    $ResourceGroupName='rgDev'
    $ProfileName='cdn-profile'
    $CDNEndPointName='webqa'
    
     az cdn endpoint purge -g $ResourceGroupName  --profile-name $ProfileName --content-paths '/*' --name $CDNEndPointName
    

    【讨论】:

    • 嗨,南希,我更新了同样的内容,但给出了同样的错误。
    • 你用的是同一个命令吗?我发现你定义了两个-n和--name或者重新打开你的shell?
    • 啊,我明白了,是的,我用了两次。运行更新的命令后让我更新你
    • 谢谢@Nancy,我现在可以解决这个问题了。
    猜你喜欢
    • 1970-01-01
    • 2022-11-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-03-16
    • 1970-01-01
    相关资源
    最近更新 更多