ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud
ibm.getPiNetworkPort
Explore with Pulumi AI
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:
- Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Pi
Network stringName - The unique identifier or name of a network.
- Id string
- Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Pi
Network stringName - The unique identifier or name of a network.
- Id string
- pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- pi
Network StringName - The unique identifier or name of a network.
- id String
- pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- pi
Network stringName - The unique identifier or name of a network.
- id string
- pi_
cloud_ strinstance_ id - The GUID of the service instance associated with an account.
- pi_
network_ strname - The unique identifier or name of a network.
- id str
- pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- pi
Network StringName - The unique identifier or name of a network.
- id String
getPiNetworkPort Result
The following output properties are available:
- Id string
- Network
Ports List<GetPi Network Port Network Port> - (List) List of all in use network ports for a network.
- Pi
Cloud stringInstance Id - Pi
Network stringName
- Id string
- Network
Ports []GetPi Network Port Network Port - (List) List of all in use network ports for a network.
- Pi
Cloud stringInstance Id - Pi
Network stringName
- id String
- network
Ports List<GetPi Network Port Network Port> - (List) List of all in use network ports for a network.
- pi
Cloud StringInstance Id - pi
Network StringName
- id string
- network
Ports GetPi Network Port Network Port[] - (List) List of all in use network ports for a network.
- pi
Cloud stringInstance Id - pi
Network stringName
- id str
- network_
ports Sequence[GetPi Network Port Network Port] - (List) List of all in use network ports for a network.
- pi_
cloud_ strinstance_ id - pi_
network_ strname
- id String
- network
Ports List<Property Map> - (List) List of all in use network ports for a network.
- pi
Cloud StringInstance Id - pi
Network StringName
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.
- Mac
Address 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.
- Public
Ip 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.
- Mac
Address 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.
- Public
Ip 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.
- mac
Address 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.
- public
Ip 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.
- mac
Address 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.
- public
Ip 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.
- mac
Address 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.
- public
Ip 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.