全部产品
Search
文档中心

Virtual Private Cloud:AddIpamPoolCidr

更新时间:Dec 21, 2025

Menyediakan Blok CIDR untuk Kolam IPAM.

Deskripsi operasi

  • Sebelum menyediakan Blok CIDR, Anda harus membuat Kolam IPAM dengan memanggil operasi CreateIpamPool.

  • Anda tidak dapat menyediakan Blok CIDR untuk kolam anak jika kolam induknya belum memiliki Blok CIDR yang disediakan.

  • Jika kolam induk telah memiliki Blok CIDR yang disediakan, Anda dapat menyediakan Blok CIDR untuk kolam anaknya. Blok CIDR kolam anak harus merupakan subset dari Blok CIDR kolam induk.

  • Jika kolam induk memiliki Blok CIDR yang disediakan dan alokasi CIDR, Blok CIDR yang Anda sediakan untuk kolam anak tidak boleh bertentangan dengan alokasi CIDR yang sudah ada.

  • Permintaan untuk menyediakan Blok CIDR untuk Kolam IPAM harus dikirim dari wilayah yang dikelola oleh IPAM tersebut.

  • Blok CIDR yang Anda sediakan untuk Kolam IPAM tidak boleh bertentangan dengan Blok CIDR yang telah disediakan untuk kolam lain yang memiliki ruang lingkup yang berlaku sama.

  • Jumlah Blok CIDR yang disediakan untuk Kolam IPAM dibatasi. Secara default, kolam IPv6 publik tingkat atas hanya dapat memiliki maksimal satu Blok CIDR yang disediakan, sedangkan jenis kolam lainnya dapat memiliki hingga 50 Blok CIDR yang disediakan.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

vpc:AddIpamPoolCidr

update

*All Resource

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

RegionId

string

Yes

ID wilayah hosted dari IPAM.

Panggil DescribeRegions untuk mendapatkan ID wilayah.

cn-hangzhou

IpamPoolId

string

Yes

ID instans dari Kolam IPAM.

ipam-pool-6rcq3tobayc20t****

Cidr

string

No

Blok CIDR yang akan disediakan.

Catatan

Sediakan Blok CIDR untuk kolam privat tingkat atas hanya dengan memasukkan Blok CIDR.

192.168.1.0/24

NetmaskLength

integer

No

Subnet mask dari Blok CIDR.

Catatan

Sediakan Blok CIDR untuk kolam IPv6 publik tingkat atas hanya dengan memasukkan masker.

24

DryRun

boolean

No

Menentukan apakah akan melakukan dry run. Nilai yang valid:

  • true: melakukan dry run tetapi tidak menyediakan Blok CIDR. Sistem melakukan Pemeriksaan Awal terhadap parameter yang diperlukan, sintaks permintaan, dan batasan. Jika permintaan lolos dry run, kode kesalahan DryRunOperation dikembalikan.

  • false (default): mengirim permintaan. Jika permintaan lolos pemeriksaan, kode status HTTP 2xx dikembalikan dan operasi dilakukan.

false

ClientToken

string

No

Token klien yang digunakan untuk memastikan idempotensi permintaan. Gunakan klien untuk menghasilkan token, tetapi pastikan token tersebut unik di antara permintaan. Token hanya boleh berisi karakter ASCII.

Catatan

Jika Anda tidak menentukan parameter ini, sistem secara otomatis menggunakan RequestId dari permintaan sebagai ClientToken. RequestId setiap permintaan API mungkin berbeda.

123e4567-e89b-12d3-a456-426655440000

Elemen respons

Element

Type

Description

Example

object

BaseResult

RequestId

string

ID permintaan.

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

Cidr

string

Blok CIDR yang berhasil disediakan untuk Kolam IPAM.

192.168.1.0/24

Contoh

Respons sukses

JSONformat

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

Kode kesalahan

HTTP status code

Error code

Error message

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.
404 ResourceNotFound.IpamPool The dependent IPAM pool is not found. The IPAM pool does not exist.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.