/// <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>
 public static Assignment Delete(this IAssignmentsOperations operations, string scope, string assignmentName)
 {
     return(operations.DeleteAsync(scope, assignmentName).GetAwaiter().GetResult());
 }
예제 #2
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>
        public static Assignment DeleteInSubscription(this IAssignmentsOperations operations, string subscriptionId, string assignmentName)
        {
            var scope = string.Format(Constants.ResourceScopes.SubscriptionScope, subscriptionId);

            return(operations.DeleteAsync(scope, assignmentName).GetAwaiter().GetResult());
        }
예제 #3
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>
        public static Assignment DeleteInManagementGroup(this IAssignmentsOperations operations, string managementGroupName, string assignmentName)
        {
            var resourceScope = string.Format(Constants.ResourceScopes.ManagementGroupScope, managementGroupName);

            return(operations.DeleteAsync(resourceScope, assignmentName).GetAwaiter().GetResult());
        }
 /// <summary>
 /// Delete a blueprint assignment.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceScope'>
 /// 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='deleteBehavior'>
 /// When deleteBehavior=all, the resources that were created by the blueprint
 /// assignment will be deleted. Possible values include: 'none', 'all'
 /// </param>
 public static Assignment Delete(this IAssignmentsOperations operations, string resourceScope, string assignmentName, string deleteBehavior = default(string))
 {
     return(operations.DeleteAsync(resourceScope, assignmentName, deleteBehavior).GetAwaiter().GetResult());
 }