Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Serverless Integrations
  • Comparison with other Yandex Cloud services
    • Overview
      • Workflow
      • Starting a workflow execution
        • Overview
          • Switch
          • Foreach
          • Parallel
          • Success
          • Fail
          • NoOp
          • Wait
          • While
      • Templating
    • Cron expressions
    • Quotas and limits
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Public materials
  • Release notes
  1. Concepts
  2. Workflows
  3. YaWL specification
  4. Control steps
  5. Switch

Switch

Written by
Yandex Cloud
Updated at June 11, 2025

Selecting the further execution path. Only one path can be selected: the one for which the condition first returns true. If all conditions have returned false, and no value is set in the default field, the execution will be terminated with an error.

Field name Type Required Default value Templating is supported Description
input string No Overall state of the workflow Yes A jq template to filter the workflow state fed into the step.
choices Choice[] Yes No No List of possible further execution paths.
default string No No No ID of the step to execute if none of the conditions specified in choices return true.

Choice objectChoice object

Field name Type Required Description
condition string Yes Condition in the form of a jq template that returns either the true or false string.
next string Yes ID of the step to execute if the condition returns true.

Was the article helpful?

Previous
DatabaseQuery
Next
Foreach
© 2025 Direct Cursus Technology L.L.C.