/// <summary>
 /// Lists the existing CDN custom domains within an endpoint.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='endpointName'>
 /// Name of the endpoint within the CDN profile.
 /// </param>
 /// <param name='profileName'>
 /// Name of the CDN profile within the resource group.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group within the Azure subscription.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IEnumerable <CustomDomain> > ListByEndpointAsync(this ICustomDomainsOperations operations, string endpointName, string profileName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByEndpointWithHttpMessagesAsync(endpointName, profileName, resourceGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }