You can call this operation to terminate a deployment environment.

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

POST /pop/v1/wam/appEnv/terminate HTTP/1.1

Request parameters

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

The ID of the deployment environment.

DryRun String No true

Specifies whether to perform a dry run.

  • If this parameter is set to true, no change is created, but the steps for creating the deployment environment are returned. If this parameter is set to false, the deployment environment is created and the change ID is returned.
    • The default value is false.

Response parameters

Parameter Type Example Description
Code String OK

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

EnvChangeDetail

The change information about the deployment environment.

ChangeId String wc-5d3e71642977ca5251e*****

The ID of the change.

EnvId String we-5d39b8ba6786bd4b149*****

The ID of the deployment environment.

Operations

The list of change operations.

OperationDescription String Delete monitor group 78*****

The description of the change operation.

OperationType String destroy

The type of the change operation.

StartTime String 1564373348658

The start time of the change.

Message String success

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

RequestId String 393D5428-E693-4063-9C59-1D5393E*****

The ID of the request.

Examples

Sample request


http://webplus.cn-hangzhou.aliyuncs.com/pop/v1/wam/appEnv/terminate?ServiceCode=webx&<Common request parameters>

Sample success response

XML format

<TerminateAppEnvResponse>
    <Message>success</Message>
    <RequestId>1DCDA97A-5F5E-4DEC-85C7-9F2EE02*****</RequestId>
    <EnvChangeDetail>
        <Operations>
            <Operation>
                <OperationType>destroy</OperationType>
                <OperationDescription>Delete monitor group 78*****</OperationDescription>
            </Operation>
            <Operation>
                <OperationType>destroy</OperationType>
                <OperationDescription>Delete security group sg-wz97khuqdfkclpr*****</OperationDescription>
            </Operation>
            <Operation>
                <OperationType>destroy</OperationType>
                <OperationDescription>Delete scaling group on ESS</OperationDescription>
            </Operation>
            <Operation>
                <OperationType>destroy</OperationType>
                <OperationDescription>Unbind VSwitch(es) vsw-wz9gfawx1vxkimtj*****</OperationDescription>
            </Operation>
            <Operation>
                <OperationType>destroy</OperationType>
                <OperationDescription>Unbind VPC vpc-wz9e6y22o3o91nuy*****</OperationDescription>
            </Operation>
        </Operations>
    </EnvChangeDetail>
    <Code>OK</Code>
</TerminateAppEnvResponse>

JSON format

{
	"Message":"success",
	"RequestId":"393D5428-E693-4063-9C59-1D5393E*****",
	"EnvChangeDetail":{
		"Operations":{
			"Operation":[
				{
					"OperationType":"destroy",
					"OperationDescription":"Delete monitor group 78*****"
				},
				{
					"OperationType":"destroy",
					"OperationDescription":"Delete security group sg-wz97khuqdfkclpr*****"
				},
				{
					"OperationType":"destroy",
					"OperationDescription":"Delete scaling group on ESS"
				},
				{
					"OperationType":"destroy",
					"OperationDescription":"Unbind VSwitch(es) vsw-wz9gfawx1vxkimtj*****"
				},
				{
					"OperationType":"destroy",
					"OperationDescription":"Unbind VPC vpc-wz9e6y22o3o91nuy*****"
				}
			]
		}
	},
	"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.
403 StatusNotAllowedTerminated A terminate action cannot be performed on an environment that has already terminated. The error message returned because the deployment environment that you are attempting to terminate has been terminated.

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