public static final class RunInstancesRequest.NetworkInterface.Builder extends Object
构造器和说明 |
---|
Builder() |
public RunInstancesRequest.NetworkInterface.Builder deleteOnRelease(Boolean deleteOnRelease)
* true * false Default value: true. > This parameter takes effect only for secondary ENIs.
public RunInstancesRequest.NetworkInterface.Builder description(String description)
When you specify this parameter, take note of the following items: * The value of N cannot exceed the maximum number of ENIs per instance that the instance type supports. For the maximum number of ENIs per instance that an instance type supports, see [Overview of instance families](~~25378~~) or call the [DescribeInstanceTypes](~~2679699~~) operation. * The description must be 2 to 256 characters in length and cannot start with `http://` or `https://`. * If you set `NetworkInterface.N.InstanceType` to `Primary`, you do not need to specify this parameter.
public RunInstancesRequest.NetworkInterface.Builder instanceType(String instanceType)
Valid values: * Primary: primary ENI. * Secondary: secondary ENI. Default value: Secondary.
public RunInstancesRequest.NetworkInterface.Builder ipv6Address(List<String> ipv6Address)
Example: `Ipv6Address.1=2001:db8:1234:1a00::***`. When you specify this parameter, take note of the following items: * This parameter is valid only when `NetworkInterface.N.InstanceType` is set to `Primary`. If you set `NetworkInterface.N.InstanceType` to `Secondary` or leave NetworkInterface.N.InstanceType empty, you cannot specify this parameter. * If you specify this parameter, you must set `Amount` to 1 and cannot specify `Ipv6AddressCount`, `Ipv6Address.N`, or `NetworkInterface.N.Ipv6AddressCount`.
public RunInstancesRequest.NetworkInterface.Builder ipv6AddressCount(Long ipv6AddressCount)
When you specify this parameter, take note of the following items: * This parameter is valid only when `NetworkInterface.N.InstanceType` is set to `Primary`. If you set `NetworkInterface.N.InstanceType` to `Secondary` or leave NetworkInterface.N.InstanceType empty, you cannot specify this parameter. * If you specify this parameter, you cannot specify `Ipv6AddressCount`, `Ipv6Address.N`, or `NetworkInterface.N.Ipv6Address.N`.
public RunInstancesRequest.NetworkInterface.Builder networkCardIndex(Integer networkCardIndex)
When you specify this parameter, take note of the following items: * You can specify network card indexes only for instances of specific instance types. * If you set NetworkInterface.N.InstanceType to Primary, you can set NetworkInterface.N.NetworkCardIndex only to 0 for instance types that support network cards. * If you set NetworkInterface.N.InstanceType to Secondary or do not specify the parameter, you can specify NetworkInterface.N.NetworkCardIndex based on instance types if the instance types support network cards. For more information, see [Overview of instance families](~~25378~~).
public RunInstancesRequest.NetworkInterface.Builder networkInterfaceId(String networkInterfaceId)
> This parameter takes effect only for secondary ENIs. After you specify an existing secondary ENI, you cannot specify other ENI creation parameters.
public RunInstancesRequest.NetworkInterface.Builder networkInterfaceName(String networkInterfaceName)
When you specify this parameter, take note of the following items: * The value of N cannot exceed the maximum number of ENIs per instance that the instance type supports. For the maximum number of ENIs per instance that an instance type supports, see [Overview of instance families](~~25378~~) or call the [DescribeInstanceTypes](~~2679699~~) operation. * If you set `NetworkInterface.N.InstanceType` to `Primary`, you do not need to specify this parameter.
public RunInstancesRequest.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. Default value: Standard. > The number of ERIs on an instance cannot exceed the maximum number of ERIs that the instance type supports. For more information, see [Overview of instance families](~~25378~~).
public RunInstancesRequest.NetworkInterface.Builder primaryIpAddress(String primaryIpAddress)
When you specify this parameter, take note of the following items: * The value of N cannot exceed the maximum number of ENIs per instance that the instance type supports. For the maximum number of ENIs per instance that an instance type supports, see [Overview of instance families](~~25378~~) or call the [DescribeInstanceTypes](~~2679699~~) operation. * If the value of N is 1, you can configure a primary or secondary ENI. If you specify this parameter, set `Amount` to a numeric value greater than 1, and set NetworkInterface.N.InstanceType to Primary, the specified number of instances are created and consecutive primary IP addresses starting from the specified IP address are assigned to the instances. In this case, you cannot attach secondary ENIs to the instances. * If you specify this parameter, set `Amount` to a numeric value greater than 1, and set NetworkInterface.N.InstanceType to Primary, you cannot set `NetworkInterface.2.InstanceType` to Secondary to attach a secondary ENI. * If you set `NetworkInterface.N.InstanceType` to `Primary`, this parameter is equivalent to `PrivateIpAddress`. You cannot specify both this parameter and `PrivateIpAddress` in the same request. * If you set `NetworkInterface.N.InstanceType` to `Secondary` or leave NetworkInterface.N.InstanceType 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. > * The first IP address and last three IP addresses of each vSwitch CIDR block are reserved. You cannot specify the IP addresses. For example, if a vSwitch CIDR block is 192.168.1.0/24, the following IP addresses are reserved: 192.168.1.0, 192.168.1.253, 192.168.1.254, and 192.168.1.255.
public RunInstancesRequest.NetworkInterface.Builder queueNumber(Integer queueNumber)
When you specify this parameter, take note of the following items: * The value of N cannot exceed the maximum number of ENIs per instance that the instance type supports. For the maximum number of ENIs per instance that an instance type supports, see [Overview of instance families](~~25378~~) or call the [DescribeInstanceTypes](~~2679699~~) operation. * The value of this parameter cannot exceed the maximum number of queues allowed per ENI. * The total number of queues for all ENIs on the instance cannot exceed the queue quota for the instance type. To query the maximum number of queues per ENI and the queue quota for an instance type, you can call the [DescribeInstanceTypes](~~25620~~) operation and check the `MaximumQueueNumberPerEni` and `TotalEniQueueQuantity` values in the response. * If you specify this parameter and set `NetworkInterface.N.InstanceType` to `Primary`, you cannot specify `NetworkInterfaceQueueNumber`.
public RunInstancesRequest.NetworkInterface.Builder queuePairNumber(Long queuePairNumber)
public RunInstancesRequest.NetworkInterface.Builder rxQueueSize(Integer rxQueueSize)
When you specify this parameter, take note of the following items: * The Rx queue depth of an ENI must be the same as the transmit (Tx) queue depth of the ENI. Valid values: powers of 2 in the range of 8192 to 16384. * A larger Rx queue depth yields higher inbound throughput but consumes more memory.
public RunInstancesRequest.NetworkInterface.Builder securityGroupId(String securityGroupId)
When you specify this parameter, take note of the following items: * The value of N cannot exceed the maximum number of ENIs per instance that the instance type supports. For the maximum number of ENIs per instance that an instance type supports, see [Overview of instance families](~~25378~~) or call the [DescribeInstanceTypes](~~2679699~~) operation. * If you set `NetworkInterface.N.InstanceType` to `Primary`, you must specify this parameter. In this case, this parameter is equivalent to `SecurityGroupId` and you cannot specify `SecurityGroupId`, `SecurityGroupIds.N`, or `NetworkInterface.N.SecurityGroupIds.N`. * If you set `NetworkInterface.N.InstanceType` to `Secondary` or leave NetworkInterface.N.InstanceType empty, you do not need to specify this parameter. The default value is the ID of the security group to which to assign the instance.
public RunInstancesRequest.NetworkInterface.Builder securityGroupIds(List<String> securityGroupIds)
* The value of the first N cannot exceed the maximum number of ENIs per instance that the instance type supports. For the maximum number of ENIs per instance that an instance type supports, see [Overview of instance families](~~25378~~) or call the [DescribeInstanceTypes](~~2679699~~) operation. * The second N indicates that one or more security group IDs can be specified. The valid values of the second 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. When you specify this parameter, take note of the following items: * If you set `NetworkInterface.N.InstanceType` to `Primary`, you must specify 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 you set `NetworkInterface.N.InstanceType` to `Secondary` or leave NetworkInterface.N.InstanceType empty, you do not need to specify this parameter. The default value is the ID of the security group to which to assign the instance.
public RunInstancesRequest.NetworkInterface.Builder txQueueSize(Integer txQueueSize)
When you specify this parameter, take note of the following items: * The Tx queue depth of an ENI must be the same as the Rx queue depth of the ENI. Valid values: powers of 2 in the range of 8192 to 16384. * A larger Tx queue depth yields higher outbound throughput but consumes more memory.
public RunInstancesRequest.NetworkInterface.Builder vSwitchId(String vSwitchId)
When you specify this parameter, take note of the following items: * The value of N cannot exceed the maximum number of ENIs per instance that the instance type supports. For the maximum number of ENIs per instance that an instance type supports, see [Overview of instance families](~~25378~~) or call the [DescribeInstanceTypes](~~2679699~~) operation. * If you set `NetworkInterface.N.InstanceType` to `Primary`, you must specify this parameter. In this case, this parameter is equivalent to `VSwitchId`. You cannot specify both NetworkInterface.N.VSwitchId and `VSwitchId` in the same request. * If you set `NetworkInterface.N.InstanceType` to `Secondary` or leave NetworkInterface.N.InstanceType empty, you do not need to specify this parameter. The default value is the VSwitchId value.
public RunInstancesRequest.NetworkInterface build()
Copyright © 2024. All rights reserved.