GetNetworkInterface
Use this data source to access information about an existing Network Interface.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.Network.GetNetworkInterface.InvokeAsync(new Azure.Network.GetNetworkInterfaceArgs
{
Name = "acctest-nic",
ResourceGroupName = "networking",
}));
this.NetworkInterfaceId = example.Apply(example => example.Id);
}
[Output("networkInterfaceId")]
public Output<string> NetworkInterfaceId { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/network"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := network.LookupNetworkInterface(ctx, &network.LookupNetworkInterfaceArgs{
Name: "acctest-nic",
ResourceGroupName: "networking",
}, nil)
if err != nil {
return err
}
ctx.Export("networkInterfaceId", example.Id)
return nil
})
}import pulumi
import pulumi_azure as azure
example = azure.network.get_network_interface(name="acctest-nic",
resource_group_name="networking")
pulumi.export("networkInterfaceId", example.id)import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.network.getNetworkInterface({
name: "acctest-nic",
resourceGroupName: "networking",
});
export const networkInterfaceId = example.then(example => example.id);Using GetNetworkInterface
function getNetworkInterface(args: GetNetworkInterfaceArgs, opts?: InvokeOptions): Promise<GetNetworkInterfaceResult>function get_network_interface(name=None, resource_group_name=None, opts=None)func LookupNetworkInterface(ctx *Context, args *LookupNetworkInterfaceArgs, opts ...InvokeOption) (*LookupNetworkInterfaceResult, error)Note: This function is named
LookupNetworkInterfacein the Go SDK.
public static class GetNetworkInterface {
public static Task<GetNetworkInterfaceResult> InvokeAsync(GetNetworkInterfaceArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Name string
Specifies the name of the Network Interface.
- Resource
Group stringName Specifies the name of the resource group the Network Interface is located in.
- Name string
Specifies the name of the Network Interface.
- Resource
Group stringName Specifies the name of the resource group the Network Interface is located in.
- name string
Specifies the name of the Network Interface.
- resource
Group stringName Specifies the name of the resource group the Network Interface is located in.
- name str
Specifies the name of the Network Interface.
- resource_
group_ strname Specifies the name of the resource group the Network Interface is located in.
GetNetworkInterface Result
The following output properties are available:
- Applied
Dns List<string>Servers List of DNS servers applied to the specified Network Interface.
- Dns
Servers List<string> The list of DNS servers used by the specified Network Interface.
- Enable
Accelerated boolNetworking Indicates if accelerated networking is set on the specified Network Interface.
- Enable
Ip boolForwarding Indicate if IP forwarding is set on the specified Network Interface.
- Id string
The provider-assigned unique ID for this managed resource.
- Internal
Dns stringName Label The internal dns name label of the specified Network Interface.
- Ip
Configurations List<GetNetwork Interface Ip Configuration> One or more
ip_configurationblocks as defined below.- Location string
The location of the specified Network Interface.
- Mac
Address string The MAC address used by the specified Network Interface.
- Name string
The name of the IP Configuration.
- Network
Security stringGroup Id The ID of the network security group associated to the specified Network Interface.
- Private
Ip stringAddress The Private IP Address assigned to this Network Interface.
- Private
Ip List<string>Addresses The list of private ip addresses associates to the specified Network Interface.
- Resource
Group stringName - Dictionary<string, string>
List the tags associated to the specified Network Interface.
- Virtual
Machine stringId The ID of the virtual machine that the specified Network Interface is attached to.
- Applied
Dns []stringServers List of DNS servers applied to the specified Network Interface.
- Dns
Servers []string The list of DNS servers used by the specified Network Interface.
- Enable
Accelerated boolNetworking Indicates if accelerated networking is set on the specified Network Interface.
- Enable
Ip boolForwarding Indicate if IP forwarding is set on the specified Network Interface.
- Id string
The provider-assigned unique ID for this managed resource.
- Internal
Dns stringName Label The internal dns name label of the specified Network Interface.
- Ip
Configurations []GetNetwork Interface Ip Configuration One or more
ip_configurationblocks as defined below.- Location string
The location of the specified Network Interface.
- Mac
Address string The MAC address used by the specified Network Interface.
- Name string
The name of the IP Configuration.
- Network
Security stringGroup Id The ID of the network security group associated to the specified Network Interface.
- Private
Ip stringAddress The Private IP Address assigned to this Network Interface.
- Private
Ip []stringAddresses The list of private ip addresses associates to the specified Network Interface.
- Resource
Group stringName - map[string]string
List the tags associated to the specified Network Interface.
- Virtual
Machine stringId The ID of the virtual machine that the specified Network Interface is attached to.
- applied
Dns string[]Servers List of DNS servers applied to the specified Network Interface.
- dns
Servers string[] The list of DNS servers used by the specified Network Interface.
- enable
Accelerated booleanNetworking Indicates if accelerated networking is set on the specified Network Interface.
- enable
Ip booleanForwarding Indicate if IP forwarding is set on the specified Network Interface.
- id string
The provider-assigned unique ID for this managed resource.
- internal
Dns stringName Label The internal dns name label of the specified Network Interface.
- ip
Configurations GetNetwork Interface Ip Configuration[] One or more
ip_configurationblocks as defined below.- location string
The location of the specified Network Interface.
- mac
Address string The MAC address used by the specified Network Interface.
- name string
The name of the IP Configuration.
- network
Security stringGroup Id The ID of the network security group associated to the specified Network Interface.
- private
Ip stringAddress The Private IP Address assigned to this Network Interface.
- private
Ip string[]Addresses The list of private ip addresses associates to the specified Network Interface.
- resource
Group stringName - {[key: string]: string}
List the tags associated to the specified Network Interface.
- virtual
Machine stringId The ID of the virtual machine that the specified Network Interface is attached to.
- applied_
dns_ List[str]servers List of DNS servers applied to the specified Network Interface.
- dns_
servers List[str] The list of DNS servers used by the specified Network Interface.
- enable_
accelerated_ boolnetworking Indicates if accelerated networking is set on the specified Network Interface.
- enable_
ip_ boolforwarding Indicate if IP forwarding is set on the specified Network Interface.
- id str
The provider-assigned unique ID for this managed resource.
- internal_
dns_ strname_ label The internal dns name label of the specified Network Interface.
- ip_
configurations List[GetNetwork Interface Ip Configuration] One or more
ip_configurationblocks as defined below.- location str
The location of the specified Network Interface.
- mac_
address str The MAC address used by the specified Network Interface.
- name str
The name of the IP Configuration.
- network_
security_ strgroup_ id The ID of the network security group associated to the specified Network Interface.
- private_
ip_ straddress The Private IP Address assigned to this Network Interface.
- private_
ip_ List[str]addresses The list of private ip addresses associates to the specified Network Interface.
- resource_
group_ strname - Dict[str, str]
List the tags associated to the specified Network Interface.
- virtual_
machine_ strid The ID of the virtual machine that the specified Network Interface is attached to.
Supporting Types
GetNetworkInterfaceIpConfiguration
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Application
Gateway List<string>Backend Address Pools Ids A list of Backend Address Pool ID’s within a Application Gateway that this Network Interface is connected to.
- Application
Security List<string>Group Ids - Load
Balancer List<string>Backend Address Pools Ids A list of Backend Address Pool ID’s within a Load Balancer that this Network Interface is connected to.
- Load
Balancer List<string>Inbound Nat Rules Ids A list of Inbound NAT Rule ID’s within a Load Balancer that this Network Interface is connected to.
- Name string
Specifies the name of the Network Interface.
- Primary bool
is this the Primary IP Configuration for this Network Interface?
- Private
Ip stringAddress The Private IP Address assigned to this Network Interface.
- Private
Ip stringAddress Allocation The IP Address allocation type for the Private address, such as
DynamicorStatic.- Private
Ip stringAddress Version - Public
Ip stringAddress Id The ID of the Public IP Address which is connected to this Network Interface.
- Subnet
Id string The ID of the Subnet which the Network Interface is connected to.
- Application
Gateway []stringBackend Address Pools Ids A list of Backend Address Pool ID’s within a Application Gateway that this Network Interface is connected to.
- Application
Security []stringGroup Ids - Load
Balancer []stringBackend Address Pools Ids A list of Backend Address Pool ID’s within a Load Balancer that this Network Interface is connected to.
- Load
Balancer []stringInbound Nat Rules Ids A list of Inbound NAT Rule ID’s within a Load Balancer that this Network Interface is connected to.
- Name string
Specifies the name of the Network Interface.
- Primary bool
is this the Primary IP Configuration for this Network Interface?
- Private
Ip stringAddress The Private IP Address assigned to this Network Interface.
- Private
Ip stringAddress Allocation The IP Address allocation type for the Private address, such as
DynamicorStatic.- Private
Ip stringAddress Version - Public
Ip stringAddress Id The ID of the Public IP Address which is connected to this Network Interface.
- Subnet
Id string The ID of the Subnet which the Network Interface is connected to.
- application
Gateway string[]Backend Address Pools Ids A list of Backend Address Pool ID’s within a Application Gateway that this Network Interface is connected to.
- application
Security string[]Group Ids - load
Balancer string[]Backend Address Pools Ids A list of Backend Address Pool ID’s within a Load Balancer that this Network Interface is connected to.
- load
Balancer string[]Inbound Nat Rules Ids A list of Inbound NAT Rule ID’s within a Load Balancer that this Network Interface is connected to.
- name string
Specifies the name of the Network Interface.
- primary boolean
is this the Primary IP Configuration for this Network Interface?
- private
Ip stringAddress The Private IP Address assigned to this Network Interface.
- private
Ip stringAddress Allocation The IP Address allocation type for the Private address, such as
DynamicorStatic.- private
Ip stringAddress Version - public
Ip stringAddress Id The ID of the Public IP Address which is connected to this Network Interface.
- subnet
Id string The ID of the Subnet which the Network Interface is connected to.
- application
Gateway List[str]Backend Address Pools Ids A list of Backend Address Pool ID’s within a Application Gateway that this Network Interface is connected to.
- application
Security List[str]Group Ids - load
Balancer List[str]Backend Address Pools Ids A list of Backend Address Pool ID’s within a Load Balancer that this Network Interface is connected to.
- load
Balancer List[str]Inbound Nat Rules Ids A list of Inbound NAT Rule ID’s within a Load Balancer that this Network Interface is connected to.
- name str
Specifies the name of the Network Interface.
- primary bool
is this the Primary IP Configuration for this Network Interface?
- private
Ip strAddress Allocation The IP Address allocation type for the Private address, such as
DynamicorStatic.- private
Ip strAddress Version - private_
ip_ straddress The Private IP Address assigned to this Network Interface.
- public_
ip_ straddress_ id The ID of the Public IP Address which is connected to this Network Interface.
- subnet_
id str The ID of the Subnet which the Network Interface is connected to.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.