/// <summary> /// Creates a profile within a Hub, or updates an existing profile. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='hubName'> /// The name of the hub. /// </param> /// <param name='profileName'> /// The name of the profile. /// </param> /// <param name='parameters'> /// Parameters supplied to the create/delete Profile type operation /// </param> public static ProfileResourceFormat CreateOrUpdate(this IProfilesOperations operations, string resourceGroupName, string hubName, string profileName, ProfileResourceFormat parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, hubName, profileName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Checks the quota and actual usage of endpoints under the given CDN profile. /// </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 <ResourceUsageInner> > ListResourceUsageNextAsync(this IProfilesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListResourceUsageNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all profile in the hub. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='hubName'> /// The name of the hub. /// </param> /// <param name='localeCode'> /// Locale of profile to retrieve, default is en-us. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ProfileResourceFormatInner> > ListByHubAsync(this IProfilesOperations operations, string resourceGroupName, string hubName, string localeCode = "en-us", CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByHubWithHttpMessagesAsync(resourceGroupName, hubName, localeCode, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all of the CDN profiles within a resource group. /// </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> public static IPage <Profile> ListByResourceGroup(this IProfilesOperations operations, string resourceGroupName) { return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult()); }
/// <summary> /// Lists all Traffic Manager profiles within a subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IEnumerable <ProfileInner> > ListBySubscriptionAsync(this IProfilesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates a new CDN profile with a profile name under the specified /// subscription and resource group. /// </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='profile'> /// Profile properties needed to create a new profile. /// </param> public static Profile BeginCreate(this IProfilesOperations operations, string resourceGroupName, string profileName, Profile profile) { return(operations.BeginCreateAsync(resourceGroupName, profileName, profile).GetAwaiter().GetResult()); }
/// <summary> /// Deletes an existing CDN profile with the specified parameters. Deleting a /// profile will result in the deletion of all of the sub-resources including /// endpoints, origins and custom domains. /// </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> public static void BeginDelete(this IProfilesOperations operations, string resourceGroupName, string profileName) { operations.BeginDeleteAsync(resourceGroupName, profileName).GetAwaiter().GetResult(); }
/// <summary> /// Gets a CDN profile with the specified parameters. /// </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 Profile Get(this IProfilesOperations operations, string profileName, string resourceGroupName) { return(Task.Factory.StartNew(s => ((IProfilesOperations)s).GetAsync(profileName, resourceGroupName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Get a list of Image Profiles. /// </summary> /// <remarks> /// If no filter is passed, the query lists all Profiles for the Image. The /// returned list is paginated and the count of items in each page is an /// optional parameter. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscriptionId'> /// The Azure Subscription ID. /// </param> /// <param name='resourceGroup'> /// The Name of the resource group in which the workspace is located. /// </param> /// <param name='workspace'> /// The name of the workspace. /// </param> /// <param name='imageId'> /// The Image Id. /// </param> /// <param name='name'> /// The Profile name. /// </param> /// <param name='description'> /// The Profile description. /// </param> /// <param name='tags'> /// A set of tags with which to filter the returned models. /// It is a comma separated string of tags key or tags key=value /// Example: tagKey1,tagKey2,tagKey3=value3 /// </param> /// <param name='properties'> /// A set of properties with which to filter the returned models. /// It is a comma separated string of properties key and/or properties /// key=value /// Example: propKey1,propKey2,propKey3=value3 /// </param> /// <param name='count'> /// The number of items to retrieve in a page. /// </param> /// <param name='skipToken'> /// The continuation token to retrieve the next page. /// </param> /// <param name='orderBy'> /// The option to order the response. Possible values include: 'CreatedAtDesc', /// 'CreatedAtAsc', 'UpdatedAtDesc', 'UpdatedAtAsc' /// </param> public static IPage <ProfileResponse> ListQuery(this IProfilesOperations operations, System.Guid subscriptionId, string resourceGroup, string workspace, string imageId, string name = default(string), string description = default(string), string tags = default(string), string properties = default(string), int?count = default(int?), string skipToken = default(string), string orderBy = default(string)) { return(operations.ListQueryAsync(subscriptionId, resourceGroup, workspace, imageId, name, description, tags, properties, count, skipToken, orderBy).GetAwaiter().GetResult()); }
/// <summary> /// Deletes an existing CDN profile with the specified parameters. Deleting a /// profile will result in the deletion of all subresources including /// endpoints, origins and custom domains. /// </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> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeleteIfExistsAsync(this IProfilesOperations operations, string profileName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { await operations.BeginDeleteIfExistsWithHttpMessagesAsync(profileName, resourceGroupName, null, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Lists the CDN profiles within a resource group. /// </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> public static IEnumerable <Profile> ListByResourceGroup(this IProfilesOperations operations, string resourceGroupName) { return(Task.Factory.StartNew(s => ((IProfilesOperations)s).ListByResourceGroupAsync(resourceGroupName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Deletes an existing CDN profile with the specified parameters. Deleting a /// profile will result in the deletion of all subresources including /// endpoints, origins and custom domains. /// </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 void BeginDeleteIfExists(this IProfilesOperations operations, string profileName, string resourceGroupName) { Task.Factory.StartNew(s => ((IProfilesOperations)s).BeginDeleteIfExistsAsync(profileName, resourceGroupName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Lists the CDN profiles within an Azure subscitption. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IEnumerable <Profile> ListBySubscriptionId(this IProfilesOperations operations) { return(Task.Factory.StartNew(s => ((IProfilesOperations)s).ListBySubscriptionIdAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets information about the specified profile. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='hubName'> /// The name of the hub. /// </param> /// <param name='profileName'> /// The name of the profile. /// </param> /// <param name='localeCode'> /// Locale of profile to retrieve, default is en-us. /// </param> public static ProfileResourceFormat Get(this IProfilesOperations operations, string resourceGroupName, string hubName, string profileName, string localeCode = "en-us") { return(operations.GetAsync(resourceGroupName, hubName, profileName, localeCode).GetAwaiter().GetResult()); }
/// <summary> /// Gets the supported optimization types for the current profile. A user can /// create an endpoint with an optimization type from the listed values. /// </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 <SupportedOptimizationTypesListResult> ListSupportedOptimizationTypesAsync(this IProfilesOperations operations, string resourceGroupName, string profileName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListSupportedOptimizationTypesWithHttpMessagesAsync(resourceGroupName, profileName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Create a Profile. /// </summary> /// <remarks> /// Create a Profile for an Image. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscriptionId'> /// The Azure Subscription ID. /// </param> /// <param name='resourceGroup'> /// The Name of the resource group in which the workspace is located. /// </param> /// <param name='workspace'> /// The name of the workspace. /// </param> /// <param name='imageId'> /// The Image Id. /// </param> /// <param name='inputRequest'> /// The payload that is used to create the Profile. /// </param> public static void Create(this IProfilesOperations operations, System.Guid subscriptionId, string resourceGroup, string workspace, string imageId, ProfileRequestBase inputRequest) { operations.CreateAsync(subscriptionId, resourceGroup, workspace, imageId, inputRequest).GetAwaiter().GetResult(); }
/// <summary> /// Checks the quota and actual usage of endpoints under the given CDN 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> public static IPage <ResourceUsage> ListResourceUsage(this IProfilesOperations operations, string resourceGroupName, string profileName) { return(operations.ListResourceUsageAsync(resourceGroupName, profileName).GetAwaiter().GetResult()); }
/// <summary> /// Create a Profile. /// </summary> /// <remarks> /// Create a Profile for an Image. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscriptionId'> /// The Azure Subscription ID. /// </param> /// <param name='resourceGroup'> /// The Name of the resource group in which the workspace is located. /// </param> /// <param name='workspace'> /// The name of the workspace. /// </param> /// <param name='imageId'> /// The Image Id. /// </param> /// <param name='inputRequest'> /// The payload that is used to create the Profile. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task CreateAsync(this IProfilesOperations operations, System.Guid subscriptionId, string resourceGroup, string workspace, string imageId, ProfileRequestBase inputRequest, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.CreateWithHttpMessagesAsync(subscriptionId, resourceGroup, workspace, imageId, inputRequest, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Updates an existing CDN profile with the specified profile name under the /// specified subscription and resource group. /// </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='tags'> /// Profile tags /// </param> public static Profile BeginUpdate(this IProfilesOperations operations, string resourceGroupName, string profileName, IDictionary <string, string> tags = default(IDictionary <string, string>)) { return(operations.BeginUpdateAsync(resourceGroupName, profileName, tags).GetAwaiter().GetResult()); }
/// <summary> /// Get a list of Image Profiles. /// </summary> /// <remarks> /// If no filter is passed, the query lists all Profiles for the Image. The /// returned list is paginated and the count of items in each page is an /// optional parameter. /// </remarks> /// <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 <ProfileResponse> ListQueryNext(this IProfilesOperations operations, string nextPageLink) { return(operations.ListQueryNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Checks the quota and actual usage of endpoints under the given CDN profile. /// </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 IProfilesOperations operations, string nextPageLink) { return(operations.ListResourceUsageNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Get a Profile. /// </summary> /// <remarks> /// Get the Profile for an Image. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscriptionId'> /// The Azure Subscription ID. /// </param> /// <param name='resourceGroup'> /// The Name of the resource group in which the workspace is located. /// </param> /// <param name='workspace'> /// The name of the workspace. /// </param> /// <param name='imageId'> /// The Image Id. /// </param> /// <param name='id'> /// The Profile Id. /// </param> public static ProfileResponse QueryById(this IProfilesOperations operations, System.Guid subscriptionId, string resourceGroup, string workspace, string imageId, string id) { return(operations.QueryByIdAsync(subscriptionId, resourceGroup, workspace, imageId, id).GetAwaiter().GetResult()); }
/// <summary> /// Checks the availability of a Traffic Manager Relative DNS name. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='name'> /// The name of the resource. /// </param> /// <param name='type'> /// The type of the resource. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <TrafficManagerNameAvailabilityInner> CheckTrafficManagerRelativeDnsNameAvailabilityAsync(this IProfilesOperations operations, string name = default(string), string type = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CheckTrafficManagerRelativeDnsNameAvailabilityWithHttpMessagesAsync(name, type, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. /// Supplemental portal is used to configure advanced feature capabilities that /// are not yet available in the Azure portal, such as core reports in a /// standard profile; rules engine, advanced HTTP reports, and real-time stats /// and alerts in a premium profile. The SSO URI changes approximately every 10 /// minutes. /// </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> public static SsoUri GenerateSsoUri(this IProfilesOperations operations, string resourceGroupName, string profileName) { return(operations.GenerateSsoUriAsync(resourceGroupName, profileName).GetAwaiter().GetResult()); }
/// <summary> /// Checks the quota and actual usage of endpoints under the given CDN 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='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ResourceUsageInner> > ListResourceUsageAsync(this IProfilesOperations operations, string resourceGroupName, string profileName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListResourceUsageWithHttpMessagesAsync(resourceGroupName, profileName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all of the CDN profiles within an Azure subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <Profile> List(this IProfilesOperations operations) { return(operations.ListAsync().GetAwaiter().GetResult()); }
/// <summary> /// Deletes a profile within a hub /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='hubName'> /// The name of the hub. /// </param> /// <param name='profileName'> /// The name of the profile. /// </param> /// <param name='localeCode'> /// Locale of profile to retrieve, default is en-us. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IProfilesOperations operations, string resourceGroupName, string hubName, string profileName, string localeCode = "en-us", CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, hubName, profileName, localeCode, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Gets the supported optimization types for the current profile. A user can /// create an endpoint with an optimization type from the listed values. /// </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> public static SupportedOptimizationTypesListResult ListSupportedOptimizationTypes(this IProfilesOperations operations, string resourceGroupName, string profileName) { return(operations.ListSupportedOptimizationTypesAsync(resourceGroupName, profileName).GetAwaiter().GetResult()); }
/// <summary> /// Creates a profile within a Hub, or updates an existing profile. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='hubName'> /// The name of the hub. /// </param> /// <param name='profileName'> /// The name of the profile. /// </param> /// <param name='parameters'> /// Parameters supplied to the create/delete Profile type operation /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ProfileResourceFormatInner> BeginCreateOrUpdateAsync(this IProfilesOperations operations, string resourceGroupName, string hubName, string profileName, ProfileResourceFormatInner parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, hubName, profileName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all profile in the hub. /// </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 <ProfileResourceFormat> ListByHubNext(this IProfilesOperations operations, string nextPageLink) { return(operations.ListByHubNextAsync(nextPageLink).GetAwaiter().GetResult()); }