Renueva una o más instancias reservadas. Al renovar las instancias reservadas, puede especificar un periodo de validez (periodo de renovación) y si se debe habilitar la renovación automática para dichas instancias.
Descripción de la operación
Antes de llamar a esta operación, asegúrese de estar familiarizado con la facturación y los precios de las instancias reservadas.
-
Puede renovar manualmente las instancias reservadas o habilitar la renovación automática para ellas. Para obtener más información, consulte la sección Renovación del tema "Instancias reservadas".
-
Puede llamar a la operación DescribeReservedInstances para consultar las instancias reservadas que ha adquirido.
-
Puede llamar a esta operación para habilitar la renovación automática de las instancias reservadas, pero no puede usarla para deshabilitarla. Para deshabilitar la renovación automática de una instancia reservada, llame a la operación ModifyReservedInstanceAutoRenewAttribute.
Pruébelo ahora
Test
Autorización de RAM
|
Action |
Nivel de acceso |
Tipo de recurso |
Clave de condición |
Acción dependiente |
|
ecs:RenewReservedInstances |
create |
*ReservedInstance
|
Ninguna | Ninguna |
Parámetros de la solicitud
|
Parámetro |
Tipo |
Obligatorio |
Descripción |
Ejemplo |
| ReservedInstanceId |
array |
No |
Los ID de las instancias reservadas. |
|
|
string |
No |
El ID de la instancia reservada. Puede llamar a la operación DescribeReservedInstances para consultar los ID de las instancias reservadas que ha adquirido. Puede especificar hasta 10 ID de instancias reservadas en una sola solicitud. |
ecsri-2ze53qonjqxg7r**** |
|
| RegionId |
string |
No |
El ID de la región de la instancia reservada. Puede llamar a la operación DescribeRegions para consultar la lista de regiones más reciente. |
cn-hangzhou |
| Period |
integer |
No |
El periodo de validez de la instancia reservada. Valores válidos: 1 y 3. Valor predeterminado: 1. |
1 |
| PeriodUnit |
string |
No |
La unidad del periodo de validez de la instancia reservada. Establezca el valor en Year. |
Year |
| ClientToken |
string |
No |
El token de cliente que se utiliza para garantizar la idempotencia de la solicitud. Puede utilizar el cliente para generar el token, pero debe asegurarse de que sea único entre diferentes solicitudes. El token solo puede contener caracteres ASCII y no puede superar los 64 caracteres de longitud. Para obtener más información, consulte Cómo garantizar la idempotencia. |
123e4567-e89b-12d3-a456-426655440000 |
| AutoRenew |
boolean |
No |
Especifica si se debe habilitar la renovación automática para la instancia reservada. Valores válidos:
Valor predeterminado: false. |
true |
| AutoRenewPeriod |
integer |
No |
La duración de la renovación automática. Unidad: meses. Este parámetro solo surte efecto cuando AutoRenew se establece en true. Valores válidos: 12 y 36. Valor predeterminado: 12. |
1 |
Elementos de la respuesta
|
Elemento |
Tipo |
Descripción |
Ejemplo |
|
object |
|||
| RequestId |
string |
El ID de la solicitud. |
8C314443-AF0D-4766-9562-C83B7F1**** |
| ReservedInstanceIdSets |
object |
||
| ReservedInstanceId |
array |
Los ID de las instancias reservadas. |
|
|
string |
El ID de la instancia reservada. |
ecsri-2ze53qonjqxg7r**** |
|
| OrderId |
string |
El ID del pedido. |
2023912123**** |
Ejemplos
Respuesta exitosa
JSON Formato
{
"RequestId": "8C314443-AF0D-4766-9562-C83B7F1****",
"ReservedInstanceIdSets": {
"ReservedInstanceId": [
"ecsri-2ze53qonjqxg7r****"
]
},
"OrderId": "2023912123****"
}
Códigos de error
|
Código de estado HTTP |
Código de error |
Mensaje de error |
Descripción |
|---|---|---|---|
| 400 | InvalidInstanceType.ValueUnauthorized | The specified InstanceType is not authorized. | |
| 400 | InvalidParameter.Conflict | The specified region and cluster do not match. | The specified region and cluster do not correspond to each other. |
| 400 | InvalidTagKey.Malformed | The specified Tag.n.Key is not valid. | The specified Tag.N.Key parameter is invalid. |
| 400 | InvalidPeriodUnit.ValueNotSupported | The specified parameter PeriodUnit is not valid. | The specified PeriodUnit parameter is invalid. |
| 400 | InvalidTagValue.Malformed | The specified Tag.n.Value is not valid. | The specified tag value is invalid. |
| 400 | InvalidChargeType.ValueNotSupported | ChargeType is not valid. | |
| 400 | OperationDenied | The specified InstanceType or Zone is not authorized for current user. | |
| 400 | InvalidPeriod | The specified Period or PeriodUnit is not correct. | |
| 400 | MissingParameter.ReservedInstanceIds | The specified ReservedInstanceIds does not exist. | |
| 400 | InvalidParameter.PeriodUnit | The specified PeriodUnit is invalid. | The specified PeriodUnit is invalid |
| 400 | InvalidParameter.Period | The specified Period is invalid. | |
| 400 | InvalidParameter.ReservedInstanceIds | The specified ReservedInstanceIds is invalid. | |
| 400 | InvalidPeriod.ExceededMaximumExpiration | The specified renewal period cannot exceed the maximum expiration date. We recommend you try shortening the renewal period at next attempt. | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | OperationDenied.NoStock | The requested resource is sold out in the specified zone; try other types of resources or other regions and zones. | The requested resources are insufficient. |
| 403 | OperationDenied | Sales of this resource are temporarily suspended in the specified region; please try again later. | The requested resource is unavailable in the specified region. Try again later. |
| 403 | NodeControllerUnavailable | The Node Controller is temporarily unavailable. | |
| 403 | InvalidParameter.ResourceOwnerAccount | ResourceOwnerAccount is Invalid. | The specified ResourceOwnerAccount parameter is invalid. |
| 403 | Zone.NotOpen | The specified zone is not granted to you to buy resources yet. | |
| 403 | Zone.NotOnSale | The specified zone is not available for purchase. | The requested resources are unavailable in the specified zone. Try a different instance type or select a different region or zone. |
| 403 | Account.Arrearage | Your account has been in arrears. | |
| 403 | InvalidReservedInstanceName.Malformed | The specified parameter ReservedInstanceName is invalid. | |
| 403 | InvalidParameter.Scope | The specified parameter 'Scope' is invalid. | |
| 403 | InvalidReservedInstanceStatus.ValueNotSupported | ReservedInstance status is not supported. | |
| 403 | InvalidReservedInstanceOfferingType.ValueNotSupported | The OfferingType is not supported. | |
| 403 | InvalidReservedInstanceOfferingClass.ValueNotSupported | The OfferingClass is not supported. | |
| 403 | MissingParameter.ZoneId | The specified zoneId should be not empty. | |
| 403 | MissingParameter.InstanceType | The instanceType should be not empty. | |
| 403 | MissingParameter.ReservedInstanceId | The ids of reservedInstance can not be empty. | |
| 403 | MissingParameter.ReservedInstanceConfiguration | The configurations of reservedInstance can not be empty. | |
| 403 | InvalidParameter.SplitOrMerge | The Many-to-many of modification is not supported. | |
| 403 | MissingParameter.InstanceTypeAndAmountBothEmpty | The instanceType and amount can not be both empty. | |
| 403 | InvalidReservedInstancePlatform.ValueNotSupported | The Platform is not supported. | |
| 403 | InvalidParameter.ReservedInstanceName | The reservedInstanceName is invalid. | reservedInstanceName field value is illegal |
| 403 | InvalidReservedInstanceZone.ValueNotSupported | The zoneId is not exist. | |
| 403 | InvalidParameter.ValueNotSupported | The instanceTypeFamily of the instance to be changed must be consistent. | |
| 403 | IncorrectInstanceStatus | The status of specified reservedInstance must be active. | The operation is not allowed because the instance status does not support it. |
| 403 | InvalidPlatform.ValueNotSupported | The platform of reservedInstance is invalid. | |
| 403 | InvalidScope.ValueNotSupported | The scope of reservedInstance is invalid, The valid value is Zone or Region. | |
| 403 | InvalidConfiguration.ValueNotSupported | The modification Configuration should not be empty. | |
| 403 | InvalidZoneId.ValueNotSupported | The specified zoneId should be same. | |
| 403 | InvalidParameter | The parameter is invalid.Please check it. | |
| 403 | InvalidInstanceAmount.ValueNotSupported | The instanceAmount is invalid. | |
| 403 | OperationDenied.OnlyModifyName | It is not allowed to modify the ReservedInstanceName only. | The reserved instance name cannot be separately modified. |
| 403 | InvalidReservedInstanceId.NotFound | The specified parameter ReservedInstanceId is invalid. | |
| 403 | ChargeTypeViolation | The operation is not permitted due to charge type of the instance. | |
| 404 | InvalidZoneId.NotFound | The ZoneId provided does not exist in our records. |
Consulte Códigos de error para ver la lista completa.
Notas de la versión
Consulte Notas de la versión para ver la lista completa.