StopKnowledgeBaseBuildTaskInstance

Updated at:

Requests that a specified build task instance stop and returns its current status.

Operation description

Requests that a knowledge base build task instance stop. The tenant and caller identities are determined by the POP authentication context.

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:StopKnowledgeBaseBuildTaskInstance

none

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

KnowledgeBaseId

string

Yes

The ID of the associated knowledge base.

12345678-1234-4234-8234-123456789abc

TaskInstanceId

string

Yes

The ID of the task instance.

20001

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The unique ID of the request, which can be used for troubleshooting.

00000000-0000-4000-8000-000000000001

Success

boolean

Indicates whether the request is successful.

Data

object

The business data returned when the request is successful.

TaskInstanceId

string

The ID of the task instance.

20001

TaskId

string

The ID of the source task.

10001

KnowledgeBaseId

string

The ID of the associated knowledge base, which facilitates scope validation and querying.

12345678-1234-4234-8234-123456789abc

TriggerType

string

The trigger type of the execution, which can be manual, periodic, or a supported event.

MANUAL

Status

string

The overall status of the execution.

RUNNING

CurrentStage

string

The current business stage. This field is returned when reliable records are available. For common build stages and semantic model import stages, refer to the domain model. This field does not replace the overall status.

INITIALIZE

InputSnapshot

object

The non-sensitive input snapshot after selection and parsing for the current execution. This snapshot does not change when the task is updated.

SelectedInput

object

The snapshot of the selection conditions in the task definition when the instance is created. This snapshot does not change when the task is updated.

ProjectIds

array

The DataWorks workspace IDs selected for workspace-scoped builds. The list is non-empty and deduplicated.

integer

The DataWorks workspace IDs selected for workspace-scoped builds. The list is non-empty and deduplicated.

12345

SourceIds

array

The IDs of the registered sources in the current knowledge base. The list is deduplicated. Whether this field is required and the allowed source types are determined by the task input scenario. Refer to the following table for details.

string

The IDs of the registered sources in the current knowledge base. The list is deduplicated. Whether this field is required and the allowed source types are determined by the task input scenario. Refer to the following table for details.

src-document-001

Entities

array<object>

The Data Map entities such as databases, schemas, and tables selected for data asset-scoped builds. The list is non-empty and deduplicated.

object

EntityId

string

The metadata entity ID returned by Data Map. The client passes this ID as is and does not concatenate database, schema, or table identifiers.

maxcompute-table:::project_name:schema_name:table_name

EntityType

string

The entity level, such as DATABASE, SCHEMA, or TABLE. The server validates this field based on the Data Map identity. The presence of an enum value does not guarantee that all engines support it.

TABLE

YamlUploadId

string

The YAML upload session ID in the current knowledge base used for SEMANTIC_MODEL import tasks. This ID is bound when the task is created and cannot be mixed with other input scopes.

upload-yaml-001

KnowledgeObjectIds

array

The knowledge object IDs required when building from document objects in the current knowledge base. The list must be non-empty and deduplicated. Each item is a KnowledgeObjectId with Type=DOCUMENT in the current knowledge base. Do not mix these IDs with SourceIds used for external connector synchronization scopes.

string

The knowledge object IDs required when building from document objects in the current knowledge base. The list must be non-empty and deduplicated. Each item is a KnowledgeObjectId with Type=DOCUMENT in the current knowledge base. Do not mix these IDs with SourceIds used for external connector synchronization scopes.

obj-document-001

DocumentSourceCount

integer

The number of external document sources selected for the current execution. This field is not returned when it is not applicable.

1

ResolvedEntities

array<object>

The actual Data Map entities resolved from the project, database, or schema scope for the current execution. This field is not returned when it is not applicable.

object

EntityId

string

The metadata entity ID returned by Data Map. The client passes this ID as is and does not concatenate database, schema, or table identifiers.

maxcompute-table:::project_name:schema_name:table_name

EntityType

string

The entity level, such as DATABASE, SCHEMA, or TABLE. The server validates this field based on the Data Map identity. The presence of an enum value does not guarantee that all engines support it.

TABLE

ResolvedEntityCount

integer

The total number of resolved entities. An accurate count can still be returned if the array is not returned due to its size.

42

ConfigSnapshot

object

The snapshot of the model, content locale, and runtime resources for the current execution. This snapshot does not change when the task is updated.

ProjectId

integer

The DataWorks workspace ID used for the current execution. This ID is frozen from the task definition when the instance is created.

67890

LlmModel

string

The specific model ID actually used and frozen for the current execution. The value AUTO is not returned. This field can be empty for tasks that do not call models, such as pure synchronization tasks.

model-001

ContentLocale

string

The content locale used for the current execution.

zh-CN

RuntimeResource

object

The resource group and Builder CUs actually used for the current execution.

ResourceGroupId

string

The DataWorks resource group ID used by the actual Builder nodes. The server validates that this resource group is available in the workspace corresponding to the top-level ProjectId of the task.

rg-001

Cu

integer

The Builder compute specifications. Valid values: 4 to 16. If this field is omitted during creation, the effective value is 4. The read operation returns the effective value.

4

Error

object

The error code and secure error message returned when the request fails.

Code

string

The business error code, which is used to determine the error type when the request fails.

InvalidParameter

Message

string

The secure error message returned when the request fails.

The request parameters are invalid

GeneratedModels

array<object>

Applies only to model imports. The confirmed ModelId and VersionNo. For the structure, refer to the Get instance documentation.

object

ModelId

string

The model ID generated by the semantic layer. You can use this ID as a KnowledgeObjectId to read the corresponding semantic model.

01MODELULID

VersionNo

integer

The current version of the SEMANTIC_MODEL being read. Pass this value when updating content. The version can be edited in place.

1

CreateTime

integer

The time when the instance was created.

1790200400000

StartedTime

integer

The time when the execution started. This field is optional.

1790200001000

FinishedTime

integer

The time when the execution finished. This field is optional.

1790200060000

Code

string

The business error code, which is used to determine the error type when the request fails.

InvalidParameter

Message

string

The secure error message returned when the request fails.

The request parameters are invalid

Examples

Success response

JSON format

{
  "RequestId": "00000000-0000-4000-8000-000000000001",
  "Success": false,
  "Data": {
    "TaskInstanceId": "20001",
    "TaskId": "10001",
    "KnowledgeBaseId": "12345678-1234-4234-8234-123456789abc",
    "TriggerType": "MANUAL",
    "Status": "RUNNING",
    "CurrentStage": "INITIALIZE",
    "InputSnapshot": {
      "SelectedInput": {
        "ProjectIds": [
          12345
        ],
        "SourceIds": [
          "src-document-001"
        ],
        "Entities": [
          {
            "EntityId": "maxcompute-table:::project_name:schema_name:table_name",
            "EntityType": "TABLE"
          }
        ],
        "YamlUploadId": "upload-yaml-001",
        "KnowledgeObjectIds": [
          "obj-document-001"
        ]
      },
      "DocumentSourceCount": 1,
      "ResolvedEntities": [
        {
          "EntityId": "maxcompute-table:::project_name:schema_name:table_name",
          "EntityType": "TABLE"
        }
      ],
      "ResolvedEntityCount": 42
    },
    "ConfigSnapshot": {
      "ProjectId": 67890,
      "LlmModel": "model-001",
      "ContentLocale": "zh-CN",
      "RuntimeResource": {
        "ResourceGroupId": "rg-001",
        "Cu": 4
      }
    },
    "Error": {
      "Code": "InvalidParameter",
      "Message": "The request parameters are invalid"
    },
    "GeneratedModels": [
      {
        "ModelId": "01MODELULID",
        "VersionNo": 1
      }
    ],
    "CreateTime": 1790200400000,
    "StartedTime": 1790200001000,
    "FinishedTime": 1790200060000
  },
  "Code": "InvalidParameter",
  "Message": "The request parameters are invalid"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter The request parameters are invalid.
500 InternalError The knowledge base operation failed. Use RequestId to contact support.
403 Forbidden You are not authorized to perform this operation.
404 ResourceNotFound The requested resource does not exist or is not visible.
409 Conflict The resource state conflicts with this operation.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.