public static class CreateLaunchTemplateRequest.CreateLaunchTemplateRequestNetworkInterface
extends com.aliyun.tea.TeaModel
限定符和类型 | 字段和说明 |
---|---|
String |
description
The description of the secondary ENI.
|
String |
instanceType
The instance type of the instance.
|
String |
networkInterfaceName
The name of ENI N.
|
String |
networkInterfaceTrafficMode
The communication mode of the primary ENI.
|
String |
primaryIpAddress
The primary IP address to assign to ENI N.
|
String |
securityGroupId
The ID of the security group to which to assign secondary ENI N.
|
List<String> |
securityGroupIds
The ID of security group N to which to assign ENI N.
|
String |
vSwitchId
The ID of the vSwitch to which to connect to ENI N.
|
构造器和说明 |
---|
CreateLaunchTemplateRequestNetworkInterface() |
@NameInMap(value="Description") public String description
The description of the secondary ENI. The description must be 2 to 256 characters in length and cannot start with `http://` or `https://`. The value of N in `NetworkInterface.N` cannot be greater than 1.
@NameInMap(value="InstanceType") public String instanceType
The instance type of the instance.
@NameInMap(value="NetworkInterfaceName") public String networkInterfaceName
The name of ENI N.
Take note of the following items:
* Valid values of N: 1 and 2. If the value of N is 1, you can configure a primary or secondary ENI. If the value of N is 2, you must configure a primary ENI and a secondary ENI.
* If `NetworkInterface.N.InstanceType` is set to `Primary`, you do not need to set this parameter.
@NameInMap(value="NetworkInterfaceTrafficMode") public String networkInterfaceTrafficMode
The communication mode of the primary ENI. Valid values:
* Standard: uses the TCP communication mode.
* HighPerformance: uses the remote direct memory access (RDMA) communication mode with the Elastic RDMA Interface (ERI) enabled.
@NameInMap(value="PrimaryIpAddress") public String primaryIpAddress
The primary IP address to assign to ENI N.
Take note of the following items:
* Valid values of N: 1 and 2.
* If the value of N is 1, you can configure a primary or secondary ENI. If this parameter is specified, `Amount` is set to a numeric value greater than 1, and NetworkInterface.N.InstanceType is set to Primary, the specified number of instances are created and consecutive primary IP addresses starting from the specified one are assigned to the instances. In this case, you cannot attach secondary ENIs to the instances.
* If the value of N is 2, you can configure a primary ENI and a secondary ENI. If this parameter is specified, `Amount` is set to a numeric value greater than 1, and NetworkInterface.N.InstanceType is set to Primary, you cannot set `NetworkInterface.2.InstanceType` to Secondary to attach a secondary ENI.
* If `NetworkInterface.N.InstanceType` is set to `Primary`, this parameter is equivalent to `PrivateIpAddress` and you cannot specify `PrivateIpAddress`.
* If `NetworkInterface.N.InstanceType` is set to `Secondary` or left empty, the specified primary IP address is assigned to the secondary ENI. The default value is an IP address that is randomly selected from within the CIDR block of the vSwitch to which to connect the secondary ENI.
> You can attach only a single secondary ENI when you create an instance. After the instance is created, you can call the [CreateNetworkInterface](~~58504~~) and [AttachNetworkInterface](~~58515~~) operations to attach more secondary ENIs.
@NameInMap(value="SecurityGroupId") public String securityGroupId
The ID of the security group to which to assign secondary ENI N.
Take note of the following items:
* Valid values of N: 1 and 2. If the value of N is 1, you can configure a primary or secondary ENI. If the value of N is 2, you must configure a primary ENI and a secondary ENI.
* If `NetworkInterface.N.InstanceType` is set to `Primary`, you must set this parameter. In this case, this parameter is equivalent to `SecurityGroupId` and you cannot specify `SecurityGroupId`, `SecurityGroupIds.N`, or `NetworkInterface.N.SecurityGroupIds.N`.
* If `NetworkInterface.N.InstanceType` is set to `Secondary` or left empty, this parameter is optional. The default value is the ID of the security group to which to assign the ECS instance.
@NameInMap(value="SecurityGroupIds") public List<String> securityGroupIds
The ID of security group N to which to assign ENI N.
* Valid values of the first N: 1 and 2. If the value of N is 1, you can configure a primary or secondary ENI. If the value of N is 2, you can configure a primary ENI and a secondary ENI.
* The second N indicates that one or more security group IDs can be specified. The valid values of N vary based on the maximum number of security groups to which an instance can belong. For more information, see the "Security group limits" section in [Limits](~~25412#SecurityGroupQuota1~~).
Take note of the following items:
* If `NetworkInterface.N.InstanceType` is set to `Primary`, you must set this parameter or `NetworkInterface.N.SecurityGroupId`. In this case, this parameter is equivalent to `SecurityGroupIds.N` and you cannot specify `SecurityGroupId`, `SecurityGroupIds.N`, or `NetworkInterface.N.SecurityGroupId`.
* If `NetworkInterface.N.InstanceType` is set to `Secondary` or left empty, this parameter is optional. The default value is the ID of the security group to which to assign the ECS instance.
@NameInMap(value="VSwitchId") public String vSwitchId
The ID of the vSwitch to which to connect to ENI N.
Take note of the following items:
* Valid values of N: 1 and 2. If the value of N is 1, you can configure a primary or secondary ENI. If the value of N is 2, you must configure a primary ENI and a secondary ENI.
* If `NetworkInterface.N.InstanceType` is set to `Primary`, you must set this parameter. In this case, this parameter is equivalent to `VSwitchId` and you cannot specify `VSwitchId`.
* If `NetworkInterface.N.InstanceType` is set to `Secondary` or left empty, this parameter is optional. The default value is the ID of the vSwitch to which to connect the instance.
public CreateLaunchTemplateRequestNetworkInterface()
public static CreateLaunchTemplateRequest.CreateLaunchTemplateRequestNetworkInterface build(Map<String,?> map) throws Exception
Exception
public CreateLaunchTemplateRequest.CreateLaunchTemplateRequestNetworkInterface setDescription(String description)
public String getDescription()
public CreateLaunchTemplateRequest.CreateLaunchTemplateRequestNetworkInterface setInstanceType(String instanceType)
public String getInstanceType()
public CreateLaunchTemplateRequest.CreateLaunchTemplateRequestNetworkInterface setNetworkInterfaceName(String networkInterfaceName)
public String getNetworkInterfaceName()
public CreateLaunchTemplateRequest.CreateLaunchTemplateRequestNetworkInterface setNetworkInterfaceTrafficMode(String networkInterfaceTrafficMode)
public String getNetworkInterfaceTrafficMode()
public CreateLaunchTemplateRequest.CreateLaunchTemplateRequestNetworkInterface setPrimaryIpAddress(String primaryIpAddress)
public String getPrimaryIpAddress()
public CreateLaunchTemplateRequest.CreateLaunchTemplateRequestNetworkInterface setSecurityGroupId(String securityGroupId)
public String getSecurityGroupId()
public CreateLaunchTemplateRequest.CreateLaunchTemplateRequestNetworkInterface setSecurityGroupIds(List<String> securityGroupIds)
public CreateLaunchTemplateRequest.CreateLaunchTemplateRequestNetworkInterface setVSwitchId(String vSwitchId)
public String getVSwitchId()
Copyright © 2023. All rights reserved.