Skip to content

RouterInterface

This class encapsulates and extends the ROS resource type ALIYUN::VPC::RouterInterfaceThe , which resource creates a router interface.

Initializers

import com.aliyun.ros.cdk.vpc.RouterInterface;
RouterInterface.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
    .role(java.lang.String)
    .role(IResolvable)
    .routerId(java.lang.String)
    .routerId(IResolvable)
//  .accessPointId(java.lang.String)
//  .accessPointId(IResolvable)
//  .autoPay(java.lang.Boolean)
//  .autoPay(IResolvable)
//  .autoRenew(java.lang.Boolean)
//  .autoRenew(IResolvable)
//  .description(java.lang.String)
//  .description(IResolvable)
//  .fastLinkMode(java.lang.Boolean)
//  .fastLinkMode(IResolvable)
//  .healthCheckSourceIp(java.lang.String)
//  .healthCheckSourceIp(IResolvable)
//  .healthCheckTargetIp(java.lang.String)
//  .healthCheckTargetIp(IResolvable)
//  .instanceChargeType(java.lang.String)
//  .instanceChargeType(IResolvable)
//  .name(java.lang.String)
//  .name(IResolvable)
//  .oppositeAccessPointId(java.lang.String)
//  .oppositeAccessPointId(IResolvable)
//  .oppositeInterfaceId(java.lang.String)
//  .oppositeInterfaceId(IResolvable)
//  .oppositeInterfaceOwnerId(java.lang.String)
//  .oppositeInterfaceOwnerId(IResolvable)
//  .oppositeRegionId(java.lang.String)
//  .oppositeRegionId(IResolvable)
//  .oppositeRouterId(java.lang.String)
//  .oppositeRouterId(IResolvable)
//  .oppositeRouterType(java.lang.String)
//  .oppositeRouterType(IResolvable)
//  .period(java.lang.Number)
//  .period(IResolvable)
//  .pricingCycle(java.lang.String)
//  .pricingCycle(IResolvable)
//  .resourceGroupId(java.lang.String)
//  .resourceGroupId(IResolvable)
//  .routerType(java.lang.String)
//  .routerType(IResolvable)
//  .spec(java.lang.String)
//  .spec(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.
role java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property role: RouterInterface role.
routerId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property routerId: The router ID to create RouterInterface.
accessPointId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property accessPointId: Access point ID.
autoPay java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property autoPay: Specifies whether to enable automatic payment.
autoRenew java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property autoRenew: Specifies whether auto-renewal is enabled.
description java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property description: Custom description of the RouterInterface, [2, 256] characters.
fastLinkMode java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property fastLinkMode: Specifies whether the VBR-associated router interface is created in fast link mode.
healthCheckSourceIp java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property healthCheckSourceIp: Source IP address of the packet for leased line HealthCheck in leased line disaster tolerance and ECMP scenarios.
healthCheckTargetIp java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property healthCheckTargetIp: Target IP address of the packet for leased line HealthCheck in leased line disaster tolerance and ECMP scenarios.
instanceChargeType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property instanceChargeType: The billing method of the router interface.
name java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property name: Custom name of the RouterInterface, [2, 128] English or Chinese characters, must start with a letter or Chinese in size, can contain numbers, '_' or '.', '-'.
oppositeAccessPointId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property oppositeAccessPointId: Access point ID of the connection peer RouterInterface.
oppositeInterfaceId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property oppositeInterfaceId: The ID of the peer router interface.
oppositeInterfaceOwnerId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property oppositeInterfaceOwnerId: Owner account ID of the connection peer RouterInterface.
oppositeRegionId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property oppositeRegionId: The region where the connection peer RouterInterface locates.
oppositeRouterId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property oppositeRouterId: The router ID of the connection peer RouterInterface.
oppositeRouterType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property oppositeRouterType: Router type of the connection peer router.
period java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property period: Prepaid time period.
pricingCycle java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property pricingCycle: Unit of the payment cycle.
resourceGroupId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property resourceGroupId: The ID of the resource group.
routerType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property routerType: The type of router that is associated with the router interface.
spec java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property spec: The specification of the router interface and the corresponding bandwidth.

scopeRequired

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

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

roleRequired

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

Property role: RouterInterface role.

Now support 'InitiatingSide|AcceptingSide'.


routerIdRequired

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

Property routerId: The router ID to create RouterInterface.


accessPointIdOptional

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

Property accessPointId: Access point ID.

If 'RouterType' is specified as 'VBR', the value is required.


autoPayOptional

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

Property autoPay: Specifies whether to enable automatic payment.

Valid values:

  • false (default): The automatic payment is disabled. If you select this option, you must go to the Order Center to complete the payment after an order is generated.
  • true: The automatic payment is enabled. Payments are automatically complete after an order is generated.

This parameter is required if InstanceChargeType is set to PrePaid.


autoRenewOptional

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

Property autoRenew: Specifies whether auto-renewal is enabled.


descriptionOptional

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

Property description: Custom description of the RouterInterface, [2, 256] characters.

Don't fill or empty, the default is empty.


fastLinkModeOptional

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

Property fastLinkMode: Specifies whether the VBR-associated router interface is created in fast link mode.

Fast link mode allows the router interfaces between VBR and VPC ends to be automatically connected after they are created. This parameter is valid only when the value of RouterType is VBR and the value of OppositeRouterType is VRouter.

  • When the value of the FastLinkMode parameter is true, the value of the Role parameter must be InitiatingSide, and the AccessPointId, OppositeRouterType, OppsiteRouterId, and OppositeInterfaceOwnerId parameters are required.

healthCheckSourceIpOptional

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

Property healthCheckSourceIp: Source IP address of the packet for leased line HealthCheck in leased line disaster tolerance and ECMP scenarios.

It is valid only for a VRouter RouterInterface with a peer on a VBR. The source IP address must be in the VPC of the local VRouter and is not used. HealthCheckSourceIp and HealthCheckTargetIp parameters must be both specified or left unspecified.


healthCheckTargetIpOptional

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

Property healthCheckTargetIp: Target IP address of the packet for leased line HealthCheck in leased line disaster tolerance and ECMP scenarios.

It is valid only for a VRouter RouterInterface with a peer on a VBR. Usually you can use the CPE IP address of the leased line user's client (that is, the PeerGatewayIP on the VBR of the peer RouterInterface), you can also specify another IP address of the leased line user's client as the HealthCheck target IP address. HealthCheckSourceIp and HealthCheckTargetIp parameters must be both specified or left unspecified.


instanceChargeTypeOptional

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

Property instanceChargeType: The billing method of the router interface.


nameOptional

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

Property name: Custom name of the RouterInterface, [2, 128] English or Chinese characters, must start with a letter or Chinese in size, can contain numbers, '_' or '.', '-'.


oppositeAccessPointIdOptional

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

Property oppositeAccessPointId: Access point ID of the connection peer RouterInterface.

If 'OppositeRouterType' is specified as 'VBR', the value is required.


oppositeInterfaceIdOptional

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

Property oppositeInterfaceId: The ID of the peer router interface.


oppositeInterfaceOwnerIdOptional

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

Property oppositeInterfaceOwnerId: Owner account ID of the connection peer RouterInterface.

The default value is current user Id.


oppositeRegionIdOptional

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

Property oppositeRegionId: The region where the connection peer RouterInterface locates.

The default value is region where stack is created.


oppositeRouterIdOptional

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

Property oppositeRouterId: The router ID of the connection peer RouterInterface.


oppositeRouterTypeOptional

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

Property oppositeRouterType: Router type of the connection peer router.

Now support 'VRouter|VBR'. If 'RouterType' is specified as 'VBR', the value must be 'VRouter'.


periodOptional

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

Property period: Prepaid time period.

It could be from 1 to 9 when PricingCycle is Month, or 1 to 3 when PricingCycle is Year.


pricingCycleOptional

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

Property pricingCycle: Unit of the payment cycle.

It could be Month (default) or Year.


resourceGroupIdOptional

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

Property resourceGroupId: The ID of the resource group.


routerTypeOptional

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

Property routerType: The type of router that is associated with the router interface.

Valid values:

  • VRouter
  • VBR

specOptional

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

Property spec: The specification of the router interface and the corresponding bandwidth.

Valid values:

  • Mini.2: 2 Mbit/s
  • Mini.5: 5 Mbit/s
  • Small.1: 10 Mbit/s
  • Small.2: 20 Mbit/s
  • Small.5: 50 Mbit/s
  • Middle.1: 100 Mbit/s
  • Middle.2: 200 Mbit/s
  • Middle.5: 500 Mbit/s
  • Large.1: 1,000 Mbit/s
  • Large.2: 2,000 Mbit/s
  • Large.5: 5,000 Mbit/s
  • Xlarge.1: 10,000 Mbit/s

If Role is set to AcceptingSide, set Spec to Negative. This indicates that you do not need to specify the specification when you create an acceptor router interface.


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.

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

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)

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.RouterInterface;
RouterInterface.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.
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.
attrRouterInterfaceId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute RouterInterfaceId: The ID of created RouterInterface.
props RouterInterfaceProps 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

attrRouterInterfaceIdRequired

public java.lang.Object getAttrRouterInterfaceId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute RouterInterfaceId: The ID of created RouterInterface.


propsRequired

public RouterInterfaceProps getProps();