You can call this operation to delete a deployment environment.

Note You can only delete a deployment environment in the terminated state.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. You can use OpenAPI Explorer to search for APIs, call APIs, and dynamically generate SDK example code.

Request headers

This operation uses common request headers, instead of special request headers. For more information, see the "Common request headers" section in "Common request and response headers."

Request syntax

DELETE /pop/v1/wam/appEnv HTTP/1.1

Request parameters

Parameter Type Required? Example Description
EnvId String Yes we-5d39b8ba6786bd4b149*****

The ID of the deployment environment to be deleted.

Response parameters

Parameter Type Example Description
Code String OK

The response code. The value is OK if the request is successful.

Message String success

The response message. The value is success if the request is successful.

RequestId String 348C6C36-F98C-46A2-B14C-B280D84*****

The ID of the request.

Examples

Sample request


http://webplus.cn-hangzhou.aliyuncs.com/pop/v1/wam/appEnv?Id=we-5d22bc1a6f48e5478fd*****&<Common request parameters>

Sample success response

XML format

<DeleteAppEnvResponse>
      <Message>success</Message>
      <RequestId>348C6C36-F98C-46A2-B14C-B280D84*****</RequestId>
      <Code>OK</Code>
</DeleteAppEnvResponse>

JSON format

{
	"DeleteAppEnvResponse":{
		"Message":[
			"success"
		],
		"RequestId":[
			"348C6C36-F98C-46A2-B14C-B280D84*****"
		],
		"Code":[
			"OK"
		]
	}
}

Error codes

HTTP status code Error code Error message Description
403 ResourceAuthFailed The specified resource does not exist or it does not belong to this Alibaba Cloud account. The error message returned because the specified resource does not exist or it does not belong to your Alibaba Cloud account.
404 DeletingEnvNotExists Deleting environment failed. The specified environment does not exist. The error message returned because the deployment environment to be deleted does not exist.
403 DeleteEnvNotAllowed You cannot delete an environment when the environment is abandoning an update, performing a change, or when the status is not "terminated". The error message returned because an error occurred while deleting the specified deployment environment. You cannot delete the deployment environment if it is not in the terminated state and it is aborting an update or performing a change.

For more information about error codes, see API Error Center.