Skip to content

VpcCidrBlockAssociation

This class encapsulates and extends the ROS resource type ALIYUN::VPC::VpcCidrBlockAssociation, which is used to add a secondary CIDR block to a virtual private cloud (VPC).

Initializers

import com.aliyun.ros.cdk.vpc.VpcCidrBlockAssociation;
VpcCidrBlockAssociation.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
    .vpcId(java.lang.String)
    .vpcId(IResolvable)
//  .ipamPoolId(java.lang.String)
//  .ipamPoolId(IResolvable)
//  .iPv6CidrBlock(java.lang.String)
//  .iPv6CidrBlock(IResolvable)
//  .ipv6Isp(java.lang.String)
//  .ipv6Isp(IResolvable)
//  .ipVersion(java.lang.String)
//  .ipVersion(IResolvable)
//  .secondaryCidrBlock(java.lang.String)
//  .secondaryCidrBlock(IResolvable)
//  .secondaryCidrMask(java.lang.Number)
//  .secondaryCidrMask(IResolvable)
    .build();
Name Type Description
scope com.aliyun.ros.cdk.core.Construct No description.
id java.lang.String No description.
enableResourcePropertyConstraint java.lang.Boolean No description.
vpcId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property vpcId: The ID of the VPC to which you want to add a secondary CIDR block.
ipamPoolId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property ipamPoolId: The ID of the IP Address Manager (IPAM) pool that contains IPv4 addresses.
iPv6CidrBlock java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property iPv6CidrBlock: The IPv6 CIDR block to be added.
ipv6Isp java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property ipv6Isp: The type of the IPv6 CIDR block.
ipVersion java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property ipVersion: The version of the IP address.
secondaryCidrBlock java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property secondaryCidrBlock: The IPv4 CIDR block to be added.
secondaryCidrMask java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property secondaryCidrMask: Add an additional network segment to the VPC from the iPam address pool by entering a mask.

scopeRequired

  • Type: com.aliyun.ros.cdk.core.Construct

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

vpcIdRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property vpcId: The ID of the VPC to which you want to add a secondary CIDR block.


ipamPoolIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property ipamPoolId: The ID of the IP Address Manager (IPAM) pool that contains IPv4 addresses.


iPv6CidrBlockOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property iPv6CidrBlock: The IPv6 CIDR block to be added.

Note You must and can specify only one of SecondaryCidrBlock and Ipv6CidrBlock.


ipv6IspOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property ipv6Isp: The type of the IPv6 CIDR block.

Valid values: BGP (default) ChinaMobile ChinaUnicom ChinaTelecom Note If your Alibaba Cloud account is allowed to activate single-ISP bandwidth, you can set this parameter to ChinaTelecom, ChinaUnicom, or ChinaMobile.


ipVersionOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property ipVersion: The version of the IP address.

Valid values: IPV4: the IPv4 address. IPV6: the IPv6 address. If you set IpVersion to IPV6 and do not specify SecondaryCidrBlock, you can add a secondary IPv6 CIDR block to the VPC.


secondaryCidrBlockOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property secondaryCidrBlock: The IPv4 CIDR block to be added.

Take note of the following requirements: You can specify one of the following standard IPv4 CIDR blocks or their subnets as the secondary IPv4 CIDR block of the VPC: 192.168.0.0/16, 172.16.0.0/12, and 10.0.0.0/8. You can also use a custom CIDR block other than 100.64.0.0/10, 224.0.0.0/4, 127.0.0.0/8, 169.254.0.0/16, or their subnets as the secondary IPv4 CIDR block of the VPC. The CIDR block must meet the following requirements: The CIDR block cannot start with 0. The subnet mask must be 8 to 28 bits in length. The CIDR block cannot overlap with the primary CIDR block or an existing secondary CIDR block of the VPC. Note You must and can specify only one of SecondaryCidrBlock and Ipv6CidrBlock.


secondaryCidrMaskOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property secondaryCidrMask: Add an additional network segment to the VPC from the iPam address pool by entering a mask.

Explain that the designated iPam address pool adds additional network segments to VPC, and the parameter SecondaryCidrblock or SecondaryCidrmask inputs at least one.


Methods

Name Description
toString Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
addCondition No description.
addCount No description.
addDependency No description.
addResourceDesc No description.
applyRemovalPolicy No description.
getAtt No description.
setMetadata No description.

toString

public java.lang.String toString()

Returns a string representation of this construct.

synthesize

public void synthesize(ISynthesisSession session)

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

sessionRequired

  • Type: com.aliyun.ros.cdk.core.ISynthesisSession

The synthesis session.


addCondition

public void addCondition(RosCondition condition)

conditionRequired

  • Type: com.aliyun.ros.cdk.core.RosCondition

addCount

public void addCount(java.lang.Number OR IResolvable count)

countRequired

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

addDependency

public void addDependency(Resource resource)

resourceRequired

  • Type: com.aliyun.ros.cdk.core.Resource

addResourceDesc

public void addResourceDesc(java.lang.String desc)

descRequired

  • Type: java.lang.String

applyRemovalPolicy

public void applyRemovalPolicy(RemovalPolicy policy)

policyRequired

  • Type: com.aliyun.ros.cdk.core.RemovalPolicy

getAtt

public IResolvable getAtt(java.lang.String name)

nameRequired

  • Type: java.lang.String

setMetadata

public void setMetadata(java.lang.String key, java.lang.Object value)

keyRequired

  • Type: java.lang.String

valueRequired

  • Type: java.lang.Object

Static Functions

Name Description
isConstruct Return whether the given object is a Construct.

isConstruct

import com.aliyun.ros.cdk.vpc.VpcCidrBlockAssociation;
VpcCidrBlockAssociation.isConstruct(java.lang.Object x)

Return whether the given object is a Construct.

xRequired

  • Type: java.lang.Object

Properties

Name Type Description
node com.aliyun.ros.cdk.core.ConstructNode The construct tree node associated with this construct.
ref java.lang.String No description.
stack com.aliyun.ros.cdk.core.Stack The stack in which this resource is defined.
resource com.aliyun.ros.cdk.core.RosResource No description.
attrVpcId com.aliyun.ros.cdk.core.IResolvable Attribute VpcId: The ID of the VPC to which you want to add a secondary CIDR block.

nodeRequired

public ConstructNode getNode();
  • Type: com.aliyun.ros.cdk.core.ConstructNode

The construct tree node associated with this construct.


refRequired

public java.lang.String getRef();
  • Type: java.lang.String

stackRequired

public Stack getStack();
  • Type: com.aliyun.ros.cdk.core.Stack

The stack in which this resource is defined.


resourceOptional

public RosResource getResource();
  • Type: com.aliyun.ros.cdk.core.RosResource

attrVpcIdRequired

public IResolvable getAttrVpcId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute VpcId: The ID of the VPC to which you want to add a secondary CIDR block.