Vpc
This class encapsulates and extends the ROS resource type ALIYUN::ECS::VPC
, which is used to create a virtual private cloud (VPC).
Initializers
import com.aliyun.ros.cdk.ecs.Vpc;
Vpc.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
// .cidrBlock(java.lang.String)
// .cidrBlock(IResolvable)
// .description(java.lang.String)
// .description(IResolvable)
// .enableIpv6(java.lang.Boolean)
// .enableIpv6(IResolvable)
// .ipv6CidrBlock(java.lang.String)
// .ipv6CidrBlock(IResolvable)
// .ipv6Isp(java.lang.String)
// .ipv6Isp(IResolvable)
// .resourceGroupId(java.lang.String)
// .resourceGroupId(IResolvable)
// .secondaryCidrBlocks(IResolvable)
// .secondaryCidrBlocks(java.util.List<java.lang.String)
// .secondaryCidrBlocks(IResolvable>)
// .tags(java.util.List<TagsProperty>)
// .userCidr(java.lang.String)
// .userCidr(IResolvable)
// .vpcName(java.lang.String)
// .vpcName(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. |
cidrBlock |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property cidrBlock: The IP address range of the VPC in the CIDR block form. |
description |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property description: Description of the vpc, [2, 256] characters. |
enableIpv6 |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property enableIpv6: Whether to enable an IPv6 network cidr, the value is:False (default): not turned on.True: On. |
ipv6CidrBlock |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property ipv6CidrBlock: IPv6 network cidr of the VPC. |
ipv6Isp |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property ipv6Isp: The Internet service provider (ISP) for IPv6 addresses of the VPC. |
resourceGroupId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property resourceGroupId: Resource group id. |
secondaryCidrBlocks |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property secondaryCidrBlocks: The secondary IPv4 CIDR blocks. |
tags |
java.util.List<TagsProperty> |
Property tags: Tags to attach to vpc. |
userCidr |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property userCidr: The user CIDR block. |
vpcName |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property vpcName: Display name of the vpc instance, [2, 128] English or Chinese characters, must start with a letter or Chinese in size, can contain numbers, '_' or '.', '-'. |
scope
Required
- Type: com.aliyun.ros.cdk.core.Construct
id
Required
- Type: java.lang.String
enableResourcePropertyConstraint
Optional
- Type: java.lang.Boolean
cidrBlock
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property cidrBlock: The IP address range of the VPC in the CIDR block form.
You can use the following IP address ranges and their subnets: 10.0.0.0/8 172.16.0.0/12 (Default) 192.168.0.0/16
description
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property description: Description of the vpc, [2, 256] characters.
Do not fill or empty, the default is empty.
enableIpv6
Optional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property enableIpv6: Whether to enable an IPv6 network cidr, the value is:False (default): not turned on.True: On.
ipv6CidrBlock
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property ipv6CidrBlock: IPv6 network cidr of the VPC.
ipv6Isp
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property ipv6Isp: The Internet service provider (ISP) for IPv6 addresses of the VPC.
Valid values: BGP(default): Alibaba Cloud BGP IPv6 ChinaMobile: China Mobile (single line) ChinaUnicom: China Unicom (single line) ChinaTelecom: China Telecom (single line) Note If your Alibaba Cloud account is allowed to activate single-ISP bandwidth, you can set the parameter to ChinaTelecom, ChinaUnicom, and ChinaMobile.
resourceGroupId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: Resource group id.
secondaryCidrBlocks
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property secondaryCidrBlocks: The secondary IPv4 CIDR blocks.
tags
Optional
- Type: java.util.List<TagsProperty>
Property tags: Tags to attach to vpc.
Max support 20 tags to add during create vpc. Each tag with two properties Key and Value, and Key is required.
userCidr
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property userCidr: The user CIDR block.
Separate multiple CIDR blocks with commas (,). At most three CIDR blocks are supported.
vpcName
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vpcName: Display name of the vpc instance, [2, 128] English or Chinese characters, must start with a letter or Chinese in size, can contain numbers, '_' or '.', '-'.
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.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
Name | Description |
---|---|
isConstruct |
Return whether the given object is a Construct. |
isConstruct
import com.aliyun.ros.cdk.ecs.Vpc;
Vpc.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- 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. |
attrRouteTableId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute RouteTableId: The router table id of created VPC. |
attrVpcId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute VpcId: Id of created VPC. |
attrVpcName |
com.aliyun.ros.cdk.core.IResolvable |
Attribute VpcName: The name of VPC. |
attrVRouterId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute VRouterId: Router id of created VPC. |
node
Required
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
ref
Required
public java.lang.String getRef();
- Type: java.lang.String
stack
Required
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resource
Optional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrRouteTableId
Required
public IResolvable getAttrRouteTableId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute RouteTableId: The router table id of created VPC.
attrVpcId
Required
public IResolvable getAttrVpcId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute VpcId: Id of created VPC.
attrVpcName
Required
public IResolvable getAttrVpcName();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute VpcName: The name of VPC.
attrVRouterId
Required
public IResolvable getAttrVRouterId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute VRouterId: Router id of created VPC.