最近更新时间:2023.07.07 10:54:52
首次发布时间:2022.04.01 11:40:15
调用 ReplaceSystemVolume 接口为一台ECS实例更换系统。
说明
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ReplaceSystemVolume | 要执行的操作,取值:ReplaceSystemVolume。 |
Version | String | 是 | 2020-04-01 | 接口的版本,取值:2020-04-01。 |
InstanceId | String | 是 | i-a8j6n1i4hojfqpa0**** | 实例ID。您可以调用DescribeInstances接口查询获取。 |
ImageId | String | 是 | image-38dfk6rfisf6kir6**** | 更换操作系统时使用的镜像ID。您可以调用DescribeImages接口查询获取。 |
Password | String | 否 | Password@123 | 重置密码,密码规则如下:
说明
|
KeyPairName | String | 否 | kp-test-123 | 重置密钥对。您可以调用DescribeKeyPairs接口查询获取。 说明
|
ClientToken | String | 否 | 333456899ff**** | 保证请求幂等性。由客户端自动生成一个参数值,确保不同请求间该参数值唯一,避免当调用API超时或服务器内部错误时,客户端多次重试导致重复性操作。取值:
|
KeepImageCredential | Boolean | 否 | false | 使用镜像预设密码/密钥对登录实例。取值:
说明
|
DryRun | Boolean | 否 | false | 是否只预检此次请求。取值:
|
操作接口仅返回公共参数及错误码。
GET /?Action=ReplaceSystemVolume&Version=2020-04-01&InstanceId=i-a8j6n1i4hojfqpa0****&ImageId=image-38dfk6rfisf6kir6****&Password=Password@123 HTTP/1.1 Host: open.volcengineapi.com Region: cn-beijing Service: ecs
{ "ResponseMetadata": { "RequestId": "2021062415303301022514515207C4****", "Action": "ReplaceSystemVolume", "Version": "2020-04-01", "Service": "ecs", "Region": "cn-beijing" }, "Result": {} }
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | MissingParameter.InstanceId | The required parameter InstanceId is not supplied. | 实例ID不能为空。 |
400 | MissingParameter.PasswordAndKeyPair | The required parameter PasswordAndKeyPair is not supplied. | 密码与密钥对不允许同时为空。 |
400 | InvalidInstanceStatus | The status of the specified instance does not support this request. | 当前实例的状态不支持此操作。 |
400 | MissingParameter.ImageId | The required parameter ImageId is not supplied. | 镜像ID不能为空。 |
400 | InvalidKeyPairForWindows.Unsupported | The OSType of this specified instance is Windows, which does not support key pairs. | 指定的实例是Windows操作系统,不支持密钥对。 |
400 | InvalidPassword.Malformed | The specified password is malformed. | 指定的密码格式不合法。 |
400 | InvalidClientToken.Malformed | The specified ClientToken is malformed. | 指定的ClientToken不合法。 |
400 | IdempotentParameterMismatch | The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical. | 幂等参数不一致。 |
400 | InvalidArgument | The specified argument is invalid. | 指定的参数不合法。 |
400 | InvalidVolumeStatus | The status of the specified volume does not support this request. | 当前实例系统盘状态不支持此操作。 |
400 | MissingParameter.VolumeType | The required parameter VolumeType is not supplied. | 云盘类型不能为空。 |
400 | LimitExceeded.SystemVolumeSize | The specified system volume size exceeds the limit. | 指定的系统盘大小(GiB)超出限制。 |
404 | InvalidImage.NotFound | The specified image does not exist. | 指定的镜像不存在。 |
404 | InvalidKeyPair.NotFound | The specified KeyPair does not exist. | 指定的密钥对不存在。 |
404 | InvalidInstance.NotFound | The specified instance does not exist. | 指定的实例不存在。 |
412 | InvalidInstance.Expired | The specified instance has expired. | 实例已过期。 |
412 | IdempotentProcessing | The request uses the same client token as a previous one that is still in process. | 先前的幂等请求仍在处理中,请稍后重试。 |
412 | InvalidImage.InstanceTypeMismatch | The specified image and instance type do not match. | 指定的镜像不支持指定的实例规格。 |
412 | InvalidVolumeType.ImageMismatch | The specified VolumeType and Image do not match. | 指定的云盘类型和镜像不匹配。 |
412 | InvalidVolumeSize.ImageSizeMismatch | The specified system disk size is smaller than the image file size. | 指定系统盘容量小于镜像文件大小。 |
412 | OperationDenied.ResourceLocked | The specified operation is denied as your resource is locked for another operation. | 指定的操作被拒绝,因为您的资源已被其他操作锁定。 |
412 | OperationDenied.InstanceIsCreatingImage | The specified operation is denied as your instance is creating image. | 指定的操作被拒绝,因为您的实例正在创建镜像。 |
412 | OperationDenied.ResourceCreatedByOtherService | The specified operation is denied as your resource is created by other service. You can check system tags to find the service. | 指定的操作被拒绝,因为您的资源被其他服务创建,请前往对应服务的控制台操作。 |
412 | InvalidImageId.KeepImageCredentialMismatch | The specified ImageId and KeepImageCredential do not match. | 指定的ImageId和KeepImageCredential不匹配。 |
412 | InvalidKeyPairName.KeepImageCredentialMismatch | The specified KeyPairName and KeepImageCredential do not match. | 指定的KeyPairName和KeepImageCredential不匹配。 |
412 | InvalidPassword.KeepImageCredentialMismatch | The specified Password and KeepImageCredential do not match. | 指定的Password和KeepImageCredential不匹配。 |
412 | DryRunOperation | Your request has been validated by the DryRunOperation. | 通过“DryRun”校验,您的请求已通过验证。 |
412 | InvalidImage.HostnameMismatch | The hostname of the current instance can not be applied to the image you choose. | 实例的主机名不适用于您选择的镜像。 |
500 | InternalError | An internal error has occurred. | 内部错误,请重试。如果多次尝试失败,请提交工单。 |