All Products
Search
Document Center

Elastic Compute Service:ModifyInstanceAutoReleaseTime

Last Updated:Nov 18, 2024

Changes the automatic release time of a pay-as-you-go or preemptible Elastic Compute Service (ECS) instance or cancels the automatic release of the instance.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ecs:ModifyInstanceAutoReleaseTimeupdate
*Instance
acs:ecs:{#regionId}:{#accountId}:instance/{#instanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
InstanceIdstringYes

The ID of the instance.

i-bp1env7nl3mijm2t****
AutoReleaseTimestringNo

The automatic release time of the instance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.

  • If the value of seconds (ss) is not 00, the time is automatically rounded to the nearest minute based on the value of minutes (mm).
  • The release time must be at least 30 minutes later than the current time.
  • The release time must be at most three years later than the current time.

If AutoReleaseTime is not configured, the automatic release feature is disabled, and the instance will not be automatically released.

2018-01-01T01:02:03Z

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

Error codes

HTTP status codeError codeError messageDescription
400MissingParameterInstanceId should not be null.The InstanceId parameter is required.
400InvalidAutoReleaseTime.MalformedThe specified parameter autoReleaseTime is not valid.The specified automatic release time is invalid. Specify the time in UTC in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format.
400UnsupportedParameterThe parameters is unsupported.The specified parameter is invalid.
403ChargeTypeViolationThe operation is not permitted due to charge type of the instance.The operation is not supported while the instance is using the current billing method.
404NoSuchResourceThe specified resource is not found.The specified resource does not exist.
500InternalErrorThe request processing has failed due to some unknown error, exception or failure.An internal error has occurred. Try again later.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history