public static class CreateLaunchTemplateRequest.CreateLaunchTemplateRequestNetworkInterface
extends com.aliyun.tea.TeaModel
限定符和类型 | 字段和说明 |
---|---|
String |
description
The description of the secondary ENI.
|
String |
instanceType
The type of ENI N.
|
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 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 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.
testEniDescription
@NameInMap(value="InstanceType") public String instanceType
The type of ENI N. 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.
Valid values:
Default value: Secondary.
example:ecs.g5.large
@NameInMap(value="NetworkInterfaceName") public String networkInterfaceName
The name of ENI N.
Take note of the following items:
NetworkInterface.N.InstanceType
is set to Primary
, you do not need to set this parameter.testEniName
@NameInMap(value="NetworkInterfaceTrafficMode") public String networkInterfaceTrafficMode
The communication mode of the primary ENI. Valid values:
Standard
@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.
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.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
. You cannot specify both this parameter and 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.
example:You can attach only a single secondary ENI when you create an instance. After the instance is created, you can call the CreateNetworkInterface and AttachNetworkInterface operations to attach more secondary ENIs.
192.168.**.**
@NameInMap(value="SecurityGroupId") public String securityGroupId
The ID of the security group to which to assign ENI N.
Take note of the following items:
NetworkInterface.N.InstanceType
is set to Primary
, you must set this parameter. In this case, this parameter is equivalent to SecurityGroupId
. You cannot specify SecurityGroupId
, SecurityGroupIds.N
, or NetworkInterface.N.SecurityGroupIds.N
.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 instance.sg-bp15ed6xe1yxeycg****
@NameInMap(value="SecurityGroupIds") public List<String> securityGroupIds
The ID of security group N to which to assign ENI N.
Take note of the following items:
NetworkInterface.N.InstanceType
is set to Primary
, you must specify this parameter or NetworkInterface.N.SecurityGroupId
. In this case, this parameter is equivalent to SecurityGroupIds.N
. You cannot specify SecurityGroupId
, SecurityGroupIds.N
, or NetworkInterface.N.SecurityGroupId
.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 instance.sg-bp67acfmxazb4p****
@NameInMap(value="VSwitchId") public String vSwitchId
The ID of the vSwitch to which to connect ENI N.
Take note of the following items:
NetworkInterface.N.InstanceType
is set to Primary
, you must set this parameter. In this case, this parameter is equivalent to VSwitchId
. You cannot specify both NetworkInterface.N.VSwitchId and VSwitchId
.NetworkInterface.N.InstanceType
is set to Secondary
or left empty, this parameter is optional. The default value is the VSwitchId value.vsw-bp1s5fnvk4gn2tws0****
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 © 2024. All rights reserved.