Skip to content

NetworkInterfaces

This class encapsulates and extends the ROS resource type DATASOURCE::ECS::NetworkInterfaces, which is used to query the details of elastic network interfaces (ENIs).

Initializers

import com.aliyun.ros.cdk.ecs.datasource.NetworkInterfaces;
NetworkInterfaces.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
//  .instanceId(java.lang.String)
//  .instanceId(IResolvable)
//  .ipv6Addresses(IResolvable)
//  .ipv6Addresses(java.util.List<java.lang.String)
//  .ipv6Addresses(IResolvable>)
//  .networkInterfaceIds(IResolvable)
//  .networkInterfaceIds(java.util.List<java.lang.String)
//  .networkInterfaceIds(IResolvable>)
//  .networkInterfaceName(java.lang.String)
//  .networkInterfaceName(IResolvable)
//  .primaryIpAddress(java.lang.String)
//  .primaryIpAddress(IResolvable)
//  .privateIpAddresses(IResolvable)
//  .privateIpAddresses(java.util.List<java.lang.String)
//  .privateIpAddresses(IResolvable>)
//  .refreshOptions(java.lang.String)
//  .refreshOptions(IResolvable)
//  .resourceGroupId(java.lang.String)
//  .resourceGroupId(IResolvable)
//  .securityGroupId(java.lang.String)
//  .securityGroupId(IResolvable)
//  .serviceManaged(java.lang.Boolean)
//  .serviceManaged(IResolvable)
//  .status(java.lang.String)
//  .status(IResolvable)
//  .tags(java.util.List<TagsProperty>)
//  .type(java.lang.String)
//  .type(IResolvable)
//  .vpcId(java.lang.String)
//  .vpcId(IResolvable)
//  .vSwitchId(java.lang.String)
//  .vSwitchId(IResolvable)
    .build();
Name Type Description
scope com.aliyun.ros.cdk.core.Construct No description.
id java.lang.String No description.
enableResourcePropertyConstraint java.lang.Boolean No description.
instanceId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property instanceId: The ID of the instance to which the ENI is bound.
ipv6Addresses com.aliyun.ros.cdk.core.IResolvable OR java.util.List Property ipv6Addresses: IPv6 address N of the ENI.
networkInterfaceIds com.aliyun.ros.cdk.core.IResolvable OR java.util.List Property networkInterfaceIds: The ID of ENI N.
networkInterfaceName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property networkInterfaceName: The name of the ENI.
primaryIpAddress java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property primaryIpAddress: The primary private IPv4 address of the ENI.
privateIpAddresses com.aliyun.ros.cdk.core.IResolvable OR java.util.List Property privateIpAddresses: Secondary private IPv4 address N of the ENI.
refreshOptions java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated.
resourceGroupId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property resourceGroupId: The ID of the resource group to which the eni belongs.
securityGroupId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property securityGroupId: The ID of the security group to which the secondary ENI belongs.
serviceManaged java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property serviceManaged: Specifies whether the user is an Alibaba Cloud service or a distributor.
status java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property status: The state of the ENI.
tags java.util.List Property tags: Tags of eni.
type java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property type: The type of the ENI.
vpcId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property vpcId: The ID of the virtual private cloud (VPC) to which the ENI belongs.
vSwitchId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property vSwitchId: The ID of the vSwitch to which the ENI is connected.

scopeRequired

  • Type: com.aliyun.ros.cdk.core.Construct

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

instanceIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property instanceId: The ID of the instance to which the ENI is bound.


ipv6AddressesOptional

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List

Property ipv6Addresses: IPv6 address N of the ENI.

You can specify multiple IPv6 addresses. Valid values of N: 1 to 100.


networkInterfaceIdsOptional

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List

Property networkInterfaceIds: The ID of ENI N.

Valid values of N: 1 to 100.


networkInterfaceNameOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property networkInterfaceName: The name of the ENI.


primaryIpAddressOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property primaryIpAddress: The primary private IPv4 address of the ENI.


privateIpAddressesOptional

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List

Property privateIpAddresses: Secondary private IPv4 address N of the ENI.

Valid values of N: 1 to 100.


refreshOptionsOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated.

Valid values:

  • Never: Never refresh the datasource resource when the stack is updated.
  • Always: Always refresh the datasource resource when the stack is updated. Default is Never.

resourceGroupIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property resourceGroupId: The ID of the resource group to which the eni belongs.

If this parameter is specified to query resources,up to 1,000 resources that belong to the specified resource group can be displayed in the response.


securityGroupIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property securityGroupId: The ID of the security group to which the secondary ENI belongs.

To query the details of secondary ENIs based on the ID of a security group, specify this parameter. To query the details of primary ENIs based on the ID of a security group, call the DescribeInstances operation and specify the SecurityGroupId parameter.


serviceManagedOptional

  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property serviceManaged: Specifies whether the user is an Alibaba Cloud service or a distributor.


statusOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property status: The state of the ENI.

Valid values: Creating: The ENI is being created. 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. CreateFailed: The ENI cannot be created. This parameter is empty by default, which indicates that ENIs in all states are queried.


tagsOptional

  • Type: java.util.List

Property tags: Tags of eni.


typeOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property type: The type of the ENI.

Valid values: Primary Secondary This parameter is empty by default, which indicates that both primary and secondary ENIs are queried.


vpcIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property vpcId: The ID of the virtual private cloud (VPC) to which the ENI belongs.


vSwitchIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property vSwitchId: The ID of the vSwitch to which the ENI is connected.


Methods

Name Description
toString Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
addCondition No description.
addCount No description.
addDependency No description.
addResourceDesc No description.
applyRemovalPolicy No description.
getAtt No description.
setMetadata No description.

toString

public java.lang.String toString()

Returns a string representation of this construct.

synthesize

public void synthesize(ISynthesisSession session)

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

sessionRequired

  • Type: com.aliyun.ros.cdk.core.ISynthesisSession

The synthesis session.


addCondition

public void addCondition(RosCondition condition)

conditionRequired

  • Type: com.aliyun.ros.cdk.core.RosCondition

addCount

public void addCount(java.lang.Number OR IResolvable count)

countRequired

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

addDependency

public void addDependency(Resource resource)

resourceRequired

  • Type: com.aliyun.ros.cdk.core.Resource

addResourceDesc

public void addResourceDesc(java.lang.String desc)

descRequired

  • Type: java.lang.String

applyRemovalPolicy

public void applyRemovalPolicy(RemovalPolicy policy)

policyRequired

  • Type: com.aliyun.ros.cdk.core.RemovalPolicy

getAtt

public IResolvable getAtt(java.lang.String name)

nameRequired

  • Type: java.lang.String

setMetadata

public void setMetadata(java.lang.String key, java.lang.Object value)

keyRequired

  • Type: java.lang.String

valueRequired

  • Type: java.lang.Object

Static Functions

Name Description
isConstruct Return whether the given object is a Construct.

isConstruct

import com.aliyun.ros.cdk.ecs.datasource.NetworkInterfaces;
NetworkInterfaces.isConstruct(java.lang.Object x)

Return whether the given object is a Construct.

xRequired

  • Type: java.lang.Object

Properties

Name Type Description
node com.aliyun.ros.cdk.core.ConstructNode The construct tree node associated with this construct.
ref java.lang.String No description.
stack com.aliyun.ros.cdk.core.Stack The stack in which this resource is defined.
resource com.aliyun.ros.cdk.core.RosResource No description.
attrNetworkInterfaceIds com.aliyun.ros.cdk.core.IResolvable Attribute NetworkInterfaceIds: The list of NetworkInterfaceIds.
attrNetworkInterfaces com.aliyun.ros.cdk.core.IResolvable Attribute NetworkInterfaces: The list of NetworkInterfaces.

nodeRequired

public ConstructNode getNode();
  • Type: com.aliyun.ros.cdk.core.ConstructNode

The construct tree node associated with this construct.


refRequired

public java.lang.String getRef();
  • Type: java.lang.String

stackRequired

public Stack getStack();
  • Type: com.aliyun.ros.cdk.core.Stack

The stack in which this resource is defined.


resourceOptional

public RosResource getResource();
  • Type: com.aliyun.ros.cdk.core.RosResource

attrNetworkInterfaceIdsRequired

public IResolvable getAttrNetworkInterfaceIds();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute NetworkInterfaceIds: The list of NetworkInterfaceIds.


attrNetworkInterfacesRequired

public IResolvable getAttrNetworkInterfaces();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute NetworkInterfaces: The list of NetworkInterfaces.