Associe par lot plusieurs adresses IP élastiques (EIP) à une instance de service cloud dans la même région.
Description de l'opération
AssociateEipAddressBatch associe plusieurs EIP à une instance de service cloud par lot. Cette opération prend uniquement en charge l'attachement par lot d'EIP à une instance de passerelle NAT Internet ou à une instance de contrôleur d'interface réseau secondaire (NIC) dans la même région. Pour associer une EIP à d'autres instances de service cloud, appelez AssociateEipAddress.
- AssociateEipAddressBatch est une opération asynchrone. Après avoir appelé cette opération, le système renvoie un identifiant de requête, mais les instances EIP ne sont pas encore attachées à l'instance de service cloud. La tâche d'attachement continue de s'exécuter en arrière-plan. Vous pouvez appeler DescribeEipAddresses pour interroger l'état d'une instance EIP :
Si l'instance EIP est dans l'état Associating, l'instance EIP est en cours d'attachement. Dans cet état, vous pouvez uniquement exécuter des opérations de requête.
Si l'instance EIP est dans l'état InUse, l'instance EIP est attachée.
AssociateEipAddressBatch ne prend pas en charge l'attachement simultané de la même instance EIP à des instances de service cloud.
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
|
vpc:AssociateEipAddressBatch |
update |
*Address
Instance
NatGateway
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| RegionId |
string |
Oui |
L'identifiant de la région des EIP à associer à l'instance de service cloud. Vous pouvez appeler DescribeRegions pour interroger l'identifiant de la région. |
cn-hangzhou |
| BindedInstanceId |
string |
Oui |
L'identifiant de l'instance de service cloud à laquelle attacher les EIP. Vous pouvez spécifier l'identifiant d'instance d'une instance de passerelle NAT Internet ou d'une instance de contrôleur d'interface réseau secondaire (NIC). |
ngw-hp3akk9irtd69jad**** |
| BindedInstanceType |
string |
Oui |
Le type de l'instance à laquelle attacher les EIP. Valeurs valides :
|
Nat |
| Mode |
string |
Non |
Le mode d'association. Définissez la valeur sur MULTI_BINDED, qui spécifie le mode multi-EIP vers ENI. Ce paramètre est requis uniquement lorsque InstanceType est défini sur NetworkInterface. |
MULTI_BINDED |
| InstanceIds |
array |
Oui |
La liste des EIP à associer à l'instance de service cloud. Vous devez spécifier au moins 1 EIP et pouvez en spécifier jusqu'à 50. |
|
|
string |
Non |
L'identifiant de l'instance EIP à associer à l'instance de service cloud. Vous devez spécifier au moins 1 identifiant d'instance EIP et pouvez en spécifier jusqu'à 50. |
eip-2zeerraiwb7ujsxdc**** |
|
| ClientToken |
string |
Non |
Le jeton client utilisé pour garantir l'idempotence de la requête. Vous pouvez utiliser le client pour générer le jeton, mais vous devez vous assurer que le jeton est unique parmi les différentes requêtes. Le jeton ne peut contenir que des caractères ASCII. Remarque
Si vous ne spécifiez pas ce paramètre, le système utilise automatiquement le RequestId de la requête API comme ClientToken. Le RequestId peut être différent pour chaque requête API. |
02fb3da4-130e-11e9-8e44-0016e04115b |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
Les paramètres de réponse. |
||
| RequestId |
string |
L'identifiant de la requête. |
54B48E3D-DF70-471B-AA93-08E683A1B45 |
Exemples
JSON format
{
"RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45"
}
Codes d'erreur
|
Code de statut HTTP |
Code d'erreur |
Message d'erreur |
Description |
|---|---|---|---|
| 400 | InvalidAssociation.Duplicated | Specified instance already is associated. | |
| 400 | OperationDenied | Specified instance is not in VPC. | |
| 400 | InvalidParameter.Mismatch | Specified elastic IP address and ECS instance are not in the same region. | |
| 400 | IncorrectEipStatus | Current elastic IP status does not support this operation | |
| 400 | IncorrectInstanceStatus | Current instance status does not support this operation. | |
| 400 | InvalidInstanceType.ValueNotSupported | The specified value of InstanceType is not supported. | |
| 400 | IncorrectHaVipStatus | HaVip can be operated by this action only when it's status is Available or InUse. | The operation supports only HAVIPs in the Available or InUse state. |
| 400 | InvalidParameter | The specified parameter is not valid. | |
| 400 | Forbidden | The eip instance owener error | The EIP does not belong to your account. Check whether you have the permissions to perform the operation on the EIP. |
| 400 | TaskConflict | The eip operate too frequent, TaskConflict. | Operations are too frequent and tasks conflict with each other. |
| 400 | InvalidBindingStatus | The eip binding status invalid. | |
| 400 | BIND_INSTANCE_HAVE_PORTMAP_OR_BIND_EIP | The instance may have portMap or already bind eip. | The ECS instance already has a port forwarding rule (DNAT). Delete the corresponding port forwarding rule before performing the operation. |
| 400 | EIP_CAN_NOT_ASSOCIATE_WITH_PUBLIC_IP | instance already bind natpublicip,cannot bind eip. | |
| 400 | BIND_INSTANCE_OWENER_ERROR | Cannot operate the eip. | |
| 400 | NATGATEWAY_FINANCIALLOCKED | The NatGateway has expire, cannot do bind operation. | |
| 400 | InvalidParameter.InstanceTypeNotSupport | The specified instance type is not support. | |
| 400 | QuotaExceeded.NumberOfTrafficEip | The number of traffic eip on natgw exceed limitation. | |
| 400 | QuotaExceeded.NumberOfEip | Binded eip Quota exceed on this NatGw. | The number of EIPs associated with the NAT gateway exceeds the upper limit. |
| 400 | InvalidEipBandwidth.OutOfMaxValue | The Eip Bandwidth is invalid. | |
| 400 | Forbidden.EipCanNotBindGatgw | Eip can not bind on natgw. | |
| 400 | InvalidAction.Denied | Action is denied due to unfinished Eip configuration modification. | The EIP configurations are not complete and the operation is denied. |
| 400 | InstanceType.NotSupport | The instance type is invalid. | |
| 400 | InvalidParams.NotFound | instance not found | |
| 400 | BindInstance.NotSupported | bind instance type %s is not supported. | |
| 400 | Forbidden.InstanceBandwidthNotZero | Eip can not bind with instance when it's bandwidth is not zero. | |
| 400 | INSTANCE_TYPE_NOT_SUPPORT | The instance type is invalid. | |
| 400 | ServerRegion.Invalid | Eip bind remote server region invalid. | |
| 400 | Eni.Attached | The eni should be detached from ecs when associating with direct eip. | If the ENI is associated with an EIP in cut-through mode, you must disassociate the ENI from the ECS instance. |
| 400 | Invalid.DirectEip.BindType | The direct eip can be only associated with eni. | |
| 400 | Invalid.Function.NotSupported | Multi-IP function is under test, the region or uid is not supported. | |
| 400 | InvalidStatus.EniStatusNotSupport | %s | |
| 400 | InvalidParameter.EniInstanceId | %s | |
| 400 | %s | %s | |
| 400 | EipBatchBind.TypeNotSupport | eip batch bind type not support | |
| 400 | OperationFailed.RegionNotMatch | The specified eip is not in this region | |
| 400 | InvalidEIPStatus.BizDisabled | The EIP has been locked. | The error message returned because the EIP is locked. |
| 400 | Forbidden.FinancialLocked | The ip business status is invalid. | The error message returned because the instance has overdue payments. |
| 400 | OperationDenied.Unauthorized | The operation is not allowed because the user is not in the whitelist. | The operation is not allowed because you are not in the whitelist. |
| 400 | OperationDenied.UnsupportedEipBindMode | The operation is not supported for the NAT gateway due to its EIP binding mode. | The operation is not supported by the EIP binding mode of the NAT gateway. |
| 400 | OperationDenied.Ipv4GatewayExist | The operation is not allowed because of Ipv4GatewayExist. | |
| 404 | InvalidAllocationId.NotFound | Specified allocation ID is not found. | |
| 404 | InvalidInstanId.NotFound | Specified instance does not exist. | |
| 404 | Forbidden.RegionNotFound | Specified instance is not found during access authentication. | The error message returned because the region is not supported. |
| 404 | OperationDenied.VpcIpv4GatewayEnabled | The operation is not allowed because of the VPC of the NAT gateway has opened IPv4 Gateway. | IPv4 gateways are enabled for the VPC where the NAT gateway resides and the operation is denied. |
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.