public async Task Update() { SubscriptionResource subscription = await Client.GetDefaultSubscriptionAsync(); ResourceGroupResource rg = await CreateResourceGroup(subscription, "testRg-"); string cdnProfileName = Recording.GenerateAssetName("profile-"); ProfileResource cdnProfile = await CreateCdnProfile(rg, cdnProfileName, CdnSkuName.StandardMicrosoft); string cdnEndpointName = Recording.GenerateAssetName("endpoint-"); CdnEndpointResource cdnEndpoint = await CreateCdnEndpoint(cdnProfile, cdnEndpointName); PatchableCdnEndpointData updateOptions = new PatchableCdnEndpointData { IsHttpAllowed = false, OriginPath = "/path/valid", OriginHostHeader = "www.bing.com" }; var lro = await cdnEndpoint.UpdateAsync(WaitUntil.Completed, updateOptions); CdnEndpointResource updatedCdnEndpoint = lro.Value; ResourceDataHelper.AssertEndpointUpdate(updatedCdnEndpoint, updateOptions); }