Exemple #1
0
 /// <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>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ProfileInner> CreateAsync(this IProfilesOperations operations, string resourceGroupName, string profileName, ProfileInner profile, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, profileName, profile, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #2
0
 /// <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();
 }