Skip to main content

ecs eni

Manage elastic network interfaces

Run ecctl ecs eni <action> -h for usage, or ecctl schema ecs.eni.<action> --full for the complete, agent-readable spec of every parameter and behavior.

create

ecctl ecs eni create [flags]

Create ENI

  • Kind: mutation · Risk: medium
  • Synchronous: waits for Available (waiter available_after_create, timeout 300s); use --no-wait to skip.
  • Idempotent via ClientToken.
APIWhen calledPurpose
CreateNetworkInterfaceEvery time the command runs.Perform the resource operation.
DescribeNetworkInterfaceAttributeWhen --no-wait is not specified.Poll until the resource reaches the target state. (repeated)
DescribeNetworkInterfaceAttributeWhen --no-wait is not specified.Return the final resource view. (cached; no additional request)
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region
--sgstring_arraysecurity group IDs
--vswitchstringVSwitch ID
--connection-trackingobjectconnection tracking configuration JSON object
--delete-on-releasebooleandelete ENI when instance is released
--descriptionstringENI description
--enhanced-networkobjectenhanced network configuration JSON object
--ipv4-prefix-countintegernumber of IPv4 prefixes
--ipv4-prefixesstring_arrayIPv4 prefixes
--ipv6-address-countintegernumber of IPv6 addresses
--ipv6-addressesstring_arrayIPv6 addresses
--ipv6-prefix-countintegernumber of IPv6 prefixes
--ipv6-prefixesstring_arrayIPv6 prefixes
--namestringENI name
--primary-ipstringprimary private IPv4 address
--private-ip-countintegernumber of secondary private IPv4 addresses
--private-ipsstring_arraysecondary private IPv4 addresses
--queue-numberintegerENI queue number
--queue-pair-numberintegerENI queue pair number
--resource-groupstringresource group ID
--rx-queue-sizeintegerreceive queue size
--source-dest-checkbooleanenable source/destination check
--tagkey_valuetag assignment key=value
--traffic-configobjectENI traffic config
--traffic-modestringENI traffic mode
--tx-queue-sizeintegertransmit queue size
--typestringENI type
--visiblebooleanmake the ENI visible

update

ecctl ecs eni update <id> [flags]

Update ENI

  • Kind: mutation · Risk: medium
  • Idempotent via ClientToken.
APIWhen calledPurpose
ModifyNetworkInterfaceAttributeWhen --name is specified or --description is specified or --sg is specified or --queue-number is specified or --delete-on-release is specified or --rx-queue-size is specified or --tx-queue-size is specified or --source-dest-check is specified or --traffic-config is specified or --connection-tracking is specified or --enhanced-network is specified.Perform the resource operation.
AssignPrivateIpAddressesWhen --private-ip contains a value prefixed with + or --private-ip-count is specified or --ipv4-prefix contains a value prefixed with + or --ipv4-prefix-count is specified.Perform the resource operation.
UnassignPrivateIpAddressesWhen --private-ip contains a value prefixed with - or --ipv4-prefix contains a value prefixed with -.Perform the resource operation.
AssignIpv6AddressesWhen --ipv6-address contains a value prefixed with + or --ipv6-address-count is specified or --ipv6-prefix contains a value prefixed with + or --ipv6-prefix-count is specified.Perform the resource operation.
UnassignIpv6AddressesWhen --ipv6-address contains a value prefixed with - or --ipv6-prefix contains a value prefixed with -.Perform the resource operation.
EnableNetworkInterfaceQoSWhen --qos field status equals enable.Perform the resource operation.
DisableNetworkInterfaceQoSWhen --qos field status equals disable.Perform the resource operation.
DescribeNetworkInterfaceAttributeWhen --no-wait is not specified.Read the resource view.
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region
--connection-trackingobjectconnection tracking configuration JSON object
--delete-on-releasebooleandelete ENI when instance is released
--descriptionstringENI description
--enhanced-networkobjectenhanced network configuration JSON object
--ipv4-prefixstring_arrayIPv4 prefix changes
--ipv4-prefix-countintegernumber of IPv4 prefixes
--ipv6-addressstring_arrayIPv6 address changes
--ipv6-address-countintegernumber of IPv6 addresses
--ipv6-prefixstring_arrayIPv6 prefix changes
--ipv6-prefix-countintegernumber of IPv6 prefixes
--namestringENI name
--private-ipstring_arraysecondary private IPv4 address changes
--private-ip-countintegernumber of secondary private IPv4 addresses
--qosobjectENI QoS speed limit settings
--queue-numberintegerENI queue number
--rx-queue-sizeintegerreceive queue size
--sgstring_arraysecurity group IDs
--source-dest-checkbooleanenable source/destination check
--traffic-configobjectENI traffic config
--tx-queue-sizeintegertransmit queue size

delete

ecctl ecs eni delete <id> [flags]

Delete ENI

  • Kind: mutation · Risk: high
  • Synchronous: waits for absent (waiter deleted_after_delete, timeout 300s); use --no-wait to skip.
APIWhen calledPurpose
DeleteNetworkInterfaceEvery time the command runs.Perform the resource operation.
DescribeNetworkInterfacesWhen --no-wait is not specified.Poll until the resource reaches the target state. (repeated)
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region

get

ecctl ecs eni get <id> [flags]

Get ENI

  • Kind: read · Risk: low
APIWhen calledPurpose
DescribeNetworkInterfaceAttributeEvery time the command runs.Read the resource view.
DescribeEniMonitorDataWhen --with-monitor is specified.Read the resource view.
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region
--attributestringENI attribute to query
--end-timestringmonitor end time
--fieldsstringcomma-separated resource fields to include
--instancestringECS instance ID
--periodintegermonitor period in seconds
--start-timestringmonitor start time
--with-monitorbooleaninclude ENI monitor data

list

ecctl ecs eni list [<ids>...] [flags]

List ENIs

  • Kind: read · Risk: low
APIWhen calledPurpose
DescribeNetworkInterfacesEvery time the command runs.Read the resource view.
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region
--fieldsstringcomma-separated resource fields to include
--filterkey_valuefilter expression key=value
--limitintegermaximum resources to return (default: 100)
--next-tokenstringtoken for the next result page

attach

ecctl ecs eni attach <id> [flags]

Attach ENI

  • Kind: mutation · Risk: medium
  • Synchronous: waits for InUse (waiter in_use_after_attach, timeout 300s); use --no-wait to skip.
APIWhen calledPurpose
AttachNetworkInterfaceEvery time the command runs.Perform the resource operation.
DescribeNetworkInterfaceAttributeWhen --no-wait is not specified.Poll until the resource reaches the target state. (repeated)
DescribeNetworkInterfaceAttributeWhen --no-wait is not specified.Return the final resource view. (cached; no additional request)
ParameterTypeRequiredDescription
--instancestringECS instance ID
--regionstringAlibaba Cloud region
--network-card-indexintegernetwork card index
--trunk-network-instance-idstringtrunk ENI instance ID
--wait-for-network-configuration-readybooleanwait for network configuration to become ready during attach

detach

ecctl ecs eni detach <id> [flags]

Detach ENI

  • Kind: mutation · Risk: medium
  • Synchronous: waits for Available (waiter available_after_detach, timeout 300s); use --no-wait to skip.
APIWhen calledPurpose
DetachNetworkInterfaceEvery time the command runs.Perform the resource operation.
DescribeNetworkInterfaceAttributeWhen --no-wait is not specified.Poll until the resource reaches the target state. (repeated)
DescribeNetworkInterfaceAttributeWhen --no-wait is not specified.Return the final resource view. (cached; no additional request)
ParameterTypeRequiredDescription
--instancestringECS instance ID
--regionstringAlibaba Cloud region
--trunk-network-instance-idstringtrunk ENI instance ID