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

ibm.getIsBareMetalServerNetworkInterfaceReservedIp

Explore with Pulumi AI

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

    Import the details of an existing Reserved IP in a network interface of an bare metal server as a read-only data source. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const dataReservedIp = ibm.getIsBareMetalServerNetworkInterfaceReservedIp({
        bareMetalServer: ibm_is_bare_metal_server.test_bare_metal_server.id,
        networkInterface: ibm_is_bare_metal_server.test_bare_metal_server.network_interfaces[0].id,
        reservedIp: ibm_is_bare_metal_server.test_bare_metal_server.network_interfaces[0].ips[0].id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    data_reserved_ip = ibm.get_is_bare_metal_server_network_interface_reserved_ip(bare_metal_server=ibm_is_bare_metal_server["test_bare_metal_server"]["id"],
        network_interface=ibm_is_bare_metal_server["test_bare_metal_server"]["network_interfaces"][0]["id"],
        reserved_ip=ibm_is_bare_metal_server["test_bare_metal_server"]["network_interfaces"][0]["ips"][0]["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.GetIsBareMetalServerNetworkInterfaceReservedIp(ctx, &ibm.GetIsBareMetalServerNetworkInterfaceReservedIpArgs{
    			BareMetalServer:  ibm_is_bare_metal_server.Test_bare_metal_server.Id,
    			NetworkInterface: ibm_is_bare_metal_server.Test_bare_metal_server.Network_interfaces[0].Id,
    			ReservedIp:       ibm_is_bare_metal_server.Test_bare_metal_server.Network_interfaces[0].Ips[0].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 dataReservedIp = Ibm.GetIsBareMetalServerNetworkInterfaceReservedIp.Invoke(new()
        {
            BareMetalServer = ibm_is_bare_metal_server.Test_bare_metal_server.Id,
            NetworkInterface = ibm_is_bare_metal_server.Test_bare_metal_server.Network_interfaces[0].Id,
            ReservedIp = ibm_is_bare_metal_server.Test_bare_metal_server.Network_interfaces[0].Ips[0].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.GetIsBareMetalServerNetworkInterfaceReservedIpArgs;
    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 dataReservedIp = IbmFunctions.getIsBareMetalServerNetworkInterfaceReservedIp(GetIsBareMetalServerNetworkInterfaceReservedIpArgs.builder()
                .bareMetalServer(ibm_is_bare_metal_server.test_bare_metal_server().id())
                .networkInterface(ibm_is_bare_metal_server.test_bare_metal_server().network_interfaces()[0].id())
                .reservedIp(ibm_is_bare_metal_server.test_bare_metal_server().network_interfaces()[0].ips()[0].id())
                .build());
    
        }
    }
    
    variables:
      dataReservedIp:
        fn::invoke:
          function: ibm:getIsBareMetalServerNetworkInterfaceReservedIp
          arguments:
            bareMetalServer: ${ibm_is_bare_metal_server.test_bare_metal_server.id}
            networkInterface: ${ibm_is_bare_metal_server.test_bare_metal_server.network_interfaces[0].id}
            reservedIp: ${ibm_is_bare_metal_server.test_bare_metal_server.network_interfaces[0].ips[0].id}
    

    Using getIsBareMetalServerNetworkInterfaceReservedIp

    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 getIsBareMetalServerNetworkInterfaceReservedIp(args: GetIsBareMetalServerNetworkInterfaceReservedIpArgs, opts?: InvokeOptions): Promise<GetIsBareMetalServerNetworkInterfaceReservedIpResult>
    function getIsBareMetalServerNetworkInterfaceReservedIpOutput(args: GetIsBareMetalServerNetworkInterfaceReservedIpOutputArgs, opts?: InvokeOptions): Output<GetIsBareMetalServerNetworkInterfaceReservedIpResult>
    def get_is_bare_metal_server_network_interface_reserved_ip(bare_metal_server: Optional[str] = None,
                                                               id: Optional[str] = None,
                                                               network_interface: Optional[str] = None,
                                                               reserved_ip: Optional[str] = None,
                                                               opts: Optional[InvokeOptions] = None) -> GetIsBareMetalServerNetworkInterfaceReservedIpResult
    def get_is_bare_metal_server_network_interface_reserved_ip_output(bare_metal_server: Optional[pulumi.Input[str]] = None,
                                                               id: Optional[pulumi.Input[str]] = None,
                                                               network_interface: Optional[pulumi.Input[str]] = None,
                                                               reserved_ip: Optional[pulumi.Input[str]] = None,
                                                               opts: Optional[InvokeOptions] = None) -> Output[GetIsBareMetalServerNetworkInterfaceReservedIpResult]
    func GetIsBareMetalServerNetworkInterfaceReservedIp(ctx *Context, args *GetIsBareMetalServerNetworkInterfaceReservedIpArgs, opts ...InvokeOption) (*GetIsBareMetalServerNetworkInterfaceReservedIpResult, error)
    func GetIsBareMetalServerNetworkInterfaceReservedIpOutput(ctx *Context, args *GetIsBareMetalServerNetworkInterfaceReservedIpOutputArgs, opts ...InvokeOption) GetIsBareMetalServerNetworkInterfaceReservedIpResultOutput

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

    public static class GetIsBareMetalServerNetworkInterfaceReservedIp 
    {
        public static Task<GetIsBareMetalServerNetworkInterfaceReservedIpResult> InvokeAsync(GetIsBareMetalServerNetworkInterfaceReservedIpArgs args, InvokeOptions? opts = null)
        public static Output<GetIsBareMetalServerNetworkInterfaceReservedIpResult> Invoke(GetIsBareMetalServerNetworkInterfaceReservedIpInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIsBareMetalServerNetworkInterfaceReservedIpResult> getIsBareMetalServerNetworkInterfaceReservedIp(GetIsBareMetalServerNetworkInterfaceReservedIpArgs args, InvokeOptions options)
    public static Output<GetIsBareMetalServerNetworkInterfaceReservedIpResult> getIsBareMetalServerNetworkInterfaceReservedIp(GetIsBareMetalServerNetworkInterfaceReservedIpArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIsBareMetalServerNetworkInterfaceReservedIp:getIsBareMetalServerNetworkInterfaceReservedIp
      arguments:
        # arguments dictionary

    The following arguments are supported:

    BareMetalServer string
    The id for the bare metal server.
    NetworkInterface string
    The id for the network interface.
    ReservedIp string
    The id for the Reserved IP.
    Id string
    (String) The id for the reserved IP
    BareMetalServer string
    The id for the bare metal server.
    NetworkInterface string
    The id for the network interface.
    ReservedIp string
    The id for the Reserved IP.
    Id string
    (String) The id for the reserved IP
    bareMetalServer String
    The id for the bare metal server.
    networkInterface String
    The id for the network interface.
    reservedIp String
    The id for the Reserved IP.
    id String
    (String) The id for the reserved IP
    bareMetalServer string
    The id for the bare metal server.
    networkInterface string
    The id for the network interface.
    reservedIp string
    The id for the Reserved IP.
    id string
    (String) The id for the reserved IP
    bare_metal_server str
    The id for the bare metal server.
    network_interface str
    The id for the network interface.
    reserved_ip str
    The id for the Reserved IP.
    id str
    (String) The id for the reserved IP
    bareMetalServer String
    The id for the bare metal server.
    networkInterface String
    The id for the network interface.
    reservedIp String
    The id for the Reserved IP.
    id String
    (String) The id for the reserved IP

    getIsBareMetalServerNetworkInterfaceReservedIp Result

    The following output properties are available:

    Address string
    AutoDelete bool
    (String) The auto_delete boolean for reserved IP
    BareMetalServer string
    CreatedAt string
    (String) The creation timestamp for the reserved IP
    Href string
    (String) The unique reference for the reserved IP
    Id string
    (String) The id for the reserved IP
    Name string
    (String) The name for the reserved IP
    NetworkInterface string
    Owner string
    (String) The owner of the reserved IP
    ReservedIp string
    (String) Same as id
    ResourceType string
    (String) The type of resource
    Target string
    (String) The id for the target for the reserved IP
    Address string
    AutoDelete bool
    (String) The auto_delete boolean for reserved IP
    BareMetalServer string
    CreatedAt string
    (String) The creation timestamp for the reserved IP
    Href string
    (String) The unique reference for the reserved IP
    Id string
    (String) The id for the reserved IP
    Name string
    (String) The name for the reserved IP
    NetworkInterface string
    Owner string
    (String) The owner of the reserved IP
    ReservedIp string
    (String) Same as id
    ResourceType string
    (String) The type of resource
    Target string
    (String) The id for the target for the reserved IP
    address String
    autoDelete Boolean
    (String) The auto_delete boolean for reserved IP
    bareMetalServer String
    createdAt String
    (String) The creation timestamp for the reserved IP
    href String
    (String) The unique reference for the reserved IP
    id String
    (String) The id for the reserved IP
    name String
    (String) The name for the reserved IP
    networkInterface String
    owner String
    (String) The owner of the reserved IP
    reservedIp String
    (String) Same as id
    resourceType String
    (String) The type of resource
    target String
    (String) The id for the target for the reserved IP
    address string
    autoDelete boolean
    (String) The auto_delete boolean for reserved IP
    bareMetalServer string
    createdAt string
    (String) The creation timestamp for the reserved IP
    href string
    (String) The unique reference for the reserved IP
    id string
    (String) The id for the reserved IP
    name string
    (String) The name for the reserved IP
    networkInterface string
    owner string
    (String) The owner of the reserved IP
    reservedIp string
    (String) Same as id
    resourceType string
    (String) The type of resource
    target string
    (String) The id for the target for the reserved IP
    address str
    auto_delete bool
    (String) The auto_delete boolean for reserved IP
    bare_metal_server str
    created_at str
    (String) The creation timestamp for the reserved IP
    href str
    (String) The unique reference for the reserved IP
    id str
    (String) The id for the reserved IP
    name str
    (String) The name for the reserved IP
    network_interface str
    owner str
    (String) The owner of the reserved IP
    reserved_ip str
    (String) Same as id
    resource_type str
    (String) The type of resource
    target str
    (String) The id for the target for the reserved IP
    address String
    autoDelete Boolean
    (String) The auto_delete boolean for reserved IP
    bareMetalServer String
    createdAt String
    (String) The creation timestamp for the reserved IP
    href String
    (String) The unique reference for the reserved IP
    id String
    (String) The id for the reserved IP
    name String
    (String) The name for the reserved IP
    networkInterface String
    owner String
    (String) The owner of the reserved IP
    reservedIp String
    (String) Same as id
    resourceType String
    (String) The type of resource
    target String
    (String) The id for the target for the reserved IP

    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