文档

ModifyInstanceAttachmentAttributes - 修改实例的私有池的属性

更新时间:

调用ModifyInstanceAttachmentAttributes修改实例的私有池的属性。

接口说明

私有池是弹性保障服务或容量预定服务在创建后生成的,关联了与私有池匹配的实例信息。您可以在创建实例时设置是否使用私有池启动,实例将会与弹性保障服务或容量预定服务进行匹配。

  • 调用该接口修改实例的私有池的属性后,实例不需要重启。
  • 当您调用以下接口时,系统会重新匹配实例的私有池。如果实例已匹配了指定的私有池,可能因私有池容量已用完或私有池失效等原因造成调用失败的问题。如果出现调用失败的问题,请先调用 ModifyInstanceAttachmentAttributes 接口将私有池的匹配模式修改为Open
    • StartInstance 重启启用节省停机模式的实例
    • ReActivateInstances
    • ModifyInstanceChargeType
    • ModifyPrepayInstanceSpec
    • ReplaceSystemDisk

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
ecs:ModifyInstanceAttachmentAttributesWrite
  • Instance
    acs:ecs:{#regionId}:{#accountId}:instance/*

请求参数

名称类型必填描述示例值
RegionIdstring

私有池所属的地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。

cn-hangzhou
InstanceIdstring

需要修改私有池匹配属性的实例 ID。

i-bp67acfmxazb4****
PrivatePoolOptions.MatchCriteriastring

修改实例的私有池匹配模式。取值范围:

  • Open:开放模式。该模式下系统自动为实例匹配开放的私有池。
  • Target:指定模式。该模式下必须同时指定PrivatePoolOptions.Id参数,设置指定的私有池 ID。
  • None:不使用。该模式下实例正常启动,不使用私有池。
Open
PrivatePoolOptions.Idstring

私有池 ID,即弹性保障服务 ID 或者容量预定服务 ID。

  • PrivatePoolOptions.MatchCriteria取值为Target时,该参数为必填项。
  • PrivatePoolOptions.MatchCriteria取值为OpenNone时,该参数不传值。
eap-bp67acfmxazb4****

返回参数

名称类型描述示例值
object
RequestIdstring

请求 ID。

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

示例

正常返回示例

JSON格式

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

错误码

HTTP status code错误码错误信息描述
400MissingParameter.RegionIdThe specified RegionId should not be null.RegionId是必选参数。
400MissingParameter.InstanceIdThe specified InstanceId should not be null.-
400InvalidResourcePackage.BizStatusThe resource package business status is not supported.-
400InvalidInstanceId.MalFormedThe specified InstanceId is not valid.-
400DedicatedHostNotSupportedDedicatedHost is not supported for PrivatePool.私有池不支持专有宿主机。
400SpotNotSupportedSpot is not supported for PrivatePool.私有池不支持抢占式实例。
400ClassicNetworkNotSupportedClassic network is not supported for PrivatePool.私有池不支持经典网络类型实例。
400Invalid.InstanceIdInstance does not exist.实例不存在。
400Invalid.PrivatePoolOptions.MatchCriteriaTarget mode does not support this operation.Target模式不支持本次操作。
400MissingParameter.PrivatePoolOptions.IdThe specified PrivatePoolOptions.Id should not be null.PrivatePoolOptions.Id 参数不能为空。
400Invalid.PrivatePoolOptions.IdThe PrivatePool does not exist.私有池不存在。
400Invalid.InstanceTypeThe InstanceType does not match the PrivatePool.实例类型与私有池不匹配。
400Invalid.InstanceChargeTypeThe InstanceChargeType does not match the PrivatePool.实例计费类型与私有池不匹配。
400Invalid.ZoneIdThe ZoneId does not match the PrivatePool.可用区与私有池不匹配。
400Invalid.PrivatePoolOptions.NoStockThe PrivatePool has been used up.-
400Invalid.PrivatePoolOptions.MatchCriteriaThe PrivatePoolOptions.MatchCriteria does not match the PrivatePool.指定的PrivatePoolOptions.MatchCriteria参数与私有池不匹配。
400InvalidPlatform.ValueNotSupportedThe Platform does not match the PrivatePool.指定的Platform参数与私有池不匹配。
400Invalid.PrivatePoolOptions.statusThe PrivatePool is expired or inactive.-
400Invalid.PrivatePoolOptions.statusThe PrivatePool status is not valid.-
400Invalid.PrivatePoolOptions.statusThe Instance should be created within 48 hours once the PrivatePool is started.-
400InvalidAliUidThe PrivatePool does not belong to the user of the Instance.私有池不属于创建实例的用户。
400Invalid.InstanceIdThe Instance dose not attached to a PrivatePool.实例未与私有池匹配。
400MissingParameter.PackageTypeThe specified parameter "PackageType" can not be empty.-
400MissingParameter.PrivatePoolOptions.IdsThe specified parameter "PrivatePoolOptions.Ids" can not be empty.-
400MissingParameter.PrivatePoolOptions.IdThe specified parameter "PrivatePoolOptions.Id" can not be empty.-
400MissingParameter.InstanceCpuCoreCountThe specified parameter "InstanceCpuCoreCount" can not be empty.-
400MissingParameter.InstanceAmountThe specified parameter "InstanceAmount" can not be empty.-
400MissingParameter.InstanceCpuCoreCountOrInstanceAmountThe specified parameter "InstanceCpuCoreCount" and "InstanceAmount" must not be empty at the same time.-
400Invalid.TooManyPrivatePoolOptions.IdsToo many PrivatePoolOptions.Ids in this request.PrivatePoolOptions.Ids参数超过上限。
400Invalid.TooManyZoneIdsToo many ZoneIds in the request.ZoneIds参数超过上限。
400Invalid.TooManyInstanceTypesToo many InstanceTypes in the request.InstanceTypes参数超过上限。
400Invalid.TooManyUnpaidPrivatePoolToo many PrivatePools create but still unpaid.多个私有池未支付。
400Invalid.InstanceCpuCoreCountOrInstanceAmountBoth InstanceCpuCoreCount and InstanceAmount are provided.InstanceCpuCoreCount和InstanceAmount两个参数不需要同时提供。
400Invalid.PrivatePoolOptions.IdsThe specified parameter "PrivatePoolOptions.Ids" exist invalid element Id.-
400Invalid.PackageTypeThe specified parameter "PackageType" is invalid.-
400Invalid.PrivatePool.PurchaseThe PrivatePool has already paid.私有池已经支付。
400Invalid.AssuranceTimes.NotSupportedThe value of AssuranceTimes is not supported.AssuranceTimes参数值不支持。
400Invalid.TooManyInstanceTypesThe specified parameter "InstanceType" should only has one item.-
400Invalid.PrivatePoolOptions.MatchCriteriaThe specified parameter "PrivatePoolOptions.MatchCriteria" is invalid.-
400RepeatStartPrivatePoolPrivatePool has already been started.私有池已经启动。
400Invalid.PrivatePoolOptions.IdThe specified parameter "PrivatePoolOptions.Id" should be empty.-
400Invalid.InstanceIdModify DedicatedHost Instance's attachment attributes is not supported.-
400Invalid.InstanceIdModify Spot Instance's attachment attributes is not supported.-
400Invalid.InstanceIdModify Classic Network Instance's attachment attributes is not supported.-
400Invalid.InstanceIdThe Instance already belongs to this PrivatePool.-
400Invalid.InstanceIdThe instanceId is not found.-
500InternalErrorThe request processing has failed due to some unknown error, exception or failure.内部错误,请重试。
500InvalidRegionId.NotFoundThe specified RegionId does not exist.指定的地域 ID 不存在。

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
暂无变更历史
  • 本页导读 (1)
文档反馈