예제 #1
0
 /// <summary>
 /// Get information about a configuration profile assignment
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='configurationProfileAssignmentName'>
 /// The configuration profile assignment name.
 /// </param>
 /// <param name='vmName'>
 /// The name of the virtual machine.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ConfigurationProfileAssignment> GetAsync(this IConfigurationProfileAssignmentsOperations operations, string resourceGroupName, string configurationProfileAssignmentName, string vmName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, configurationProfileAssignmentName, vmName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
예제 #2
0
 /// <summary>
 /// Get information about a configuration profile assignment
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='configurationProfileAssignmentName'>
 /// The configuration profile assignment name.
 /// </param>
 /// <param name='vmName'>
 /// The name of the virtual machine.
 /// </param>
 public static ConfigurationProfileAssignment Get(this IConfigurationProfileAssignmentsOperations operations, string resourceGroupName, string configurationProfileAssignmentName, string vmName)
 {
     return(operations.GetAsync(resourceGroupName, configurationProfileAssignmentName, vmName).GetAwaiter().GetResult());
 }
예제 #3
0
 /// <summary>
 /// Creates an association between a VM and Automanage configuration profile
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='configurationProfileAssignmentName'>
 /// Name of the configuration profile assignment. Only default is supported.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the create or update configuration profile
 /// assignment.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='vmName'>
 /// The name of the virtual machine.
 /// </param>
 public static ConfigurationProfileAssignment CreateOrUpdate(this IConfigurationProfileAssignmentsOperations operations, string configurationProfileAssignmentName, ConfigurationProfileAssignment parameters, string resourceGroupName, string vmName)
 {
     return(operations.CreateOrUpdateAsync(configurationProfileAssignmentName, parameters, resourceGroupName, vmName).GetAwaiter().GetResult());
 }
예제 #4
0
 /// <summary>
 /// Get list of configuration profile assignments under a given 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 <ConfigurationProfileAssignment> > ListBySubscriptionAsync(this IConfigurationProfileAssignmentsOperations operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
예제 #5
0
 /// <summary>
 /// Get list of configuration profile assignments under a given subscription
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IEnumerable <ConfigurationProfileAssignment> ListBySubscription(this IConfigurationProfileAssignmentsOperations operations)
 {
     return(operations.ListBySubscriptionAsync().GetAwaiter().GetResult());
 }
예제 #6
0
 /// <summary>
 /// Get list of configuration profile assignments
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 public static IEnumerable <ConfigurationProfileAssignment> List(this IConfigurationProfileAssignmentsOperations operations, string resourceGroupName)
 {
     return(operations.ListAsync(resourceGroupName).GetAwaiter().GetResult());
 }
예제 #7
0
 /// <summary>
 /// Delete a configuration profile assignment
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='configurationProfileAssignmentName'>
 /// Name of the configuration profile assignment
 /// </param>
 /// <param name='vmName'>
 /// The name of the virtual machine.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IConfigurationProfileAssignmentsOperations operations, string resourceGroupName, string configurationProfileAssignmentName, string vmName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, configurationProfileAssignmentName, vmName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
예제 #8
0
 /// <summary>
 /// Delete a configuration profile assignment
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='configurationProfileAssignmentName'>
 /// Name of the configuration profile assignment
 /// </param>
 /// <param name='vmName'>
 /// The name of the virtual machine.
 /// </param>
 public static void Delete(this IConfigurationProfileAssignmentsOperations operations, string resourceGroupName, string configurationProfileAssignmentName, string vmName)
 {
     operations.DeleteAsync(resourceGroupName, configurationProfileAssignmentName, vmName).GetAwaiter().GetResult();
 }