Skip to content

NetworkInterfaceProps

Properties for defining a NetworkInterface.

See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-ecs-networkinterface

Initializer

import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkecs"
&alicloudroscdkecs.NetworkInterfaceProps {
    VSwitchId: interface{},
    DeleteOnRelease: interface{},
    Description: interface{},
    Ipv4PrefixCount: interface{},
    Ipv4Prefixes: interface{},
    Ipv6AddressCount: interface{},
    Ipv6Addresses: interface{},
    Ipv6PrefixCount: interface{},
    Ipv6Prefixes: interface{},
    NetworkInterfaceName: interface{},
    NetworkInterfaceTrafficMode: interface{},
    PrimaryIpAddress: interface{},
    PrivateIpAddresses: interface{},
    QueueNumber: interface{},
    ResourceGroupId: interface{},
    RxQueueSize: interface{},
    SecondaryPrivateIpAddressCount: interface{},
    SecurityGroupId: interface{},
    SecurityGroupIds: interface{},
    Tags: *[]github.com/alibabacloud-go/ros-cdk/alicloudroscdkecs.RosNetworkInterface.TagsProperty,
    TxQueueSize: interface{},
}

Properties

Name Type Description
VSwitchId interface{} Property vSwitchId: The ID of the VSwitch for the elastic network interface.
DeleteOnRelease interface{} Property deleteOnRelease: Specifies whether to delete the ENI when the instance is released.
Description interface{} Property description: The description of the elastic network interface.
Ipv4PrefixCount interface{} Property ipv4PrefixCount: Specifies one or more IPv4 prefixes for the elastic network interface.
Ipv4Prefixes interface{} Property ipv4Prefixes: Specifies one or more IPv4 prefixes for the elastic network interface.
Ipv6AddressCount interface{} Property ipv6AddressCount: The number of random IPv6 addresses to assign to the elastic network interface.
Ipv6Addresses interface{} Property ipv6Addresses: The IPv6 address N to assign to the ENI.
Ipv6PrefixCount interface{} Property ipv6PrefixCount: Specifies one or more IPv6 prefixes for the elastic network interface.
Ipv6Prefixes interface{} Property ipv6Prefixes: Specifies one or more IPv6 prefixes for the elastic network interface.
NetworkInterfaceName interface{} Property networkInterfaceName: Name of your ENI.
NetworkInterfaceTrafficMode interface{} Property networkInterfaceTrafficMode: The traffic mode of the elastic network interface.
PrimaryIpAddress interface{} Property primaryIpAddress: The primary private IP address of the ENI.
PrivateIpAddresses interface{} Property privateIpAddresses: Specifies secondary private IP addresses of the ENI.
QueueNumber interface{} Property queueNumber: The number of queues that are supported by the ENI.
ResourceGroupId interface{} Property resourceGroupId: Resource group id.
RxQueueSize interface{} Property rxQueueSize: Elastic network card inbound queue depth.
SecondaryPrivateIpAddressCount interface{} Property secondaryPrivateIpAddressCount: The number of private IP addresses that can be created automatically by ECS.
SecurityGroupId interface{} Property securityGroupId: The ID of the security group for the elastic network interface.
SecurityGroupIds interface{} Property securityGroupIds: The IDs of one or more security groups to which to add the elastic network interface.
Tags *[]TagsProperty Property tags: Tags to attach to instance.
TxQueueSize interface{} Property txQueueSize: Elastic network card outbound queue depth.

VSwitchIdRequired

VSwitchId interface{}
  • Type: interface{}

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

DeleteOnRelease interface{}
  • Type: interface{}

Property deleteOnRelease: Specifies whether to delete the ENI when the instance is released.


DescriptionOptional

Description interface{}
  • Type: interface{}

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

Ipv4PrefixCount interface{}
  • Type: interface{}

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

Ipv4Prefixes interface{}
  • Type: interface{}

Property ipv4Prefixes: Specifies one or more IPv4 prefixes for the elastic network interface.


Ipv6AddressCountOptional

Ipv6AddressCount interface{}
  • Type: interface{}

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.N or Ipv6AddressCount, but not both, to assign IPv6 addresses.


Ipv6AddressesOptional

Ipv6Addresses interface{}
  • Type: interface{}

Property ipv6Addresses: The IPv6 address N to assign to the ENI.


Ipv6PrefixCountOptional

Ipv6PrefixCount interface{}
  • Type: interface{}

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

Ipv6Prefixes interface{}
  • Type: interface{}

Property ipv6Prefixes: Specifies one or more IPv6 prefixes for the elastic network interface.


NetworkInterfaceNameOptional

NetworkInterfaceName interface{}
  • Type: interface{}

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

NetworkInterfaceTrafficMode interface{}
  • Type: interface{}

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

PrimaryIpAddress interface{}
  • Type: interface{}

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

PrivateIpAddresses interface{}
  • Type: interface{}

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

QueueNumber interface{}
  • Type: interface{}

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

ResourceGroupId interface{}
  • Type: interface{}

Property resourceGroupId: Resource group id.


RxQueueSizeOptional

RxQueueSize interface{}
  • Type: interface{}

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

SecondaryPrivateIpAddressCount interface{}
  • Type: interface{}

Property secondaryPrivateIpAddressCount: The number of private IP addresses that can be created automatically by ECS.


SecurityGroupIdOptional

SecurityGroupId interface{}
  • Type: interface{}

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 SecurityGroupId or SecurityGroupIds.N, but not both.


SecurityGroupIdsOptional

SecurityGroupIds interface{}
  • Type: interface{}

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 SecurityGroupId or SecurityGroupIds.N, but not both.


TagsOptional

Tags *[]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

TxQueueSize interface{}
  • Type: interface{}

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.