Skip to content

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 '.', '-'.

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

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: 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.

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.ecs.Vpc;
Vpc.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.
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.

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

attrRouteTableIdRequired

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

Attribute RouteTableId: The router table id of created VPC.


attrVpcIdRequired

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

Attribute VpcId: Id of created VPC.


attrVpcNameRequired

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

Attribute VpcName: The name of VPC.


attrVRouterIdRequired

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

Attribute VRouterId: Router id of created VPC.