Share via


Triggers - Subscribe To Events

Subscribe event trigger to events.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/subscribeToEvents?api-version=2018-06-01

URI Parameters

Name In Required Type Description
factoryName
path True

string

minLength: 3
maxLength: 63
pattern: ^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$

The factory name.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string (uuid)

The ID of the target subscription. The value must be an UUID.

triggerName
path True

string

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

The trigger name.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Responses

Name Type Description
200 OK

TriggerSubscriptionOperationStatus

Azure operation completed successfully.

202 Accepted

Resource operation accepted.

Headers

  • Location: string
  • Retry-After: integer
Other Status Codes

CloudError

An unexpected error response.

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_SubscribeToEvents

Sample request

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

Sample response

{
  "status": "Enabled",
  "triggerName": "exampleTrigger"
}
Location: https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/triggers/exampleTrigger/getEventSubscriptionStatus?api-version=2018-06-01

Definitions

Name Description
CloudError

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

EventSubscriptionStatus

Event Subscription Status.

TriggerSubscriptionOperationStatus

Defines the response of a trigger subscription operation.

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.

EventSubscriptionStatus

Event Subscription Status.

Value Description
Enabled

Enabled

Provisioning

Provisioning

Deprovisioning

Deprovisioning

Disabled

Disabled

Unknown

Unknown

TriggerSubscriptionOperationStatus

Defines the response of a trigger subscription operation.

Name Type Description
status

EventSubscriptionStatus

Event Subscription Status.

triggerName

string

Trigger name.