Deleting a Real-Time Service Deployment Version
Function
This API is used to delete a real-time version of a specified service deployment. It is used when you need to clear versions that are no longer used or optimize resource management.
The request must contain a valid service ID, deployment ID, and version number. You must have the permission to manage the target service deployment, and the version must not be in the active state.
After the deletion, the specified version is removed from the real-time service deployment and related resources are released.
If the service ID and deployment ID are invalid, the version number does not exist, or the user does not have the permission, "400 Bad Request" or "403 Forbidden" is returned. If the version is active or has other dependencies, "400 Bad Request" is returned.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
modelarts:service:deleteDeploymentVersion
Read
service *
-
-
-
URI
DELETE /v2/{project_id}/services/{service_id}/deployments/{deployment_id}/versions/{version}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID. For details, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
| service_id | Yes | String | Definition Service ID, which can be obtained from the response body during service creation or by querying the services owned by the current user. The service_id field is the service ID. Constraints N/A Range N/A Default Value N/A |
| version | Yes | String | Definition Version number, which can be obtained by querying the version list. Constraints N/A Range N/A Default Value N/A |
| deployment_id | Yes | String | Definition Deployment ID, which you can obtain from the response body when adding the deployment or by obtaining service deployments. The deployment_id field indicates the deployment ID. Constraints N/A Range Deployment ID. Default Value N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | No | String | Definition User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. For details about how to obtain the token, see Obtaining a User Token Through Password Authentication. Constraints N/A Range N/A Default Value N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition Service deployment ID. Range N/A |
Example Requests
Delete a specific real-time service deployment version.
DELETE https://{end_point}/v2/{project_id}/services/{service_id}/deployments/{deployment_id}/versions/{version} Example Responses
Status code: 200
Information about the deleted deployment version.
{
"service_id" : "service_idxxxxxxxxxxxxxxxxxx",
"deployment_id" : "deployment_idxxxxxxxxxxxxxxx",
"version" : "1.0.0"
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Information about the deleted deployment version. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot