Permanently deletes a specified category.
Operation description
- RAM users (sub-accounts) must first obtain the API permissions for Alibaba Cloud Model Studio (requiring AliyunBailianDataFullAccess, which includes the sfm:DeleteCategory permission point) and join a workspace before they can call this operation. Alibaba Cloud accounts (primary accounts) can call this operation directly without authorization. We recommend that you call this operation by using the latest version of the Alibaba Cloud Model Studio SDK.
- This operation is idempotent.
Debug
You can directly run this operation in OpenAPI Explorer, saving you the trouble of calculating signatures. After the operation runs successfully, OpenAPI Explorer can automatically generate SDK code examples.
Try it now
RAM authorization
The following table describes the authorization information of the operation. You can use it in the Action element of a RAM policy statement to grant RAM users or RAM roles the permission to call this operation. Details are as follows:
- Action: the specific permission point.
- Access level: the access level of each operation. Valid values: write (Write), read (Read), and list (List).
-
Resource type: the resource types that support authorization for the operation. Details are as follows:
- Required resource types are marked with a preceding asterisk (*).
- For operations that do not support resource-level authorization,
All resourcesis used.
- Condition key: the condition keys defined by the cloud service itself.
- Dependent action: other permissions required to successfully perform the operation. The caller must have the permissions of all dependent actions for the operation to succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| sfm:DeleteCategory | delete | *All resources * |
| None |
Request syntax
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| CategoryId | string | Yes | The category ID, which is the | cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx |
| WorkspaceId | string | Yes | The ID of the workspace to which the category belongs. For information about how to obtain the workspace ID, see How to use a workspace. | llm-3shx2gu255oqxxxx |
Response elements
| Element | Type | Description | Example |
|---|---|---|---|
| object | Schema of Response | ||
| RequestId | string | The request ID. | 17204B98-xxxx-4F9A-8464-2446A84821CA |
| Data | object | The business data field of the operation. | |
| CategoryId | string | The ID of the deleted category. | cate_cdd11b1b79a74e8bbd675c356a91ee3xxxxxxxx |
| Status | string | The status code returned by the operation. | 200 |
| Success | boolean | Indicates whether the operation is called successfully:
| true |
| Message | string | The error message. | workspace id is null or invalid. |
| Code | string | The error status code. | success |
Examples
Success response
JSON format