Queries information about 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,
"RefreshOptions": String
}
}
Properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
Status |
String |
No |
Yes |
The status of the ENI. |
Valid values:
Note
If you leave this property empty, ENIs in all states are queried. |
|
PrivateIpAddresses |
List |
No |
Yes |
The secondary private IPv4 addresses of the ENI. |
You can specify up to 100 IP addresses. Separate multiple IP addresses with commas (,). |
|
ServiceManaged |
Boolean |
No |
Yes |
Specifies whether the user of the ENI is an Alibaba Cloud service or a distributor. |
Valid values:
|
|
ResourceGroupId |
String |
No |
Yes |
The ID of the resource group. |
None. |
|
InstanceId |
String |
No |
Yes |
The ID of the ECS instance to which the ENI is attached. |
None. |
|
SecurityGroupId |
String |
No |
Yes |
The ID of the security group to which the secondary ENI belongs. |
To query secondary ENIs by security group, specify this property. |
|
VSwitchId |
String |
No |
Yes |
The ID of the vSwitch to which the ENI is connected. |
None. |
|
NetworkInterfaceName |
String |
No |
Yes |
The ENI name. |
None. |
|
NetworkInterfaceIds |
List |
No |
Yes |
The IDs of the ENIs. |
You can specify up to 100 ENI IDs. Separate multiple IDs with commas (,). |
|
PrimaryIpAddress |
String |
No |
Yes |
The primary private IPv4 address of the ENI. |
None. |
|
Ipv6Addresses |
List |
No |
Yes |
The IPv6 addresses of the ENI. |
You can specify up to 100 IP addresses. Separate multiple IP addresses with commas (,). |
|
Type |
String |
No |
Yes |
The ENI type. |
Valid values:
Note
If you leave this property empty, all types of ENIs are queried. |
|
VpcId |
String |
No |
Yes |
The ID of the virtual private cloud (VPC) to which the ENI belongs. |
None. |
|
Tags |
List |
No |
Yes |
The tags of the ENI. |
You can add up to 20 tags. For more information, see Tags properties. |
|
RefreshOptions |
String |
No |
Yes |
The refresh policy for data source resources when the stack is updated. |
Valid values:
|
Tags syntax
"Tags": [
{
"Value": String,
"Key": String
}
]
Tags properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
Value |
String |
No |
No |
The tag value of the ENI. |
None. |
|
Key |
String |
Yes |
No |
The tag key of the ENI. |
None. |
Return values (Fn::GetAtt)
-
NetworkInterfaceIds: the IDs of the ENIs.
-
NetworkInterfaces: details of the ENIs.
|
Property |
Type |
Description |
Constraint |
|
NetworkInterfaceIds |
List |
The IDs of the ENIs. |
None. |
|
NetworkInterfaces |
List |
Details of the ENIs. |
None. |
|
VpcId |
String |
The ID of the VPC to which the ENI belongs. |
None. |
|
Type |
String |
The ENI type. |
Valid values:
|
|
Status |
String |
The status of the ENI. |
Valid values:
|
|
NetworkInterfaceTrafficMode |
String |
The communication mode of the ENI. |
Valid values:
|
|
NetworkInterfaceId |
String |
The ENI ID. |
None. |
|
InstanceId |
String |
The ID of the ECS instance to which the ENI is attached. |
None. |
|
OwnerId |
String |
The ID of the Alibaba Cloud account to which the ENI belongs. |
None. |
|
VSwitchId |
String |
The ID of the vSwitch to which the ENI is connected. |
None. |
|
ResourceGroupId |
String |
The ID of the resource group. |
None. |
|
ZoneId |
String |
The zone ID. |
None. |
|
PrivateIpAddress |
String |
The secondary private IPv4 address of the ENI. |
None. |
|
QueueNumber |
Number |
The number of queues supported by the ENI. |
Valid values:
|
|
PrivateIpSets |
List |
The private IP addresses of the instance. |
None. |
|
Ipv6Sets |
List |
The IPv6 addresses assigned to the ENI. |
None. |
|
Tags |
List |
The tags. |
None. |
|
SecurityGroupIds |
List |
The IDs of the security groups to which the ENI belongs. |
None. |
|
AssociatedPublicIp |
List |
The elastic IP addresses (EIPs) 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"
]
}
}
}
}