For the complete documentation index, see llms.txt. This page is also available as Markdown.

TerminateInstance

1. API Description

This API (TerminateInstance) is used to return an instance.

Note

  • Use this API to return an instance that is no longer required. A pay-as-you-go instance will stop billing after it is returns.

  • Calling this API on a subscription instance will cancel the subscription and the instance will be automatically returned after the subscription expires.

  • When this API is called, the instance will be moved to the recycle bin and be released in 24 hours if there are no other operations. You can also call ReleaseInstances to release the instance.

  • Operations on instances in recycle bin or in stalling status are not supported.

  • Operations on instances in CREATE_FAILED status will delete the instance directly. For prepaid instances, all payment amounts will be refunded.

2. Input Parameters

The following request parameter list only provides API request parameters.

Parameter Name
Required
Type
Description

instanceId

Yes

String

Instance ID.

To obtain the instance ID, you can call DescribeInstances and look for instanceId in the response.

3. Output Parameters

Parameter Name
Type
Description

requestId

String

The unique request ID, which is returned for each request.

RequestId is required for locating a problem.

4. Code Example

Return an instance with the ID: instanceId

5. Developer Resources

Zenlayer Cloud API 2.0 integrates SDKs,to make it easier for you to call APIs. More programming languages will be supported.

6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

HTTP Status Code
Error Code
Description

403

OPERATION_DENIED_INSTANCE_SUBSCRIPTION

Instances with subscription pricing model do not support this operation.

403

OPERATION_DENIED_INSTANCE_RECYCLED

The instance is in the recycle bin.

403

OPERATION_DENIED_INSTANCE_STATUS_INSTALLING

This operation is not supported for instances that are being installed.

403

OPERATION_DENIED_INSTANCE_CREATING

Instances that are being created do not support this operation.

404

INVALID_INSTANCE_NOT_FOUND

Instance does not exist.

Last updated