Triggers - Create Or Update

Creates or updates a trigger.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}?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\._\(\)]+$

subscriptionId
path True

string

The subscription identifier.

triggerName
path True

string

The trigger name.

Regex pattern: ^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$

api-version
query True

string

The API version.

Request Header

Name Required Type Description
If-Match

string

ETag of the trigger entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update.

Request Body

Name Required Type Description
properties True Trigger:

MultiplePipelineTrigger

Properties of the trigger.

Responses

Name Type Description
200 OK

TriggerResource

OK.

Other Status Codes

CloudError

An error response received from the Azure Data Factory service.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Triggers_Create
Triggers_Update

Triggers_Create

Sample Request

PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/triggers/exampleTrigger?api-version=2018-06-01

{
  "properties": {
    "type": "ScheduleTrigger",
    "typeProperties": {
      "recurrence": {
        "frequency": "Minute",
        "interval": 4,
        "startTime": "2018-06-16T00:39:13.8441801Z",
        "endTime": "2018-06-16T00:55:13.8441801Z",
        "timeZone": "UTC"
      }
    },
    "pipelines": [
      {
        "pipelineReference": {
          "referenceName": "examplePipeline",
          "type": "PipelineReference"
        },
        "parameters": {
          "OutputBlobNameList": [
            "exampleoutput.csv"
          ]
        }
      }
    ]
  }
}

Sample Response

Date: Sat, 16 Jun 2018 00:40:14 GMT
X-Content-Type-Options: nosniff
x-ms-ratelimit-remaining-subscription-writes: 1186
x-ms-request-id: 373f1a49-685d-4c07-8857-0fcf1bcaffcb
x-ms-correlation-request-id: 373f1a49-685d-4c07-8857-0fcf1bcaffcb
{
  "id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/triggers/exampleTrigger",
  "name": "exampleTrigger",
  "type": "Microsoft.DataFactory/factories/triggers",
  "properties": {
    "type": "ScheduleTrigger",
    "typeProperties": {
      "recurrence": {
        "frequency": "Minute",
        "interval": 4,
        "startTime": "2018-06-16T00:39:13.8441801Z",
        "endTime": "2018-06-16T00:55:13.8441801Z",
        "timeZone": "UTC"
      }
    },
    "pipelines": [
      {
        "pipelineReference": {
          "referenceName": "examplePipeline",
          "type": "PipelineReference"
        },
        "parameters": {
          "OutputBlobNameList": [
            "exampleoutput.csv"
          ]
        }
      }
    ],
    "runtimeState": "Stopped"
  },
  "etag": "0a008ad4-0000-0000-0000-5b245c6e0000"
}

Triggers_Update

Sample Request

PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/triggers/exampleTrigger?api-version=2018-06-01

{
  "properties": {
    "type": "ScheduleTrigger",
    "typeProperties": {
      "recurrence": {
        "frequency": "Minute",
        "interval": 4,
        "startTime": "2018-06-16T00:39:14.905167Z",
        "endTime": "2018-06-16T00:55:14.905167Z",
        "timeZone": "UTC"
      }
    },
    "pipelines": [
      {
        "pipelineReference": {
          "referenceName": "examplePipeline",
          "type": "PipelineReference"
        },
        "parameters": {
          "OutputBlobNameList": [
            "exampleoutput.csv"
          ]
        }
      }
    ],
    "description": "Example description"
  }
}

Sample Response

Date: Sat, 16 Jun 2018 00:40:15 GMT
X-Content-Type-Options: nosniff
x-ms-ratelimit-remaining-subscription-writes: 1185
x-ms-request-id: d5ccf096-0618-4b26-9829-db77e4c391c7
x-ms-correlation-request-id: d5ccf096-0618-4b26-9829-db77e4c391c7
{
  "id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/triggers/exampleTrigger",
  "name": "exampleTrigger",
  "type": "Microsoft.DataFactory/factories/triggers",
  "properties": {
    "type": "ScheduleTrigger",
    "typeProperties": {
      "recurrence": {
        "frequency": "Minute",
        "interval": 4,
        "startTime": "2018-06-16T00:39:14.905167Z",
        "endTime": "2018-06-16T00:55:14.905167Z",
        "timeZone": "UTC"
      }
    },
    "pipelines": [
      {
        "pipelineReference": {
          "referenceName": "examplePipeline",
          "type": "PipelineReference"
        },
        "parameters": {
          "OutputBlobNameList": [
            "exampleoutput.csv"
          ]
        }
      }
    ],
    "description": "Example description",
    "runtimeState": "Stopped"
  },
  "etag": "0a008dd4-0000-0000-0000-5b245c6f0000"
}

Definitions

Name Description
CloudError

The object that defines the structure of an Azure Data Factory error response.

MultiplePipelineTrigger

Base class for all triggers that support one to many model for trigger to pipeline.

PipelineReference

Pipeline reference type.

TriggerPipelineReference

Pipeline that needs to be triggered with the given parameters.

TriggerResource

Trigger resource type.

TriggerRuntimeState

Enumerates possible state of Triggers.

CloudError

The object that defines the structure of an Azure Data Factory error response.

Name Type Description
error.code

string

Error code.

error.details

CloudError[]

Array with additional error details.

error.message

string

Error message.

error.target

string

Property name/path in request associated with error.

MultiplePipelineTrigger

Base class for all triggers that support one to many model for trigger to pipeline.

Name Type Description
annotations

object[]

List of tags that can be used for describing the trigger.

description

string

Trigger description.

pipelines

TriggerPipelineReference[]

Pipelines that need to be started.

runtimeState

TriggerRuntimeState

Indicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger.

type string:

MultiplePipelineTrigger

Trigger type.

PipelineReference

Pipeline reference type.

Name Type Description
name

string

Reference name.

referenceName

string

Reference pipeline name.

type enum:

PipelineReference

Pipeline reference type.

TriggerPipelineReference

Pipeline that needs to be triggered with the given parameters.

Name Type Description
parameters

object

Pipeline parameters.

pipelineReference

PipelineReference

Pipeline reference.

TriggerResource

Trigger resource type.

Name Type Description
etag

string

Etag identifies change in the resource.

id

string

The resource identifier.

name

string

The resource name.

properties Trigger:

MultiplePipelineTrigger

Properties of the trigger.

type

string

The resource type.

TriggerRuntimeState

Enumerates possible state of Triggers.

Name Type Description
Disabled

string

Started

string

Stopped

string