public static final class CreateLaunchTemplateRequest.NetworkInterface.Builder extends Object
构造器和说明 |
---|
Builder() |
public CreateLaunchTemplateRequest.NetworkInterface.Builder description(String description)
public CreateLaunchTemplateRequest.NetworkInterface.Builder instanceType(String instanceType)
Valid values: * Primary * Secondary Default value: Secondary.
public CreateLaunchTemplateRequest.NetworkInterface.Builder networkInterfaceName(String networkInterfaceName)
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.
public CreateLaunchTemplateRequest.NetworkInterface.Builder networkInterfaceTrafficMode(String networkInterfaceTrafficMode)
* Standard: uses the TCP communication mode. * HighPerformance: uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
public CreateLaunchTemplateRequest.NetworkInterface.Builder primaryIpAddress(String primaryIpAddress)
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`. 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. > 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.
public CreateLaunchTemplateRequest.NetworkInterface.Builder securityGroupId(String securityGroupId)
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`. 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 instance.
public CreateLaunchTemplateRequest.NetworkInterface.Builder securityGroupIds(List<String> securityGroupIds)
* 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 must 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](~~25412#SecurityGroupQuota1~~) section of the "Limits" topic. Take note of the following items: * If `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`. * 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 instance.
public CreateLaunchTemplateRequest.NetworkInterface.Builder vSwitchId(String vSwitchId)
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`. You cannot specify both NetworkInterface.N.VSwitchId and `VSwitchId`. * If `NetworkInterface.N.InstanceType` is set to `Secondary` or left empty, this parameter is optional. The default value is the VSwitchId value.
public CreateLaunchTemplateRequest.NetworkInterface build()
Copyright © 2024. All rights reserved.