Revierte un disco a un estado anterior mediante una instantánea de disco.
Descripción de la operación
Antes de invocar esta operación, lea Revertir un disco mediante instantáneas.
Al invocar esta operación, tenga en cuenta los siguientes puntos:
El disco debe estar en el estado En uso (
In_use) o Disponible (Available).La instancia a la que está adjunto el disco debe estar en el estado Detenido (
Stopped). Puede invocar StopInstances para detener una instancia.El parámetro SnapshotId especificado debe ser una instantánea histórica creada a partir del disco especificado por DiskId.
Cuando invoque DescribeInstances para consultar la información de la instancia de ECS, si la respuesta contiene
{"OperationLocks": {"LockReason" : "security"}}, se prohíben todas las operaciones sobre la instancia.
Pruébelo ahora
Test
Autorización de RAM
|
Action |
Nivel de acceso |
Tipo de recurso |
Clave de condición |
Acción dependiente |
|
ecs:ResetDisk |
update |
*Disk.
*Snapshot.
|
Ninguna | Ninguna |
Parámetros de la solicitud
|
Parámetro |
Tipo |
Obligatorio |
Descripción |
Ejemplo |
| DiskId |
string |
Sí |
El ID del disco que se va a revertir. |
d-bp199lyny9b3**** |
| SnapshotId |
string |
Sí |
El ID de la instantánea que se utilizará para revertir el disco. |
s-bp199lyny9b3**** |
| DryRun |
boolean |
No |
Especifica si se debe realizar una ejecución de prueba (dry run). Valores válidos:
Valor predeterminado: false. |
false |
Elementos de la respuesta
|
Elemento |
Tipo |
Descripción |
Ejemplo |
|
object |
|||
| RequestId |
string |
El ID de la solicitud. |
F3CD6886-D8D0-4FEE-B93E-1B732396**** |
Ejemplos
Respuesta exitosa
JSON Formato
{
"RequestId": "F3CD6886-D8D0-4FEE-B93E-1B732396****"
}
Códigos de error
|
Código de estado HTTP |
Código de error |
Mensaje de error |
Descripción |
|---|---|---|---|
| 400 | DiskCategory.OperationNotSupported | The operation is not supported to the specified disk due to its disk category. | El tipo de disco actual no admite esta operación. |
| 400 | InvalidRegionId.MalFormed | The specified RegionId is not valid. | |
| 400 | DryRunOperation | Request validation has been passed with DryRun flag set. | La verificación DryRun se completó correctamente. Su solicitud ha sido validada. |
| 400 | InternalError | The requested services is not available now. Please try again later. | Ocurrió un error interno. Inténtelo de nuevo. |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | IncorrectDiskStatus | The current disk status does not support this operation. | |
| 403 | IncorrectInstanceStatus | The current status of the resource does not support this operation. | |
| 403 | InstanceLockedForSecurity | The instance is locked due to security. | La instancia a la que está conectado el disco está bloqueada por motivos de seguridad. |
| 403 | InvalidParameter.Mismatch | The specified snapshot is not created from the specified disk. | |
| 403 | InvalidSnapshot.TooOld | The snapshot was created before 2013-07-15 and cannot be restored since the disk was first detached. | |
| 403 | InstanceExpiredOrInArrears | The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode). | |
| 403 | OperationDenied | The specified snapshot dees not support ResetDisk. | |
| 403 | InvalidSnapshotId.NotReady | The specified snapshot has not completed yet. | |
| 403 | InvalidAccountStatus.NotEnoughBalance | Your account does not have enough balance. | |
| 403 | InvalidAccountStatus.SnapshotServiceUnavailable | Snapshot service has not been opened yet. | El servicio de instantáneas no está activado. La operación no se puede realizar. |
| 403 | Operation.Conflict | The operation may conflict with others. Please retry later. | |
| 403 | UserNotInTheWhiteList | The user is not in disk white list. | El usuario no se encuentra en la lista blanca de Shared Block Storage. Envíe un ticket para solicitar el acceso a la lista blanca. |
| 403 | InvalidParameter.KMSKeyId.CMKUnauthorized | The CMK has not authorized the ECS service to perform the KMS TagResource and UntagResource operations. Please verify the authorization and try again. | |
| 403 | InvalidParameter.KMSKeyId.CMKNotEnabled | The CMK needs to be enabled. | |
| 403 | InvalidParameter.KMSKeyId.KMSUnauthorized | ECS service does not have permission to access your KMS key. Please verify that the specified KMS key has authorized the ECS service. | |
| 403 | IncorrectDiskStatus.HasUnfinishedSnapshot | The current disk has unfinished snapshot. | El disco especificado tiene instantáneas incompletas. |
| 403 | InvalidOperation.DiskResetInProgress | The operation cannot be performed because the disk has an ongoing reset task. Please try again later. | |
| 404 | InvalidParameter.KMSKeyId.NotFound | The specified KMSKeyId does not exist. Please verify that the key ID is correct and that the key resides in the current region. | |
| 404 | InvalidDiskId.NotFound | The specified disk does not exist. | El disco especificado no existe. Verifique si el ID del disco es correcto. |
| 404 | Disk.NotFound | The specified disk does not exist. | El disco especificado no existe. Verifique si el disco es correcto. |
| 404 | InvalidSnapshotId.NotFound | The specified SnapshotId does not exist. | |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | La instancia especificada no existe. Verifique si el ID de la instancia es correcto. |
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.