///GENMHASH:F08598A17ADD014E223DFD77272641FF:F733ABC4C4375BDE663CF05B96352BF2 public async override Task <Microsoft.Azure.Management.Cdn.Fluent.ICdnEndpoint> UpdateAsync(CancellationToken cancellationToken = default(CancellationToken)) { EndpointUpdateParametersInner updateInner = new EndpointUpdateParametersInner { IsHttpAllowed = Inner.IsHttpAllowed, IsHttpsAllowed = Inner.IsHttpsAllowed, OriginPath = Inner.OriginPath, OriginHostHeader = Inner.OriginHostHeader, IsCompressionEnabled = Inner.IsCompressionEnabled, ContentTypesToCompress = Inner.ContentTypesToCompress, GeoFilters = Inner.GeoFilters, OptimizationType = Inner.OptimizationType, QueryStringCachingBehavior = Inner.QueryStringCachingBehavior, Tags = Inner.Tags }; DeepCreatedOrigin originInner = Inner.Origins.ElementAt(0); OriginUpdateParametersInner originParameters = new OriginUpdateParametersInner { HostName = originInner.HostName, HttpPort = originInner.HttpPort, HttpsPort = originInner.HttpsPort }; await Task.WhenAll(deletedCustomDomainList .Select(itemToDelete => Parent.Manager.Inner.CustomDomains.DeleteAsync( Parent.ResourceGroupName, Parent.Name, Name(), itemToDelete.Name, cancellationToken))); deletedCustomDomainList.Clear(); await Parent.Manager.Inner.Origins.UpdateAsync( Parent.ResourceGroupName, Parent.Name, Name(), originInner.Name, originParameters, cancellationToken); var endpointInner = await Parent.Manager.Inner.Endpoints.UpdateAsync( Parent.ResourceGroupName, Parent.Name, Name(), updateInner, cancellationToken); SetInner(endpointInner); return(this); }
/// <summary> /// Updates an existing CDN endpoint with the specified endpoint name under the /// specified subscription, resource group and profile. Only tags and Origin /// HostHeader can be updated after creating an endpoint. To update origins, /// use the Update Origin operation. To update custom domains, use the Update /// Custom Domain operation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the Resource group within the Azure subscription. /// </param> /// <param name='profileName'> /// Name of the CDN profile which is unique within the resource group. /// </param> /// <param name='endpointName'> /// Name of the endpoint under the profile which is unique globally. /// </param> /// <param name='endpointUpdateProperties'> /// Endpoint update properties /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <EndpointInner> BeginUpdateAsync(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointName, EndpointUpdateParametersInner endpointUpdateProperties, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, profileName, endpointName, endpointUpdateProperties, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }