Trigger ​Trigger

yaml
type: "io.kestra.plugin.azure.storage.blob.trigger"
yaml
id: react_to_files
namespace: company.team

tasks:
  - id: each
    type: io.kestra.plugin.core.flow.ForEach
    concurrencyLimit: 1
    values: "{{ trigger.blobs | jq('.[].uri') }}"
    tasks:
      - id: return
        type: io.kestra.plugin.core.debug.Return
        format: "{{ taskrun.value }}"

triggers:
  - id: watch
    type: io.kestra.plugin.azure.storage.blob.Trigger
    interval: PT5M
    endpoint: "https://yourblob.blob.core.windows.net"
    connectionString: "DefaultEndpointsProtocol=...=="
    container: myBlobContainer
    prefix: yourDirectory/subdirectory
    action: MOVE
    moveTo:
      container: mydata
      name: archive

yaml
id: process_and_delete_files
namespace: company.team

tasks:
  - id: each
    type: io.kestra.plugin.core.flow.ForEach
    values: "{{ trigger.blobs | jq('.[].name') }}"
    tasks:
      - id: return
        type: io.kestra.plugin.core.debug.Return
        format: "{{ taskrun.value }}"

      - id: delete
        type: io.kestra.plugin.azure.storage.blob.Delete
        endpoint: "https://yourblob.blob.core.windows.net"
        connectionString: "DefaultEndpointsProtocol=...=="
        container: myBlobContainer
        name: "{{ taskrun.value }}"

triggers:
  - id: watch
    type: io.kestra.plugin.azure.storage.blob.Trigger
    endpoint: "https://yourblob.blob.core.windows.net"
    connectionString: "DefaultEndpointsProtocol=...=="
    container: myBlobContainer
    prefix: yourDirectory/subdirectory
    action: NONE
    moveTo:
      container: myBlobContainer
      name: archive
Properties
Possible Values
MOVEDELETENONE
Default FILES
Possible Values
FILESDIRECTORYBOTH
Default PT1M
Format duration
SubType string
Possible Values
CREATEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINT
SubType
Format partial-time
Format partial-time
Format partial-time
Default DURATION_WINDOW
Possible Values
DAILY_TIME_DEADLINEDAILY_TIME_WINDOWDURATION_WINDOWSLIDING_WINDOW
Format duration
Format duration
Format uri
Default false
Format time
Format time
Default {{ trigger.date }}
Default {{ trigger.date }}
Possible Values
EQUALSPREFIXSUFFIX
Default false
SubType
Validation RegExp ^[a-zA-Z0-9][a-zA-Z0-9_-]*
Min length 1
Default true
Default { "type": "DURATION_WINDOW" }
Possible Values
FIRSTLASTSECONDTHIRDFOURTH
Possible Values
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAY
Default {{ trigger.date }}
Possible Values
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAY
Default {{ trigger.date }}
SubType string
Possible Values
CREATEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINT
SubType string
Possible Values
CREATEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINT
Format date-time
Format date-time
Default {{ trigger.date }}
SubType string
Possible Values
CREATEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINT
SubType string
Possible Values
CREATEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINT
Default {{ trigger.date }}