Reinicializa um disco ao seu estado inicial de quando foi criado.
Descrição da operação
Ao chamar esta operação, observe os seguintes itens:
O disco deve estar no estado Em Uso (
In_use), e a instância ECS à qual o disco está anexado deve estar no estado Parado (Stopped).Você não pode reinicializar um disco que está anexado a uma instância antes que a instância seja iniciada pela primeira vez.
Você não pode reinicializar um disco que possui snapshots locais.
Para um disco de sistema, o disco é reinicializado ao estado inicial da imagem. Se a imagem de origem usada para criar o disco tiver sido excluída, o disco não poderá ser reinicializado.
Para um disco de dados criado do zero, o disco é reinicializado como um disco vazio. Para um disco de dados criado a partir de um snapshot, o disco é reinicializado ao estado do snapshot. Se o snapshot de origem tiver sido excluído, o disco não poderá ser reinicializado e um erro será retornado.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
ecs:ReInitDisk |
update |
*Disk
|
|
Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| DiskId |
string |
Sim |
O ID do disco a ser reinicializado. |
d-bp67acfmxazb4ph**** |
| Password |
string |
Não |
Especifica se o nome de usuário e a senha da instância ECS devem ser redefinidos quando o disco de sistema for reinicializado. A senha deve ter de 8 a 30 caracteres e deve conter pelo menos três dos seguintes tipos de caracteres: letras maiúsculas, letras minúsculas, dígitos e caracteres especiais. Os seguintes caracteres especiais são suportados:
Para instâncias Windows, a senha não pode começar com uma barra (/). Nota
Se você especificar o parâmetro |
EcsV587! |
| KeyPairName |
string |
Não |
O nome do key pair. Nota
Este parâmetro é aplicável apenas a instâncias Linux. Quando o disco de sistema é reinicializado, você pode anexar um key pair SSH à instância ECS como credencial de logon. Após usar um key pair SSH, o método de logon por nome de usuário e senha é desativado. |
testKeyPairName |
| AutoStartInstance |
boolean |
Não |
Especifica se a instância deve ser iniciada automaticamente após o disco ser reinicializado. Valores válidos:
Valor padrão: false. |
true |
| SecurityEnhancementStrategy |
string |
Não |
Especifica se o serviço gratuito do Security Center deve ser usado após o disco de sistema ser reinicializado. Valores válidos:
Valor padrão: Deactive. |
Active |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
|||
| RequestId |
string |
O ID da solicitação. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
Exemplos
Resposta de sucesso
JSON formato
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 400 | LoginAsNonRoot.ImageNotSupport | The specified image does not support login as non-root. | The image does not support the logons of non-root users. |
| 400 | DiskHasSnapshotsWithInstantAccessEnabled.OperationNotSupported | The operation is not supported to the specified disk that have snapshots with InstantAccess enabled. | |
| 400 | InvalidPassword.Malformed | The specified parameter "Password" is not valid. | |
| 400 | InvalidKeyPairName.NotFound | The specified KeyPairName does not exist. | The specified KeyPairName parameter does not exist. |
| 400 | DependencyViolation.IoOptimize | The specified parameter InstanceId is not valid. | The I/O optimization configuration of the instance is invalid. |
| 400 | DiskCategory.OperationNotSupported | The operation is not supported to the specified disk due to its disk category. | The specified disk category does not support this operation. |
| 400 | InvalidRegionId.MalFormed | The specified RegionId is not valid. | |
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | An internal error has occurred. Try again later. |
| 403 | LoginAsNonRoot.RegionNotSupport | The specified region does not support login as non-root. | |
| 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. | The operation is not supported while the instance is locked for security reasons. |
| 403 | InvalidSnapshot.TooOld | The disk is created from a snapshotId made before 2013-07-15, it cannot be re-initiated the specified disk any more since the detached first time. | Snapshots created before July 15, 2013 do not support this operation. |
| 403 | OperationDenied | The snapshot which is used to create the specified disk has been deleted. | |
| 403 | InstanceExpiredOrInArrears | The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode). | |
| 403 | DiskCreatingSnapshot | The operation is denied due to a snapshot of the specified disk is not completed yet. | |
| 403 | SharedImageDeleted | The specified image by others shared is deleted. | |
| 403 | DependencyViolation.WindowsInstance | The instance creating is windows, cannot use ssh key pair to login. | |
| 403 | InvalidDisk.DiskFromClonedNotSupport | The specified disk %s is cloned from source disk %s, so not support reinit | |
| 403 | UserNotInTheWhiteList | The user is not in volume white list. | |
| 403 | InvalidParameter.KMSKeyId.CMKNotEnabled | The CMK needs to be enabled. | |
| 403 | InvalidParameter.KMSKeyId.KMSUnauthorized | ECS service have no right to access your KMS. | ECS is not authorized to access your KMS resources. |
| 403 | HibernationConfigured.InstanceOperationForbidden | The operation is not permitted due to limit of the hibernation configured instance. | The operation cannot be performed due to the limitations of instances for which the instance hibernation feature is enabled. |
| 403 | InvalidOperation.MultiAttachDisk | Multi attach disk does not support this operation. | Disks for which the multi-attach feature is enabled do not support the operation. |
| 403 | InvalidParameter.KMSKeyId.CMKUnauthorized | The CMK needs to be added ECS tag. | |
| 403 | InvalidSourceSnapshot | The source snapshot of the disk has been deleted and cannot support the current operation. | The source snapshot of the disk has been deleted and cannot support the current operation. |
| 403 | InvalidOperation.ReInitUnsupported | The specified disk does not support reInit. | The specified cloud disk does not support reinitialization. |
| 404 | InvalidDiskId.NotFound | The specified disk does not exist. | The specified disk does not exist. Check whether the disk ID is correct. |
| 404 | InvalidImageId.NotFound | The specified ImageId does not exist. | The specified image does not exist in this account. Check whether the image ID is correct. |
| 404 | InvalidDiskId.OperationNotSupported | The operation is not supported due to image not exist. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.