1. Packages
  2. Ibm Provider
  3. API Docs
  4. getPiNetworkInterface
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getPiNetworkInterface

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Retrieves information about a network interface.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const networkInterface = ibm.getPiNetworkInterface({
        piCloudInstanceId: "<value of the cloud_instance_id>",
        piNetworkId: "network_id",
        piNetworkInterfaceId: "network_interface_id",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    network_interface = ibm.get_pi_network_interface(pi_cloud_instance_id="<value of the cloud_instance_id>",
        pi_network_id="network_id",
        pi_network_interface_id="network_interface_id")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.LookupPiNetworkInterface(ctx, &ibm.LookupPiNetworkInterfaceArgs{
    			PiCloudInstanceId:    "<value of the cloud_instance_id>",
    			PiNetworkId:          "network_id",
    			PiNetworkInterfaceId: "network_interface_id",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var networkInterface = Ibm.GetPiNetworkInterface.Invoke(new()
        {
            PiCloudInstanceId = "<value of the cloud_instance_id>",
            PiNetworkId = "network_id",
            PiNetworkInterfaceId = "network_interface_id",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetPiNetworkInterfaceArgs;
    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 networkInterface = IbmFunctions.getPiNetworkInterface(GetPiNetworkInterfaceArgs.builder()
                .piCloudInstanceId("<value of the cloud_instance_id>")
                .piNetworkId("network_id")
                .piNetworkInterfaceId("network_interface_id")
                .build());
    
        }
    }
    
    variables:
      networkInterface:
        fn::invoke:
          function: ibm:getPiNetworkInterface
          arguments:
            piCloudInstanceId: <value of the cloud_instance_id>
            piNetworkId: network_id
            piNetworkInterfaceId: network_interface_id
    

    Notes

    • Please find supported Regions for endpoints.
    • If a Power cloud instance is provisioned at lon04, The provider level attributes should be as follows:
      • region - lon
      • zone - lon04

    Example usage:

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    

    Using getPiNetworkInterface

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getPiNetworkInterface(args: GetPiNetworkInterfaceArgs, opts?: InvokeOptions): Promise<GetPiNetworkInterfaceResult>
    function getPiNetworkInterfaceOutput(args: GetPiNetworkInterfaceOutputArgs, opts?: InvokeOptions): Output<GetPiNetworkInterfaceResult>
    def get_pi_network_interface(id: Optional[str] = None,
                                 pi_cloud_instance_id: Optional[str] = None,
                                 pi_network_id: Optional[str] = None,
                                 pi_network_interface_id: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetPiNetworkInterfaceResult
    def get_pi_network_interface_output(id: Optional[pulumi.Input[str]] = None,
                                 pi_cloud_instance_id: Optional[pulumi.Input[str]] = None,
                                 pi_network_id: Optional[pulumi.Input[str]] = None,
                                 pi_network_interface_id: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetPiNetworkInterfaceResult]
    func LookupPiNetworkInterface(ctx *Context, args *LookupPiNetworkInterfaceArgs, opts ...InvokeOption) (*LookupPiNetworkInterfaceResult, error)
    func LookupPiNetworkInterfaceOutput(ctx *Context, args *LookupPiNetworkInterfaceOutputArgs, opts ...InvokeOption) LookupPiNetworkInterfaceResultOutput

    > Note: This function is named LookupPiNetworkInterface in the Go SDK.

    public static class GetPiNetworkInterface 
    {
        public static Task<GetPiNetworkInterfaceResult> InvokeAsync(GetPiNetworkInterfaceArgs args, InvokeOptions? opts = null)
        public static Output<GetPiNetworkInterfaceResult> Invoke(GetPiNetworkInterfaceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPiNetworkInterfaceResult> getPiNetworkInterface(GetPiNetworkInterfaceArgs args, InvokeOptions options)
    public static Output<GetPiNetworkInterfaceResult> getPiNetworkInterface(GetPiNetworkInterfaceArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getPiNetworkInterface:getPiNetworkInterface
      arguments:
        # arguments dictionary

    The following arguments are supported:

    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiNetworkId string
    network id.
    PiNetworkInterfaceId string
    network interface id.
    Id string
    (String) The unique identifier of the network interface resource.The id is composed of <network_id>/<network_interface_id>
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiNetworkId string
    network id.
    PiNetworkInterfaceId string
    network interface id.
    Id string
    (String) The unique identifier of the network interface resource.The id is composed of <network_id>/<network_interface_id>
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piNetworkId String
    network id.
    piNetworkInterfaceId String
    network interface id.
    id String
    (String) The unique identifier of the network interface resource.The id is composed of <network_id>/<network_interface_id>
    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    piNetworkId string
    network id.
    piNetworkInterfaceId string
    network interface id.
    id string
    (String) The unique identifier of the network interface resource.The id is composed of <network_id>/<network_interface_id>
    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    pi_network_id str
    network id.
    pi_network_interface_id str
    network interface id.
    id str
    (String) The unique identifier of the network interface resource.The id is composed of <network_id>/<network_interface_id>
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piNetworkId String
    network id.
    piNetworkInterfaceId String
    network interface id.
    id String
    (String) The unique identifier of the network interface resource.The id is composed of <network_id>/<network_interface_id>

    getPiNetworkInterface Result

    The following output properties are available:

    Crn string
    (String) The network interface's crn.
    Id string
    (String) The unique identifier of the network interface resource.The id is composed of <network_id>/<network_interface_id>
    Instances List<GetPiNetworkInterfaceInstance>
    (List) The attached instance to this Network Interface.
    IpAddress string
    (String) The ip address of this network interface.
    MacAddress string
    (String) The mac address of the network interface.
    Name string
    (String) Name of the network interface (not unique or indexable).
    NetworkInterfaceId string
    (String) The unique identifier of the network interface.
    NetworkSecurityGroupId string

    Deprecated: Deprecated

    NetworkSecurityGroupIds List<string>
    (List) List of network security groups that the network interface is a member of.
    PiCloudInstanceId string
    PiNetworkId string
    PiNetworkInterfaceId string
    Status string
    (String) The status of the network interface.
    UserTags List<string>
    (List) List of user tags attached to the resource.
    Crn string
    (String) The network interface's crn.
    Id string
    (String) The unique identifier of the network interface resource.The id is composed of <network_id>/<network_interface_id>
    Instances []GetPiNetworkInterfaceInstance
    (List) The attached instance to this Network Interface.
    IpAddress string
    (String) The ip address of this network interface.
    MacAddress string
    (String) The mac address of the network interface.
    Name string
    (String) Name of the network interface (not unique or indexable).
    NetworkInterfaceId string
    (String) The unique identifier of the network interface.
    NetworkSecurityGroupId string

    Deprecated: Deprecated

    NetworkSecurityGroupIds []string
    (List) List of network security groups that the network interface is a member of.
    PiCloudInstanceId string
    PiNetworkId string
    PiNetworkInterfaceId string
    Status string
    (String) The status of the network interface.
    UserTags []string
    (List) List of user tags attached to the resource.
    crn String
    (String) The network interface's crn.
    id String
    (String) The unique identifier of the network interface resource.The id is composed of <network_id>/<network_interface_id>
    instances List<GetPiNetworkInterfaceInstance>
    (List) The attached instance to this Network Interface.
    ipAddress String
    (String) The ip address of this network interface.
    macAddress String
    (String) The mac address of the network interface.
    name String
    (String) Name of the network interface (not unique or indexable).
    networkInterfaceId String
    (String) The unique identifier of the network interface.
    networkSecurityGroupId String

    Deprecated: Deprecated

    networkSecurityGroupIds List<String>
    (List) List of network security groups that the network interface is a member of.
    piCloudInstanceId String
    piNetworkId String
    piNetworkInterfaceId String
    status String
    (String) The status of the network interface.
    userTags List<String>
    (List) List of user tags attached to the resource.
    crn string
    (String) The network interface's crn.
    id string
    (String) The unique identifier of the network interface resource.The id is composed of <network_id>/<network_interface_id>
    instances GetPiNetworkInterfaceInstance[]
    (List) The attached instance to this Network Interface.
    ipAddress string
    (String) The ip address of this network interface.
    macAddress string
    (String) The mac address of the network interface.
    name string
    (String) Name of the network interface (not unique or indexable).
    networkInterfaceId string
    (String) The unique identifier of the network interface.
    networkSecurityGroupId string

    Deprecated: Deprecated

    networkSecurityGroupIds string[]
    (List) List of network security groups that the network interface is a member of.
    piCloudInstanceId string
    piNetworkId string
    piNetworkInterfaceId string
    status string
    (String) The status of the network interface.
    userTags string[]
    (List) List of user tags attached to the resource.
    crn str
    (String) The network interface's crn.
    id str
    (String) The unique identifier of the network interface resource.The id is composed of <network_id>/<network_interface_id>
    instances Sequence[GetPiNetworkInterfaceInstance]
    (List) The attached instance to this Network Interface.
    ip_address str
    (String) The ip address of this network interface.
    mac_address str
    (String) The mac address of the network interface.
    name str
    (String) Name of the network interface (not unique or indexable).
    network_interface_id str
    (String) The unique identifier of the network interface.
    network_security_group_id str

    Deprecated: Deprecated

    network_security_group_ids Sequence[str]
    (List) List of network security groups that the network interface is a member of.
    pi_cloud_instance_id str
    pi_network_id str
    pi_network_interface_id str
    status str
    (String) The status of the network interface.
    user_tags Sequence[str]
    (List) List of user tags attached to the resource.
    crn String
    (String) The network interface's crn.
    id String
    (String) The unique identifier of the network interface resource.The id is composed of <network_id>/<network_interface_id>
    instances List<Property Map>
    (List) The attached instance to this Network Interface.
    ipAddress String
    (String) The ip address of this network interface.
    macAddress String
    (String) The mac address of the network interface.
    name String
    (String) Name of the network interface (not unique or indexable).
    networkInterfaceId String
    (String) The unique identifier of the network interface.
    networkSecurityGroupId String

    Deprecated: Deprecated

    networkSecurityGroupIds List<String>
    (List) List of network security groups that the network interface is a member of.
    piCloudInstanceId String
    piNetworkId String
    piNetworkInterfaceId String
    status String
    (String) The status of the network interface.
    userTags List<String>
    (List) List of user tags attached to the resource.

    Supporting Types

    GetPiNetworkInterfaceInstance

    Href string
    (String) Link to instance resource.
    InstanceId string
    (String) The attached instance id.
    Href string
    (String) Link to instance resource.
    InstanceId string
    (String) The attached instance id.
    href String
    (String) Link to instance resource.
    instanceId String
    (String) The attached instance id.
    href string
    (String) Link to instance resource.
    instanceId string
    (String) The attached instance id.
    href str
    (String) Link to instance resource.
    instance_id str
    (String) The attached instance id.
    href String
    (String) Link to instance resource.
    instanceId String
    (String) The attached instance id.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud