diff --git a/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/datafactory.json b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/datafactory.json index 9cfa78d3833d..abfeb6407b35 100644 --- a/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/datafactory.json +++ b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/datafactory.json @@ -2765,6 +2765,149 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/subscribeToEvents": { + "post": { + "tags": [ + "triggers" + ], + "operationId": "Triggers_SubscribeToEvents", + "x-ms-examples": { + "Triggers_SubscribeToEvents": { + "$ref": "./examples/Triggers_SubscribeToEvents.json" + } + }, + "description": "Subscribe event trigger to events.", + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/factoryName" + }, + { + "$ref": "#/parameters/triggerName" + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "Trigger is subscribed to events.", + "schema": { + "$ref": "#/definitions/TriggerSubscriptionOperationStatus" + } + }, + "202": { + "description": "Accepted." + }, + "default": { + "description": "An error response received from the Azure Data Factory service.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/getEventSubscriptionStatus": { + "post": { + "tags": [ + "triggers" + ], + "operationId": "Triggers_GetEventSubscriptionStatus", + "x-ms-examples": { + "Triggers_GetEventSubscriptionStatus": { + "$ref": "./examples/Triggers_GetEventSubscriptionStatus.json" + } + }, + "description": "Get a trigger's event subscription status.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/factoryName" + }, + { + "$ref": "#/parameters/triggerName" + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "Trigger event subscription state.", + "schema": { + "$ref": "#/definitions/TriggerSubscriptionOperationStatus" + } + }, + "default": { + "description": "An error response received from the Azure Data Factory service.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/unsubscribeFromEvents": { + "post": { + "tags": [ + "triggers" + ], + "operationId": "Triggers_UnsubscribeFromEvents", + "x-ms-examples": { + "Triggers_UnsubscribeFromEvents": { + "$ref": "./examples/Triggers_UnsubscribeFromEvents.json" + } + }, + "description": "Unsubscribe event trigger from events.", + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/factoryName" + }, + { + "$ref": "#/parameters/triggerName" + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "Trigger is unsubscribed from events.", + "schema": { + "$ref": "#/definitions/TriggerSubscriptionOperationStatus" + } + }, + "202": { + "description": "Accepted." + }, + "default": { + "description": "An error response received from the Azure Data Factory service.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/start": { "post": { "tags": [ @@ -3658,6 +3801,33 @@ "message" ] }, + "TriggerSubscriptionOperationStatus": { + "description": "Defines the response of a trigger subscription operation.", + "type": "object", + "properties": { + "triggerName": { + "description": "Trigger name.", + "type": "string", + "readOnly": true + }, + "status": { + "type": "string", + "enum": [ + "Enabled", + "Provisioning", + "Deprovisioning", + "Disabled", + "Unknown" + ], + "x-ms-enum": { + "name": "EventSubscriptionStatus", + "modelAsString": true + }, + "description": "Event Subscription Status.", + "readOnly": true + } + } + }, "VariableDefinitionSpecification": { "description": "Definition of variable for a Pipeline.", "type": "object", diff --git a/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_GetEventSubscriptionStatus.json b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_GetEventSubscriptionStatus.json new file mode 100644 index 000000000000..5efc8eebb44b --- /dev/null +++ b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_GetEventSubscriptionStatus.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-12345678abc", + "resourceGroupName": "exampleResourceGroup", + "factoryName": "exampleFactoryName", + "triggerName": "exampleTrigger", + "api-version": "2018-06-01" + }, + "responses": { + "200": { + "body": { + "triggerName": "exampleTrigger", + "status": "Enabled" + } + } + } +} diff --git a/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_SubscribeToEvents.json b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_SubscribeToEvents.json new file mode 100644 index 000000000000..82d16f4b2448 --- /dev/null +++ b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_SubscribeToEvents.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-12345678abc", + "resourceGroupName": "exampleResourceGroup", + "factoryName": "exampleFactoryName", + "triggerName": "exampleTrigger", + "api-version": "2018-06-01" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/triggers/exampleTrigger/getEventSubscriptionStatus?api-version=2018-06-01" + } + }, + "200": { + "body": { + "triggerName": "exampleTrigger", + "status": "Enabled" + } + } + } +} diff --git a/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_UnsubscribeFromEvents.json b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_UnsubscribeFromEvents.json new file mode 100644 index 000000000000..55cb7979d4d5 --- /dev/null +++ b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_UnsubscribeFromEvents.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-12345678abc", + "resourceGroupName": "exampleResourceGroup", + "factoryName": "exampleFactoryName", + "triggerName": "exampleTrigger", + "api-version": "2018-06-01" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/triggers/exampleTrigger/getEventSubscriptionStatus?api-version=2018-06-01" + } + }, + "200": { + "body": { + "triggerName": "exampleTrigger", + "status": "Disabled" + } + } + } +}