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

ibm.getPiNetworkInterfaces

Explore with Pulumi AI

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

    Retrieve information about network interfaces.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const networkInterfaces = ibm.getPiNetworkInterfaces({
        piCloudInstanceId: "<value of the cloud_instance_id>",
        piNetworkId: "network_id",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    network_interfaces = ibm.get_pi_network_interfaces(pi_cloud_instance_id="<value of the cloud_instance_id>",
        pi_network_id="network_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.GetPiNetworkInterfaces(ctx, &ibm.GetPiNetworkInterfacesArgs{
    			PiCloudInstanceId: "<value of the cloud_instance_id>",
    			PiNetworkId:       "network_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 networkInterfaces = Ibm.GetPiNetworkInterfaces.Invoke(new()
        {
            PiCloudInstanceId = "<value of the cloud_instance_id>",
            PiNetworkId = "network_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.GetPiNetworkInterfacesArgs;
    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 networkInterfaces = IbmFunctions.getPiNetworkInterfaces(GetPiNetworkInterfacesArgs.builder()
                .piCloudInstanceId("<value of the cloud_instance_id>")
                .piNetworkId("network_id")
                .build());
    
        }
    }
    
    variables:
      networkInterfaces:
        fn::invoke:
          function: ibm:getPiNetworkInterfaces
          arguments:
            piCloudInstanceId: <value of the cloud_instance_id>
            piNetworkId: network_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 getPiNetworkInterfaces

    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 getPiNetworkInterfaces(args: GetPiNetworkInterfacesArgs, opts?: InvokeOptions): Promise<GetPiNetworkInterfacesResult>
    function getPiNetworkInterfacesOutput(args: GetPiNetworkInterfacesOutputArgs, opts?: InvokeOptions): Output<GetPiNetworkInterfacesResult>
    def get_pi_network_interfaces(id: Optional[str] = None,
                                  pi_cloud_instance_id: Optional[str] = None,
                                  pi_network_id: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetPiNetworkInterfacesResult
    def get_pi_network_interfaces_output(id: Optional[pulumi.Input[str]] = None,
                                  pi_cloud_instance_id: Optional[pulumi.Input[str]] = None,
                                  pi_network_id: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetPiNetworkInterfacesResult]
    func GetPiNetworkInterfaces(ctx *Context, args *GetPiNetworkInterfacesArgs, opts ...InvokeOption) (*GetPiNetworkInterfacesResult, error)
    func GetPiNetworkInterfacesOutput(ctx *Context, args *GetPiNetworkInterfacesOutputArgs, opts ...InvokeOption) GetPiNetworkInterfacesResultOutput

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

    public static class GetPiNetworkInterfaces 
    {
        public static Task<GetPiNetworkInterfacesResult> InvokeAsync(GetPiNetworkInterfacesArgs args, InvokeOptions? opts = null)
        public static Output<GetPiNetworkInterfacesResult> Invoke(GetPiNetworkInterfacesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPiNetworkInterfacesResult> getPiNetworkInterfaces(GetPiNetworkInterfacesArgs args, InvokeOptions options)
    public static Output<GetPiNetworkInterfacesResult> getPiNetworkInterfaces(GetPiNetworkInterfacesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getPiNetworkInterfaces:getPiNetworkInterfaces
      arguments:
        # arguments dictionary

    The following arguments are supported:

    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiNetworkId string
    network id.
    Id string
    (String) The unique network interface id.
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiNetworkId string
    network id.
    Id string
    (String) The unique network interface id.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piNetworkId String
    network id.
    id String
    (String) The unique network interface id.
    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    piNetworkId string
    network id.
    id string
    (String) The unique network interface id.
    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    pi_network_id str
    network id.
    id str
    (String) The unique network interface id.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piNetworkId String
    network id.
    id String
    (String) The unique network interface id.

    getPiNetworkInterfaces Result

    The following output properties are available:

    Id string
    (String) The unique network interface id.
    Interfaces List<GetPiNetworkInterfacesInterface>
    (List) Network interfaces.
    PiCloudInstanceId string
    PiNetworkId string
    Id string
    (String) The unique network interface id.
    Interfaces []GetPiNetworkInterfacesInterface
    (List) Network interfaces.
    PiCloudInstanceId string
    PiNetworkId string
    id String
    (String) The unique network interface id.
    interfaces List<GetPiNetworkInterfacesInterface>
    (List) Network interfaces.
    piCloudInstanceId String
    piNetworkId String
    id string
    (String) The unique network interface id.
    interfaces GetPiNetworkInterfacesInterface[]
    (List) Network interfaces.
    piCloudInstanceId string
    piNetworkId string
    id str
    (String) The unique network interface id.
    interfaces Sequence[GetPiNetworkInterfacesInterface]
    (List) Network interfaces.
    pi_cloud_instance_id str
    pi_network_id str
    id String
    (String) The unique network interface id.
    interfaces List<Property Map>
    (List) Network interfaces.
    piCloudInstanceId String
    piNetworkId String

    Supporting Types

    GetPiNetworkInterfacesInterface

    Crn string
    (String) The network interface's crn.
    Id string
    (String) The unique network interface id.
    Instances List<GetPiNetworkInterfacesInterfaceInstance>
    (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).
    NetworkSecurityGroupId string
    NetworkSecurityGroupIds List<string>
    (List) List of network security groups that the network interface is a member of.
    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 network interface id.
    Instances []GetPiNetworkInterfacesInterfaceInstance
    (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).
    NetworkSecurityGroupId string
    NetworkSecurityGroupIds []string
    (List) List of network security groups that the network interface is a member of.
    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 network interface id.
    instances List<GetPiNetworkInterfacesInterfaceInstance>
    (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).
    networkSecurityGroupId String
    networkSecurityGroupIds List<String>
    (List) List of network security groups that the network interface is a member of.
    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 network interface id.
    instances GetPiNetworkInterfacesInterfaceInstance[]
    (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).
    networkSecurityGroupId string
    networkSecurityGroupIds string[]
    (List) List of network security groups that the network interface is a member of.
    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 network interface id.
    instances Sequence[GetPiNetworkInterfacesInterfaceInstance]
    (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_security_group_id str
    network_security_group_ids Sequence[str]
    (List) List of network security groups that the network interface is a member of.
    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 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).
    networkSecurityGroupId String
    networkSecurityGroupIds List<String>
    (List) List of network security groups that the network interface is a member of.
    status String
    (String) The status of the network interface.
    userTags List<String>
    (List) List of user tags attached to the resource.

    GetPiNetworkInterfacesInterfaceInstance

    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