Membuat blok CIDR khusus yang dicadangkan dari kolam IPAM.
Deskripsi operasi
-
Before you create a custom reserved CIDR block, ensure that you have created an IPAM pool and added a CIDR block to it. You can call the CreateIpamPool operation to create an IPAM pool and the AddIpamPoolCidr operation to add a CIDR block to the pool.
-
When you specify the Cidr or CidrMask parameter to create a custom reserved CIDR block, the mask must be within the range specified for the IPAM pool.
-
If an IPAM pool has a region attribute, the request to create a custom reserved CIDR block must be initiated from the region where the pool is located.
-
The custom reserved CIDR block must not conflict with existing CIDR block allocations in the IPAM pool.
Coba sekarang
Test
RAM authorization
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID wilayah tempat Anda ingin membuat blok CIDR khusus yang dicadangkan. Anda dapat memanggil DescribeRegions untuk mendapatkan ID wilayah. |
cn-hangzhou |
| IpamPoolId |
string |
Yes |
ID kolam IPAM. |
ipam-pool-6rcq3tobayc20t**** |
| Cidr |
string |
No |
Blok CIDR untuk mengalokasikan dari kolam IPAM. Catatan
Anda harus menentukan parameter Cidr atau CidrMask. |
192.168.1.0/24 |
| CidrMask |
integer |
No |
Masker blok CIDR untuk mengalokasikan dari kolam IPAM. Catatan
Anda harus menentukan parameter Cidr atau CidrMask. |
24 |
| DryRun |
boolean |
No |
Apakah akan menjalankan dry run. Nilai valid:
|
false |
| ClientToken |
string |
No |
Token klien yang digunakan untuk memastikan idempotensi permintaan. Hasilkan nilai pada klien Anda untuk memastikan nilai tersebut unik di antara permintaan yang berbeda. Token hanya dapat berisi karakter ASCII. Catatan
Jika Anda tidak menentukan parameter ini, sistem secara otomatis menggunakan RequestId permintaan sebagai ClientToken. RequestId mungkin berbeda untuk setiap permintaan. |
123e4567-e89b-12d3-a456-426655440000 |
| IpamPoolAllocationDescription |
string |
No |
Deskripsi blok CIDR khusus yang dicadangkan. Panjang deskripsi harus 1 hingga 256 karakter. Harus dimulai dengan huruf atau karakter Tionghoa dan tidak boleh dimulai dengan |
test description |
| IpamPoolAllocationName |
string |
No |
Nama blok CIDR khusus yang dicadangkan. Panjang nama harus 1 hingga 128 karakter dan tidak boleh dimulai dengan |
test name |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
CE9CDAE5-341E-5D0B-AC8A-2BAC707D3EB2 |
| IpamPoolAllocationId |
string |
The ID of the custom reserved CIDR block. |
ipam-pool-alloc-112za33e4**** |
| Cidr |
string |
The allocated CIDR block. |
192.168.1.0/24 |
| SourceCidr |
string |
The source CIDR block. |
192.168.0.0/16 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "CE9CDAE5-341E-5D0B-AC8A-2BAC707D3EB2",
"IpamPoolAllocationId": "ipam-pool-alloc-112za33e4****",
"Cidr": "192.168.1.0/24",
"SourceCidr": "192.168.0.0/16"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | OperationDenied.ResourceTypeIsNotCustom | The operation is not allowed because the resource type is not Custom. | |
| 400 | MissingParam.CidrOrCidrMask | The CIDR or CIDR Mask must be input. | |
| 400 | OperationDenied.IpamPoolNotInRegion | The operation is not allowed because the IPAM pool not in specific region does not support creating VPC or associating CIDR for VPC. | |
| 400 | OperationDenied.RequestRegionInvalid | The operation is not allowed because the request is not invoked in the region of the IPAM pool. | |
| 400 | IllegalParam.Cidr | The specified CIDR is illegal. | |
| 400 | IllegalParam.CidrMask | The specified CidrMask is illegal. | |
| 400 | DryRunOperation | Request validation has been passed with DryRun flag set. | |
| 400 | OperationDenied.AvailableCidrInsufficient | The operation is not allowed because available CIDR is insufficient. | |
| 400 | OperationDenied.CidrInExcludeCidrs | The operation is not allowed because the input CIDR is within the illegal CIDRs. | |
| 400 | OperationDenied.CidrUnavailableInPool | The operation is not allowed because the CIDR is unavailable in the IPAM pool. | |
| 400 | OperationDenied.CidrMaskTooLarge | The operation is denied because the CIDR mask %s is larger than the allocationMaxNetmask %s of the pool. | |
| 400 | OperationDenied.CidrMaskTooSmall | The operation is denied because the CIDR mask %s is less than the allocationMinNetmask %s of the pool. | |
| 404 | ResourceNotFound.IpamPool | The dependent IPAM pool is not found. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.