Substitui o sistema operacional de uma instância ECS substituindo o disco do sistema. Após a substituição, o ID do disco do sistema é alterado e o disco original é liberado.
Descrição da operação
Antes de chamar esta operação, leia Substituir um disco do sistema (alterar o sistema operacional).
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
ecs:ReplaceSystemDisk |
update |
Disk.
Image.
*Instance.
|
|
Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| InstanceId |
string |
Sim |
O ID da instância de destino. |
i-bp67acfmxazb4ph**** |
| ImageId |
string |
Não |
O ID da imagem a ser usada para redefinir o sistema. Este parâmetro é obrigatório. |
m-bp67acfmxazb4ph**** |
| SystemDisk.Size |
integer |
Não |
A capacidade do novo disco do sistema. Unidade: GiB. Valores válidos: |
80 |
| ClientToken |
string |
Não |
O token de cliente usado para garantir a idempotência da solicitação. Você pode usar o cliente para gerar o token, mas certifique-se de que o token seja exclusivo entre diferentes solicitações. O valor ClientToken pode conter apenas caracteres ASCII e não pode exceder 64 caracteres de comprimento. Para mais informações, consulte Como garantir a idempotência. |
123e4567-e89b-12d3-a456-426655440000 |
| UseAdditionalService |
boolean |
Não |
Especifica se deve usar a configuração do sistema da máquina virtual fornecida pelo Alibaba Cloud (Windows: NTP e KMS. Linux: NTP e YUM). |
true |
| Password |
string |
Não |
Especifica se deve redefinir o nome de usuário e a senha da instância ECS. A senha deve ter de 8 a 30 caracteres de comprimento 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: |
EcsV587! |
| PasswordInherit |
boolean |
Não |
Especifica se deve usar a senha predefinida da imagem. |
false |
| KeyPairName |
string |
Não |
O nome do par de chaves. |
testKeyPairName |
| DiskId |
string |
Não |
Nota
[Deprecated] Este parâmetro foi descontinuado. Para melhorar a compatibilidade, use |
d-bp67acfmxazb4ph**** |
| Platform |
string |
Não |
Nota
Este parâmetro foi descontinuado. |
CentOS |
| Architecture |
string |
Não |
Nota
Este parâmetro foi descontinuado. |
i386 |
| SecurityEnhancementStrategy |
string |
Não |
Especifica se deve usar o serviço gratuito Security Center após a substituição do disco do sistema. Valores válidos: |
Active |
| Encrypted |
boolean |
Não |
Especifica se deve criptografar o disco. Valores válidos: |
false |
| KMSKeyId |
string |
Não |
O ID da chave KMS do disco do sistema. |
e522b26d-abf6-4e0d-b5da-04b7******3c |
| EncryptAlgorithm |
string |
Não |
Nota
Este parâmetro não está disponível publicamente. |
hide |
| Arn |
array<object> |
Não |
Este parâmetro não está disponível publicamente. |
|
|
object |
Não |
|||
| RoleType |
string |
Não |
Nota
Este parâmetro não está disponível publicamente. |
null |
| Rolearn |
string |
Não |
Nota
Este parâmetro não está disponível publicamente. |
null |
| AssumeRoleFor |
integer |
Não |
Nota
Este parâmetro não está disponível publicamente. |
0 |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
|||
| DiskId |
string |
O ID do novo disco do sistema. |
d-bp67acfmxazb4ph**** |
| RequestId |
string |
O ID da solicitação. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
Exemplos
Resposta de sucesso
JSON formato
{
"DiskId": "d-bp67acfmxazb4ph****",
"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. | Esta imagem não suporta login sem privilégios de root. |
| 400 | InvalidSystemDiskSize.ValueNotSupported | The specified parameter SystemDisk.Size is invalid. | |
| 400 | InvalidParameter.Conflict | The specified image does not support the specified instance type. | A operação atual não permite que diskId e imageId sejam especificados simultaneamente. Certifique-se de que diskId ou imageId não esteja vazio. |
| 400 | InvalidSystemDiskSize.ImageNotSupportResize | The specified image does not support resize. | A imagem não suporta o tamanho de disco do sistema especificado. |
| 400 | InvalidSystemDiskSize | The specified parameter SystemDisk.Size is invalid. | |
| 400 | InvalidPassword.Malformed | The specified parameter "Password" is not valid. | O parâmetro Password especificado é inválido. |
| 400 | InvalidPasswordParam.Mismatch | The input password should be null when passwdInherit is true. | Quando PasswdInherit está ativado, o nome de usuário e a senha devem ser definidos como vazios. |
| 400 | OperationDenied | The specified image contains the snapshot of the data disk. This operation is not supported. | |
| 400 | InvalidDiskCategory.ValueNotSupported | The specified parameter "DiskCategory" is not valid. | O tipo de disco do recurso especificado não suporta esta operação. |
| 400 | InvalidKeyPairName.NotFound | The specified KeyPairName does not exist. | O par de chaves não existe. |
| 400 | DependencyViolation.IoOptimize | The specified parameter InstanceId is not valid. | A configuração de otimização de E/S da instância especificada é inválida. |
| 400 | MissingParameter.Architecture | Architecture should not be null. | O parâmetro Architecture não pode estar vazio. |
| 400 | InvalidArchitecture.Malformed | Architecture is not valid. | O parâmetro Architecture especificado é inválido. Verifique se o formato deste parâmetro está correto. |
| 400 | MissingParameter.Platform | Platform should not be null. | O parâmetro Platform não pode estar vazio. |
| 400 | InvalidPlatform.Malformed | Platform is not valid. | A plataforma especificada é inválida. |
| 400 | InvalidDiskId.NotFound | The specified disk do not exist. | O disco especificado não existe. |
| 400 | InvalidDatadisk.DiskStatusViolation | The operation is not permitted due to status of the Datadisk. | O status atual do disco de dados não oferece suporte a esta operação. |
| 400 | InvalidDatadisk.DiskCategoryViolation | The operation is not permitted due to category of the Datadisk. | O tipo de disco de dados não oferece suporte a esta operação. |
| 400 | InvalidDatadisk.ChargeTypeViolation | The operation is not permitted due to charge type of the Datadisk. | |
| 400 | MissingParameter | The input parameter "ImageId" that is mandatory for processing this request is not supplied. | |
| 400 | InvalidInstance.NotFoundSystemDisk | The specified instance has no system disk. | O disco de sistema da instância está ausente. |
| 400 | InvalidParameter.DiskType | The specified disk type which has kms key can't convert to system disk. | |
| 400 | DISK_IN_DEDICATED_BLOCK_STORAGE_CLUSTER | The disk in dedicated block storage cluster is not allowed to do this operation. | |
| 400 | IncorrectDiskStatus.ReplicationStatusNotFound | Disk replication status not found. | |
| 400 | IncorrectDiskStatus.InReplication | Disk already in replication. | |
| 400 | InvalidInstanceType.NotSupported | The specified instanceType is not supported by the image architecture. | A arquitetura de imagem especificada não suporta este tipo de instância. |
| 400 | InvalidRegionId.NotSupportReplaceEncryptedSystemDisk | The specified region not support replace encrypted system disk. | |
| 400 | InvalidStorageClusterId.CapacityNotEnough | The remaining capacity of the current dedicated storage cluster is less than the size of disk. | O cluster de armazenamento em bloco dedicado onde o disco reside não possui capacidade disponível suficiente. |
| 400 | QuotaExceed.DiskCapacity | The used capacity of disk type has exceeded the quota in the zone, %s. | A capacidade utilizada do tipo de disco especificado excedeu o limite de cota na zona ativa. Acesse o Centro de Cotas para consultar e solicitar um aumento da cota de capacidade de disco. |
| 400 | AccountForbidden.ProductCreationLimited | The commodity must be officially operated by Aliyun and in pay-as-you-go billing method. | Os clientes de migração para nuvem empresarial podem adquirir apenas instâncias ECS pay-as-you-go e não podem adquirir produtos de terceiros, como imagens fornecidas pelo Alibaba Cloud Marketplace. Verifique os parâmetros e tente novamente com parâmetros válidos. |
| 400 | InternalError | The requested services is not available now. Please try again later. | Ocorreu um erro ao enviar a solicitação. Tente novamente mais tarde. |
| 400 | InvalidDiskName.Malformed | The specified parameter "SyatemDisk.DiskName or DataDisk.n.DiskName" is not valid. | O nome do disco especificado no parâmetro DiskName é inválido. |
| 400 | InvalidParameter.Encrypted | Creating non-encrypted disks with encrypted snapshots is not supported. | Não há suporte para a criação de um disco não criptografado a partir de um snapshot criptografado. |
| 500 | OperationDenied | Internal Error. | |
| 500 | InternalError | The request processing has failed due to an internal error and you may retry later or contact support with the request ID. | |
| 403 | LoginAsNonRoot.RegionNotSupport | The specified region does not support login as non-root. | |
| 403 | InvalidSystemDiskStatus.IsTransfering | The current status of the resource does not support this operation. The system disk is transferring. | |
| 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. | A instância está bloqueada por motivos de segurança. Entre em contato com o suporte técnico de segurança. |
| 403 | ImageNotSubscribed | The specified image has not be subscribed. | |
| 403 | ImageRemovedInMarket | The specified marketplace image is not available. Or the specified user-defined image includes a product code because it is based on an image subscribed from the marketplace; and that marketplace image including the exact same product code has been removed. | |
| 403 | InstanceExpiredOrInArrears | The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode). | |
| 403 | ChargeTypeViolation | The operation is not permitted due to charge type of the instance. | |
| 403 | DiskCreatingSnapshot | The operation is denied due to a snapshot of the specified disk is not completed yet. | |
| 403 | IoOptimized.NotSupported | The specified image does not support IoOptimized instances. | |
| 403 | ImageNotSupportInstanceType | The specified image don not support the InstanceType instance. | |
| 403 | QuotaExceed.BuyImage | The specified image is from the image market. You have not bought it or your quota has been exceeded. | |
| 403 | INST_HAS_UNPAID_ORDER | The instance has unpaid order. | |
| 403 | OperationDenied.InstanceCreating | The specified instance is creating. | |
| 403 | DependencyViolation.WindowsInstance | The instance runs Windows and does not support SSH key pair login. | |
| 403 | InvalidParameter.NotMatch | %s | O tipo de instância especificado suporta apenas imagens específicas. Você pode chamar a operação DescribeImages para consultar as imagens disponíveis. |
| 403 | ResourcesNotInSameZone | The specified instance and disk are not in the same zone. | |
| 403 | OperationDenied.UnpaidOrder | The specified instance has unpaid order. | O ID da instância especificado possui um pedido não pago. Você pode fazer login no console ECS para concluir o pagamento. |
| 403 | InvalidHostname.MismatchImage | The hostname of the current instance can not be applied to the image you choose. | |
| 403 | HibernationConfigured.InstanceOperationForbidden | The operation is not permitted due to limit of the hibernation configured instance. | A operação não é permitida porque a instância não atende aos requisitos para ativar a opção de hibernação. |
| 403 | InvalidOperation.MultiAttachDisk | Multi attach disk does not support this operation. | Esta operação não é suportada para discos com o recurso multi-attach ativado. |
| 403 | InvalidRegionId.NotSupportEncryptAlgorithm | The current region does not support creating encrypted disks with EncryptAlgorithm. | |
| 403 | InvalidRegionId.NotExists | The region not exists. | |
| 403 | InvalidEncryptAlgorithm | The specified parameter EncryptAlgorithm is not valid. | |
| 403 | InvalidEncrypted.NotMatchKmsKeyId | The specified parameter Encrypted must be true when KmsKeyId is not empty. | |
| 403 | InvalidEncrypted.NotMatchEncryptAlgorithm | The specified parameter Encrypted must be true when EncryptAlgorithm is not empty. | |
| 403 | InvalidParameter.KmsNotEnabled | The specified operation need enable KMS. | |
| 403 | InvalidParameter.DataEncryptedKeyCreateFailed | Failed to create the KMS data encryption key. Please verify that the current KMS key has authorized the ECS service to use it. If the issue persists; contact KMS Technical Support. | |
| 403 | InvalidParameter.KMSKeyId.NotFound | The specified KMSKeyId does not exist. | |
| 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 | InvalidKMSKeyId.NotSymmetric | The specified parameter KmsKeyId must be symmetric. | |
| 403 | InvalidDiskId.NotSupportReplaceEncryptedSystemDisk | The specified diskId not support replace encrypted system disk. | |
| 403 | NotSupportSnapshotEncrypted.DiskCategory | The specified disk category does not support creating encrypted system disks or encrypted data disks from snapshots. Check the DiskCategory or Encrypted parameter; or check your account for default encryption settings. | |
| 403 | InvalidParameter.AllEmpty | The current operation does not allow both diskId and imageId to be empty. Make sure that either diskId or imageId is not empty. | password e keyPairName não podem estar vazios para esta operação. Certifique-se de que pelo menos um entre password ou keyPairName seja especificado. |
| 403 | InvalidParameter.Conflict | The current operation does not allow both diskId and imageId to be set. Make sure that either diskId or imageId is not empty. | A operação atual não permite que diskId e imageId sejam especificados simultaneamente. Certifique-se de que diskId ou imageId não esteja vazio. |
| 403 | OperationDenied | The current region does not support changing the image type. | O EIP especificado está indisponível ou não autorizado. |
| 403 | OperationDenied.ImageNotValid | The specified Image is disabled or deleted. Please check the status of the image. | |
| 403 | OperationDenied.DiskNoStock | The requested disk category is sold out in the specified zone. Please try a different disk category or another zone. | O tipo de disco solicitado está esgotado na zona especificada. Tente um tipo de disco diferente ou uma zona diferente. |
| 403 | InvalidParameter.KMSKeyId.CMKNotEnabled | The CMK (Customer Master Key) must be in an active state. | A chave mestra do cliente (CMK) deve estar no estado ativo. |
| 403 | InvalidParameter.KMSKeyId.CMKUnauthorized | The CMK(Customer Master Key) lacks authorization to add tags to the ECS service. | O ECS não tem permissão para criptografar ou descriptografar sua CMK. |
| 403 | InvalidEncrypted.NotMatchSnapshot | The specified parameter Encrypted must be set to true when creating disks with encrypted snapshots. | Ao criar um disco a partir de um snapshot criptografado, o parâmetro Encrypted deve ser definido como true. |
| 403 | InvalidEncrypted.NotMatchDiskDefaultEncryption | Enabling disk default encryption prevents the creation of non-encrypted disks. | Após a ativação da criptografia padrão de disco no nível da conta, não é possível criar discos não criptografados. |
| 403 | InvalidPayMethod.SyncPaymentNotSupport | Synchronous payment is not supported. Use another payment method. | O pagamento síncrono não é suportado. Selecione outro método de pagamento. |
| 403 | InvalidOperation.ImageSecureBootUnsupported | The image does not support secure boot. | A imagem não suporta Secure Boot. |
| 403 | InvalidDiskCategory.NotSupported | The disk category is not supported in the current zone. Please call DescribeAvailableResource to check supported categories. | |
| 403 | OperationDenied.KMSKeyUnauthorized | The operation is denied due to missing KMS key authorization. Please check the KMS key permissions and ensure the key is properly authorized for this operation. | |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | O ID da instância especificado é inválido. |
| 404 | InvalidImageId.NotFound | The specified ImageId does not exist. | A imagem especificada não foi encontrada. Certifique-se de que a imagem existe na região atual e seu status está disponível. |
| 404 | InvalidSystemDiskSize.MoreThanMaxSize | The specified SystemDisk.Size parameter exceeds the maximum size. | |
| 404 | InvalidSystemDiskSize.LessThanImageSize | The specified parameter SystemDisk.Size is less than the image size. | |
| 404 | InvalidSystemDiskSize.LessThanMinSize | The specified parameter SystemDisk.Size is less than the min size. | |
| 404 | NoSuchResource | The specified resource is not found. | O recurso especificado não existe. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.