コード例 #1
0
 /// <summary>
 /// List published versions of given 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='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <PublishedBlueprint> > ListAsync(this IPublishedBlueprintsOperations operations, string scope, string blueprintName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(scope, blueprintName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #2
0
        /// <summary>
        /// List published versions of given 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='cancellationToken'>
        /// The cancellation token.
        /// </param>
        public static async Task <IPage <PublishedBlueprint> > ListInSubscriptionAsync(this IPublishedBlueprintsOperations operations, string subscriptionId, string blueprintName, CancellationToken cancellationToken = default(CancellationToken))
        {
            var scope = string.Format(Constants.ResourceScopes.SubscriptionScope, subscriptionId);

            using (var _result = await operations.ListWithHttpMessagesAsync(scope, blueprintName, null, cancellationToken).ConfigureAwait(false))
            {
                return(_result.Body);
            }
        }