getNetworkInterface

Use this data source to access information about an existing Network Interface.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.network.NetworkFunctions;
import com.pulumi.azure.network.inputs.GetNetworkInterfaceArgs;
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 example = NetworkFunctions.getNetworkInterface(GetNetworkInterfaceArgs.builder()
.name("acctest-nic")
.resourceGroupName("networking")
.build());
ctx.export("networkInterfaceId", example.applyValue(getNetworkInterfaceResult -> getNetworkInterfaceResult.id()));
}
}

Return

A collection of values returned by getNetworkInterface.

Parameters

argument

A collection of arguments for invoking getNetworkInterface.


suspend fun getNetworkInterface(name: String, resourceGroupName: String): GetNetworkInterfaceResult

Return

A collection of values returned by getNetworkInterface.

See also

Parameters

name

Specifies the name of the Network Interface.

resourceGroupName

Specifies the name of the resource group the Network Interface is located in.


Return

A collection of values returned by getNetworkInterface.

See also

Parameters

argument

Builder for com.pulumi.azure.network.kotlin.inputs.GetNetworkInterfacePlainArgs.