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

ibm.getPiNetworkPort

Explore with Pulumi AI

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

    This resource is deprecated and will be removed in the next major version. Use ibm.PiNetworkInterface data source instead.

    Retrieve information about a network port in the Power Virtual Server Cloud. For more information, about networks in IBM power virtual server, see adding or removing a public network.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const test_network_port = ibm.getPiNetworkPort({
        piCloudInstanceId: "51e1879c-bcbe-4ee1-a008-49cdba0eaf60",
        piNetworkName: "Zone1-CFN",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    test_network_port = ibm.get_pi_network_port(pi_cloud_instance_id="51e1879c-bcbe-4ee1-a008-49cdba0eaf60",
        pi_network_name="Zone1-CFN")
    
    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.GetPiNetworkPort(ctx, &ibm.GetPiNetworkPortArgs{
    			PiCloudInstanceId: "51e1879c-bcbe-4ee1-a008-49cdba0eaf60",
    			PiNetworkName:     "Zone1-CFN",
    		}, 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 test_network_port = Ibm.GetPiNetworkPort.Invoke(new()
        {
            PiCloudInstanceId = "51e1879c-bcbe-4ee1-a008-49cdba0eaf60",
            PiNetworkName = "Zone1-CFN",
        });
    
    });
    
    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.GetPiNetworkPortArgs;
    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 test-network-port = IbmFunctions.getPiNetworkPort(GetPiNetworkPortArgs.builder()
                .piCloudInstanceId("51e1879c-bcbe-4ee1-a008-49cdba0eaf60")
                .piNetworkName("Zone1-CFN")
                .build());
    
        }
    }
    
    variables:
      test-network-port:
        fn::invoke:
          function: ibm:getPiNetworkPort
          arguments:
            piCloudInstanceId: 51e1879c-bcbe-4ee1-a008-49cdba0eaf60
            piNetworkName: Zone1-CFN
    

    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 getPiNetworkPort

    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 getPiNetworkPort(args: GetPiNetworkPortArgs, opts?: InvokeOptions): Promise<GetPiNetworkPortResult>
    function getPiNetworkPortOutput(args: GetPiNetworkPortOutputArgs, opts?: InvokeOptions): Output<GetPiNetworkPortResult>
    def get_pi_network_port(id: Optional[str] = None,
                            pi_cloud_instance_id: Optional[str] = None,
                            pi_network_name: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetPiNetworkPortResult
    def get_pi_network_port_output(id: Optional[pulumi.Input[str]] = None,
                            pi_cloud_instance_id: Optional[pulumi.Input[str]] = None,
                            pi_network_name: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetPiNetworkPortResult]
    func GetPiNetworkPort(ctx *Context, args *GetPiNetworkPortArgs, opts ...InvokeOption) (*GetPiNetworkPortResult, error)
    func GetPiNetworkPortOutput(ctx *Context, args *GetPiNetworkPortOutputArgs, opts ...InvokeOption) GetPiNetworkPortResultOutput

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

    public static class GetPiNetworkPort 
    {
        public static Task<GetPiNetworkPortResult> InvokeAsync(GetPiNetworkPortArgs args, InvokeOptions? opts = null)
        public static Output<GetPiNetworkPortResult> Invoke(GetPiNetworkPortInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPiNetworkPortResult> getPiNetworkPort(GetPiNetworkPortArgs args, InvokeOptions options)
    public static Output<GetPiNetworkPortResult> getPiNetworkPort(GetPiNetworkPortArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getPiNetworkPort:getPiNetworkPort
      arguments:
        # arguments dictionary

    The following arguments are supported:

    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiNetworkName string
    The unique identifier or name of a network.
    Id string
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiNetworkName string
    The unique identifier or name of a network.
    Id string
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piNetworkName String
    The unique identifier or name of a network.
    id String
    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    piNetworkName string
    The unique identifier or name of a network.
    id string
    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    pi_network_name str
    The unique identifier or name of a network.
    id str
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piNetworkName String
    The unique identifier or name of a network.
    id String

    getPiNetworkPort Result

    The following output properties are available:

    Id string
    NetworkPorts List<GetPiNetworkPortNetworkPort>
    (List) List of all in use network ports for a network.
    PiCloudInstanceId string
    PiNetworkName string
    Id string
    NetworkPorts []GetPiNetworkPortNetworkPort
    (List) List of all in use network ports for a network.
    PiCloudInstanceId string
    PiNetworkName string
    id String
    networkPorts List<GetPiNetworkPortNetworkPort>
    (List) List of all in use network ports for a network.
    piCloudInstanceId String
    piNetworkName String
    id string
    networkPorts GetPiNetworkPortNetworkPort[]
    (List) List of all in use network ports for a network.
    piCloudInstanceId string
    piNetworkName string
    id str
    network_ports Sequence[GetPiNetworkPortNetworkPort]
    (List) List of all in use network ports for a network.
    pi_cloud_instance_id str
    pi_network_name str
    id String
    networkPorts List<Property Map>
    (List) List of all in use network ports for a network.
    piCloudInstanceId String
    piNetworkName String

    Supporting Types

    GetPiNetworkPortNetworkPort

    Description string
    (String) The description for the network port.
    Href string
    (String) Network port href.
    Ipaddress string
    (String) The IP address of the port.
    MacAddress string
    (String) The MAC address of the instance.
    Macaddress string
    (String) The MAC address of the instance. Deprecated please use mac_address instead.
    Portid string
    (String) The ID of the port.
    PublicIp string
    (String) The public IP associated with the port.
    Status string
    (String) The status of the port.
    Description string
    (String) The description for the network port.
    Href string
    (String) Network port href.
    Ipaddress string
    (String) The IP address of the port.
    MacAddress string
    (String) The MAC address of the instance.
    Macaddress string
    (String) The MAC address of the instance. Deprecated please use mac_address instead.
    Portid string
    (String) The ID of the port.
    PublicIp string
    (String) The public IP associated with the port.
    Status string
    (String) The status of the port.
    description String
    (String) The description for the network port.
    href String
    (String) Network port href.
    ipaddress String
    (String) The IP address of the port.
    macAddress String
    (String) The MAC address of the instance.
    macaddress String
    (String) The MAC address of the instance. Deprecated please use mac_address instead.
    portid String
    (String) The ID of the port.
    publicIp String
    (String) The public IP associated with the port.
    status String
    (String) The status of the port.
    description string
    (String) The description for the network port.
    href string
    (String) Network port href.
    ipaddress string
    (String) The IP address of the port.
    macAddress string
    (String) The MAC address of the instance.
    macaddress string
    (String) The MAC address of the instance. Deprecated please use mac_address instead.
    portid string
    (String) The ID of the port.
    publicIp string
    (String) The public IP associated with the port.
    status string
    (String) The status of the port.
    description str
    (String) The description for the network port.
    href str
    (String) Network port href.
    ipaddress str
    (String) The IP address of the port.
    mac_address str
    (String) The MAC address of the instance.
    macaddress str
    (String) The MAC address of the instance. Deprecated please use mac_address instead.
    portid str
    (String) The ID of the port.
    public_ip str
    (String) The public IP associated with the port.
    status str
    (String) The status of the port.
    description String
    (String) The description for the network port.
    href String
    (String) Network port href.
    ipaddress String
    (String) The IP address of the port.
    macAddress String
    (String) The MAC address of the instance.
    macaddress String
    (String) The MAC address of the instance. Deprecated please use mac_address instead.
    portid String
    (String) The ID of the port.
    publicIp String
    (String) The public IP associated with the port.
    status String
    (String) The status of the port.

    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