Class TriggerClient

java.lang.Object
com.azure.analytics.synapse.artifacts.TriggerClient

public final class TriggerClient extends Object
Initializes a new instance of the synchronous ArtifactsClient type.
  • Method Details

    • getTriggersByWorkspace

      public com.azure.core.http.rest.PagedIterable<TriggerResource> 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

      public com.azure.core.http.rest.PagedIterable<TriggerResource> getTriggersByWorkspace(com.azure.core.util.Context context)
      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

      public TriggerResource createOrUpdateTrigger(String triggerName, TriggerResource trigger)
      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 com.azure.core.http.rest.Response<TriggerResource> createOrUpdateTriggerWithResponse(String triggerName, TriggerResource trigger, String ifMatch, com.azure.core.util.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

      public TriggerResource getTrigger(String triggerName, String ifNoneMatch)
      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

      public TriggerResource getTrigger(String triggerName)
      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 com.azure.core.http.rest.Response<TriggerResource> getTriggerWithResponse(String triggerName, String ifNoneMatch, com.azure.core.util.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

      public void deleteTrigger(String triggerName)
      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

      public com.azure.core.http.rest.Response<Void> deleteTriggerWithResponse(String triggerName, com.azure.core.util.Context context)
      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

      public TriggerSubscriptionOperationStatus subscribeTriggerToEvents(String triggerName)
      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 com.azure.core.http.rest.Response<TriggerSubscriptionOperationStatus> subscribeTriggerToEventsWithResponse(String triggerName, com.azure.core.util.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

      public TriggerSubscriptionOperationStatus getEventSubscriptionStatus(String triggerName)
      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 com.azure.core.http.rest.Response<TriggerSubscriptionOperationStatus> getEventSubscriptionStatusWithResponse(String triggerName, com.azure.core.util.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

      public TriggerSubscriptionOperationStatus unsubscribeTriggerFromEvents(String triggerName)
      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 com.azure.core.http.rest.Response<TriggerSubscriptionOperationStatus> unsubscribeTriggerFromEventsWithResponse(String triggerName, com.azure.core.util.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

      public void startTrigger(String triggerName)
      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

      public com.azure.core.http.rest.Response<Void> startTriggerWithResponse(String triggerName, com.azure.core.util.Context context)
      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

      public void stopTrigger(String triggerName)
      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

      public com.azure.core.http.rest.Response<Void> stopTriggerWithResponse(String triggerName, com.azure.core.util.Context context)
      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.