Vpc
- Implements: IVpc
This class encapsulates and extends the ROS resource type ALIYUN::ECS::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: The value contains 1 to 128 characters and cannot start with http:\/\/ or https:\/\/. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
cidrBlockOptional
- 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
descriptionOptional
- 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.
enableIpv6Optional
- 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.
ipv6CidrBlockOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property ipv6CidrBlock: IPv6 network cidr of the VPC.
ipv6IspOptional
- 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.
resourceGroupIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: Resource group id.
secondaryCidrBlocksOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property secondaryCidrBlocks: The secondary IPv4 CIDR blocks.
tagsOptional
- 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.
userCidrOptional
- 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.
vpcNameOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vpcName: The value contains 1 to 128 characters and cannot start with http:\/\/ or https:\/\/.
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. |
fetchCondition | No description. |
fetchDependency | No description. |
fetchResourceDesc | 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
fetchCondition
public RosCondition fetchCondition()
fetchDependency
public java.util.List<java.lang.String> fetchDependency()
fetchResourceDesc
public java.lang.String fetchResourceDesc()
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. |
env | com.aliyun.ros.cdk.core.IResourceEnvironment | The environment this resource belongs to. |
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 | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute RouteTableId: The router table id of created VPC. |
attrVpcId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute VpcId: Id of created VPC. |
attrVpcName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute VpcName: The name of VPC. |
attrVRouterId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute VRouterId: Router id of created VPC. |
props | VPCProps | No description. |
nodeRequired
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
envRequired
public IResourceEnvironment getEnv();
- Type: com.aliyun.ros.cdk.core.IResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
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
attrRouteTableIdRequired
public java.lang.Object getAttrRouteTableId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute RouteTableId: The router table id of created VPC.
attrVpcIdRequired
public java.lang.Object getAttrVpcId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute VpcId: Id of created VPC.
attrVpcNameRequired
public java.lang.Object getAttrVpcName();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute VpcName: The name of VPC.
attrVRouterIdRequired
public java.lang.Object getAttrVRouterId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute VRouterId: Router id of created VPC.
propsRequired
public VPCProps getProps();
- Type: VPCProps