/// <summary>
 /// List the custom domains of one lifecycle application.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <CustomDomainResource> > ListNextAsync(this ICustomDomainsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Get the custom domain of one lifecycle application.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='appName'>
 /// The name of the App resource.
 /// </param>
 /// <param name='domainName'>
 /// The name of the custom domain resource.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CustomDomainResource> GetAsync(this ICustomDomainsOperations operations, string resourceGroupName, string serviceName, string appName, string domainName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, appName, domainName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <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);
     }
 }
 /// <summary>
 /// Updates an existing CDN custom domain within an endpoint.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='customDomainName'>
 /// Name of the custom domain within an endpoint.
 /// </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='hostName'>
 /// The host name of the custom domain. Must be a domain name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ErrorResponse> UpdateAsync(this ICustomDomainsOperations operations, string customDomainName, string endpointName, string profileName, string resourceGroupName, string hostName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(customDomainName, endpointName, profileName, resourceGroupName, hostName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Deletes an existing CDN custom domain within an endpoint.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='customDomainName'>
 /// Name of the custom domain within an endpoint.
 /// </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 <CustomDomain> BeginDeleteIfExistsAsync(this ICustomDomainsOperations operations, string customDomainName, string endpointName, string profileName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginDeleteIfExistsWithHttpMessagesAsync(customDomainName, endpointName, profileName, resourceGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 6
0
 /// <summary>
 /// Enable https delivery of the custom domain.
 /// </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='customDomainName'>
 /// Name of the custom domain within an endpoint.
 /// </param>
 /// <param name='customDomainHttpsParameters'>
 /// The configuration specifying how to enable HTTPS for the custom domain -
 /// using CDN managed certificate or user's own certificate. If not specified,
 /// enabling ssl uses CDN managed certificate by default.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CustomDomainInner> EnableCustomHttpsAsync(this ICustomDomainsOperations operations, string resourceGroupName, string profileName, string endpointName, string customDomainName, CustomDomainHttpsParameters customDomainHttpsParameters = default(CustomDomainHttpsParameters), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.EnableCustomHttpsWithHttpMessagesAsync(resourceGroupName, profileName, endpointName, customDomainName, customDomainHttpsParameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
        public static async Task <IList <CustomDomain> > ListAllByEndpointAsync(this ICustomDomainsOperations operations, string resourceGroupName, string profileName, string endpointName)
        {
            var endpoints = new List <CustomDomain>();

            var list = await operations.ListByEndpointAsync(resourceGroupName, profileName, endpointName);

            endpoints.AddRange(list);

            while (list.NextPageLink != null)
            {
                list = await operations.ListByEndpointNextAsync(list.NextPageLink);

                endpoints.AddRange(list);
            }

            return(endpoints);
        }
 /// <summary>
 /// Create or update custom domain of one lifecycle application.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='appName'>
 /// The name of the App resource.
 /// </param>
 /// <param name='domainName'>
 /// The name of the custom domain resource.
 /// </param>
 /// <param name='domainResource'>
 /// Parameters for the create or update operation
 /// </param>
 public static CustomDomainResource CreateOrUpdate(this ICustomDomainsOperations operations, string resourceGroupName, string serviceName, string appName, string domainName, CustomDomainResource domainResource)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, serviceName, appName, domainName, domainResource).GetAwaiter().GetResult());
 }
 /// <summary>
 /// List the custom domains of one lifecycle application.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <CustomDomainResource> ListNext(this ICustomDomainsOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete the custom domain of one lifecycle application.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='appName'>
 /// The name of the App resource.
 /// </param>
 /// <param name='domainName'>
 /// The name of the custom domain resource.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this ICustomDomainsOperations operations, string resourceGroupName, string serviceName, string appName, string domainName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, serviceName, appName, domainName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Delete the custom domain of one lifecycle application.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='appName'>
 /// The name of the App resource.
 /// </param>
 /// <param name='domainName'>
 /// The name of the custom domain resource.
 /// </param>
 public static void BeginDelete(this ICustomDomainsOperations operations, string resourceGroupName, string serviceName, string appName, string domainName)
 {
     operations.BeginDeleteAsync(resourceGroupName, serviceName, appName, domainName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// List the custom domains of one lifecycle application.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='appName'>
 /// The name of the App resource.
 /// </param>
 public static IPage <CustomDomainResource> List(this ICustomDomainsOperations operations, string resourceGroupName, string serviceName, string appName)
 {
     return(operations.ListAsync(resourceGroupName, serviceName, appName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets an existing CDN custom domain within an endpoint.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='customDomainName'>
 /// Name of the custom domain within an endpoint.
 /// </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>
 public static CustomDomain Get(this ICustomDomainsOperations operations, string customDomainName, string endpointName, string profileName, string resourceGroupName)
 {
     return(Task.Factory.StartNew(s => ((ICustomDomainsOperations)s).GetAsync(customDomainName, endpointName, profileName, resourceGroupName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets an exisitng custom domain within an endpoint.
 /// </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='customDomainName'>
 /// Name of the custom domain within an endpoint.
 /// </param>
 public static CustomDomain Get(this ICustomDomainsOperations operations, string resourceGroupName, string profileName, string endpointName, string customDomainName)
 {
     return(operations.GetAsync(resourceGroupName, profileName, endpointName, customDomainName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists all of the existing custom domains within an endpoint.
 /// </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>
 public static IPage <CustomDomain> ListByEndpoint(this ICustomDomainsOperations operations, string resourceGroupName, string profileName, string endpointName)
 {
     return(operations.ListByEndpointAsync(resourceGroupName, profileName, endpointName).GetAwaiter().GetResult());
 }
Esempio n. 16
0
 /// <summary>
 /// Enable https delivery of the custom domain.
 /// </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='customDomainName'>
 /// Name of the custom domain within an endpoint.
 /// </param>
 /// <param name='customDomainHttpsParameters'>
 /// The configuration specifying how to enable HTTPS for the custom domain -
 /// using CDN managed certificate or user's own certificate. If not specified,
 /// enabling ssl uses CDN managed certificate by default.
 /// </param>
 public static CustomDomain EnableCustomHttps(this ICustomDomainsOperations operations, string resourceGroupName, string profileName, string endpointName, string customDomainName, CustomDomainHttpsParameters customDomainHttpsParameters = default(CustomDomainHttpsParameters))
 {
     return(operations.EnableCustomHttpsAsync(resourceGroupName, profileName, endpointName, customDomainName, customDomainHttpsParameters).GetAwaiter().GetResult());
 }