Skip to main content

trigger

Creates, updates, deletes, gets or lists a trigger resource.

Overview

Nametrigger
TypeResource
Idazure.synapse_artifacts.trigger

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
namestringThe name of the resource.
objectUnmatched properties from the message are deserialized to this collection.
annotationsarrayList of tags that can be used for describing the trigger.
descriptionstringTrigger description.
etagstringResource Etag.
runtimeStatestringIndicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger. Known values are: "Started", "Stopped", and "Disabled".
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_triggerselecttrigger_name, endpointIf-None-MatchGets a trigger.
get_triggers_by_workspaceselectendpointLists triggers.
create_or_update_triggerinserttrigger_name, endpoint, typeIf-MatchCreates or updates a trigger.
create_or_update_triggerreplacetrigger_name, endpoint, typeIf-MatchCreates or updates a trigger.
delete_triggerdeletetrigger_name, endpointDeletes a trigger.
get_event_subscription_statusexectrigger_name, endpointGet a trigger's event subscription status.
subscribe_trigger_to_eventsexectrigger_name, endpointSubscribe event trigger to events.
unsubscribe_trigger_from_eventsexectrigger_name, endpointUnsubscribe event trigger from events.
start_triggerexectrigger_name, endpointStarts a trigger.
stop_triggerexectrigger_name, endpointStops a trigger.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
endpointstringThe service endpoint host (no scheme). (default: )
trigger_namestringThe trigger name. Required.
If-MatchstringETag of the trigger entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. Default value is None.
If-None-MatchstringETag of the trigger entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. Default value is None.

SELECT examples

Gets a trigger.

SELECT
id,
name,
,
annotations,
description,
etag,
runtimeState,
type
FROM azure.synapse_artifacts.trigger
WHERE trigger_name = '{{ trigger_name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND If-None-Match = '{{ If-None-Match }}'
;

INSERT examples

Creates or updates a trigger.

INSERT INTO azure.synapse_artifacts.trigger (
,
type,
description,
annotations,
trigger_name,
endpoint,
If-Match
)
SELECT
'{{ }}',
'{{ type }}' /* required */,
'{{ description }}',
'{{ annotations }}',
'{{ trigger_name }}',
'{{ endpoint }}',
'{{ If-Match }}'
RETURNING
id,
name,
etag,
properties,
type
;

REPLACE examples

Creates or updates a trigger.

REPLACE azure.synapse_artifacts.trigger
SET
= '{{ }}',
type = '{{ type }}',
description = '{{ description }}',
annotations = '{{ annotations }}'
WHERE
trigger_name = '{{ trigger_name }}' --required
AND endpoint = '{{ endpoint }}' --required
AND type = '{{ type }}' --required
AND If-Match = '{{ If-Match}}'
RETURNING
id,
name,
etag,
properties,
type;

DELETE examples

Deletes a trigger.

DELETE FROM azure.synapse_artifacts.trigger
WHERE trigger_name = '{{ trigger_name }}' --required
AND endpoint = '{{ endpoint }}' --required
;

Lifecycle Methods

Get a trigger's event subscription status.

EXEC azure.synapse_artifacts.trigger.get_event_subscription_status 
@trigger_name='{{ trigger_name }}' --required,
@endpoint='{{ endpoint }}' --required
;