예제 #1
0
        /// <summary>
        /// Get a published Blueprint.
        /// </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='versionId'>
        /// version of the published blueprint.
        /// </param>
        public static PublishedBlueprint GetInSubscription(this IPublishedBlueprintsOperations operations, string subscriptionId, string blueprintName, string versionId)
        {
            var scope = string.Format(Constants.ResourceScopes.SubscriptionScope, subscriptionId);

            return(operations.GetAsync(scope, blueprintName, versionId).GetAwaiter().GetResult());
        }
예제 #2
0
 /// <summary>
 /// Get a published version of 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='versionId'>
 /// Version of the published blueprint definition.
 /// </param>
 public static PublishedBlueprint Get(this IPublishedBlueprintsOperations operations, string scope, string blueprintName, string versionId)
 {
     return(operations.GetAsync(scope, blueprintName, versionId).GetAwaiter().GetResult());
 }
        /// <summary>
        /// Get a published Blueprint.
        /// </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='versionId'>
        /// version of the published blueprint.
        /// </param>
        public static PublishedBlueprint GetInManagementGroup(this IPublishedBlueprintsOperations operations, string managementGroupName, string blueprintName, string versionId)
        {
            var scope = string.Format(Constants.ResourceScopes.ManagementGroupScope, managementGroupName);

            return(operations.GetAsync(scope, blueprintName, versionId).GetAwaiter().GetResult());
        }