/// <summary>
 /// Delete a blueprint assignment.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// The scope of the resource. Valid scopes are: management group (format:
 /// '/providers/Microsoft.Management/managementGroups/{managementGroup}'),
 /// subscription (format: '/subscriptions/{subscriptionId}').
 /// </param>
 /// <param name='assignmentName'>
 /// Name of the blueprint assignment.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Assignment> DeleteAsync(this IAssignmentsOperations operations, string scope, string assignmentName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.DeleteWithHttpMessagesAsync(scope, assignmentName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #2
0
        /// <summary>
        /// Deletes a Blueprint assignment in a management group.
        /// </summary>
        /// <param name='operations'>
        /// The operations group for this extension method.
        /// </param>
        /// <param name='managementGroupName'>
        /// The name of the management group where the assignment is saved.
        /// </param>
        /// <param name='assignmentName'>
        /// The name of the assignment.
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        public static async Task <Assignment> DeleteInManagementGroupAsync(this IAssignmentsOperations operations, string managementGroupName, string assignmentName, CancellationToken cancellationToken = default(CancellationToken))
        {
            var resourceScope = string.Format(Constants.ResourceScopes.ManagementGroupScope, managementGroupName);

            using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceScope, assignmentName, null, cancellationToken).ConfigureAwait(false))
            {
                return(_result.Body);
            }
        }
Beispiel #3
0
        /// <summary>
        /// Delete a Blueprint assignment.
        /// </summary>
        /// <param name='operations'>
        /// The operations group for this extension method.
        /// </param>
        /// <param name='subscriptionId'>
        /// azure subscriptionId, which we assign the blueprint to.
        /// </param>
        /// <param name='assignmentName'>
        /// name of the assignment.
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        public static async Task <Assignment> DeleteInSubscriptionAsync(this IAssignmentsOperations operations, string subscriptionId, string assignmentName, CancellationToken cancellationToken = default(CancellationToken))
        {
            var scope = string.Format(Constants.ResourceScopes.SubscriptionScope, subscriptionId);

            using (var _result = await operations.DeleteWithHttpMessagesAsync(scope, assignmentName, null, cancellationToken).ConfigureAwait(false))
            {
                return(_result.Body);
            }
        }