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

ibm.getIsDedicatedHostDisk

Explore with Pulumi AI

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

    Retrieve the dedicated host disk. For more information, about dedicated host disk, see migrating a dedicated host instance to another host.

    Note: VPC infrastructure services are a regional specific based endpoint, by default targets to us-south. Please make sure to target right region in the provider block as shown in the provider.tf file, if VPC service is created in region other than us-south.

    provider.tf

    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) {
        }
    }
    
    {}
    

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const example = ibm.getIsDedicatedHostDisk({
        dedicatedHost: ibm_is_dedicated_host.example.id,
        disk: data.ibm_is_dedicated_host_disks.example.disks[0].id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    example = ibm.get_is_dedicated_host_disk(dedicated_host=ibm_is_dedicated_host["example"]["id"],
        disk=data["ibm_is_dedicated_host_disks"]["example"]["disks"][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.LookupIsDedicatedHostDisk(ctx, &ibm.LookupIsDedicatedHostDiskArgs{
    			DedicatedHost: ibm_is_dedicated_host.Example.Id,
    			Disk:          data.Ibm_is_dedicated_host_disks.Example.Disks[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 example = Ibm.GetIsDedicatedHostDisk.Invoke(new()
        {
            DedicatedHost = ibm_is_dedicated_host.Example.Id,
            Disk = data.Ibm_is_dedicated_host_disks.Example.Disks[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.GetIsDedicatedHostDiskArgs;
    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.getIsDedicatedHostDisk(GetIsDedicatedHostDiskArgs.builder()
                .dedicatedHost(ibm_is_dedicated_host.example().id())
                .disk(data.ibm_is_dedicated_host_disks().example().disks()[0].id())
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ibm:getIsDedicatedHostDisk
          arguments:
            dedicatedHost: ${ibm_is_dedicated_host.example.id}
            disk: ${data.ibm_is_dedicated_host_disks.example.disks[0].id}
    

    Using getIsDedicatedHostDisk

    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 getIsDedicatedHostDisk(args: GetIsDedicatedHostDiskArgs, opts?: InvokeOptions): Promise<GetIsDedicatedHostDiskResult>
    function getIsDedicatedHostDiskOutput(args: GetIsDedicatedHostDiskOutputArgs, opts?: InvokeOptions): Output<GetIsDedicatedHostDiskResult>
    def get_is_dedicated_host_disk(dedicated_host: Optional[str] = None,
                                   disk: Optional[str] = None,
                                   id: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetIsDedicatedHostDiskResult
    def get_is_dedicated_host_disk_output(dedicated_host: Optional[pulumi.Input[str]] = None,
                                   disk: Optional[pulumi.Input[str]] = None,
                                   id: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetIsDedicatedHostDiskResult]
    func LookupIsDedicatedHostDisk(ctx *Context, args *LookupIsDedicatedHostDiskArgs, opts ...InvokeOption) (*LookupIsDedicatedHostDiskResult, error)
    func LookupIsDedicatedHostDiskOutput(ctx *Context, args *LookupIsDedicatedHostDiskOutputArgs, opts ...InvokeOption) LookupIsDedicatedHostDiskResultOutput

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

    public static class GetIsDedicatedHostDisk 
    {
        public static Task<GetIsDedicatedHostDiskResult> InvokeAsync(GetIsDedicatedHostDiskArgs args, InvokeOptions? opts = null)
        public static Output<GetIsDedicatedHostDiskResult> Invoke(GetIsDedicatedHostDiskInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIsDedicatedHostDiskResult> getIsDedicatedHostDisk(GetIsDedicatedHostDiskArgs args, InvokeOptions options)
    public static Output<GetIsDedicatedHostDiskResult> getIsDedicatedHostDisk(GetIsDedicatedHostDiskArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIsDedicatedHostDisk:getIsDedicatedHostDisk
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DedicatedHost string
    The dedicated host identifier.
    Disk string
    The dedicated host disk identifier.
    Id string
    (String) The unique identifier for this instance disk.
    DedicatedHost string
    The dedicated host identifier.
    Disk string
    The dedicated host disk identifier.
    Id string
    (String) The unique identifier for this instance disk.
    dedicatedHost String
    The dedicated host identifier.
    disk String
    The dedicated host disk identifier.
    id String
    (String) The unique identifier for this instance disk.
    dedicatedHost string
    The dedicated host identifier.
    disk string
    The dedicated host disk identifier.
    id string
    (String) The unique identifier for this instance disk.
    dedicated_host str
    The dedicated host identifier.
    disk str
    The dedicated host disk identifier.
    id str
    (String) The unique identifier for this instance disk.
    dedicatedHost String
    The dedicated host identifier.
    disk String
    The dedicated host disk identifier.
    id String
    (String) The unique identifier for this instance disk.

    getIsDedicatedHostDisk Result

    The following output properties are available:

    Available double
    (String) The remaining space left for instance placement in GB (gigabytes).
    CreatedAt string
    (Timestamp) The date and time that the disk was created.
    DedicatedHost string
    Disk string
    Href string
    (String) The URL for this instance disk.
    Id string
    (String) The unique identifier for this instance disk.
    InstanceDisks List<GetIsDedicatedHostDiskInstanceDisk>
    (List) Instance disks that are on the dedicated host disk.
    InterfaceType string
    (String) The disk interface used for attaching the disk. The enumerated values for this property are expected to expand in the future. When processing this property, check for and log unknown values. Optionally, halts processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
    LifecycleState string
    (String) The lifecycle state of this dedicated host disk.
    Name string
    (String) The user defined or system provided name for this disk.
    Provisionable bool
    (String) Indicates whether this dedicated host disk is available for instance disk creation.
    ResourceType string
    (String) The type of resource referenced.
    Size double
    (String) The size of the disk in GB (gigabytes).
    SupportedInstanceInterfaceTypes List<string>
    (String) The instance disk interfaces supported for this dedicated host disk.
    Available float64
    (String) The remaining space left for instance placement in GB (gigabytes).
    CreatedAt string
    (Timestamp) The date and time that the disk was created.
    DedicatedHost string
    Disk string
    Href string
    (String) The URL for this instance disk.
    Id string
    (String) The unique identifier for this instance disk.
    InstanceDisks []GetIsDedicatedHostDiskInstanceDisk
    (List) Instance disks that are on the dedicated host disk.
    InterfaceType string
    (String) The disk interface used for attaching the disk. The enumerated values for this property are expected to expand in the future. When processing this property, check for and log unknown values. Optionally, halts processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
    LifecycleState string
    (String) The lifecycle state of this dedicated host disk.
    Name string
    (String) The user defined or system provided name for this disk.
    Provisionable bool
    (String) Indicates whether this dedicated host disk is available for instance disk creation.
    ResourceType string
    (String) The type of resource referenced.
    Size float64
    (String) The size of the disk in GB (gigabytes).
    SupportedInstanceInterfaceTypes []string
    (String) The instance disk interfaces supported for this dedicated host disk.
    available Double
    (String) The remaining space left for instance placement in GB (gigabytes).
    createdAt String
    (Timestamp) The date and time that the disk was created.
    dedicatedHost String
    disk String
    href String
    (String) The URL for this instance disk.
    id String
    (String) The unique identifier for this instance disk.
    instanceDisks List<GetIsDedicatedHostDiskInstanceDisk>
    (List) Instance disks that are on the dedicated host disk.
    interfaceType String
    (String) The disk interface used for attaching the disk. The enumerated values for this property are expected to expand in the future. When processing this property, check for and log unknown values. Optionally, halts processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
    lifecycleState String
    (String) The lifecycle state of this dedicated host disk.
    name String
    (String) The user defined or system provided name for this disk.
    provisionable Boolean
    (String) Indicates whether this dedicated host disk is available for instance disk creation.
    resourceType String
    (String) The type of resource referenced.
    size Double
    (String) The size of the disk in GB (gigabytes).
    supportedInstanceInterfaceTypes List<String>
    (String) The instance disk interfaces supported for this dedicated host disk.
    available number
    (String) The remaining space left for instance placement in GB (gigabytes).
    createdAt string
    (Timestamp) The date and time that the disk was created.
    dedicatedHost string
    disk string
    href string
    (String) The URL for this instance disk.
    id string
    (String) The unique identifier for this instance disk.
    instanceDisks GetIsDedicatedHostDiskInstanceDisk[]
    (List) Instance disks that are on the dedicated host disk.
    interfaceType string
    (String) The disk interface used for attaching the disk. The enumerated values for this property are expected to expand in the future. When processing this property, check for and log unknown values. Optionally, halts processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
    lifecycleState string
    (String) The lifecycle state of this dedicated host disk.
    name string
    (String) The user defined or system provided name for this disk.
    provisionable boolean
    (String) Indicates whether this dedicated host disk is available for instance disk creation.
    resourceType string
    (String) The type of resource referenced.
    size number
    (String) The size of the disk in GB (gigabytes).
    supportedInstanceInterfaceTypes string[]
    (String) The instance disk interfaces supported for this dedicated host disk.
    available float
    (String) The remaining space left for instance placement in GB (gigabytes).
    created_at str
    (Timestamp) The date and time that the disk was created.
    dedicated_host str
    disk str
    href str
    (String) The URL for this instance disk.
    id str
    (String) The unique identifier for this instance disk.
    instance_disks Sequence[GetIsDedicatedHostDiskInstanceDisk]
    (List) Instance disks that are on the dedicated host disk.
    interface_type str
    (String) The disk interface used for attaching the disk. The enumerated values for this property are expected to expand in the future. When processing this property, check for and log unknown values. Optionally, halts processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
    lifecycle_state str
    (String) The lifecycle state of this dedicated host disk.
    name str
    (String) The user defined or system provided name for this disk.
    provisionable bool
    (String) Indicates whether this dedicated host disk is available for instance disk creation.
    resource_type str
    (String) The type of resource referenced.
    size float
    (String) The size of the disk in GB (gigabytes).
    supported_instance_interface_types Sequence[str]
    (String) The instance disk interfaces supported for this dedicated host disk.
    available Number
    (String) The remaining space left for instance placement in GB (gigabytes).
    createdAt String
    (Timestamp) The date and time that the disk was created.
    dedicatedHost String
    disk String
    href String
    (String) The URL for this instance disk.
    id String
    (String) The unique identifier for this instance disk.
    instanceDisks List<Property Map>
    (List) Instance disks that are on the dedicated host disk.
    interfaceType String
    (String) The disk interface used for attaching the disk. The enumerated values for this property are expected to expand in the future. When processing this property, check for and log unknown values. Optionally, halts processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
    lifecycleState String
    (String) The lifecycle state of this dedicated host disk.
    name String
    (String) The user defined or system provided name for this disk.
    provisionable Boolean
    (String) Indicates whether this dedicated host disk is available for instance disk creation.
    resourceType String
    (String) The type of resource referenced.
    size Number
    (String) The size of the disk in GB (gigabytes).
    supportedInstanceInterfaceTypes List<String>
    (String) The instance disk interfaces supported for this dedicated host disk.

    Supporting Types

    GetIsDedicatedHostDiskInstanceDisk

    Deleteds List<GetIsDedicatedHostDiskInstanceDiskDeleted>
    (List) If present, this property indicates the referenced resource has been deleted and provides the supplementary information.
    Href string
    (String) The URL for this instance disk.
    Id string
    (String) The unique identifier for this instance disk.
    Name string
    (String) The user defined or system provided name for this disk.
    ResourceType string
    (String) The type of resource referenced.
    Deleteds []GetIsDedicatedHostDiskInstanceDiskDeleted
    (List) If present, this property indicates the referenced resource has been deleted and provides the supplementary information.
    Href string
    (String) The URL for this instance disk.
    Id string
    (String) The unique identifier for this instance disk.
    Name string
    (String) The user defined or system provided name for this disk.
    ResourceType string
    (String) The type of resource referenced.
    deleteds List<GetIsDedicatedHostDiskInstanceDiskDeleted>
    (List) If present, this property indicates the referenced resource has been deleted and provides the supplementary information.
    href String
    (String) The URL for this instance disk.
    id String
    (String) The unique identifier for this instance disk.
    name String
    (String) The user defined or system provided name for this disk.
    resourceType String
    (String) The type of resource referenced.
    deleteds GetIsDedicatedHostDiskInstanceDiskDeleted[]
    (List) If present, this property indicates the referenced resource has been deleted and provides the supplementary information.
    href string
    (String) The URL for this instance disk.
    id string
    (String) The unique identifier for this instance disk.
    name string
    (String) The user defined or system provided name for this disk.
    resourceType string
    (String) The type of resource referenced.
    deleteds Sequence[GetIsDedicatedHostDiskInstanceDiskDeleted]
    (List) If present, this property indicates the referenced resource has been deleted and provides the supplementary information.
    href str
    (String) The URL for this instance disk.
    id str
    (String) The unique identifier for this instance disk.
    name str
    (String) The user defined or system provided name for this disk.
    resource_type str
    (String) The type of resource referenced.
    deleteds List<Property Map>
    (List) If present, this property indicates the referenced resource has been deleted and provides the supplementary information.
    href String
    (String) The URL for this instance disk.
    id String
    (String) The unique identifier for this instance disk.
    name String
    (String) The user defined or system provided name for this disk.
    resourceType String
    (String) The type of resource referenced.

    GetIsDedicatedHostDiskInstanceDiskDeleted

    MoreInfo string
    (String) Link to documentation about deleted resources.
    MoreInfo string
    (String) Link to documentation about deleted resources.
    moreInfo String
    (String) Link to documentation about deleted resources.
    moreInfo string
    (String) Link to documentation about deleted resources.
    more_info str
    (String) Link to documentation about deleted resources.
    moreInfo String
    (String) Link to documentation about deleted resources.

    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