/// <summary>
        /// Create or update Blueprint definition.
        /// </summary>
        /// <param name='operations'>
        /// The operations group for this extension method.
        /// </param>
        /// <param name='subscriptionId'>
        /// azure subscriptionId, which we save the blueprint to.
        /// </param>
        /// <param name='blueprintName'>
        /// name of the blueprint.
        /// </param>
        /// <param name='blueprint'>
        /// Blueprint definition.
        /// </param>
        public static BlueprintModel CreateOrUpdateInSubscription(this IBlueprintsOperations operations, string subscriptionId, string blueprintName, BlueprintModel blueprint)
        {
            var scope = string.Format(Constants.ResourceScopes.SubscriptionScope, subscriptionId);

            return(operations.CreateOrUpdateAsync(scope, blueprintName, blueprint).GetAwaiter().GetResult());
        }
 /// <summary>
 /// Create or update a blueprint definition.
 /// </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}'). For blueprint
 /// assignments management group scope is reserved for future use.
 /// </param>
 /// <param name='blueprintName'>
 /// Name of the blueprint definition.
 /// </param>
 /// <param name='blueprint'>
 /// Blueprint definition.
 /// </param>
 public static BlueprintModel CreateOrUpdate(this IBlueprintsOperations operations, string scope, string blueprintName, BlueprintModel blueprint)
 {
     return(operations.CreateOrUpdateAsync(scope, blueprintName, blueprint).GetAwaiter().GetResult());
 }
        /// <summary>
        /// Create or update Blueprint definition.
        /// </summary>
        /// <param name='operations'>
        /// The operations group for this extension method.
        /// </param>
        /// <param name='managementGroupName'>
        /// azure managementGroup name, which we save the blueprint to.
        /// </param>
        /// <param name='blueprintName'>
        /// name of the blueprint.
        /// </param>
        /// <param name='blueprint'>
        /// Blueprint definition.
        /// </param>
        public static BlueprintModel CreateOrUpdateInManagementGroup(this IBlueprintsOperations operations, string managementGroupName, string blueprintName, BlueprintModel blueprint)
        {
            var scope = string.Format(Constants.ResourceScopes.ManagementGroupScope, managementGroupName);

            return(operations.CreateOrUpdateAsync(scope, blueprintName, blueprint).GetAwaiter().GetResult());
        }