/// <summary>
        /// List Operations for given blueprint assignment within a subscription.
        /// </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 IPage <AssignmentOperation> ListInSubscription(this IAssignmentOperations operations, string subscriptionId, string assignmentName)
        {
            var scope = string.Format(Constants.ResourceScopes.SubscriptionScope, subscriptionId);

            return(operations.ListAsync(scope, assignmentName).GetAwaiter().GetResult());
        }
Esempio n. 2
0
 /// <summary>
 /// List operations for given blueprint assignment within a subscription or a
 /// management group.
 /// </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>
 public static IPage <AssignmentOperation> List(this IAssignmentOperations operations, string resourceScope, string assignmentName)
 {
     return(operations.ListAsync(resourceScope, assignmentName).GetAwaiter().GetResult());
 }
Esempio n. 3
0
        /// <summary>
        /// Lists Operations for given blueprint assignment within 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 IPage <AssignmentOperation> ListInManagementGroup(this IAssignmentOperations operations, string managementGroupName, string assignmentName)
        {
            var resourceScope = string.Format(Constants.ResourceScopes.ManagementGroupScope, managementGroupName);

            return(operations.ListAsync(resourceScope, assignmentName).GetAwaiter().GetResult());
        }