1. Packages
  2. Ibm Provider
  3. API Docs
  4. getPiDhcp
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.getPiDhcp

Explore with Pulumi AI

ibm logo
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

    Retrieve information about a DHCP Server. For more information, see getting started with IBM Power Systems Virtual Servers.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const example = ibm.getPiDhcp({
        piCloudInstanceId: "<value of the cloud_instance_id>",
        piDhcpId: "0e48e1be-9f54-4a67-ba55-7e31ce98b65a",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    example = ibm.get_pi_dhcp(pi_cloud_instance_id="<value of the cloud_instance_id>",
        pi_dhcp_id="0e48e1be-9f54-4a67-ba55-7e31ce98b65a")
    
    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.LookupPiDhcp(ctx, &ibm.LookupPiDhcpArgs{
    			PiCloudInstanceId: "<value of the cloud_instance_id>",
    			PiDhcpId:          "0e48e1be-9f54-4a67-ba55-7e31ce98b65a",
    		}, 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 example = Ibm.GetPiDhcp.Invoke(new()
        {
            PiCloudInstanceId = "<value of the cloud_instance_id>",
            PiDhcpId = "0e48e1be-9f54-4a67-ba55-7e31ce98b65a",
        });
    
    });
    
    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.GetPiDhcpArgs;
    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 example = IbmFunctions.getPiDhcp(GetPiDhcpArgs.builder()
                .piCloudInstanceId("<value of the cloud_instance_id>")
                .piDhcpId("0e48e1be-9f54-4a67-ba55-7e31ce98b65a")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ibm:getPiDhcp
          arguments:
            piCloudInstanceId: <value of the cloud_instance_id>
            piDhcpId: 0e48e1be-9f54-4a67-ba55-7e31ce98b65a
    

    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 getPiDhcp

    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 getPiDhcp(args: GetPiDhcpArgs, opts?: InvokeOptions): Promise<GetPiDhcpResult>
    function getPiDhcpOutput(args: GetPiDhcpOutputArgs, opts?: InvokeOptions): Output<GetPiDhcpResult>
    def get_pi_dhcp(id: Optional[str] = None,
                    pi_cloud_instance_id: Optional[str] = None,
                    pi_dhcp_id: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetPiDhcpResult
    def get_pi_dhcp_output(id: Optional[pulumi.Input[str]] = None,
                    pi_cloud_instance_id: Optional[pulumi.Input[str]] = None,
                    pi_dhcp_id: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetPiDhcpResult]
    func LookupPiDhcp(ctx *Context, args *LookupPiDhcpArgs, opts ...InvokeOption) (*LookupPiDhcpResult, error)
    func LookupPiDhcpOutput(ctx *Context, args *LookupPiDhcpOutputArgs, opts ...InvokeOption) LookupPiDhcpResultOutput

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

    public static class GetPiDhcp 
    {
        public static Task<GetPiDhcpResult> InvokeAsync(GetPiDhcpArgs args, InvokeOptions? opts = null)
        public static Output<GetPiDhcpResult> Invoke(GetPiDhcpInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPiDhcpResult> getPiDhcp(GetPiDhcpArgs args, InvokeOptions options)
    public static Output<GetPiDhcpResult> getPiDhcp(GetPiDhcpArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getPiDhcp:getPiDhcp
      arguments:
        # arguments dictionary

    The following arguments are supported:

    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiDhcpId string
    ID of the DHCP Server.
    Id string
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiDhcpId string
    ID of the DHCP Server.
    Id string
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piDhcpId String
    ID of the DHCP Server.
    id String
    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    piDhcpId string
    ID of the DHCP Server.
    id string
    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    pi_dhcp_id str
    ID of the DHCP Server.
    id str
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piDhcpId String
    ID of the DHCP Server.
    id String

    getPiDhcp Result

    The following output properties are available:

    DhcpId string
    (Deprecated, String) ID of the DHCP Server.

    Deprecated: Deprecated

    Id string
    Leases List<GetPiDhcpLease>
    (List) List of DHCP Server PVM Instance leases. Nested scheme for leases:
    NetworkId string
    (String) ID of the DHCP Server private network.
    NetworkName string
    (String) Name of the DHCP Server private network.
    PiCloudInstanceId string
    PiDhcpId string
    Status string
    (String) Status of the DHCP Server.
    DhcpId string
    (Deprecated, String) ID of the DHCP Server.

    Deprecated: Deprecated

    Id string
    Leases []GetPiDhcpLease
    (List) List of DHCP Server PVM Instance leases. Nested scheme for leases:
    NetworkId string
    (String) ID of the DHCP Server private network.
    NetworkName string
    (String) Name of the DHCP Server private network.
    PiCloudInstanceId string
    PiDhcpId string
    Status string
    (String) Status of the DHCP Server.
    dhcpId String
    (Deprecated, String) ID of the DHCP Server.

    Deprecated: Deprecated

    id String
    leases List<GetPiDhcpLease>
    (List) List of DHCP Server PVM Instance leases. Nested scheme for leases:
    networkId String
    (String) ID of the DHCP Server private network.
    networkName String
    (String) Name of the DHCP Server private network.
    piCloudInstanceId String
    piDhcpId String
    status String
    (String) Status of the DHCP Server.
    dhcpId string
    (Deprecated, String) ID of the DHCP Server.

    Deprecated: Deprecated

    id string
    leases GetPiDhcpLease[]
    (List) List of DHCP Server PVM Instance leases. Nested scheme for leases:
    networkId string
    (String) ID of the DHCP Server private network.
    networkName string
    (String) Name of the DHCP Server private network.
    piCloudInstanceId string
    piDhcpId string
    status string
    (String) Status of the DHCP Server.
    dhcp_id str
    (Deprecated, String) ID of the DHCP Server.

    Deprecated: Deprecated

    id str
    leases Sequence[GetPiDhcpLease]
    (List) List of DHCP Server PVM Instance leases. Nested scheme for leases:
    network_id str
    (String) ID of the DHCP Server private network.
    network_name str
    (String) Name of the DHCP Server private network.
    pi_cloud_instance_id str
    pi_dhcp_id str
    status str
    (String) Status of the DHCP Server.
    dhcpId String
    (Deprecated, String) ID of the DHCP Server.

    Deprecated: Deprecated

    id String
    leases List<Property Map>
    (List) List of DHCP Server PVM Instance leases. Nested scheme for leases:
    networkId String
    (String) ID of the DHCP Server private network.
    networkName String
    (String) Name of the DHCP Server private network.
    piCloudInstanceId String
    piDhcpId String
    status String
    (String) Status of the DHCP Server.

    Supporting Types

    GetPiDhcpLease

    InstanceIp string
    (String) IP of the PVM Instance.
    InstanceMac string
    (String) MAC Address of the PVM Instance.
    InstanceIp string
    (String) IP of the PVM Instance.
    InstanceMac string
    (String) MAC Address of the PVM Instance.
    instanceIp String
    (String) IP of the PVM Instance.
    instanceMac String
    (String) MAC Address of the PVM Instance.
    instanceIp string
    (String) IP of the PVM Instance.
    instanceMac string
    (String) MAC Address of the PVM Instance.
    instance_ip str
    (String) IP of the PVM Instance.
    instance_mac str
    (String) MAC Address of the PVM Instance.
    instanceIp String
    (String) IP of the PVM Instance.
    instanceMac String
    (String) MAC Address of the PVM Instance.

    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.77.1 published on Monday, Apr 14, 2025 by ibm-cloud