/// <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 <Endpoint> BeginUpdateAsync(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointName, EndpointUpdateParameters endpointUpdateProperties, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, profileName, endpointName, endpointUpdateProperties, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a Traffic Manager endpoint. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing the Traffic Manager endpoint. /// </param> /// <param name='profileName'> /// The name of the Traffic Manager profile. /// </param> /// <param name='endpointType'> /// The type of the Traffic Manager endpoint. /// </param> /// <param name='endpointName'> /// The name of the Traffic Manager endpoint. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <EndpointInner> GetAsync(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, profileName, endpointType, endpointName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists existing CDN endpoints. /// </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='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <Endpoint> > ListByProfileAsync(this IEndpointsOperations operations, string resourceGroupName, string profileName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByProfileWithHttpMessagesAsync(resourceGroupName, profileName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Checks the quota and usage of geo filters and custom domains under the /// given endpoint. /// </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 <ResourceUsage> > ListResourceUsageNextAsync(this IEndpointsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListResourceUsageNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
public static async Task <IList <Endpoint> > ListAllByProfileAsync(this IEndpointsOperations operations, string resourceGroupName, string profileName) { var endpoints = new List <Endpoint>(); var list = await operations.ListByProfileAsync(resourceGroupName, profileName); endpoints.AddRange(list); while (list.NextPageLink != null) { list = await operations.ListByProfileNextAsync(list.NextPageLink); endpoints.AddRange(list); } return(endpoints); }
/// <summary> /// Lists existing CDN endpoints. /// </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 <Endpoint> ListByProfileNext(this IEndpointsOperations operations, string nextPageLink) { return(operations.ListByProfileNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Pre-loads a content to CDN. Available for Verizon Profiles. /// </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='contentPaths'> /// The path to the content to be loaded. Path should be a relative file URL of /// the origin. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginLoadContentAsync(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointName, IList <string> contentPaths, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginLoadContentWithHttpMessagesAsync(resourceGroupName, profileName, endpointName, contentPaths, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Pre-loads a content to CDN. Available for Verizon Profiles. /// </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='contentPaths'> /// The path to the content to be loaded. Path should be a relative file URL of /// the origin. /// </param> public static void BeginLoadContent(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointName, IList <string> contentPaths) { operations.BeginLoadContentAsync(resourceGroupName, profileName, endpointName, contentPaths).GetAwaiter().GetResult(); }
/// <summary> /// Gets an existing CDN endpoint with the specified endpoint name under the /// specified subscription, resource group and profile. /// </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 Endpoint Get(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointName) { return(operations.GetAsync(resourceGroupName, profileName, endpointName).GetAwaiter().GetResult()); }
/// <summary> /// Forcibly pre-loads CDN endpoint content. /// </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='contentPaths'> /// The path to the content to be loaded. Should describe a file path. /// </param> public static void BeginLoadContent(this IEndpointsOperations operations, string endpointName, string profileName, string resourceGroupName, IList <string> contentPaths) { Task.Factory.StartNew(s => ((IEndpointsOperations)s).BeginLoadContentAsync(endpointName, profileName, resourceGroupName, contentPaths), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Gets a Traffic Manager endpoint. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing the Traffic Manager endpoint. /// </param> /// <param name='profileName'> /// The name of the Traffic Manager profile. /// </param> /// <param name='endpointType'> /// The type of the Traffic Manager endpoint. /// </param> /// <param name='endpointName'> /// The name of the Traffic Manager endpoint. /// </param> public static Endpoint Get(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName) { return(Task.Factory.StartNew(s => ((IEndpointsOperations)s).GetAsync(resourceGroupName, profileName, endpointType, endpointName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Removes a content from Front Door. /// </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='frontDoorName'> /// Name of the Front Door which is globally unique. /// </param> /// <param name='contentFilePaths'> /// The path to the content to be purged. Path can be a full URL, e.g. /// '/pictures/city.png' which removes a single file, or a directory with a /// wildcard, e.g. '/pictures/*' which removes all folders and files in the /// directory. /// </param> public static void BeginPurgeContent(this IEndpointsOperations operations, string resourceGroupName, string frontDoorName, PurgeParameters contentFilePaths) { operations.BeginPurgeContentAsync(resourceGroupName, frontDoorName, contentFilePaths).GetAwaiter().GetResult(); }
/// <summary> /// Checks the quota and usage of geo filters and custom domains under the /// given 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 <ResourceUsage> ListResourceUsage(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointName) { return(operations.ListResourceUsageAsync(resourceGroupName, profileName, endpointName).GetAwaiter().GetResult()); }
/// <summary> /// Checks the quota and usage of geo filters and custom domains under the /// given endpoint. /// </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 <ResourceUsage> ListResourceUsageNext(this IEndpointsOperations operations, string nextPageLink) { return(operations.ListResourceUsageNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Validates the custom domain mapping to ensure it maps to the correct CDN /// endpoint in DNS. /// </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='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 <ValidateCustomDomainOutput> ValidateCustomDomainAsync(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointName, string hostName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ValidateCustomDomainWithHttpMessagesAsync(resourceGroupName, profileName, endpointName, hostName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Validates the custom domain mapping to ensure it maps to the correct CDN /// endpoint in DNS. /// </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='hostName'> /// The host name of the custom domain. Must be a domain name. /// </param> public static ValidateCustomDomainOutput ValidateCustomDomain(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointName, string hostName) { return(operations.ValidateCustomDomainAsync(resourceGroupName, profileName, endpointName, hostName).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a Traffic Manager endpoint. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing the Traffic Manager endpoint to /// be deleted. /// </param> /// <param name='profileName'> /// The name of the Traffic Manager profile. /// </param> /// <param name='endpointType'> /// The type of the Traffic Manager endpoint to be deleted. /// </param> /// <param name='endpointName'> /// The name of the Traffic Manager endpoint to be deleted. /// </param> public static DeleteOperationResult Delete(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName) { return(operations.DeleteAsync(resourceGroupName, profileName, endpointType, endpointName).GetAwaiter().GetResult()); }
/// <summary> /// Create or update a Traffic Manager endpoint. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing the Traffic Manager endpoint to /// be created or updated. /// </param> /// <param name='profileName'> /// The name of the Traffic Manager profile. /// </param> /// <param name='endpointType'> /// The type of the Traffic Manager endpoint to be created or updated. /// </param> /// <param name='endpointName'> /// The name of the Traffic Manager endpoint to be created or updated. /// </param> /// <param name='parameters'> /// The Traffic Manager endpoint parameters supplied to the CreateOrUpdate /// operation. /// </param> public static Endpoint CreateOrUpdate(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName, Endpoint parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, profileName, endpointType, endpointName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Validates a custom domain mapping to ensure it maps to the correct CNAME /// in DNS. /// </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='hostName'> /// The host name of the custom domain. Must be a domain name. /// </param> public static ValidateCustomDomainOutput ValidateCustomDomain(this IEndpointsOperations operations, string endpointName, string profileName, string resourceGroupName, string hostName) { return(Task.Factory.StartNew(s => ((IEndpointsOperations)s).ValidateCustomDomainAsync(endpointName, profileName, resourceGroupName, hostName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Creates a new CDN endpoint with the specified endpoint name under the /// specified subscription, resource group and profile. /// </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='endpoint'> /// Endpoint properties /// </param> public static Endpoint BeginCreate(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointName, Endpoint endpoint) { return(operations.BeginCreateAsync(resourceGroupName, profileName, endpointName, endpoint).GetAwaiter().GetResult()); }
/// <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> public static Endpoint BeginUpdate(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointName, EndpointUpdateParameters endpointUpdateProperties) { return(operations.BeginUpdateAsync(resourceGroupName, profileName, endpointName, endpointUpdateProperties).GetAwaiter().GetResult()); }
/// <summary> /// Removes a content from Front Door. /// </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='frontDoorName'> /// Name of the Front Door which is globally unique. /// </param> /// <param name='contentFilePaths'> /// The path to the content to be purged. Path can be a full URL, e.g. /// '/pictures/city.png' which removes a single file, or a directory with a /// wildcard, e.g. '/pictures/*' which removes all folders and files in the /// directory. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task PurgeContentAsync(this IEndpointsOperations operations, string resourceGroupName, string frontDoorName, PurgeParameters contentFilePaths, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.PurgeContentWithHttpMessagesAsync(resourceGroupName, frontDoorName, contentFilePaths, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Lists existing CDN endpoints within a profile. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </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 IEnumerable <Endpoint> ListByProfile(this IEndpointsOperations operations, string profileName, string resourceGroupName) { return(Task.Factory.StartNew(s => ((IEndpointsOperations)s).ListByProfileAsync(profileName, resourceGroupName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Deletes a Traffic Manager endpoint. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing the Traffic Manager endpoint to /// be deleted. /// </param> /// <param name='profileName'> /// The name of the Traffic Manager profile. /// </param> /// <param name='endpointType'> /// The type of the Traffic Manager endpoint to be deleted. /// </param> /// <param name='endpointName'> /// The name of the Traffic Manager endpoint to be deleted. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName, CancellationToken cancellationToken = default(CancellationToken)) { await operations.DeleteWithHttpMessagesAsync(resourceGroupName, profileName, endpointType, endpointName, null, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Deletes an existing CDN endpoint with the specified endpoint name under the /// specified subscription, resource group and profile. /// </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 void BeginDelete(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointName) { operations.BeginDeleteAsync(resourceGroupName, profileName, endpointName).GetAwaiter().GetResult(); }
/// <summary> /// Updates an existing CDN endpoint with the specified parameters. Only tags /// and OriginHostHeader 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='endpointName'> /// Name of the endpoint within the CDN profile. /// </param> /// <param name='endpointProperties'> /// Endpoint properties /// </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 Endpoint BeginUpdate(this IEndpointsOperations operations, string endpointName, EndpointUpdateParameters endpointProperties, string profileName, string resourceGroupName) { return(Task.Factory.StartNew(s => ((IEndpointsOperations)s).BeginUpdateAsync(endpointName, endpointProperties, profileName, resourceGroupName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Deletes an existing CDN endpoint with the specified parameters. /// </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> public static void BeginDeleteIfExists(this IEndpointsOperations operations, string endpointName, string profileName, string resourceGroupName) { Task.Factory.StartNew(s => ((IEndpointsOperations)s).BeginDeleteIfExistsAsync(endpointName, profileName, resourceGroupName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }