/// <summary> /// Lists Blueprint assignments 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 assignments are saved. /// </param> public static IPage <Assignment> ListInManagementGroup(this IAssignmentsOperations operations, string managementGroupName) { var resourceScope = string.Format(Constants.ResourceScopes.ManagementGroupScope, managementGroupName); return(operations.ListAsync(resourceScope).GetAwaiter().GetResult()); }
/// <summary> /// List blueprint assignments within a subscription. /// </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> public static IPage <Assignment> List(this IAssignmentsOperations operations, string scope) { return(operations.ListAsync(scope).GetAwaiter().GetResult()); }
/// <summary> /// List Blueprint assignments 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> public static IPage <Assignment> ListInSubscription(this IAssignmentsOperations operations, string subscriptionId) { var scope = string.Format(Constants.ResourceScopes.SubscriptionScope, subscriptionId); return(operations.ListAsync(scope).GetAwaiter().GetResult()); }