/// <summary> /// Publish a new version of the blueprint definition with the latest /// artifacts. Published blueprint definitions are immutable. /// </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> /// <param name='publishedBlueprint'> /// Published Blueprint to create or update. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <PublishedBlueprint> CreateAsync(this IPublishedBlueprintsOperations operations, string scope, string blueprintName, string versionId, PublishedBlueprint publishedBlueprint = default(PublishedBlueprint), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateWithHttpMessagesAsync(scope, blueprintName, versionId, publishedBlueprint, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Publish a new version of the Blueprint with the latest artifacts. Published /// Blueprints are immutable. /// </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> /// <param name='publishedBlueprint'> /// published blueprint object /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <PublishedBlueprint> CreateInSubscriptionAsync(this IPublishedBlueprintsOperations operations, string subscriptionId, string blueprintName, string versionId, PublishedBlueprint publishedBlueprint = default(PublishedBlueprint), CancellationToken cancellationToken = default(CancellationToken)) { var scope = string.Format(Constants.ResourceScopes.SubscriptionScope, subscriptionId); using (var _result = await operations.CreateWithHttpMessagesAsync(scope, blueprintName, versionId, publishedBlueprint, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Publish a new version of the Blueprint with the latest artifacts. Published /// Blueprints are immutable. /// </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> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <PublishedBlueprint> CreateInManagementGroupAsync(this IPublishedBlueprintsOperations operations, string managementGroupName, string blueprintName, string versionId, CancellationToken cancellationToken = default(CancellationToken)) { var scope = string.Format(Constants.ResourceScopes.ManagementGroupScope, managementGroupName); using (var _result = await operations.CreateWithHttpMessagesAsync(scope, blueprintName, versionId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }