/// <summary>
        /// Get a Blueprint assignment operation.
        /// </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='assignmentOperationName'>
        /// name of the assignment operation.
        /// </param>
        public static AssignmentOperation GetInSubscription(this IAssignmentOperations operations, string subscriptionId, string assignmentName, string assignmentOperationName)
        {
            var scope = string.Format(Constants.ResourceScopes.SubscriptionScope, subscriptionId);

            return(operations.GetAsync(scope, assignmentName, assignmentOperationName).GetAwaiter().GetResult());
        }
Example #2
0
 /// <summary>
 /// Get a blueprint assignment operation.
 /// </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='assignmentOperationName'>
 /// Name of the blueprint assignment operation.
 /// </param>
 public static AssignmentOperation Get(this IAssignmentOperations operations, string resourceScope, string assignmentName, string assignmentOperationName)
 {
     return(operations.GetAsync(resourceScope, assignmentName, assignmentOperationName).GetAwaiter().GetResult());
 }
Example #3
0
        /// <summary>
        /// Gets a Blueprint assignment operation.
        /// </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='assignmentOperationName'>
        /// The name of the assignment operation.
        /// </param>
        public static AssignmentOperation GetInManagementGroup(this IAssignmentOperations operations, string managementGroupName, string assignmentName, string assignmentOperationName)
        {
            var resourceScope = string.Format(Constants.ResourceScopes.ManagementGroupScope, managementGroupName);

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