Esempio n. 1
0
        /// <summary>
        /// Gets 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 GetInSubscription(this IAssignmentsOperations operations, string managementGroupName, string assignmentName)
        {
            var resourceScope = string.Format(Constants.ResourceScopes.ManagementGroupScope, managementGroupName);

            return(operations.GetInSubscriptionAsync(resourceScope, assignmentName).GetAwaiter().GetResult());
        }
Esempio n. 2
0
        /// <summary>
        /// Get 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 GetInSubscription(this IAssignmentsOperations operations, string subscriptionId, string assignmentName)
        {
            var scope = string.Format(Constants.ResourceScopes.SubscriptionScope, subscriptionId);

            return(operations.GetInSubscriptionAsync(scope, assignmentName).GetAwaiter().GetResult());
        }