/// <summary> /// Delete a blueprint artifact. /// </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> /// <param name='blueprintName'> /// Name of the blueprint definition. /// </param> /// <param name='artifactName'> /// Name of the blueprint artifact. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Artifact> DeleteAsync(this IArtifactsOperations operations, string scope, string blueprintName, string artifactName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DeleteWithHttpMessagesAsync(scope, blueprintName, artifactName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Delete a Blueprint artifact. /// </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='artifactName'> /// name of the artifact. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Artifact> DeleteInManagementGroupAsync(this IArtifactsOperations operations, string managementGroupName, string blueprintName, string artifactName, CancellationToken cancellationToken = default(CancellationToken)) { var scope = string.Format(Constants.ResourceScopes.ManagementGroupScope, managementGroupName); using (var _result = await operations.DeleteWithHttpMessagesAsync(scope, blueprintName, artifactName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }