public async Task TestDeleteNotebook() { PipelineClient client = CreateClient(); PipelineResource resource = await DisposablePipeline.CreateResource(client, this.Recording); PipelineDeletePipelineOperation operation = await client.StartDeletePipelineAsync(resource.Name); await operation.WaitAndAssertSuccessfulCompletion(); }
public async Task TestDeletePipeline() { string pipelineName = Recording.GenerateName("Pipeline"); PipelineCreateOrUpdatePipelineOperation createOperation = await PipelineClient.StartCreateOrUpdatePipelineAsync(pipelineName, new PipelineResource()); await createOperation.WaitForCompletionAsync(); PipelineDeletePipelineOperation deleteOperation = await PipelineClient.StartDeletePipelineAsync(pipelineName); Response response = await deleteOperation.WaitForCompletionAsync(); Assert.AreEqual(200, response.Status); }
public async Task RunPipeline() { #region Snippet:CreatePipelineClientPrep #if SNIPPET // Replace the string below with your actual endpoint url. string endpoint = "<my-endpoint-url>"; #else string endpoint = TestEnvironment.EndpointUrl; #endif string pipelineName = "Test-Pipeline"; #endregion #region Snippet:CreatePipelineClient var client = new PipelineClient(endpoint: new Uri(endpoint), credential: new DefaultAzureCredential()); #endregion #region Snippet:CreatePipeline PipelineCreateOrUpdatePipelineOperation operation = client.StartCreateOrUpdatePipeline(pipelineName, new PipelineResource()); Response <PipelineResource> createdPipeline = await operation.WaitForCompletionAsync(); #endregion #region Snippet:RetrievePipeline PipelineResource retrievedPipeline = client.GetPipeline(pipelineName); Console.WriteLine("Pipeline ID: {0}", retrievedPipeline.Id); #endregion #region Snippet:RunPipeline Console.WriteLine("Running pipeline."); CreateRunResponse runOperation = await client.CreatePipelineRunAsync(pipelineName); Console.WriteLine("Run started. ID: {0}", runOperation.RunId); #endregion #region Snippet:ListPipelines Pageable <PipelineResource> pipelines = client.GetPipelinesByWorkspace(); foreach (PipelineResource pipeline in pipelines) { Console.WriteLine(pipeline.Name); } #endregion #region Snippet:DeletePipeline PipelineDeletePipelineOperation deleteOperation = client.StartDeletePipeline(pipelineName); await deleteOperation.WaitForCompletionResponseAsync(); #endregion }
public async Task TestRenameLinkedService() { PipelineClient client = CreateClient(); PipelineResource resource = await DisposablePipeline.CreateResource(client, Recording); string newPipelineName = Recording.GenerateId("Pipeline2", 16); PipelineRenamePipelineOperation renameOperation = await client.StartRenamePipelineAsync(resource.Name, new ArtifactRenameRequest() { NewName = newPipelineName }); await renameOperation.WaitForCompletionResponseAsync(); PipelineResource pipeline = await client.GetPipelineAsync(newPipelineName); Assert.AreEqual(newPipelineName, pipeline.Name); PipelineDeletePipelineOperation operation = await client.StartDeletePipelineAsync(newPipelineName); await operation.WaitForCompletionResponseAsync(); }
public async ValueTask DisposeAsync() { PipelineDeletePipelineOperation operation = await _client.StartDeletePipelineAsync(Name); await operation.WaitForCompletionResponseAsync(); }