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

ibm.getContainerDedicatedHost

Explore with Pulumi AI

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

    Retrieve information about a dedicated host. For more information about dedicated hosts, see Creating and managing dedicated hosts on VPC Gen 2 infrastructure.

    Example Usage

    In the following example, you can retrieve a dedicated host:

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const testDhost = ibm.getContainerDedicatedHost({
        hostId: "abcd12-dh-abcdefgh1234567-abcd123-acbd1234",
        hostPoolId: "dh-abcdefgh1234567",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    test_dhost = ibm.get_container_dedicated_host(host_id="abcd12-dh-abcdefgh1234567-abcd123-acbd1234",
        host_pool_id="dh-abcdefgh1234567")
    
    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.LookupContainerDedicatedHost(ctx, &ibm.LookupContainerDedicatedHostArgs{
    			HostId:     "abcd12-dh-abcdefgh1234567-abcd123-acbd1234",
    			HostPoolId: "dh-abcdefgh1234567",
    		}, 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 testDhost = Ibm.GetContainerDedicatedHost.Invoke(new()
        {
            HostId = "abcd12-dh-abcdefgh1234567-abcd123-acbd1234",
            HostPoolId = "dh-abcdefgh1234567",
        });
    
    });
    
    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.GetContainerDedicatedHostArgs;
    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 testDhost = IbmFunctions.getContainerDedicatedHost(GetContainerDedicatedHostArgs.builder()
                .hostId("abcd12-dh-abcdefgh1234567-abcd123-acbd1234")
                .hostPoolId("dh-abcdefgh1234567")
                .build());
    
        }
    }
    
    variables:
      testDhost:
        fn::invoke:
          function: ibm:getContainerDedicatedHost
          arguments:
            hostId: abcd12-dh-abcdefgh1234567-abcd123-acbd1234
            hostPoolId: dh-abcdefgh1234567
    

    Using getContainerDedicatedHost

    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 getContainerDedicatedHost(args: GetContainerDedicatedHostArgs, opts?: InvokeOptions): Promise<GetContainerDedicatedHostResult>
    function getContainerDedicatedHostOutput(args: GetContainerDedicatedHostOutputArgs, opts?: InvokeOptions): Output<GetContainerDedicatedHostResult>
    def get_container_dedicated_host(host_id: Optional[str] = None,
                                     host_pool_id: Optional[str] = None,
                                     id: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetContainerDedicatedHostResult
    def get_container_dedicated_host_output(host_id: Optional[pulumi.Input[str]] = None,
                                     host_pool_id: Optional[pulumi.Input[str]] = None,
                                     id: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetContainerDedicatedHostResult]
    func LookupContainerDedicatedHost(ctx *Context, args *LookupContainerDedicatedHostArgs, opts ...InvokeOption) (*LookupContainerDedicatedHostResult, error)
    func LookupContainerDedicatedHostOutput(ctx *Context, args *LookupContainerDedicatedHostOutputArgs, opts ...InvokeOption) LookupContainerDedicatedHostResultOutput

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

    public static class GetContainerDedicatedHost 
    {
        public static Task<GetContainerDedicatedHostResult> InvokeAsync(GetContainerDedicatedHostArgs args, InvokeOptions? opts = null)
        public static Output<GetContainerDedicatedHostResult> Invoke(GetContainerDedicatedHostInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetContainerDedicatedHostResult> getContainerDedicatedHost(GetContainerDedicatedHostArgs args, InvokeOptions options)
    public static Output<GetContainerDedicatedHostResult> getContainerDedicatedHost(GetContainerDedicatedHostArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getContainerDedicatedHost:getContainerDedicatedHost
      arguments:
        # arguments dictionary

    The following arguments are supported:

    HostId string
    The unique identifier of the dedicated host.
    HostPoolId string
    The unique identifier of the dedicated host pool the dedicated host is associated with.
    Id string
    HostId string
    The unique identifier of the dedicated host.
    HostPoolId string
    The unique identifier of the dedicated host pool the dedicated host is associated with.
    Id string
    hostId String
    The unique identifier of the dedicated host.
    hostPoolId String
    The unique identifier of the dedicated host pool the dedicated host is associated with.
    id String
    hostId string
    The unique identifier of the dedicated host.
    hostPoolId string
    The unique identifier of the dedicated host pool the dedicated host is associated with.
    id string
    host_id str
    The unique identifier of the dedicated host.
    host_pool_id str
    The unique identifier of the dedicated host pool the dedicated host is associated with.
    id str
    hostId String
    The unique identifier of the dedicated host.
    hostPoolId String
    The unique identifier of the dedicated host pool the dedicated host is associated with.
    id String

    getContainerDedicatedHost Result

    The following output properties are available:

    Flavor string
    (String) The flavor of the worker.
    HostId string
    HostPoolId string
    Id string
    LifeCycles List<GetContainerDedicatedHostLifeCycle>
    (List) A nested block describes the lifecycle state of the dedicated host.
    PlacementEnabled bool
    (Bool) Describes if the placement on the dedicated host is enabled
    Resources List<GetContainerDedicatedHostResource>
    (List) A nested block describes the resources of the dedicated host.
    Workers List<GetContainerDedicatedHostWorker>
    (List) A nested block describes the workers associated with this dedicated host.
    Zone string
    (String) The zone of the dedicated host.
    Flavor string
    (String) The flavor of the worker.
    HostId string
    HostPoolId string
    Id string
    LifeCycles []GetContainerDedicatedHostLifeCycle
    (List) A nested block describes the lifecycle state of the dedicated host.
    PlacementEnabled bool
    (Bool) Describes if the placement on the dedicated host is enabled
    Resources []GetContainerDedicatedHostResource
    (List) A nested block describes the resources of the dedicated host.
    Workers []GetContainerDedicatedHostWorker
    (List) A nested block describes the workers associated with this dedicated host.
    Zone string
    (String) The zone of the dedicated host.
    flavor String
    (String) The flavor of the worker.
    hostId String
    hostPoolId String
    id String
    lifeCycles List<GetContainerDedicatedHostLifeCycle>
    (List) A nested block describes the lifecycle state of the dedicated host.
    placementEnabled Boolean
    (Bool) Describes if the placement on the dedicated host is enabled
    resources List<GetContainerDedicatedHostResource>
    (List) A nested block describes the resources of the dedicated host.
    workers List<GetContainerDedicatedHostWorker>
    (List) A nested block describes the workers associated with this dedicated host.
    zone String
    (String) The zone of the dedicated host.
    flavor string
    (String) The flavor of the worker.
    hostId string
    hostPoolId string
    id string
    lifeCycles GetContainerDedicatedHostLifeCycle[]
    (List) A nested block describes the lifecycle state of the dedicated host.
    placementEnabled boolean
    (Bool) Describes if the placement on the dedicated host is enabled
    resources GetContainerDedicatedHostResource[]
    (List) A nested block describes the resources of the dedicated host.
    workers GetContainerDedicatedHostWorker[]
    (List) A nested block describes the workers associated with this dedicated host.
    zone string
    (String) The zone of the dedicated host.
    flavor str
    (String) The flavor of the worker.
    host_id str
    host_pool_id str
    id str
    life_cycles Sequence[GetContainerDedicatedHostLifeCycle]
    (List) A nested block describes the lifecycle state of the dedicated host.
    placement_enabled bool
    (Bool) Describes if the placement on the dedicated host is enabled
    resources Sequence[GetContainerDedicatedHostResource]
    (List) A nested block describes the resources of the dedicated host.
    workers Sequence[GetContainerDedicatedHostWorker]
    (List) A nested block describes the workers associated with this dedicated host.
    zone str
    (String) The zone of the dedicated host.
    flavor String
    (String) The flavor of the worker.
    hostId String
    hostPoolId String
    id String
    lifeCycles List<Property Map>
    (List) A nested block describes the lifecycle state of the dedicated host.
    placementEnabled Boolean
    (Bool) Describes if the placement on the dedicated host is enabled
    resources List<Property Map>
    (List) A nested block describes the resources of the dedicated host.
    workers List<Property Map>
    (List) A nested block describes the workers associated with this dedicated host.
    zone String
    (String) The zone of the dedicated host.

    Supporting Types

    GetContainerDedicatedHostLifeCycle

    ActualState string
    (String) The actual state of the dedicated host.
    DesiredState string
    (String) The desired state of the dedicated host.
    Message string
    (String) Information message about the dedicated host's lifecycle.
    MessageDate string
    (String) The date of the information message.
    MessageDetails string
    (String) Additional details of the information message.
    MessageDetailsDate string
    (String) The date of the additional details.
    ActualState string
    (String) The actual state of the dedicated host.
    DesiredState string
    (String) The desired state of the dedicated host.
    Message string
    (String) Information message about the dedicated host's lifecycle.
    MessageDate string
    (String) The date of the information message.
    MessageDetails string
    (String) Additional details of the information message.
    MessageDetailsDate string
    (String) The date of the additional details.
    actualState String
    (String) The actual state of the dedicated host.
    desiredState String
    (String) The desired state of the dedicated host.
    message String
    (String) Information message about the dedicated host's lifecycle.
    messageDate String
    (String) The date of the information message.
    messageDetails String
    (String) Additional details of the information message.
    messageDetailsDate String
    (String) The date of the additional details.
    actualState string
    (String) The actual state of the dedicated host.
    desiredState string
    (String) The desired state of the dedicated host.
    message string
    (String) Information message about the dedicated host's lifecycle.
    messageDate string
    (String) The date of the information message.
    messageDetails string
    (String) Additional details of the information message.
    messageDetailsDate string
    (String) The date of the additional details.
    actual_state str
    (String) The actual state of the dedicated host.
    desired_state str
    (String) The desired state of the dedicated host.
    message str
    (String) Information message about the dedicated host's lifecycle.
    message_date str
    (String) The date of the information message.
    message_details str
    (String) Additional details of the information message.
    message_details_date str
    (String) The date of the additional details.
    actualState String
    (String) The actual state of the dedicated host.
    desiredState String
    (String) The desired state of the dedicated host.
    message String
    (String) Information message about the dedicated host's lifecycle.
    messageDate String
    (String) The date of the information message.
    messageDetails String
    (String) Additional details of the information message.
    messageDetailsDate String
    (String) The date of the additional details.

    GetContainerDedicatedHostResource

    Capacities List<GetContainerDedicatedHostResourceCapacity>
    (List) A nested block describes the capacity of the dedicated host. Nested scheme for capacity:
    Consumeds List<GetContainerDedicatedHostResourceConsumed>
    (List) A nested block describes the consumed resources of the dedicated host. Nested scheme for capacity:
    Capacities []GetContainerDedicatedHostResourceCapacity
    (List) A nested block describes the capacity of the dedicated host. Nested scheme for capacity:
    Consumeds []GetContainerDedicatedHostResourceConsumed
    (List) A nested block describes the consumed resources of the dedicated host. Nested scheme for capacity:
    capacities List<GetContainerDedicatedHostResourceCapacity>
    (List) A nested block describes the capacity of the dedicated host. Nested scheme for capacity:
    consumeds List<GetContainerDedicatedHostResourceConsumed>
    (List) A nested block describes the consumed resources of the dedicated host. Nested scheme for capacity:
    capacities GetContainerDedicatedHostResourceCapacity[]
    (List) A nested block describes the capacity of the dedicated host. Nested scheme for capacity:
    consumeds GetContainerDedicatedHostResourceConsumed[]
    (List) A nested block describes the consumed resources of the dedicated host. Nested scheme for capacity:
    capacities Sequence[GetContainerDedicatedHostResourceCapacity]
    (List) A nested block describes the capacity of the dedicated host. Nested scheme for capacity:
    consumeds Sequence[GetContainerDedicatedHostResourceConsumed]
    (List) A nested block describes the consumed resources of the dedicated host. Nested scheme for capacity:
    capacities List<Property Map>
    (List) A nested block describes the capacity of the dedicated host. Nested scheme for capacity:
    consumeds List<Property Map>
    (List) A nested block describes the consumed resources of the dedicated host. Nested scheme for capacity:

    GetContainerDedicatedHostResourceCapacity

    MemoryBytes double
    (Int) Consumed memory capacity of the dedicated host.
    Vcpu double
    (Int) Consumed VCPU capacity of the dedicated host.
    MemoryBytes float64
    (Int) Consumed memory capacity of the dedicated host.
    Vcpu float64
    (Int) Consumed VCPU capacity of the dedicated host.
    memoryBytes Double
    (Int) Consumed memory capacity of the dedicated host.
    vcpu Double
    (Int) Consumed VCPU capacity of the dedicated host.
    memoryBytes number
    (Int) Consumed memory capacity of the dedicated host.
    vcpu number
    (Int) Consumed VCPU capacity of the dedicated host.
    memory_bytes float
    (Int) Consumed memory capacity of the dedicated host.
    vcpu float
    (Int) Consumed VCPU capacity of the dedicated host.
    memoryBytes Number
    (Int) Consumed memory capacity of the dedicated host.
    vcpu Number
    (Int) Consumed VCPU capacity of the dedicated host.

    GetContainerDedicatedHostResourceConsumed

    MemoryBytes double
    (Int) Consumed memory capacity of the dedicated host.
    Vcpu double
    (Int) Consumed VCPU capacity of the dedicated host.
    MemoryBytes float64
    (Int) Consumed memory capacity of the dedicated host.
    Vcpu float64
    (Int) Consumed VCPU capacity of the dedicated host.
    memoryBytes Double
    (Int) Consumed memory capacity of the dedicated host.
    vcpu Double
    (Int) Consumed VCPU capacity of the dedicated host.
    memoryBytes number
    (Int) Consumed memory capacity of the dedicated host.
    vcpu number
    (Int) Consumed VCPU capacity of the dedicated host.
    memory_bytes float
    (Int) Consumed memory capacity of the dedicated host.
    vcpu float
    (Int) Consumed VCPU capacity of the dedicated host.
    memoryBytes Number
    (Int) Consumed memory capacity of the dedicated host.
    vcpu Number
    (Int) Consumed VCPU capacity of the dedicated host.

    GetContainerDedicatedHostWorker

    ClusterId string
    (String) The ID of the cluster the worker is associated with.
    Flavor string
    (String) The flavor of the worker.
    WorkerId string
    (String) The ID of the worker.
    WorkerPoolId string
    (String) The ID of the worker pool the worker is associated with.
    ClusterId string
    (String) The ID of the cluster the worker is associated with.
    Flavor string
    (String) The flavor of the worker.
    WorkerId string
    (String) The ID of the worker.
    WorkerPoolId string
    (String) The ID of the worker pool the worker is associated with.
    clusterId String
    (String) The ID of the cluster the worker is associated with.
    flavor String
    (String) The flavor of the worker.
    workerId String
    (String) The ID of the worker.
    workerPoolId String
    (String) The ID of the worker pool the worker is associated with.
    clusterId string
    (String) The ID of the cluster the worker is associated with.
    flavor string
    (String) The flavor of the worker.
    workerId string
    (String) The ID of the worker.
    workerPoolId string
    (String) The ID of the worker pool the worker is associated with.
    cluster_id str
    (String) The ID of the cluster the worker is associated with.
    flavor str
    (String) The flavor of the worker.
    worker_id str
    (String) The ID of the worker.
    worker_pool_id str
    (String) The ID of the worker pool the worker is associated with.
    clusterId String
    (String) The ID of the cluster the worker is associated with.
    flavor String
    (String) The flavor of the worker.
    workerId String
    (String) The ID of the worker.
    workerPoolId String
    (String) The ID of the worker pool the worker is associated with.

    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