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

ibm.getPiPublicNetwork

Explore with Pulumi AI

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

    Retrieve the details about a public network that is used for your Power Systems Virtual Server instance. For more information, about public network in IBM Power Systems Virtual Server, see adding or removing a public network.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const dsPublicNetwork = ibm.getPiPublicNetwork({
        piCloudInstanceId: "49fba6c9-23f8-40bc-9899-aca322ee7d5b",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    ds_public_network = ibm.get_pi_public_network(pi_cloud_instance_id="49fba6c9-23f8-40bc-9899-aca322ee7d5b")
    
    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.GetPiPublicNetwork(ctx, &ibm.GetPiPublicNetworkArgs{
    			PiCloudInstanceId: "49fba6c9-23f8-40bc-9899-aca322ee7d5b",
    		}, 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 dsPublicNetwork = Ibm.GetPiPublicNetwork.Invoke(new()
        {
            PiCloudInstanceId = "49fba6c9-23f8-40bc-9899-aca322ee7d5b",
        });
    
    });
    
    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.GetPiPublicNetworkArgs;
    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 dsPublicNetwork = IbmFunctions.getPiPublicNetwork(GetPiPublicNetworkArgs.builder()
                .piCloudInstanceId("49fba6c9-23f8-40bc-9899-aca322ee7d5b")
                .build());
    
        }
    }
    
    variables:
      dsPublicNetwork:
        fn::invoke:
          function: ibm:getPiPublicNetwork
          arguments:
            piCloudInstanceId: 49fba6c9-23f8-40bc-9899-aca322ee7d5b
    

    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 getPiPublicNetwork

    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 getPiPublicNetwork(args: GetPiPublicNetworkArgs, opts?: InvokeOptions): Promise<GetPiPublicNetworkResult>
    function getPiPublicNetworkOutput(args: GetPiPublicNetworkOutputArgs, opts?: InvokeOptions): Output<GetPiPublicNetworkResult>
    def get_pi_public_network(id: Optional[str] = None,
                              pi_cloud_instance_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetPiPublicNetworkResult
    def get_pi_public_network_output(id: Optional[pulumi.Input[str]] = None,
                              pi_cloud_instance_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetPiPublicNetworkResult]
    func GetPiPublicNetwork(ctx *Context, args *GetPiPublicNetworkArgs, opts ...InvokeOption) (*GetPiPublicNetworkResult, error)
    func GetPiPublicNetworkOutput(ctx *Context, args *GetPiPublicNetworkOutputArgs, opts ...InvokeOption) GetPiPublicNetworkResultOutput

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

    public static class GetPiPublicNetwork 
    {
        public static Task<GetPiPublicNetworkResult> InvokeAsync(GetPiPublicNetworkArgs args, InvokeOptions? opts = null)
        public static Output<GetPiPublicNetworkResult> Invoke(GetPiPublicNetworkInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPiPublicNetworkResult> getPiPublicNetwork(GetPiPublicNetworkArgs args, InvokeOptions options)
    public static Output<GetPiPublicNetworkResult> getPiPublicNetwork(GetPiPublicNetworkArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getPiPublicNetwork:getPiPublicNetwork
      arguments:
        # arguments dictionary

    The following arguments are supported:

    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    Id string
    (String) The ID of the network.
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    Id string
    (String) The ID of the network.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    id String
    (String) The ID of the network.
    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    id string
    (String) The ID of the network.
    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    id str
    (String) The ID of the network.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    id String
    (String) The ID of the network.

    getPiPublicNetwork Result

    The following output properties are available:

    Crn string
    (String) The CRN of this resource.
    Id string
    (String) The ID of the network.
    Name string
    (String) The name of the network.
    PiCloudInstanceId string
    Type string
    (String) The type of VLAN that the network is connected to.
    VlanId double
    (String) The ID of the VLAN that the network is connected to.
    Crn string
    (String) The CRN of this resource.
    Id string
    (String) The ID of the network.
    Name string
    (String) The name of the network.
    PiCloudInstanceId string
    Type string
    (String) The type of VLAN that the network is connected to.
    VlanId float64
    (String) The ID of the VLAN that the network is connected to.
    crn String
    (String) The CRN of this resource.
    id String
    (String) The ID of the network.
    name String
    (String) The name of the network.
    piCloudInstanceId String
    type String
    (String) The type of VLAN that the network is connected to.
    vlanId Double
    (String) The ID of the VLAN that the network is connected to.
    crn string
    (String) The CRN of this resource.
    id string
    (String) The ID of the network.
    name string
    (String) The name of the network.
    piCloudInstanceId string
    type string
    (String) The type of VLAN that the network is connected to.
    vlanId number
    (String) The ID of the VLAN that the network is connected to.
    crn str
    (String) The CRN of this resource.
    id str
    (String) The ID of the network.
    name str
    (String) The name of the network.
    pi_cloud_instance_id str
    type str
    (String) The type of VLAN that the network is connected to.
    vlan_id float
    (String) The ID of the VLAN that the network is connected to.
    crn String
    (String) The CRN of this resource.
    id String
    (String) The ID of the network.
    name String
    (String) The name of the network.
    piCloudInstanceId String
    type String
    (String) The type of VLAN that the network is connected to.
    vlanId Number
    (String) The ID of the VLAN that the network is connected to.

    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