GetInstance

Updated at:

Queries the information about an instance.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dataworks:*

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

integer

Yes

The instance ID. You can call the ListInstances operation to query the ID.

1234

ProjectEnv

string

Yes

The environment of the workspace. Valid values: PROD: production environment and DEV: development environment.

Valid values:

  • PROD :

    生产环境

  • DEV :

    开发环境

PROD

Response elements

Element

Type

Description

Example

object

The response parameters.

HttpStatusCode

integer

The HTTP status code.

200

RequestId

string

The request ID.

E6F0DBDD-5AD****

ErrorMessage

string

The error message returned when the instance fails to be scheduled.

test

Success

boolean

Indicates whether the request was successful.

true

ErrorCode

string

The error code.

0

Data

object

The details of the instance.

Status

string

The task status. Valid values: NOT_RUN(1): not run; WAIT_TIME(2): waiting for the scheduled time; WAIT_RESOURCE(3): dispatched to the execution engine and waiting in the resource queue; RUNNING(4): running; CHECKING(7): execution finished and sent to Data Quality for validation; CHECKING_CONDITION(8): execution finished and branch conditions being checked; WAIT_TRIGGER(9): waiting for a trigger, a state entered by trigger-based nodes after waiting for the scheduled time; FAILURE(5): failed; SUCCESS(6): successful.

NOT_RUN

CycTime

integer

The scheduling time of the instance.

1590422400000

BeginRunningTime

integer

The time when the instance started to run.

1590416703313

FinishTime

integer

The time when the running of the instance was complete.

1590416703313

CreateTime

integer

The time when the instance was generated.

1590416703313

DagId

integer

The workflow ID.

338450167

Priority

integer

The priority of the instance. Valid values: 1, 3, 5, 7, and 8. A greater value indicates a higher priority. Default value: 1.

1

TaskType

string

The scheduling type of the node that generates the instance. Valid values:

  • NORMAL(0): The node is an auto triggered node. The scheduling system regularly runs the node.

  • MANUAL(1): The node is a manually triggered node. The scheduling system does not regularly run the node.

  • PAUSE(2): The node is a frozen node. The scheduling system regularly runs the node but sets the status of the node to failed when the scheduling system starts to run the node.

  • SKIP(3): The node is a dry-run node. The scheduling system regularly runs the node but sets the status of the node to successful when the scheduling system starts to run the node.

  • SKIP_UNCHOOSE(4): The node is an unselected node in a temporary workflow. This type of node exists only in temporary workflows. The scheduling system sets the status of the node to successful when the scheduling system starts to run the node.

  • SKIP_CYCLE(5): The node is a node that is scheduled by the week or month and is waiting for the scheduling time to arrive. The scheduling system regularly runs the node but sets the status of the node to successful when the scheduling system starts to run the node.

  • CONDITION_UNCHOOSE(6): The node is not selected by its ancestor branch node and is run as a dry-run node.

  • REALTIME_DEPRECATED(7): The node has instances that are generated in real time but deprecated. The scheduling system sets the status of the node to successful.

NORMAL(0)

ParamValues

string

The parameters related to the node.

bizdate=$bizdate tbods=$tbods tbdw=$tbdw tbpmic=$tbpmic tbpidx=$tbpidx tbptcif=$tbptcif

Connection

string

The connection string.

odps_first

BaselineId

integer

The baseline ID.

123123

DqcType

integer

Indicates whether the instance is associated with a monitoring rule in Data Quality. Valid values:

  • 0: The instance is associated with a monitoring rule in Data Quality.

  • 1: The instance is not associated with a monitoring rule in Data Quality.

1

DagType

string

The workflow type. Valid values: DAILY(0): daily scheduled workflow; MANUAL(1): manually triggered task workflow; SMOKE_TEST(2): smoke testing workflow; SUPPLY_DATA(3): data backfill workflow; MANUAL_FLOW(4): manually run dataflow or PAI workflow, such as running a workflow in the IDE; BUSINESS_PROCESS_DAG(5): manual workflow DAG.

DAILY

BusinessId

integer

The workflow ID.

123

TaskRerunTime

integer

The number of times the instance can still run. This value can be empty or an integer greater than or equal to 0. An empty value indicates that automatic reruns are not configured for the corresponding node. A value of 0 indicates that the instance cannot be rerun. A positive integer n indicates that the instance can still be rerun n times. For example, 1 means one remaining rerun and 2 means two remaining reruns. The initial value is the automatic rerun count configured for the corresponding node plus 1.

0

PeriodNumber

integer

The sequence number of the cycle. This parameter indicates the sequence number of the cycle of the instance on the current day.

1

ModifyTime

integer

The time when the instance was last modified.

1590416703313

Repeatability

boolean

Indicates whether the instance can be rerun.

true

RepeatInterval

integer

The interval at which the node is rerun after the node fails to run. Unit: milliseconds.

60000

InstanceId

integer

The instance ID.

11713307578

BeginWaitResTime

integer

The time when the instance started to wait for resources.

1590416703313

RelatedFlowId

integer

The ID of the workflow to which the node belongs.

123123

Bizdate

integer

The business date of the instance. In most cases, the value is one day before the time when the instance was run.

1590336000000

NodeName

string

The name of the node.

kzh

BeginWaitTimeTime

integer

The time when the instance started to wait to be scheduled.

1590416703313

DqcDescription

string

The table and partition filter expression in Data Quality that are associated with the node.

[{"projectName":"ztjy_dim","tableName":"dim_user_agent_manage_area_a","partition":"ds\u003d$[yyyy-mm-dd-1]"}]

NodeId

integer

The node ID.

33115

CreateUser

string

The creator of the instance.

111

Owner

string

The owner of the instance.

111

Examples

Success response

JSON format

{
  "HttpStatusCode": 200,
  "RequestId": "E6F0DBDD-5AD****",
  "ErrorMessage": "test",
  "Success": true,
  "ErrorCode": "0",
  "Data": {
    "Status": "NOT_RUN",
    "CycTime": 1590422400000,
    "BeginRunningTime": 1590416703313,
    "FinishTime": 1590416703313,
    "CreateTime": 1590416703313,
    "DagId": 338450167,
    "Priority": 1,
    "TaskType": "NORMAL(0)",
    "ParamValues": "bizdate=$bizdate tbods=$tbods tbdw=$tbdw tbpmic=$tbpmic tbpidx=$tbpidx tbptcif=$tbptcif",
    "Connection": "odps_first",
    "BaselineId": 123123,
    "DqcType": 1,
    "DagType": "DAILY",
    "BusinessId": 123,
    "TaskRerunTime": 0,
    "PeriodNumber": 1,
    "ModifyTime": 1590416703313,
    "Repeatability": true,
    "RepeatInterval": 60000,
    "InstanceId": 11713307578,
    "BeginWaitResTime": 1590416703313,
    "RelatedFlowId": 123123,
    "Bizdate": 1590336000000,
    "NodeName": "kzh",
    "BeginWaitTimeTime": 1590416703313,
    "DqcDescription": "[{\"projectName\":\"ztjy_dim\",\"tableName\":\"dim_user_agent_manage_area_a\",\"partition\":\"ds\\u003d$[yyyy-mm-dd-1]\"}]",
    "NodeId": 33115,
    "CreateUser": "111",
    "Owner": "111"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.