Class TriggerClient
java.lang.Object
com.azure.analytics.synapse.artifacts.TriggerClient
Initializes a new instance of the synchronous ArtifactsClient type.
-
Method Summary
Modifier and TypeMethodDescriptioncreateOrUpdateTrigger
(String triggerName, TriggerResource trigger) Creates or updates a trigger.createOrUpdateTrigger
(String triggerName, TriggerResource trigger, String ifMatch) Creates or updates a trigger.createOrUpdateTriggerWithResponse
(String triggerName, TriggerResource trigger, String ifMatch, Context context) Creates or updates a trigger.void
deleteTrigger
(String triggerName) Deletes a trigger.deleteTriggerWithResponse
(String triggerName, Context context) Deletes a trigger.getEventSubscriptionStatus
(String triggerName) Get a trigger's event subscription status.getEventSubscriptionStatusWithResponse
(String triggerName, Context context) Get a trigger's event subscription status.getTrigger
(String triggerName) Gets a trigger.getTrigger
(String triggerName, String ifNoneMatch) Gets a trigger.Lists triggers.getTriggersByWorkspace
(Context context) Lists triggers.getTriggerWithResponse
(String triggerName, String ifNoneMatch, Context context) Gets a trigger.void
startTrigger
(String triggerName) Starts a trigger.startTriggerWithResponse
(String triggerName, Context context) Starts a trigger.void
stopTrigger
(String triggerName) Stops a trigger.stopTriggerWithResponse
(String triggerName, Context context) Stops a trigger.subscribeTriggerToEvents
(String triggerName) Subscribe event trigger to events.subscribeTriggerToEventsWithResponse
(String triggerName, Context context) Subscribe event trigger to events.unsubscribeTriggerFromEvents
(String triggerName) Unsubscribe event trigger from events.unsubscribeTriggerFromEventsWithResponse
(String triggerName, Context context) Unsubscribe event trigger from events.
-
Method Details
-
getTriggersByWorkspace
Lists triggers.- Returns:
- a list of trigger resources as paginated response with
PagedIterable
. - Throws:
CloudErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
getTriggersByWorkspace
Lists triggers.- Parameters:
context
- The context to associate with this operation.- Returns:
- a list of trigger resources as paginated response with
PagedIterable
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.CloudErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
createOrUpdateTrigger
public TriggerResource createOrUpdateTrigger(String triggerName, TriggerResource trigger, String ifMatch) Creates or updates a trigger.- Parameters:
triggerName
- The trigger name.trigger
- Trigger resource definition.ifMatch
- ETag of the trigger entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update.- Returns:
- trigger resource type.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.CloudErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
createOrUpdateTrigger
Creates or updates a trigger.- Parameters:
triggerName
- The trigger name.trigger
- Trigger resource definition.- Returns:
- trigger resource type.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.CloudErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
createOrUpdateTriggerWithResponse
public Response<TriggerResource> createOrUpdateTriggerWithResponse(String triggerName, TriggerResource trigger, String ifMatch, Context context) Creates or updates a trigger.- Parameters:
triggerName
- The trigger name.trigger
- Trigger resource definition.ifMatch
- ETag of the trigger entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update.context
- The context to associate with this operation.- Returns:
- trigger resource type along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.CloudErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
getTrigger
Gets a trigger.- Parameters:
triggerName
- The trigger name.ifNoneMatch
- ETag 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.- Returns:
- a trigger.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.CloudErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
getTrigger
Gets a trigger.- Parameters:
triggerName
- The trigger name.- Returns:
- a trigger.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.CloudErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
getTriggerWithResponse
public Response<TriggerResource> getTriggerWithResponse(String triggerName, String ifNoneMatch, Context context) Gets a trigger.- Parameters:
triggerName
- The trigger name.ifNoneMatch
- ETag 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.context
- The context to associate with this operation.- Returns:
- a trigger along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.CloudErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
deleteTrigger
Deletes a trigger.- Parameters:
triggerName
- The trigger name.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.CloudErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
deleteTriggerWithResponse
Deletes a trigger.- Parameters:
triggerName
- The trigger name.context
- The context to associate with this operation.- Returns:
- the
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.CloudErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
subscribeTriggerToEvents
Subscribe event trigger to events.- Parameters:
triggerName
- The trigger name.- Returns:
- defines the response of a trigger subscription operation.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.CloudErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
subscribeTriggerToEventsWithResponse
public Response<TriggerSubscriptionOperationStatus> subscribeTriggerToEventsWithResponse(String triggerName, Context context) Subscribe event trigger to events.- Parameters:
triggerName
- The trigger name.context
- The context to associate with this operation.- Returns:
- defines the response of a trigger subscription operation along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.CloudErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
getEventSubscriptionStatus
Get a trigger's event subscription status.- Parameters:
triggerName
- The trigger name.- Returns:
- a trigger's event subscription status.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.CloudErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
getEventSubscriptionStatusWithResponse
public Response<TriggerSubscriptionOperationStatus> getEventSubscriptionStatusWithResponse(String triggerName, Context context) Get a trigger's event subscription status.- Parameters:
triggerName
- The trigger name.context
- The context to associate with this operation.- Returns:
- a trigger's event subscription status along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.CloudErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
unsubscribeTriggerFromEvents
Unsubscribe event trigger from events.- Parameters:
triggerName
- The trigger name.- Returns:
- defines the response of a trigger subscription operation.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.CloudErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
unsubscribeTriggerFromEventsWithResponse
public Response<TriggerSubscriptionOperationStatus> unsubscribeTriggerFromEventsWithResponse(String triggerName, Context context) Unsubscribe event trigger from events.- Parameters:
triggerName
- The trigger name.context
- The context to associate with this operation.- Returns:
- defines the response of a trigger subscription operation along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.CloudErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
startTrigger
Starts a trigger.- Parameters:
triggerName
- The trigger name.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.CloudErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
startTriggerWithResponse
Starts a trigger.- Parameters:
triggerName
- The trigger name.context
- The context to associate with this operation.- Returns:
- the
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.CloudErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
stopTrigger
Stops a trigger.- Parameters:
triggerName
- The trigger name.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.CloudErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
stopTriggerWithResponse
Stops a trigger.- Parameters:
triggerName
- The trigger name.context
- The context to associate with this operation.- Returns:
- the
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.CloudErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-