Tous les produits
Search
Centre de documentation

:AddIpamPoolCidr

Dernière mise à jour :Aug 06, 2026

Provisionne un bloc CIDR pour un pool IPAM.

Description de l'opération

  • Avant de provisionner un bloc CIDR, assurez-vous d'avoir créé un pool IPAM. Vous pouvez appeler CreateIpamPool pour créer un pool IPAM.

  • Si le pool parent ne possède pas de bloc CIDR provisionné, le sous-pool ne prend pas en charge le provisionnement de bloc CIDR.

  • Si le pool parent possède un bloc CIDR provisionné, le sous-pool peut avoir un bloc CIDR provisionné, et ce bloc CIDR provisionné doit être un sous-ensemble du bloc CIDR provisionné du pool parent.

  • Si le pool parent possède un bloc CIDR provisionné et également des allocations CIDR, le bloc CIDR provisionné pour le sous-pool ne doit pas entrer en conflit avec les allocations CIDR existantes.

  • La requête de provisionnement d'un bloc CIDR pour un pool IPAM doit être initiée depuis la région hébergeant l'IPAM.

  • Le bloc CIDR provisionné pour un pool IPAM ne doit pas entrer en conflit avec les blocs CIDR provisionnés pour d'autres pools dans la même portée.

  • Le nombre de blocs CIDR pouvant être provisionnés pour un pool est limité. Le maximum par défaut pour un pool de premier niveau IPv6 public est de 1. Le maximum par défaut pour les autres types de pools est de 50.

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

Aucune autorisation n'est requise pour cette opération. En cas de problème, contactez le support technique.

Paramètres de requête

Paramètre

Type

Requis

Description

Exemple

RegionId

string

Oui

L'identifiant de la région hébergeant l'IPAM.

Vous pouvez appeler DescribeRegions pour obtenir l'identifiant de la région.

cn-hangzhou

IpamPoolId

string

Oui

L'identifiant d'instance du pool IPAM.

ipam-pool-6rcq3tobayc20t****

Cidr

string

Non

Le bloc CIDR à provisionner.

Remarque

Les pools privés de premier niveau ne prennent en charge le provisionnement qu'en spécifiant un bloc CIDR.

192.168.1.0/24

NetmaskLength

integer

Non

Provisionne un bloc CIDR en spécifiant une longueur de masque de réseau.

Remarque

Les pools publics IPv6 de premier niveau ne prennent en charge le provisionnement qu'en spécifiant une longueur de masque de réseau.

24

DryRun

boolean

Non

Indique si un test à blanc doit être effectué. Valeurs valides :

  • true : effectue un test à blanc sans provisionner de bloc CIDR pour le pool IPAM. Le système vérifie les paramètres requis, le format de la requête et les limites métier. Si la vérification échoue, l'erreur correspondante est renvoyée. Si la vérification réussit, le code d'erreur DryRunOperation est renvoyé.

  • false (par défaut) : envoie la requête. Une fois la vérification réussie, un code d'état HTTP 2xx est renvoyé et l'opération est exécutée.

false

ClientToken

string

Non

Le jeton client utilisé pour garantir l'idempotence de la requête. Valeur générée par le client, unique pour chaque requête. ClientToken ne prend en charge que les caractères ASCII.

Remarque

Si vous ne spécifiez pas ce paramètre, le système utilise le RequestId de la requête API comme ClientToken. Le RequestId est différent pour chaque requête API.

123e4567-e89b-12d3-a456-426655440000

Éléments de réponse

Élément

Type

Description

Exemple

object

BaseResult.

RequestId

string

L'identifiant de la requête.

558BC336-8B88-53B0-B4AD-980EE900AB01

Cidr

string

Le bloc CIDR qui a été provisionné avec succès pour le pool IPAM.

192.168.1.0/24

Exemples

JSON format

{
  "RequestId": "558BC336-8B88-53B0-B4AD-980EE900AB01",
  "Cidr": "192.168.1.0/24"
}

Codes d'erreur

Code de statut HTTP

Code d'erreur

Message d'erreur

Description

400 IllegalParam.IpVersion The specified IpVersion is illegal. Invalid IpVersion.
400 UnsupportedFeature.PublicIpamScopeType The feature of PublicIpamScopeType is not supported. The IPAM you specified does not support the creation of public scope.
400 IllegalParam.IpamPool The specified IPAM pool cannot be empty. The IPAM pool cannot be empty.
400 OperationDenied.PoolRegionNotSupportAddPoolCidr The operation is not allowed because pool region does not support adding CIDR. The operation was not allowed because the operation to add CIDR could not be performed in the region.
400 OperationDenied.CidrConflictWithTopCidrs The operation is not allowed because the input CIDR conflicts with existing top CIDRs. The operation is not allowed because the input CIDR conflicts with existing top CIDRs.
400 OperationDenied.SourceCidrIsNull The operation is not allowed because the source CIDR is null. The parent pool does not have a CIDR block.
400 OperationDenied.CidrNotInSourceCidr The operation is not allowed because the input CIDR is not in source CIDR. The specified CIDR block does not fall within the CIDR range of the parent pool.
400 ResourceNotFound.SourceIpamPool The dependent source IPAM pool is not found. The dependent resource source IPAM Pool does not exist.
400 OperationDenied.CidrConflictWithExistAllocation The operation is not allowed because the input CIDR conflicts with the existing allocation. The specified CIDR block conflicts with an existing CIDR block.
400 DryRunOperation Request validation has been passed with DryRun flag set.
400 IllegalParam.Cidr The specified CIDR is illegal. The CIDR block is invalid.
400 QuotaExceeded.IpamCidrQuotaPerIpamPool The quota of ipamCidrQuotaPerIpamPool count is exceeded. The number of CIDR blocks in the IPAM pool exceeds the upper limit.
400 OperationDenied.OperateShareResource The operation is not allowed because the instance is a shared resource. The operation is not allowed because the instance is a shared resource.
400 IncorrectStatus.IpamPool The status of the IPAM pool is incorrect. The status of the IPAM pool is incorrect.
400 MissingParam.CidrOrNetmaskLength The Cidr or NetmaskLength must be input. The Cidr or NetmaskLength must be input.
400 Mismatch.CidrAndPoolIpVersion The ip verion of input Cidr is inconsistent with that of the input IPAM pool. The ip verion of input Cidr is inconsistent with that of the input IPAM pool.
400 Mismatch.CidrAndNetmaskLength The mask of the input Cidr is inconsistent with the input NetmaskLength. The mask of the input Cidr is inconsistent with the input NetmaskLength.
400 MissingParam.Cidr The Cidr must be input when adding CIDR for IPAM private top pool. The Cidr must be input when adding CIDR for IPAM private top pool.
400 UnsupportedFeature.AddCidrForIpamPrivateIpv6Pool Adding CIDR for IPAM private IPv6 pool is not supported for this user. Adding CIDR for IPAM private IPv6 pool is not supported for this user.
400 UnsupportedFeature.AddUlaCidrForIpamPublicIpv6Pool Adding ULA CIDR for IPAM public IPv6 pool is not supported. Adding ULA CIDR for IPAM public IPv6 pool is not supported.
400 IllegalParam.NetmaskLength The specified NetmaskLength is illegal. The specified NetmaskLength is illegal.
400 OperationDenied.CidrConflictWithOfficialGuaCidrs The operation is not allowed because the input CIDR conflicts with official GUA CIDRs. The operation is not allowed because the input CIDR conflicts with official GUA CIDRs.
400 OperationDenied.CidrUnavailableInPool The operation is not allowed because the CIDR is unavailable in the IPAM pool. The operation is not allowed because the CIDR is unavailable in the IPAM pool.
400 OperationDenied.AvailableCidrInsufficient The operation is not allowed because available CIDR is insufficient. The operation is not allowed because available CIDR is insufficient.
400 OperationDenied.OfficialCidrInsufficient The operation is not allowed because the official CIDR is insufficient. The operation is not allowed because the official CIDR is insufficient.
400 OperationDenied.OfficialCidrUnavailable The operation is not allowed because the official CIDR is unavailable. The operation is not allowed because the official CIDR is unavailable.
400 OperationDenied.OfficialCidrTmpUnavailable The operation is not allowed because the official CIDR is temporarily unavailable. The operation is not allowed because the official CIDR is temporarily unavailable.
400 UnsupportedFeature.AddUlaCidrForIpamPrivateIpv6Pool Adding ULA CIDR for IPAM private IPv6 pool is not supported for this user.
400 UnsupportedFeature.AddByoipCidrForIpamPrivateIpv6Pool Adding BYOIP CIDR for IPAM private IPv6 pool is not supported for this user.
400 OperationDenied.CidrMaskTooSmall The operation is not allowed because the CIDR mask length %s is smaller than the minimum allowed %s. The CIDR mask length %s is smaller than the minimum allowed value %s.
400 OperationDenied.CidrMaskTooLarge The operation is not allowed because the CIDR mask length %s is larger than the maximum allowed %s. The CIDR mask length %s is larger than the maximum allowed value %s.
404 ResourceNotFound.IpamPool The dependent IPAM pool is not found. The IPAM pool does not exist.

Consultez Codes d'erreur pour la liste complète.

Notes de version

Consultez Notes de version pour la liste complète.