POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId}/cancel?api-version=2018-06-01
With optional parameters:
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId}/cancel?isRecursive={isRecursive}&api-version=2018-06-01
URI Parameters
Name
In
Required
Type
Description
factoryName
path
True
string
The factory name.
Regex pattern: ^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$
resourceGroupName
path
True
string
The resource group name.
Regex pattern: ^[-\w\._\(\)]+$
runId
path
True
string
The pipeline run identifier.
subscriptionId
path
True
string
The subscription identifier.
api-version
query
True
string
The API version.
isRecursive
query
boolean
If true, cancel all the Child pipelines that are triggered by the current pipeline.
POST https://management.azure.com/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/pipelineruns/16ac5348-ff82-4f95-a80d-638c1d47b721/cancel?api-version=2018-06-01
import com.azure.core.util.Context;
/** Samples for PipelineRuns Cancel. */
public final class Main {
/*
* x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PipelineRuns_Cancel.json
*/
/**
* Sample code: PipelineRuns_Cancel.
*
* @param manager Entry point to DataFactoryManager.
*/
public static void pipelineRunsCancel(com.azure.resourcemanager.datafactory.DataFactoryManager manager) {
manager
.pipelineRuns()
.cancelWithResponse(
"exampleResourceGroup",
"exampleFactoryName",
"16ac5348-ff82-4f95-a80d-638c1d47b721",
null,
Context.NONE);
}
}
Read this SDK documentation on how to add the SDK to your project and authenticate.
package armdatafactory_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PipelineRuns_Cancel.json
func ExamplePipelineRunsClient_Cancel() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armdatafactory.NewPipelineRunsClient("12345678-1234-1234-1234-12345678abc", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = client.Cancel(ctx,
"exampleResourceGroup",
"exampleFactoryName",
"16ac5348-ff82-4f95-a80d-638c1d47b721",
&armdatafactory.PipelineRunsClientCancelOptions{IsRecursive: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
}
Read this SDK documentation on how to add the SDK to your project and authenticate.
const { DataFactoryManagementClient } = require("@azure/arm-datafactory");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Cancel a pipeline run by its run ID.
*
* @summary Cancel a pipeline run by its run ID.
* x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PipelineRuns_Cancel.json
*/
async function pipelineRunsCancel() {
const subscriptionId = "12345678-1234-1234-1234-12345678abc";
const resourceGroupName = "exampleResourceGroup";
const factoryName = "exampleFactoryName";
const runId = "16ac5348-ff82-4f95-a80d-638c1d47b721";
const credential = new DefaultAzureCredential();
const client = new DataFactoryManagementClient(credential, subscriptionId);
const result = await client.pipelineRuns.cancel(resourceGroupName, factoryName, runId);
console.log(result);
}
pipelineRunsCancel().catch(console.error);
Read this SDK documentation on how to add the SDK to your project and authenticate.
Sample Response
Status code:
200
Definitions
CloudError
The object that defines the structure of an Azure Data Factory error response.