get Network Interfaces
suspend fun getNetworkInterfaces(argument: GetNetworkInterfacesPlainArgs): GetNetworkInterfacesResult
Example Usage
The following shows outputting all network interface ids in a region.
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetNetworkInterfacesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var exampleNetworkInterfaces = Ec2Functions.getNetworkInterfaces();
ctx.export("example", exampleNetworkInterfaces.applyValue(getNetworkInterfacesResult -> getNetworkInterfacesResult.ids()));
}
}
Content copied to clipboard
Return
A collection of values returned by getNetworkInterfaces.
Parameters
argument
A collection of arguments for invoking getNetworkInterfaces.
suspend fun getNetworkInterfaces(filters: List<GetNetworkInterfacesFilter>? = null, tags: Map<String, String>? = null): GetNetworkInterfacesResult
Return
A collection of values returned by getNetworkInterfaces.
Parameters
filters
Custom filter block as described below. More complex filters can be expressed using one or more filter
sub-blocks, which take the following arguments:
tags
Map of tags, each pair of which must exactly match a pair on the desired network interfaces.
See also
suspend fun getNetworkInterfaces(argument: suspend GetNetworkInterfacesPlainArgsBuilder.() -> Unit): GetNetworkInterfacesResult
Return
A collection of values returned by getNetworkInterfaces.
Parameters
argument
Builder for com.pulumi.aws.ec2.kotlin.inputs.GetNetworkInterfacesPlainArgs.