API standard and pre-built SDKs in multi-language
The OpenAPI specification of this product (pai-dsw/2022-01-01) follows the ROA standard. Alibaba Cloud provides pre-built SDKs for popular programming languages to abstract low-level complexities such as request signing. This enables developers to call APIs using language-specific syntax without dealing with HTTP details directly.
Custom signature
If your specific needs, such as a customized signature, are not supported by the SDK, manually sign requests using the signature mechanism. Note that manual signing requires significant effort (usually about 5 business days). For support, join our DingTalk group (ID: 147535001692).
Before you begin
An Alibaba Cloud account has full administrative privileges. A compromised AccessKey pair exposes all associated resources to unauthorized access, posing a significant security risk. To call APIs securely, create a Resource Access Management (RAM) user with API access only, configure its AccessKey pairs, and implement the principle of least privilege (PoLP) through RAM policies. Use the Alibaba Cloud account only when its permissions are explicitly required for specific scenarios.
Examples
|
API |
Title |
Description |
| CreateInstance | CreateInstance | Creates a DSW instance. |
| UpdateInstance | UpdateInstance | Updates the properties of a DSW instance. |
| StartInstance | StartInstance | Starts a DSW instance. |
| StopInstance | StopInstance | Stops a DSW instance. |
| GetInstance | GetInstance | Retrieves the details of a DSW instance. |
| ListInstances | ListInstances | Queries a list of Distribution Switch (DSW) instances. |
| DeleteInstances | DeleteInstances | Deletes a batch of instances. |
| StopInstances | StopInstances | Stops a batch of instances. |
Life Cycle
|
API |
Title |
Description |
| GetLifecycle | GetLifecycle | Retrieves the lifecycle of an instance. |
Instance Snapshot
|
API |
Title |
Description |
| CreateInstanceSnapshot | CreateInstanceSnapshot | Creates an instance snapshot. |
| DeleteInstanceSnapshot | DeleteInstanceSnapshot | Deletes an instance snapshot. |
| GetInstanceSnapshot | GetInstanceSnapshot | Call the GetInstanceSnapshot operation to retrieve an instance snapshot. |
| ListInstanceSnapshot | ListInstanceSnapshot | Lists instance snapshots. |
Statistics
|
API |
Title |
Description |
| GetResourceGroupStatistics | GetResourceGroupStatistics | A resource group provides a set of dedicated machine resources for Platform for AI (PAI). These resources run your PAI computing tasks and Data Science Workshop (DSW) instances. This operation retrieves statistics about the current and historical statuses of DSW instances in a specified resource group, such as the number of succeeded, failed, and stopped instances. These statistics help you understand your task history and optimize resource usage. |
| ListInstanceStatistics | ListInstanceStatistics | Retrieves statistics information for instances. |
Instance timing automatic shutdown
|
API |
Title |
Description |
| GetInstanceShutdownTimer | GetInstanceShutdownTimer | Retrieves the details of a scheduled shutdown task for an instance. |
User Configuration
|
API |
Title |
Description |
| GetUserConfig | GetUserConfig | You can call GetUserConfig to query user information. |
Other
|
API |
Title |
Description |
| CreateDiagnosis | CreateDiagnosis | Diagnoses problems for an instance. |
| GetMetrics | GetMetrics | Retrieves the metrics for an instance. |
| GetUserCommand | GetUserCommand | Retrieves a user-defined command. |
| ListSystemLogs | ListSystemLogs | Retrieves system logs. This API is deprecated and should not be used. |
Others
|
API |
Title |
Description |
| CreateIdleInstanceCuller | CreateIdleInstanceCuller | Creates an automatic stop policy for a specific Data Science Workshop (DSW) instance. When the conditions are met, the instance is automatically stopped. You can create only one automatic stop policy for an idle DSW instance. If the specific instance has an automatic stop policy, call DeleteIdleInstanceCuller to delete it first. |
| CreateInstanceShutdownTimer | CreateInstanceShutdownTimer | Creates a scheduled stop task for an instance. |
| CreateSanityCheckTask | CreateSanityCheckTask | Submits an asynchronous health check task for a specified DSW instance. When you call this operation, you must provide the check type, such as ssh, and the instance ID. The system immediately returns a unique task ID (TaskID) to indicate that the task is successfully queued. The operation is non-blocking and does not wait for the check result, which makes it suitable for scenarios that require a fast response. You can later use the task ID to query the execution status and detailed results. |
| DeleteIdleInstanceCuller | DeleteIdleInstanceCuller | Deletes the automatic stop policy of an instance. |
| DeleteInstance | DeleteInstance | Deletes a specific instance. |
| DeleteInstanceLabels | DeleteInstanceLabels | Delete tags from a Data Science Workshop (DSW) instance. |
| DeleteInstanceShutdownTimer | DeleteInstanceShutdownTimer | Deletes a scheduled stop task of an instance. |
| GetIdleInstanceCuller | GetIdleInstanceCuller | Queries the information about an auto stop policy for a specific idle instance. |
| GetInstanceEvents | GetInstanceEvents | Retrieves the system events of a DSW instance. |
| GetInstanceMetrics | GetInstanceMetrics | Queries the resource metrics of an instance. |
| GetSanityCheckTask | GetSanityCheckTask | Queries the status and results of a health check task. You can provide the task ID and check type to retrieve the task's progress, such as Pending, Executing, Completed, or Failed. The operation also returns the start and end times and a list of found issues. If you set verbose=true in the request, detailed analysis results for each checkpoint are returned. These details include the checkpoint name, description, result, and failure reason to help you diagnose problems. |
| GetToken | GetToken | Retrieves the temporary authentication information for a specified DSW instance. |
| ListEcsSpecs | ListEcsSpecs | Retrieves a list of ECS instance types. |
| UpdateInstanceLabels | UpdateInstanceLabels | Updates the tags of a Data Science Workshop (DSW) instance. If the tags do not exist, the system adds tags. |