API standards and multilingual preset SDKs
The OpenAPI of this product (pai-dsw/2022-01-01) uses the ROA signature style. We have encapsulated SDKs for common programming languages for developers. Developers can download the SDK to directly call this product's OpenAPI without worrying about technical details. If the existing SDK does not meet your needs, you can use the signature mechanism for self-signing integration. Since the details of self-signing are very complex, it may take around 5 business days. Therefore, we recommend joining our DingTalk service group (147535001692) and conducting signature integration under expert guidance.
Before using the API, you need to prepare your identity account and access key (AccessKey) to effectively access the API through client tools (such as SDK and CLI). For details, see Obtain an AccessKey.
Custom signature scenarios
If your business scenario has special requirements and you need to integrate the API through self-signing, we recommend consulting our technical support team first (DingTalk service group: 147535001692) to obtain professional guidance and ensure efficient integration.
Account and security preparation
Alibaba Cloud accounts have full administrative permissions over all resources. Once an AccessKey is compromised, all associated resources will be at risk of unauthorized access. To ensure security, it is recommended to create a RAM user with only API access permissions and configure its AccessKey, while configuring RAM policies based on the principle of least privilege (PoLP). Use the Alibaba Cloud account only in specific scenarios where Alibaba Cloud account permissions are explicitly required.
Instances
|
API |
Title |
Description |
| CreateInstance | Create an instance | Creates a DSW instance. |
| DeleteInstance | DeleteInstance | Deletes a specific instance. |
| UpdateInstance | Update instance | Updates the attributes of a DSW instance. |
| StartInstance | StartInstance | Starts a DSW instance. |
| StopInstance | StopInstance | Stops a DSW instance. |
| GetInstance | Query instance details | Queries the details of a DSW instance. |
| ListInstances | List instances | Queries a list of Data Science Workshop (DSW) instances. |
| GetInstanceEvents | GetInstanceEvents | Retrieves system events for a DSW instance. |
| UpdateInstanceLabels | UpdateInstanceLabels | Updates the tags of a Data Science Workshop (DSW) instance. If the tags do not exist, the system adds tags. |
| DeleteInstanceLabels | DeleteInstanceLabels | Delete tags from a Data Science Workshop (DSW) instance. |
| DeleteInstances | DeleteInstances | Deletes a batch of instances. |
| StopInstances | StopInstances | Stops a batch of instances. |
Lifecycle
|
API |
Title |
Description |
| GetLifecycle | GetLifecycle | Retrieves the lifecycle of an instance. |
Resource monitoring
|
API |
Title |
Description |
| GetInstanceMetrics | GetInstanceMetrics | Queries the resource metrics of an instance. |
Instance snapshots
|
API |
Title |
Description |
| CreateInstanceSnapshot | Create an instance snapshot | 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. |
Scheduled automatic shutdown
|
API |
Title |
Description |
| CreateInstanceShutdownTimer | CreateInstanceShutdownTimer | Creates a scheduled stop task for an instance. |
| DeleteInstanceShutdownTimer | DeleteInstanceShutdownTimer | Deletes a scheduled stop task of an instance. |
| GetInstanceShutdownTimer | GetInstanceShutdownTimer | Retrieves the details of a scheduled shutdown task for an instance. |
Automatic shutdown of idle instances
|
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. |
| DeleteIdleInstanceCuller | DeleteIdleInstanceCuller | Deletes the automatic stop policy of an instance. |
| GetIdleInstanceCuller | GetIdleInstanceCuller | Queries the information about an auto stop policy for a specific idle instance. |
ECS instance types
|
API |
Title |
Description |
| ListEcsSpecs | ListEcsSpecs | Query available ECS instance types with hardware specifications, pricing, and availability information for PAI-DSW notebooks. |
User configuration
|
API |
Title |
Description |
| GetUserConfig | GetUserConfig | You can call GetUserConfig to query user information. |
Others
|
API |
Title |
Description |
| CreateDiagnosis | Diagnose instance issues | Diagnoses instance issues. |
| GetToken | Retrieve temporary authentication information for an instance | Retrieves the temporary authentication information for a specified DSW instance. |
| GetMetrics | Retrieve metrics | Retrieves the metrics of an instance. |
| GetUserCommand | GetUserCommand | Retrieves a user-defined command. |
| CreateTempFile | CreateTempFile | Creates a temporary file. |
| UpdateTempFile | UpdateTempFile | Updates the properties of a temporary file. |
| DeleteTempFile | DeleteTempFile | Deletes a temporary file. |
| GetTempFile | GetTempFile | Gets the details of a temporary file. |
| ListTempFiles | ListTempFiles | List temporary files |
| DeleteTempFileTask | DeleteTempFileTask | Deletes a temporary file task. |
| UpdateTempFileTask | UpdateTempFileTask | Updates a temporary file task. |
| CreateTempFileTask | CreateTempFileTask | Creates a temporary file task. |
| GetTempFileTask | GetTempFileTask | Retrieves the details of a temporary file task. |
| QueryAutoShutdownPolicies | QueryAutoShutdownPolicies | Retrieves the auto shutdown policies for specified running instances. |
| DeleteTempFileTasks | DeleteTempFileTasks | Deletes one or more temporary file tasks. |
| 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. |
| CreateSanityCheckTask | Create sanity check task | Submits an asynchronous health check task for a specified DSW instance. You must provide the check type (such as ssh) and the instance ID. The system immediately returns a unique task ID (TaskID), indicating that the task has been successfully queued. This operation does not block while waiting for the check result, making it suitable for scenarios that require a fast response. You can use the task ID to query the execution status and detailed results later. |