ModifyInstanceAttribute_云服务器 ECS_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

接口说明

被安全锁定的实例不支持调用该接口。更多信息,请参见资源安全锁定对调用 API 的影响

流控信息

请求速率为1000/60(s)。更多流控信息,请前往配额中心查看

授权信息

当前云产品暂无权限信息透出。

请求参数

字段名称字段详情
InstanceIdstring

实例 ID。

示例值:i-bp67acfmxazb4ph****参考取值来源:
    RunInstances
    StopInstances
    CreateInstance
    StartInstances
    RebootInstances
    DescribeInstances
    ModifyManagedInstance
    RenewReservedInstances
    AttachInstanceRamRole
    DetachInstanceRamRole
    DeregisterManagedInstance
    PurchaseReservedInstancesOffering
Passwordstring

实例的密码。支持长度为 8~30 个字符,必须同时包含大小写英文字母、数字和特殊符号中的三类字符。特殊符号可以是:()`~!@#$%^&*-_+=|{}[]:;'<>,.?/展开详情

示例值:Test123456&$
HostNamestring

操作系统的主机名。使用该参数时请注意:展开详情

示例值:testHostName
InstanceNamestring

实例名称。长度为 2~128 个英文或中文字符。必须以大小写字母或中文开头,不能以http://https://开头。可以包含数字、半角冒号(:)、下划线(_)或者短划线(-)。

示例值:testInstanceName参考取值来源:
    DescribeInstances
    ModifyManagedInstance
    DeregisterManagedInstance
Descriptionstring

实例描述。长度为 2~256 个英文或中文字符,不能以http://https://开头。

示例值:testInstanceDescription
UserDatastring

实例自定义数据,建议 Base64 编码后传入。使用该参数时请注意:展开详情

示例值:ZWNobyBoZWxsbyBlY3Mh参考取值来源:
    DescribeUserData
Recyclableboolean
说明 该参数正在邀测中,暂不开放使用。
示例值:true
CreditSpecificationstring

修改突发性能实例的运行模式。取值范围:展开详情

示例值:Standard
DeletionProtectionboolean

实例释放保护属性。指定是否支持通过控制台或 API( DeleteInstance )释放实例。展开详情

示例值:false
NetworkInterfaceQueueNumberinteger<int32>

主网卡队列数。使用该参数时请注意:展开详情

示例值:8取值 >= -1
SecurityGroupIdsarray<string>

实例重新加入的安全组 ID 数组。使用该参数时请注意:展开详情

示例值:sg-bp15ed6xe1yxeycg7o****子级条数 <= 51
RemoteConnectionOptionsobject
说明 该参数正在邀测中,暂不开放使用。
EnableJumboFrameboolean

实例 MTU 是否开启 Jumbo frame 通信模式,取值范围:展开详情

示例值:false
CpuOptions.Coreinteger<int32>

CPU 核心数。该参数不支持自定义设置,只能采用默认值。展开详情

示例值:2
CpuOptions.ThreadsPerCoreinteger<int32>

CPU 线程数。ECS 实例的 vCPU 数=CpuOptions.Core取值*CpuOptions.ThreadsPerCore取值。展开详情

示例值:2
CpuOptions.TopologyTypestring

实例的 Cpu 拓扑类型。取值范围:展开详情

示例值:DiscreteCoreToHTMapping
PrivateDnsNameOptionsobject

实例的私网域名配置信息集合。展开详情

返回参数

字段名称字段详情
RequestIdstring

请求 ID。

示例值:473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

返回示例

错误返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
InvalidInstanceName.Malformed
The specified parameter "InstanceName" is not valid.诊断
400
InvalidDescription.Malformed
The specified parameter "Description" is not valid.诊断
400
InvalidRemoteConnectionOptions.Password
The remote connection password is invalid.诊断
400
InvalidRemoteConnectionOptions.Type
The remote connection type is invalid.诊断
400
InstanceType.ValueNotSupported
The instance type not supported.诊断
400
OSType.ValueNotSupported
The OS type is not supported.诊断
400
InvalidHostPassword.Malformed
The specified parameter "Password" is not valid.诊断
400
InvalidHostName.Malformed
The specified parameter "HostName" is not valid.诊断
400
InvalidPassword.Malformed
The specified parameter "Password" is not valid.诊断
400
InvalidUserData.SizeExceeded
The specified parameter "UserData" exceeds the size.诊断
400
InvalidUserData.NotSupported
TThe specified parameter "UserData" only support the vpc and IoOptimized Instance.诊断
400
ImageNotSupportCloudInit
The specified image does not support cloud-init.诊断
400
ChargeTypeViolation
Pay-As-You-Go instances do not support this operation.诊断
400
InvalidParameter.RecycleBin
You do not have permission to set recyclable properties.诊断
400
InvalidParameter.CreditSpecification
The specified CreditSpecification is not supported in this region.诊断
400
InvalidInstanceStatus.CreditSpecRestricted
The current status of the resource does not support this operation.诊断
400
InvalidInstanceStatus.NotRunning
The current status of the resource is invalid, you can only do this operation when instance is running.诊断
400
InvalidNetworkType.NotSupported
The classic networkType does not support to modify security group诊断
400
InvalidOperation.EniCountExceeded
=The maximum number of eni in a enterprise security group is exceeded.诊断
400
JoinedGroupLimitExceed
%s诊断
400
InvalidParameter
The specified parameter is not valid.诊断
400
InvalidOperation.InvalidEcsState
%s诊断
400
InvalidParam.NotSupportJumboFrame
Not support jumbo frame.诊断
400
InvalidOperation.InstanceStatusNotSupport
The instance status is not support modify mtu config.诊断
400
InvalidOperation.InstanceStatusUnsupported
The specified instance status does not support modification of cpu topology type.诊断
400
InvalidParameter.CpuOptionsTopologyType
The specified parameter CpuOptions.TopologyType: %s is not valid.诊断
400
InvalidInstanceType.NotSupportCpuOptionsTopologyType
The specified instance type does not support CpuOptions.TopologyType: %s.诊断
400
InvalidAdditionalInfoPvdConfig.SizeExceeded
The specified parameter AdditionalInfo.PvdConfig exceeds the size.诊断
400
InvalidInstanceType.NotSupportHighDensityMode
The specified instance type does not support the use of the high density mode.诊断
400
InvalidStatus.StoppedRequired
The current state of the resource does not support this operation, it can only be operated in a stopped state.诊断
403
IncorrectInstanceStatus
The current status of the resource does not support this operation.诊断
403
InstanceLockedForSecurity
The specified operation is denied as your instance is locked for security reasons.诊断
403
OperationDenied
The instance amount in the specified SecurityGroup reach its limit.诊断
403
InvalidUserData.Forbidden
User not authorized to input the parameter "UserData"please apply for permission "UserData"诊断
403
InvalidUserData.Base64FormatInvalid
The specified UserData is not valid诊断
403
InvalidChargeType.ValueNotSupported
Deletion protection is only valid for postPaid instance, not for prePaid or spot instance.诊断
403
InvalidUser.Unauthorized
The user is not authorized诊断
403
EnterpriseGroupLimited.MutliGroupType
The specified instance can not join multi SecurityGroup types.诊断
403
SecurityGroupInstanceLimitExceed
%s诊断
403
InstanceNotInSecurityGroup
The instance not in the group.诊断
403
InvalidOperation.InvalidRegion
%s诊断
403
InvalidOperation.ResourceManagedByCloudProduct
%s诊断
403
InvalidParameter.InvalidEniQueueNumber
%s诊断
403
InvalidOperation.MaxEniQueueNumberExceeded
%s诊断
403
InvalidOperation.ExceedInstanceTypeQueueNumber
%s诊断
403
InvalidOperation.InstanceTypeNotSupportHighPerformanceTrafficMode
%s诊断
403
InvalidParameter.InvalidQueuePairNumber
%s诊断
403
InvalidOperation.MaxEniQueuePairNumberExceed
%s诊断
403
InvalidOperation.EniQueuePairNumberOverflow
%s诊断
403
AclLimitExceed
%s诊断
403
InvalidInstanceType.CpuOptionsThreadsPerCoreUnsupported
The current instance type does not support setting or modifying the CpuOptions.ThreadsPerCore parameter.诊断
403
InvalidParameter.CpuOptionsCore
The specified parameter CpuOptions.Core is not valid.诊断
403
InvalidParameter.CpuOptionsThreadsPerCore
The specified parameter CpuOptions.ThreadsPerCore is not valid.诊断
404
InvalidInstanceId.NotFound
The specified InstanceId does not exist.诊断
404
InvalidSecurityGroupId.NotFound
The specified SecurityGroupId does not exist.诊断
404
Credit.NotFound
The specified credit information does not exist.诊断
404
InvalidInstanceStatus.NeedRestart
The current status of the resource is invalid, you can only do this operation after instance is restarted.诊断
404
InvalidParameter.SecurityGroupIdRepeated
The specified security group ids has repeated.诊断
404
InvalidSecurityGroupType.NotSupportClassic
The specified SecurityGroupIds have classic group type.诊断
404
InvalidSecurityGroupVpc.NotBelongToOneVpc
The specified SecurityGroupIds are belong to different vpc.诊断
500
InternalError
The request processing has failed due to some unknown error.诊断

变更历史

变更时间变更内容概要操作
2024-12-25
变更错误码403
新增请求参数CpuOptions.Core
新增请求参数CpuOptions.ThreadsPerCore
2024-08-29
变更错误码400
2024-08-08
新增请求参数PrivateDnsNameOptions
2024-07-03
变更错误码403
变更请求参数SecurityGroupIds
2024-05-11
变更错误码400
  • 1
  • 2
  • 10 条/页

相关示例

批量删除 ECS 实例,可强制解除保护状态释放实例
2021-02-28
创建实例(RunInstances)
2022-03-01
2024年08月20日