Adiciona um bloco CIDR secundário a uma VPC.
Descrição da operação
O número máximo de blocos CIDR secundários que podem ser adicionados a uma VPC é o seguinte:\n - Podem ser adicionados no máximo 5 blocos CIDR IPv4 secundários a uma VPC.\n - Podem ser adicionados no máximo 5 blocos CIDR IPv6 secundários a uma VPC.\n\n- A operação AssociateVpcCidrBlock não oferece suporte à adição simultânea de blocos CIDR secundários à mesma VPC.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
vpc:AssociateVpcCidrBlock |
create |
*VPC
|
Nenhuma | Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| RegionId |
string |
Sim |
O ID da região da VPC à qual você deseja adicionar um bloco CIDR secundário.\n\nVocê pode chamar a operação DescribeRegions para consultar a lista de regiões mais recente. |
ch-hangzhou |
| VpcId |
string |
Sim |
O ID da VPC à qual você deseja adicionar um bloco CIDR secundário. |
vpc-o6wrloqsdqc9io3mg**** |
| SecondaryCidrBlock |
string |
Não |
O bloco CIDR IPv4 secundário a ser adicionado. O bloco CIDR deve atender aos seguintes requisitos:\n\n- Use um endereço IPv4 privado especificado na RFC 1918 como o bloco CIDR IPv4 secundário da nuvem privada virtual (VPC). A máscara de sub-rede deve ter de 16 a 28 bits de comprimento. Exemplos: 10.0.0.0/16, 172.16.0.0/16 e 192.168.0.0/16.\n- Você pode usar um bloco CIDR personalizado diferente de 100.64.0.0/10, 224.0.0.0/4, 127.0.0.0/8, 169.254.0.0/16 ou suas sub-redes como o bloco CIDR IPv4 secundário da nuvem privada virtual (VPC).\n\nLimites de configuração:\n- O bloco CIDR não pode começar com 0. A máscara de sub-rede deve ter de 16 a 28 bits de comprimento.\n\n- O bloco CIDR secundário não pode se sobrepor ao bloco CIDR primário ou aos blocos CIDR secundários existentes da VPC.\n\n> Se você não usar um pool IPAM para adicionar um bloco CIDR secundário à VPC, deverá especificar o parâmetro SecondaryCidrBlock ou o parâmetro Ipv6CidrBlock, mas não ambos. |
192.168.0.0/16 |
| SecondaryCidrMask |
integer |
Não |
A máscara de sub-rede usada para adicionar um bloco CIDR IPv4 secundário de um pool IPAM à VPC.\n\n> Ao usar um pool IPAM para adicionar um bloco CIDR IPv4 secundário à VPC, você deve especificar pelo menos um entre SecondaryCidrBlock e SecondaryCidrMask. |
16 |
| IPv6CidrBlock |
string |
Não |
O bloco CIDR IPv6 especificado da VPC.\n\n> Você não pode especificar SecondaryCidrBlock e Ipv6CidrBlock simultaneamente. |
2408:XXXX:0:6a::/56 |
| Ipv6Isp |
string |
Não |
O tipo do bloco CIDR IPv6 da VPC. Valores válidos:\n\n- BGP (padrão): Alibaba Cloud BGP IPv6.\n- ChinaMobile: China Mobile (ISP único).\n- ChinaUnicom: China Unicom (ISP único).\n- ChinaTelecom: China Telecom (ISP único).\n\n> Se sua conta estiver incluída na lista de permissões de largura de banda de ISP único da China, você poderá definir este parâmetro como ChinaTelecom (China Telecom), ChinaUnicom (China Unicom) ou ChinaMobile (China Mobile). |
BGP |
| IpVersion |
string |
Não |
A versão do endereço IP. Valores válidos:\n\n- IPV4: endereço IPv4.\n- IPV6: endereço IPv6. Quando IpVersion é definido como IPV6 e SecondaryCidrBlock não é especificado, um bloco CIDR IPv6 secundário é adicionado à VPC. |
IPV4 |
| IpamPoolId |
string |
Não |
O ID da instância do pool IPAM. |
ipam-pool-sycmt3p2a9v63i**** |
| Ipv6CidrMask |
integer |
Não |
A máscara de sub-rede usada para adicionar um bloco CIDR IPv6 de um pool IPAM à VPC.\n\n> Ao usar um pool IPAM para adicionar um bloco CIDR IPv6 secundário à VPC, você deve especificar pelo menos um entre IPv6CidrBlock e Ipv6CidrMask. |
56 |
| RegionId |
string |
Sim |
O ID da região da VPC à qual você deseja adicionar um bloco CIDR secundário.\n\nVocê pode chamar a operação DescribeRegions para consultar a lista de regiões mais recente. |
ch-hangzhou |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
O ID da solicitação. |
||
| RequestId |
string |
O ID da solicitação. |
C1221A1F-2ACD-4592-8F27-474E02883159 |
| CidrBlock |
string |
O bloco CIDR secundário adicionado à VPC. |
192.168.0.0/16 |
| IpVersion |
string |
A versão do endereço IP do bloco CIDR secundário. |
IPV4 |
Exemplos
Resposta de sucesso
JSON formato
{
"RequestId": "C1221A1F-2ACD-4592-8F27-474E02883159",
"CidrBlock": "192.168.0.0/16",
"IpVersion": "IPV4"
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 400 | InvalidVpc.NotFound | %s | |
| 400 | IncorrectStatus.Vpc | %s | |
| 400 | ParamExclusive.SecondaryCidrAndIpv6Cidr | %s | |
| 400 | OperationUnsupported.VpcMultiCidr | %s | |
| 400 | MissingParam.SecondaryCidrOrIpv6Cidr | %s | |
| 400 | OperationUnsupported.IPv6ULA | %s | |
| 400 | OperationFailed.Ipv6CidrBlockExisted | %s | |
| 400 | InvalidIpv6ULACidrBlock.Malformed | %s | |
| 400 | QuotaExceeded.GUAIpv6CidrBlock | %s | |
| 400 | IllegalParam.Ipv6CidrType | %s | |
| 400 | OperationUnsupported.OnlyULA | %s | |
| 400 | InvalidCidrBlock.Malformed | Specified CIDR block is not valid. | |
| 400 | IllegalParam.SecondaryCidrBlock | %s | |
| 400 | Duplicated.SecondaryCidrBlock | %s | |
| 400 | OperationFailed.ConflictWithEntry | %s | |
| 400 | QuotaExceeded.VpcMultiCidr | %s | |
| 400 | MissingParam.SecondaryCidrBlockOrIpv6CidrBlock | Either SecondaryCidrBlock or Ipv6CidrBlock must be specified. | The secondary CIDR block or the IPv6 CIDR block is not specified. |
| 400 | MissingParam.VpcId | You must specify VpcId. | You must specify VpcId. |
| 400 | UnsupportedFeature.Ipv6Isp | The Ipv6Isp feature is not supported. | The specified IPv6 ISP is not supported. |
| 400 | IllegalParam.IpVersion | %s | |
| 400 | OperationDenied.GUAIpv6CidrBlock | The operation is not allowed because this ipv6 CIDR is not reserved. | |
| 400 | OperationFailed.IPv6CidrNotReserved | Operation failed because this ipv6 cidr is not reserved. | |
| 400 | InvalidCidrBlock | Specified CIDR block is already exists. | |
| 400 | IllegalParam.IpamPool | The specified IPAM pool cannot be empty. | The IPAM pool cannot be empty. |
| 400 | MissingParam.SecondaryCidrMask | The parameter SecondaryCidrMask must be input. | SecondaryCidrMask is required. |
| 400 | IllegalParam.SecondaryCidrMask | The specified Secondary CIDR Mask is illegal. | Invalid SecondaryCidrMask. |
| 400 | OperationDenied.RequestRegionInvalid | The operation is not allowed because the request is not invoked in the region of the IPAM pool. | The operation is not allowed because the request is not invoked in the region of the IPAM pool. |
| 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. | The operation is not allowed because the IPAM pool not in specific region does not support creating VPC or associating CIDR for VPC. |
| 400 | MissingParam.CidrOrCidrMask | The CIDR or CIDR Mask must be input. | The CIDR or CIDR Mask must be input. |
| 400 | OperationDenied.CidrInExcludeCidrs | The operation is not allowed because the input CIDR is within the illegal CIDRs. | The operation is not allowed because the input CIDR is within the illegal CIDRs. |
| 400 | OperationDenied.AvailableCidrInsufficient | The operation is not allowed because available CIDR is insufficient. | The operation is not allowed because available CIDR is insufficient. |
| 400 | UnsupportedFeature.Ipam | IPAM is not supported in this region. | The IPAM feature is not supported in this region. |
| 400 | UnsupportedFeature.VpcIpamIpv6 | The specified IPAM pool does not support the IPv6 feature. | The specified IPAM pool does not support the IPv6 feature. |
| 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 | InvalidIpv6CidrBlock.Malformed | Param Ipv6CidrBlock is malformed. | IPv6 network segment is illegal |
| 400 | MissingParam.IpVersion | The parameter IpVersion is missing. | The parameter IpVersion is missing. |
| 400 | Mismatch.IpVersionAndIpamPoolIpVersion | The input IpVersion is inconsistent with the IpVersion of the input IPAM pool. | The input IpVersion is inconsistent with the IpVersion of the input IPAM pool. |
| 400 | IllegalParam.Ipv6CidrBlock | The parameter of Ipv6CidrBlock is illegal. | The Ipv6CidrBlock parameter is invalid. |
| 400 | OperationFailed.Ipv6CidrBlockOverLapped | The input IPv6 CIDR block overlaps with the existing ones. | The input IPv6 CIDR block overlaps with the existing ones. |
| 400 | QuotaExceeded.IPv6CidrBlock | The number of IPv6 CIDR blocks in the VPC exceeds the limit. | The number of IPv6 CIDR blocks in the VPC exceeds the limit. |
| 400 | OperationDenied.MaskOfCidrIsNotAllowed | The input mask or mask of the input CIDR is not allowed. | The input mask or mask of the input CIDR is not allowed. |
| 400 | IllegalParam.Ipv6Isp | The specified Ipv6Isp is illegal. | The specified Ipv6Isp is illegal. |
| 400 | IllegalParam.CidrMask | The input CIDR mask is illegal. | The input CIDR mask is illegal. |
| 500 | OperationFailed.ResourceNotEnough | Insufficient resources. | The resources that you request are insufficient. If you still want to request the resources, submit a ticket. |
| 403 | Forbbiden | User not authorized to operate on the specified resource. | User not authorized to operate on the specified resource. |
| 404 | ResourceNotFound.IpamPool | The dependent IPAM pool is not found. | The dependent IPAM pool is not found. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.