Modifie le type de pool privé d'une instance Elastic Compute Service (ECS).
Description de l'opération
Un pool privé est généré après la création d'une garantie d'élasticité ou d'une réservation de capacité. Le pool privé est associé aux informations sur les instances qui l'utilisent. Vous pouvez spécifier s'il faut utiliser un pool privé lors de la création d'une instance ECS afin d'associer l'instance à la garantie d'élasticité ou à la réservation de capacité correspondante.
-
Après avoir appelé cette opération pour modifier les attributs de pool privé d'une instance ECS, vous n'avez pas besoin de redémarrer l'instance pour que les modifications prennent effet.
-
Lorsque vous appelez les opérations suivantes sur une instance ECS, le système tente d'associer l'instance à des pools privés actifs. Si l'instance est déjà associée à un pool privé spécifié, l'appel à une opération peut échouer lorsque la capacité du pool privé est épuisée ou que le pool privé expire. Si l'appel échoue, appelez l'opération ModifyInstanceAttachmentAttributes pour changer le type du pool privé en Open.
-
StartInstance : démarre une instance ECS qui est arrêtée en mode économique.
-
ReActivateInstances : réactive une instance ECS qui a expiré ou qui a été récupérée en raison d'un retard de paiement.
-
ModifyInstanceChargeType : modifie le mode de facturation d'une instance ECS.
-
ModifyPrepayInstanceSpec : modifie le type d'instance d'une instance ECS.
-
ReplaceSystemDisk : remplace le système d'exploitation d'une instance ECS.
-
Testez maintenant
Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.
Test
Autorisation RAM
|
ecs:ModifyInstanceAttachmentAttributes |
update |
*Instance
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| RegionId |
string |
Oui |
L'identifiant de la région du pool privé. Vous pouvez appeler l'opération DescribeRegions pour interroger la liste des régions la plus récente. |
cn-hangzhou |
| InstanceId |
string |
Oui |
L'identifiant de l'instance pour laquelle vous souhaitez modifier les attributs du pool privé. |
i-bp67acfmxazb4**** |
| PrivatePoolOptions.MatchCriteria |
string |
Oui |
Le nouveau type de pool privé. Valeurs valides :
|
Open |
| PrivatePoolOptions.Id |
string |
Non |
L'identifiant du pool privé. Définissez la valeur sur l'identifiant de la garantie d'élasticité ou de la réservation de capacité qui génère le pool privé.
|
eap-bp67acfmxazb4**** |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
|||
| RequestId |
string |
L'identifiant de la requête. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
Exemples
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
Codes d'erreur
|
Code de statut HTTP |
Code d'erreur |
Message d'erreur |
Description |
|---|---|---|---|
| 400 | MissingParameter.RegionId | The specified RegionId should not be null. | The RegionId parameter is required. |
| 400 | MissingParameter.InstanceId | The specified InstanceId should not be null. | |
| 400 | InvalidResourcePackage.BizStatus | The resource package business status is not supported. | |
| 400 | InvalidInstanceId.MalFormed | The specified InstanceId is not valid. | |
| 400 | DedicatedHostNotSupported | DedicatedHost is not supported for PrivatePool. | The private pool does not support dedicated hosts. |
| 400 | SpotNotSupported | Spot is not supported for PrivatePool. | The private pool does not support spot instances. |
| 400 | ClassicNetworkNotSupported | Classic network is not supported for PrivatePool. | The private pool does not support instances in the classic network. |
| 400 | Invalid.InstanceId | Instance does not exist. | The specified instance does not exist. |
| 400 | Invalid.PrivatePoolOptions.MatchCriteria | Target mode does not support this operation. | The operation is not supported while the PrivatePoolOptions.MatchCriteria parameter is set to Target. |
| 400 | MissingParameter.PrivatePoolOptions.Id | The specified PrivatePoolOptions.Id should not be null. | The PrivatePoolOptions.Id parameter is required. |
| 400 | Invalid.PrivatePoolOptions.Id | The PrivatePool does not exist. | The private pool does not exist. |
| 400 | Invalid.InstanceType | The InstanceType does not match the PrivatePool. | The instance type and the private pool do not match. |
| 400 | Invalid.InstanceChargeType | The InstanceChargeType does not match the PrivatePool. | The instance billing method and the private pool do not match. |
| 400 | Invalid.ZoneId | The ZoneId does not match the PrivatePool. | The zone and the private pool do not match. |
| 400 | Invalid.PrivatePoolOptions.NoStock | The PrivatePool has been used up. | The capacity of the specified private pool (elastic assurance, capacity reservation) has been used up. |
| 400 | InvalidPlatform.ValueNotSupported | The Platform does not match the PrivatePool. | The specified Platform parameter does not match the private pool. |
| 400 | Invalid.PrivatePoolOptions.status | The PrivatePool is expired or inactive. | The private pool has expired or is not activated. |
| 400 | InvalidAliUid | The PrivatePool does not belong to the user of the Instance. | The specified private pool does not belong to the user who attempted to create the instance. |
| 400 | MissingParameter.PackageType | The specified parameter "PackageType" can not be empty. | The required parameter PackageType cannot be empty. |
| 400 | MissingParameter.PrivatePoolOptions.Ids | The specified parameter "PrivatePoolOptions.Ids" can not be empty. | Specifies that the parameter "PrivatePoolOptions.ids" cannot be empty. |
| 400 | MissingParameter.InstanceCpuCoreCount | The specified parameter "InstanceCpuCoreCount" can not be empty. | The specified parameter 'InstanceCpuCocount' cannot be empty. |
| 400 | MissingParameter.InstanceAmount | The specified parameter "InstanceAmount" can not be empty. | The specified parameter InstanceAmount cannot be empty. |
| 400 | MissingParameter.InstanceCpuCoreCountOrInstanceAmount | The specified parameter "InstanceCpuCoreCount" and "InstanceAmount" must not be empty at the same time. | The specified parameter InstanceCpuCoreCount and InstanceAmount cannot be both empty. |
| 400 | Invalid.TooManyPrivatePoolOptions.Ids | Too many PrivatePoolOptions.Ids in this request. | The number of specified private pool IDs exceeds the upper limit. |
| 400 | Invalid.TooManyZoneIds | Too many ZoneIds in the request. | The number of specified zone IDs exceeds the upper limit. |
| 400 | Invalid.TooManyInstanceTypes | Too many InstanceTypes in the request. | The number of specified instance types exceeds the upper limit. |
| 400 | Invalid.TooManyUnpaidPrivatePool | Too many PrivatePools create but still unpaid. | Multiple private pools are created but not paid. |
| 400 | Invalid.InstanceCpuCoreCountOrInstanceAmount | Both InstanceCpuCoreCount and InstanceAmount are provided. | The InstanceCpuCoreCount and InstanceAmount parameters cannot be both specified. |
| 400 | Invalid.PrivatePoolOptions.Ids | The specified parameter "PrivatePoolOptions.Ids" exist invalid element Id. | The specified private pool ID does not exist. |
| 400 | Invalid.PackageType | The specified parameter "PackageType" is invalid. | The specified parameter PackageType is invalid. |
| 400 | Invalid.PrivatePool.Purchase | The PrivatePool has already paid. | The private pool is already paid. |
| 400 | Invalid.AssuranceTimes.NotSupported | The value of AssuranceTimes is not supported. | The specified AssuranceTimes parameter is invalid. |
| 400 | RepeatStartPrivatePool | PrivatePool has already been started. | The private pool is already started. |
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | An internal error has occurred. Try again later. |
| 500 | InvalidRegionId.NotFound | The specified RegionId does not exist. | |
| 403 | InvalidOperation.PrePaidInstanceUnsupported | Not support to modify the private pool options of prepay instances. |
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.