NetworkInterface
- Implements: INetworkInterface
This class encapsulates and extends the ROS resource type ALIYUN::ECS::NetworkInterface.
Initializers
import com.aliyun.ros.cdk.ecs.NetworkInterface;
NetworkInterface.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.vSwitchId(java.lang.String)
.vSwitchId(IResolvable)
// .deleteOnRelease(java.lang.Boolean)
// .deleteOnRelease(IResolvable)
// .description(java.lang.String)
// .description(IResolvable)
// .ipv4PrefixCount(java.lang.Number)
// .ipv4PrefixCount(IResolvable)
// .ipv4Prefixes(IResolvable)
// .ipv4Prefixes(java.util.List<java.lang.String)
// .ipv4Prefixes(IResolvable>)
// .ipv6AddressCount(java.lang.Number)
// .ipv6AddressCount(IResolvable)
// .ipv6Addresses(IResolvable)
// .ipv6Addresses(java.util.List<java.lang.String)
// .ipv6Addresses(IResolvable>)
// .ipv6PrefixCount(java.lang.Number)
// .ipv6PrefixCount(IResolvable)
// .ipv6Prefixes(IResolvable)
// .ipv6Prefixes(java.util.List<java.lang.String)
// .ipv6Prefixes(IResolvable>)
// .networkInterfaceName(java.lang.String)
// .networkInterfaceName(IResolvable)
// .networkInterfaceTrafficMode(java.lang.String)
// .networkInterfaceTrafficMode(IResolvable)
// .primaryIpAddress(java.lang.String)
// .primaryIpAddress(IResolvable)
// .privateIpAddresses(IResolvable)
// .privateIpAddresses(java.util.List<java.lang.String)
// .privateIpAddresses(IResolvable>)
// .queueNumber(java.lang.Number)
// .queueNumber(IResolvable)
// .resourceGroupId(java.lang.String)
// .resourceGroupId(IResolvable)
// .rxQueueSize(java.lang.Number)
// .rxQueueSize(IResolvable)
// .secondaryPrivateIpAddressCount(java.lang.Number)
// .secondaryPrivateIpAddressCount(IResolvable)
// .securityGroupId(java.lang.String)
// .securityGroupId(IResolvable)
// .securityGroupIds(IResolvable)
// .securityGroupIds(java.util.List<java.lang.String)
// .securityGroupIds(IResolvable>)
// .tags(java.util.List<TagsProperty>)
// .txQueueSize(java.lang.Number)
// .txQueueSize(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. |
vSwitchId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property vSwitchId: The ID of the VSwitch for the elastic network interface. |
deleteOnRelease | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property deleteOnRelease: Specifies whether to delete the ENI when the instance is released. |
description | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property description: The description of the elastic network interface. |
ipv4PrefixCount | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property ipv4PrefixCount: Specifies one or more IPv4 prefixes for the elastic network interface. |
ipv4Prefixes | com.aliyun.ros.cdk.core.IResolvable OR java.util.List | Property ipv4Prefixes: Specifies one or more IPv4 prefixes for the elastic network interface. |
ipv6AddressCount | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property ipv6AddressCount: The number of random IPv6 addresses to assign to the elastic network interface. |
ipv6Addresses | com.aliyun.ros.cdk.core.IResolvable OR java.util.List | Property ipv6Addresses: The IPv6 address N to assign to the ENI. |
ipv6PrefixCount | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property ipv6PrefixCount: Specifies one or more IPv6 prefixes for the elastic network interface. |
ipv6Prefixes | com.aliyun.ros.cdk.core.IResolvable OR java.util.List | Property ipv6Prefixes: Specifies one or more IPv6 prefixes for the elastic network interface. |
networkInterfaceName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property networkInterfaceName: Name of your ENI. |
networkInterfaceTrafficMode | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property networkInterfaceTrafficMode: The traffic mode of the elastic network interface. |
primaryIpAddress | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property primaryIpAddress: The primary private IP address of the ENI. |
privateIpAddresses | com.aliyun.ros.cdk.core.IResolvable OR java.util.List | Property privateIpAddresses: Specifies secondary private IP addresses of the ENI. |
queueNumber | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property queueNumber: The number of queues that are supported by the ENI. |
resourceGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property resourceGroupId: Resource group id. |
rxQueueSize | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property rxQueueSize: Elastic network card inbound queue depth. |
secondaryPrivateIpAddressCount | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property secondaryPrivateIpAddressCount: The number of private IP addresses that can be created automatically by ECS. |
securityGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property securityGroupId: The ID of the security group for the elastic network interface. |
securityGroupIds | com.aliyun.ros.cdk.core.IResolvable OR java.util.List | Property securityGroupIds: The IDs of one or more security groups to which to add the elastic network interface. |
tags | java.util.List<TagsProperty> | Property tags: Tags to attach to instance. |
txQueueSize | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property txQueueSize: Elastic network card outbound queue depth. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
vSwitchIdRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vSwitchId: The ID of the VSwitch for the elastic network interface.
The private IP addresses for the elastic network interface are assigned from the available CIDR block of the VSwitch.
The elastic network interface and the instance to be attached must be in the same availability zone but can belong to different VSwitches.
deleteOnReleaseOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property deleteOnRelease: Specifies whether to delete the ENI when the instance is released.
descriptionOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property description: The description of the elastic network interface.
The description must be 2 to 256 characters long and cannot start with http:\/\/ or https:\/\/. Default value: empty.
ipv4PrefixCountOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property ipv4PrefixCount: Specifies one or more IPv4 prefixes for the elastic network interface.
Range: 1-10 Note: If you need to set an IPv4 prefix for an elastic network interface, you must set either Ipv4Prefixes or Ipv4PrefixCount, but not both.
ipv4PrefixesOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property ipv4Prefixes: Specifies one or more IPv4 prefixes for the elastic network interface.
ipv6AddressCountOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property ipv6AddressCount: The number of random IPv6 addresses to assign to the elastic network interface.
Valid values: 1 to 10.
You must specify either
Ipv6Address.NorIpv6AddressCount, but not both, to assign IPv6 addresses.
ipv6AddressesOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property ipv6Addresses: The IPv6 address N to assign to the ENI.
ipv6PrefixCountOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property ipv6PrefixCount: Specifies one or more IPv6 prefixes for the elastic network interface.
Range: 1-10 Note: If you need to set an IPv6 prefix for an elastic network interface, you must set either Ipv6Prefixes or Ipv6PrefixCount, but not both.
ipv6PrefixesOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property ipv6Prefixes: Specifies one or more IPv6 prefixes for the elastic network interface.
networkInterfaceNameOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property networkInterfaceName: Name of your ENI.
It is a string of [2, 128] Chinese or English characters. It must begin with a letter and can contain numbers, underscores (_), colons (:), or hyphens (-).
networkInterfaceTrafficModeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property networkInterfaceTrafficMode: The traffic mode of the elastic network interface.
Valid values:
Standard: uses the TCP traffic mode.HighPerformance: enables the Elastic RDMA Interface (ERI) and uses the RDMA traffic mode.
An elastic network interface in RDMA traffic mode can be attached only to an ERI-supported instance type. The number of these elastic network interfaces that can be attached is limited by the instance family. Default value:
Standard.
primaryIpAddressOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property primaryIpAddress: The primary private IP address of the ENI.
The specified IP address must have the same Host ID as the VSwitch. If no IP addresses are specified, a random network ID is assigned for the ENI.
privateIpAddressesOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property privateIpAddresses: Specifies secondary private IP addresses of the ENI.
This IP address must be an available IP address in the CIDR block of the VSwitch to which the ENI belongs.
queueNumberOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property queueNumber: The number of queues that are supported by the ENI.
Valid values: 1 to 2048. When you attach the ENI to an instance, make sure that the value of this parameter is less than the maximum number of queues per ENI that is allowed for the instance type. To view the maximum number of queues per ENI allowed for an instance type, you can call DescribeInstanceTypes and then check the return value of MaximumQueueNumberPerEni. By default, this parameter is empty. If you do not specify this parameter, the default number of queues per ENI for the instance type of an instance is used when you attach the ENI to the instance. To learn about the default number of queues per ENI for an instance type, you can call DescribeInstanceTypes and then check the return value of SecondaryEniQueueNumber.
resourceGroupIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: Resource group id.
rxQueueSizeOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property rxQueueSize: Elastic network card inbound queue depth.
Note: The inbound queue depth of the network card must be equal to the outbound queue depth, ranging from 8192 to 16384, and must be a power of two. Larger inbound queue depth can improve inbound throughput, but it consumes more memory.
secondaryPrivateIpAddressCountOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property secondaryPrivateIpAddressCount: The number of private IP addresses that can be created automatically by ECS.
securityGroupIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property securityGroupId: The ID of the security group for the elastic network interface.
The security group and the elastic network interface must be in the same VPC.
You must specify either
SecurityGroupIdorSecurityGroupIds.N, but not both.
securityGroupIdsOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property securityGroupIds: The IDs of one or more security groups to which to add the elastic network interface.
The security groups and the elastic network interface must be in the same VPC. The valid values of N depend on the maximum number of security groups to which an elastic network interface can be added.
You must specify either
SecurityGroupIdorSecurityGroupIds.N, but not both.
tagsOptional
- Type: java.util.List<TagsProperty>
Property tags: Tags to attach to instance.
Max support 20 tags to add during create instance. Each tag with two properties Key and Value, and Key is required.
txQueueSizeOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property txQueueSize: Elastic network card outbound queue depth.
Note: The outbound queue depth of the network card must be equal to the inbound queue depth, ranging from 8192 to 16384, and must be a power of two. Larger outbound queue depth can improve outbound throughput, but it consumes more memory.
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.NetworkInterface;
NetworkInterface.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. |
attrArn | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Arn: The Alibaba Cloud Resource Name (ARN). |
attrMacAddress | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute MacAddress: The MAC address of your Network Interface. |
attrNetworkInterfaceId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute NetworkInterfaceId: ID of your Network Interface. |
attrPrivateIpAddress | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute PrivateIpAddress: The primary private ip address of your Network Interface. |
attrSecondaryPrivateIpAddresses | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute SecondaryPrivateIpAddresses: The secondary private IP addresses of your Network Interface. |
props | NetworkInterfaceProps | 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
attrArnRequired
public java.lang.Object getAttrArn();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Arn: The Alibaba Cloud Resource Name (ARN).
attrMacAddressRequired
public java.lang.Object getAttrMacAddress();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute MacAddress: The MAC address of your Network Interface.
attrNetworkInterfaceIdRequired
public java.lang.Object getAttrNetworkInterfaceId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute NetworkInterfaceId: ID of your Network Interface.
attrPrivateIpAddressRequired
public java.lang.Object getAttrPrivateIpAddress();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute PrivateIpAddress: The primary private ip address of your Network Interface.
attrSecondaryPrivateIpAddressesRequired
public java.lang.Object getAttrSecondaryPrivateIpAddresses();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute SecondaryPrivateIpAddresses: The secondary private IP addresses of your Network Interface.
propsRequired
public NetworkInterfaceProps getProps();
- Type: NetworkInterfaceProps