All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::ECS::NetworkInterfaces

Last Updated:Oct 29, 2024

DATASOURCE::ECS::NetworkInterfaces is used to query the details of elastic network interfaces (ENIs).

Syntax

{
  "Type": "DATASOURCE::ECS::NetworkInterfaces",
  "Properties": {
    "Status": String,
    "PrivateIpAddresses": List,
    "ServiceManaged": Boolean,
    "ResourceGroupId": String,
    "InstanceId": String,
    "SecurityGroupId": String,
    "VSwitchId": String,
    "NetworkInterfaceName": String,
    "NetworkInterfaceIds": List,
    "PrimaryIpAddress": String,
    "Ipv6Addresses": List,
    "Type": String,
    "VpcId": String,
    "Tags": List
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
StatusStringNoYesThe state of the ENI. Valid values:
  • Available: The ENI is not bound to an instance.
  • Attaching: The ENI is being bound to an instance.
  • InUse: The ENI is bound to an instance.
  • Detaching: The ENI is being unbound from an instance.
  • Deleting: The ENI is being deleted.
Note If you do not specify this property, ENIs in all states are queried.
PrivateIpAddressesListNoYesThe secondary private IPv4 address of the ENI. You can specify up to 100 IP addresses. Separate multiple IP addresses with commas (,).
ServiceManagedBooleanNoYesSpecifies whether the user of the ENI is an Alibaba Cloud service or a distributor. Valid values:
  • true
  • false
ResourceGroupIdStringNoYesThe ID of the resource group. None.
InstanceIdStringNoYesThe ID of the Elastic Compute Service (ECS) instance to which the ENI is bound. None.
SecurityGroupIdStringNoYesThe ID of the security group to which the secondary ENI is attached. To query the details of secondary ENIs based on the ID of a security group, specify this property.
VSwitchIdStringNoYesThe ID of the vSwitch to which the ENI belongs. None.
NetworkInterfaceNameStringNoYesThe name of the ENI. None.
NetworkInterfaceIdsListNoYesThe IDs of the ENIs. You can specify up to 100 ENI IDs. Separate multiple IDs with commas (,).
PrimaryIpAddressStringNoYesThe primary private IPv4 address of the ENI. None.
Ipv6AddressesListNoYesThe IPv6 addresses of the ENI. You can specify up to 100 IP addresses. Separate multiple IP addresses with commas (,).
TypeStringNoYesThe type of the ENI. Valid values:
  • Primary
  • Secondary
Note If you do not specify this property, all types of ENIs are queried.
VpcIdStringNoYesThe ID of the VPC for the ENI. None.
TagsListNoYesThe tags of the ENI. You can specify up to 20 tags.

For more information, see Tags properties.

Tags syntax

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

Tags properties

PropertyTypeRequiredEditableDescriptionConstraint
ValueStringNoNoThe tag value of the ENI. None.
KeyStringYesNoThe tag key of the ENI. None.

Return values (Fn::GetAtt)

  • NetworkInterfaceIds: the IDs of the ENIs.
  • NetworkInterfaces: details of the ENIs.
PropertyTypeDescriptionConstraint
NetworkInterfaceIdsListThe IDs of the ENIs. None.
NetworkInterfacesListDetails of the ENIs. None.
VpcIdStringThe ID of the VPC for the ENI. None.
TypeStringThe type of the ENI. Valid values:
  • Primary
  • Secondary
StatusStringThe state of the ENI. Valid values:
  • Available: The ENI is not bound to an instance.
  • Attaching: The ENI is being bound to an instance.
  • InUse: The ENI is bound to an instance.
  • Detaching: The ENI is being unbound from an instance.
  • Deleting: The ENI is being deleted.
NetworkInterfaceTrafficModeStringThe communication mode of the ENI. Valid values:
  • Standard: TCP communication mode
  • HighPerformance: RDMA communication mode
NetworkInterfaceIdStringThe ID of the ENI. None.
InstanceIdStringThe ID of the ECS instance to which the ENI is bound. None.
OwnerIdStringThe ID of the Alibaba Cloud account to which the ENI belongs. None.
VSwitchIdStringThe ID of the vSwitch to which the ENI belongs. None.
ResourceGroupIdStringThe ID of the resource group. None.
ZoneIdStringThe ID of the zone. None.
PrivateIpAddressStringThe secondary private IPv4 addresses of the ENI. None.
QueueNumberNumberThe number of queues supported by the ENI. Valid values:
  • If the ENI is a secondary ENI in the InUse state and the number of queues supported by this ENI has never been modified, the default number of queues per secondary ENI that the instance type supports is returned.
  • If the number of queues supported by the secondary ENI has been modified, the new number of queues is returned.
  • If the ENI is a secondary ENI in the Available state and the number of queues supported by this ENI has never been modified, an empty value is returned.
  • If the ENI is a primary ENI, the default number of queues per primary ENI that the instance type supports is returned.
PrivateIpSetsListThe private IP addresses of the instance. None.
Ipv6SetsListThe IPv6 addresses assigned to the ENI. None.
TagsListThe tags. None.
SecurityGroupIdsListThe IDs of the security groups to which the ENI is attached. None.
AssociatedPublicIpListThe EIP associated with the secondary private IP address of the ENI. None.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Tags": {
      "Type": "Json",
      "Default": {"Key": "acs:privatelink:serviceType", "Value": "natgw"}
    }
  },
  "Resources": {
    "NetworkInterfaces": {
      "Type": "DATASOURCE::ECS::NetworkInterfaces",
      "Properties": {
        "RegionId": {
          "Ref": "ALIYUN::Region"
        },
        "Tags": {
          "Ref": "Tags"
        }
      }
    }
  },
  "Outputs": {
    "Images": {
      "Value": {
        "Fn::GetAtt": [
          "NetworkInterfaces",
          "NetworkInterfaceIds"
        ]
      }
    },
    "ImageIds": {
      "Value": {
        "Fn::GetAtt": [
          "NetworkInterfaces",
          "NetworkInterfaces"
        ]
      }
    }
  }
}