openapi: 3.0.0 servers: - description: Snowflake Task API url: https://org-account.snowflakecomputing.com info: version: 0.0.1 title: Snowflake Task API description: The Snowflake Task API is a REST API that you can use to access, update, and perform certain actions on task resources in a Snowflake database. contact: name: Snowflake, Inc. url: https://snowflake.com email: support@snowflake.com paths: /api/v2/databases/{database}/schemas/{schema}/tasks: get: summary: List tasks tags: - task description: Lists tasks under the database and schema, with show options as query parameters. operationId: listTasks parameters: - $ref: common.yaml#/components/parameters/database - $ref: common.yaml#/components/parameters/schema - $ref: common.yaml#/components/parameters/rootOnly - $ref: common.yaml#/components/parameters/like - $ref: common.yaml#/components/parameters/startsWith - $ref: common.yaml#/components/parameters/showLimit - $ref: common.yaml#/components/parameters/fromName responses: '200': description: successful headers: X-Snowflake-Request-ID: $ref: common.yaml#/components/headers/X-Snowflake-Request-ID Link: $ref: common.yaml#/components/headers/Link content: application/json: schema: type: array items: $ref: '#/components/schemas/Task' '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '408': $ref: common.yaml#/components/responses/408RequestTimeout '409': $ref: common.yaml#/components/responses/409Conflict '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout post: summary: Create a task tags: - task description: Create a task, with standard create modifiers as query parameters. See the Task component definition for what is required to be provided in the request body. operationId: createTask parameters: - $ref: common.yaml#/components/parameters/database - $ref: common.yaml#/components/parameters/schema - $ref: common.yaml#/components/parameters/createMode requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Task' example: name: name_example warehouse: REGRESS schedule: schedule_type: MINUTES_TYPE minutes: 10 predecessors: - task1 - task2 - task3 comment: test_comment definition: select 1 responses: '200': $ref: common.yaml#/components/responses/200SuccessResponse '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '408': $ref: common.yaml#/components/responses/408RequestTimeout '409': $ref: common.yaml#/components/responses/409Conflict '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout /api/v2/databases/{database}/schemas/{schema}/tasks/{name}: get: summary: Fetch a task tags: - task description: Fetch a task using the describe command output. operationId: fetchTask parameters: - $ref: common.yaml#/components/parameters/database - $ref: common.yaml#/components/parameters/schema - $ref: common.yaml#/components/parameters/name responses: '200': description: successful headers: X-Snowflake-Request-ID: $ref: common.yaml#/components/headers/X-Snowflake-Request-ID Link: $ref: common.yaml#/components/headers/Link content: application/json: schema: $ref: '#/components/schemas/Task' '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout put: summary: Create a (or alter an existing) task tags: - task description: Create a (or alter an existing) task. Even if the operation is just an alter, the full property set must be provided. operationId: createOrAlterTask parameters: - $ref: common.yaml#/components/parameters/database - $ref: common.yaml#/components/parameters/schema - $ref: common.yaml#/components/parameters/name requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Task' responses: '200': $ref: common.yaml#/components/responses/200SuccessResponse '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout delete: parameters: - $ref: common.yaml#/components/parameters/database - $ref: common.yaml#/components/parameters/schema - $ref: common.yaml#/components/parameters/name - $ref: common.yaml#/components/parameters/ifExists summary: Delete a task tags: - task description: Delete a task with the task name. If ifExists is used, the operation will succeed even if the object does not exist. Otherwise, there will be a failure if the drop is unsuccessful. operationId: deleteTask responses: '200': $ref: common.yaml#/components/responses/200SuccessResponse '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout /api/v2/databases/{database}/schemas/{schema}/tasks/{name}:execute: post: summary: Execute a task object. tags: - task description: Execute a task -- this is equivalent to EXECUTE IMMEDIATE. operationId: executeTask parameters: - $ref: common.yaml#/components/parameters/database - $ref: common.yaml#/components/parameters/schema - $ref: common.yaml#/components/parameters/name - $ref: common.yaml#/components/parameters/asyncExec - name: retryLast in: query description: Retry the last failed run of the DAG. schema: type: boolean default: false responses: '200': $ref: common.yaml#/components/responses/200SuccessResponse '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout /api/v2/databases/{database}/schemas/{schema}/tasks/{name}:resume: post: summary: Resume a suspended task. tags: - task description: Resumes a suspended task object. This is equivalent to an ALTER TASK ... RESUME. operationId: resumeTask parameters: - $ref: common.yaml#/components/parameters/database - $ref: common.yaml#/components/parameters/schema - $ref: common.yaml#/components/parameters/name responses: '200': $ref: common.yaml#/components/responses/200SuccessResponse '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout /api/v2/databases/{database}/schemas/{schema}/tasks/{name}:suspend: post: summary: Suspend a running task. tags: - task description: Suspends a running task. This is equivalent to an ALTER TASK ... SUSPEND. operationId: suspendTask parameters: - $ref: common.yaml#/components/parameters/database - $ref: common.yaml#/components/parameters/schema - $ref: common.yaml#/components/parameters/name responses: '200': $ref: common.yaml#/components/responses/200SuccessResponse '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout /api/v2/databases/{database}/schemas/{schema}/tasks/{name}/dependents: get: summary: Fetch the dependent tasks of a task tags: - task description: Returns a list of the dependent tasks of the task with identifier {name}. This operation requires an active warehouse. operationId: fetchTaskDependents parameters: - $ref: common.yaml#/components/parameters/database - $ref: common.yaml#/components/parameters/schema - $ref: common.yaml#/components/parameters/name - name: recursive in: query description: Specifies whether to limit the output to include only direct child tasks or to include all recursive child tasks. schema: type: boolean default: true responses: '200': description: successful headers: X-Snowflake-Request-ID: $ref: common.yaml#/components/headers/X-Snowflake-Request-ID Link: $ref: common.yaml#/components/headers/Link content: application/json: schema: type: array items: $ref: '#/components/schemas/Task' '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout /api/v2/databases/{database}/schemas/{schema}/tasks/{name}/current_graphs: get: deprecated: true summary: Get the graph runs that are executing or scheduled for the task for the next 8 days. tags: - task description: This function returns details for graph runs that are currently executing or are next scheduled to run within the next 8 days. operationId: getCurrentGraphsDeprecated parameters: - $ref: common.yaml#/components/parameters/database - $ref: common.yaml#/components/parameters/schema - $ref: common.yaml#/components/parameters/name - in: query name: resultLimit schema: type: integer description: Number of results to return, at most. Default is 1000, valid range is 1 to 10000. responses: '200': description: successful headers: X-Snowflake-Request-ID: $ref: common.yaml#/components/headers/X-Snowflake-Request-ID Link: $ref: common.yaml#/components/headers/Link content: application/json: schema: type: array items: $ref: '#/components/schemas/TaskRun' '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout /api/v2/databases/{database}/schemas/{schema}/tasks/{name}/current-graphs: get: summary: Get the graph runs that are executing or scheduled for the task for the next 8 days. tags: - task description: Returns details for graph runs that are currently executing or are next scheduled to run within the next 8 days. This operation requires an active warehouse. operationId: getCurrentGraphs parameters: - $ref: common.yaml#/components/parameters/database - $ref: common.yaml#/components/parameters/schema - $ref: common.yaml#/components/parameters/name - in: query name: resultLimit schema: type: integer description: Number of results to return, at most. Default is 1000, valid range is 1 to 10000. responses: '200': description: successful headers: X-Snowflake-Request-ID: $ref: common.yaml#/components/headers/X-Snowflake-Request-ID Link: $ref: common.yaml#/components/headers/Link content: application/json: schema: type: array items: $ref: '#/components/schemas/TaskRun' '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout /api/v2/databases/{database}/schemas/{schema}/tasks/{name}/complete_graphs: get: deprecated: true summary: Get the graph runs that are completed for the task. tags: - task description: This function returns details for graph runs that are completed. operationId: getCompleteGraphsDeprecated parameters: - $ref: common.yaml#/components/parameters/database - $ref: common.yaml#/components/parameters/schema - $ref: common.yaml#/components/parameters/name - in: query name: resultLimit schema: type: integer description: Number of results to return, at most. Default is 1000, valid range is 1 to 10000. - in: query name: errorOnly schema: type: boolean description: Whether to only return results for tasks runs that have failed. Default is false. responses: '200': description: successful headers: X-Snowflake-Request-ID: $ref: common.yaml#/components/headers/X-Snowflake-Request-ID Link: $ref: common.yaml#/components/headers/Link content: application/json: schema: type: array items: $ref: '#/components/schemas/TaskRun' '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout /api/v2/databases/{database}/schemas/{schema}/tasks/{name}/complete-graphs: get: summary: Get the graph runs that are completed for the task. tags: - task description: Returns details for graph runs that are completed. This operation requires an active warehouse. operationId: getCompleteGraphs parameters: - $ref: common.yaml#/components/parameters/database - $ref: common.yaml#/components/parameters/schema - $ref: common.yaml#/components/parameters/name - in: query name: resultLimit schema: type: integer description: Number of results to return, at most. Default is 1000, valid range is 1 to 10000. - in: query name: errorOnly schema: type: boolean description: Whether to only return results for tasks runs that have failed. Default is false. responses: '200': description: successful headers: X-Snowflake-Request-ID: $ref: common.yaml#/components/headers/X-Snowflake-Request-ID Link: $ref: common.yaml#/components/headers/Link content: application/json: schema: type: array items: $ref: '#/components/schemas/TaskRun' '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout /api/v2/databases/{database}/schemas/{schema}/tasks/{name}:set-tags: post: summary: Set tags on an existing task. tags: - task description: Sets tags on an existing task. operationId: setTags parameters: - $ref: common.yaml#/components/parameters/database - $ref: common.yaml#/components/parameters/schema - $ref: common.yaml#/components/parameters/name - $ref: common.yaml#/components/parameters/ifExists requestBody: required: true content: application/json: schema: type: array items: $ref: common.yaml#/components/schemas/TagAssignment responses: '200': $ref: common.yaml#/components/responses/200SuccessResponse '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout /api/v2/databases/{database}/schemas/{schema}/tasks/{name}:unset-tags: post: summary: Unset tags from an existing task. tags: - task description: Unsets tags from an existing task. operationId: unsetTags parameters: - $ref: common.yaml#/components/parameters/database - $ref: common.yaml#/components/parameters/schema - $ref: common.yaml#/components/parameters/name - $ref: common.yaml#/components/parameters/ifExists requestBody: required: true content: application/json: schema: type: array items: $ref: common.yaml#/components/schemas/TagReference responses: '200': $ref: common.yaml#/components/responses/200SuccessResponse '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout /api/v2/databases/{database}/schemas/{schema}/tasks/{name}:get-tags: get: summary: Get the tag assignments for the task. tags: - task description: Returns all tags assigned to the task. This operation requires an active warehouse. operationId: getTags parameters: - $ref: common.yaml#/components/parameters/database - $ref: common.yaml#/components/parameters/schema - $ref: common.yaml#/components/parameters/name - $ref: common.yaml#/components/parameters/withLineage responses: '200': description: successful headers: X-Snowflake-Request-ID: $ref: common.yaml#/components/headers/X-Snowflake-Request-ID Link: $ref: common.yaml#/components/headers/Link content: application/json: schema: type: array items: $ref: common.yaml#/components/schemas/TagAssignment '202': $ref: common.yaml#/components/responses/202SuccessAcceptedResponse '400': $ref: common.yaml#/components/responses/400BadRequest '401': $ref: common.yaml#/components/responses/401Unauthorized '403': $ref: common.yaml#/components/responses/403Forbidden '404': $ref: common.yaml#/components/responses/404NotFound '405': $ref: common.yaml#/components/responses/405MethodNotAllowed '429': $ref: common.yaml#/components/responses/429LimitExceeded '500': $ref: common.yaml#/components/responses/500InternalServerError '503': $ref: common.yaml#/components/responses/503ServiceUnavailable '504': $ref: common.yaml#/components/responses/504GatewayTimeout components: schemas: TaskRun: type: object description: A task run executing a standalone task or a DAG of tasks starting from the root task. properties: root_task_name: type: string description: The name of the root task in the current task run. readOnly: true database_name: type: string description: The name of the current database for the task run. readOnly: true schema_name: type: string description: The name of the current schema for the task run. readOnly: true state: type: string description: The current state of the task run. enum: - SCHEDULED - EXECUTING - SUCCEEDED - FAILED - CANCELLED - SKIPPED readOnly: true first_error_task_name: type: string description: The name of the first task throwing an error in the task run. readOnly: true first_error_code: type: integer description: The first error code thrown in the task run. readOnly: true first_error_message: type: string description: The first error message thrown in the task run. readOnly: true scheduled_time: type: string description: The scheduled time for the task run. format: date-time readOnly: true query_start_time: type: string description: The start time for the task run query. format: date-time readOnly: true next_scheduled_time: type: string description: The next upcoming time for the task run. format: date-time readOnly: true completed_time: type: string description: The time this task run was last completed. format: date-time readOnly: true root_task_id: type: string description: The unique task ID for the root task. readOnly: true graph_version: type: integer description: The current version of the DAG on the task run. readOnly: true run_id: type: integer description: The unique ID for the current task run. readOnly: true example: root_task_name: root_task database_name: test_db schema_name: test_schema state: SCHEDULED first_error_task_name: test_task first_error_code: 0 first_error_message: ERROR scheduled_time: '2024-06-18T01:01:01.111111' query_start_time: '2024-06-18T01:01:01.111111' next_scheduled_time: '2024-06-18T01:01:01.111111' completed_time: '2024-06-18T01:01:01.111111' root_task_id: '0' graph_version: 0 run_id: 0 required: - root_task_name - database_name - schema_name - state - scheduled_time - root_task_id - graph_version - run_id Task: type: object description: A Snowflake task, used to execute SQL code. properties: name: allOf: - $ref: ./common.yaml#/components/schemas/Identifier description: String that specifies the identifier (i.e. name) for the task. warehouse: allOf: - $ref: ./common.yaml#/components/schemas/Identifier description: Specifies the virtual warehouse that provides compute resources for task runs. Omit this parameter to use serverless compute resources for runs of this task. schedule: $ref: '#/components/schemas/TaskSchedule' description: Specifies the schedule for periodically running the task. comment: type: string description: Specifies a comment for the task. finalize: type: string description: Specifies the name of the root task that the finalizer task is associated with. task_auto_retry_attempts: type: integer description: Root task settable only. Specifies the number of automatic task graph retry attempts. Valid range is 0 to 30. When not specified, no retry would happen. minimum: 0 maximum: 30 config: type: object additionalProperties: true description: Task Config session_parameters: type: object additionalProperties: true description: Session Parameters for the task at runtime. definition: type: string description: The SQL definition for the task. Any one of single SQL statement, call to stored procedure, or procedural logic using Snowflake scripting. predecessors: type: array description: Specifies one or more predecessor tasks for the current task items: type: string description: The identifier for the task. task_relations: type: string description: Displays the relationship between the root task and its corresponding finalizer tasks. readOnly: true user_task_managed_initial_warehouse_size: type: string description: Specifies the size of the compute resources to provision for the first run of the task. This parameter only applies to serverless tasks. target_completion_interval: $ref: '#/components/schemas/MinutesSchedule' description: Specifies the desired task completion time. This parameter only applies to serverless tasks. serverless_task_min_statement_size: type: string description: Specifies the minimum allowed warehouse size for the serverless task. Minimum XSMALL, Maximum XXLARGE. This parameter only applies to serverless tasks. serverless_task_max_statement_size: type: string description: Specifies the maximum allowed warehouse size for the serverless task. Minimum XSMALL, Maximum XXLARGE. This parameter only applies to serverless tasks. user_task_timeout_ms: type: integer description: Specifies the time limit on a single run of the task before it times out (in milliseconds). suspend_task_after_num_failures: type: integer description: Specifies the number of consecutive failed task runs after which the current task is suspended automatically. user_task_minimum_trigger_interval_in_seconds: type: integer description: Specifies the minimum number of seconds between triggered runs of this task. Only applies to triggered tasks. Valid range 10 to 604800. minimum: 10 maximum: 604800 condition: type: string description: Specifies a Boolean SQL expression condition; multiple conditions joined with AND/OR are supported allow_overlapping_execution: type: boolean description: Specifies whether to allow multiple instances of the DAG to run concurrently. error_integration: type: string description: Specifies the name of the notification integration used to communicate with Amazon SNS, MS Azure Event Grid, or Google Pub/Sub. success_integration: type: string description: Specifies the name of the notification integration used for success notifications when the task graph completes successfully. overlap_policy: type: string description: Specifies the overlap policy for the task graph. Only applicable to root tasks. enum: - NO_OVERLAP - ALLOW_CHILD_OVERLAP - ALLOW_ALL_OVERLAP execute_as_user: type: string description: Specifies the name of the user whose privileges are used to run the task. created_on: type: string description: The time the task was created on. format: date-time readOnly: true id: type: string description: An ID for the current task. readOnly: true owner: type: string description: The role that owns the task. readOnly: true owner_role_type: type: string description: The role type of the task owner. readOnly: true state: type: string description: The state of the task. Must be one of started or suspended. readOnly: true enum: - started - suspended last_committed_on: type: string description: The time the task was last committed on. readOnly: true format: date-time last_suspended_on: type: string description: The time the task was last suspended on. readOnly: true format: date-time database_name: type: string description: The name of the parent database for the task. readOnly: true schema_name: type: string description: The name of the parent schema for the task. readOnly: true example: name: name_example schedule: schedule_type: MINUTES_TYPE minutes: 10 comment: test_comment config: output_dir: /temp/test_directory/ learning_rate: '0.1' definition: this task does... predecessors: - task1 - task2 - task3 user_task_managed_initial_warehouse_size: SMALL target_completion_interval: schedule_type: MINUTES_TYPE minutes: 5 serverless_task_min_statement_size: XSMALL serverless_task_max_statement_size: MEDIUM user_task_timeout_ms: 10 suspend_task_after_num_failures: 3 condition: select 1 allow_overlapping_execution: false error_integration: my_notification_int success_integration: my_success_notification_int overlap_policy: NO_OVERLAP execute_as_user: my_user created_on: '2024-06-18T01:01:01.111111' id: task_id owner: TASK_ADMIN owner_role_type: ADMIN state: started last_committed_on: '2024-06-18T01:01:01.111111' last_suspended_on: '2024-06-18T01:01:01.111111' database_name: TESTDB schema_name: TESTSCHEMA required: - name - definition TaskSchedule: type: object description: Specifies the schedule for periodically running the task. properties: schedule_type: description: Type of the schedule, can be either CRON_TYPE or MINUTES_TYPE. type: string discriminator: propertyName: schedule_type mapping: CRON_TYPE: CronSchedule MINUTES_TYPE: MinutesSchedule CronSchedule: description: A cron schedule for executing a task at a specified interval. allOf: - $ref: '#/components/schemas/TaskSchedule' properties: cron_expr: type: string description: A cron expression for the task execution. timezone: type: string description: The time zone for the schedule. example: cron_expr: '* * * * ? *' timezone: america/los_angeles required: - cron_expr - timezone MinutesSchedule: description: A schedule for executing a task at specified intervals of minutes (with optional sub-minute remainder in seconds). allOf: - $ref: '#/components/schemas/TaskSchedule' properties: minutes: type: integer description: The number of whole minutes between each task run. seconds: type: integer minimum: 0 maximum: 59 description: Additional seconds past `minutes` between each task run. Combined with `minutes`, the total interval is `minutes * 60 + seconds` seconds. When omitted in a request, the server treats the remainder as 0. example: minutes: 10 required: - minutes securitySchemes: KeyPair: $ref: common.yaml#/components/securitySchemes/KeyPair ExternalOAuth: $ref: common.yaml#/components/securitySchemes/ExternalOAuth SnowflakeOAuth: $ref: common.yaml#/components/securitySchemes/SnowflakeOAuth ProgrammaticAccessToken: $ref: common.yaml#/components/securitySchemes/ProgrammaticAccessToken security: - KeyPair: [] - ExternalOAuth: [] - SnowflakeOAuth: [] - ProgrammaticAccessToken: [] externalDocs: description: Streams and Tasks Reference url: https://docs.snowflake.com/en/sql-reference/commands-stream