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

ibm.getIsInstanceVolumeAttachments

Explore with Pulumi AI

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

    Retrieve information of an existing IBM Cloud infrastructure instance volume attachments as a read-only data source. For more information, about VPC virtual server instances, see Managing virtual server instances.

    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.getIsInstanceVolumeAttachments({
        instance: ibm_is_instance.example.id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    example = ibm.get_is_instance_volume_attachments(instance=ibm_is_instance["example"]["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.GetIsInstanceVolumeAttachments(ctx, &ibm.GetIsInstanceVolumeAttachmentsArgs{
    			Instance: ibm_is_instance.Example.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.GetIsInstanceVolumeAttachments.Invoke(new()
        {
            Instance = ibm_is_instance.Example.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.GetIsInstanceVolumeAttachmentsArgs;
    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.getIsInstanceVolumeAttachments(GetIsInstanceVolumeAttachmentsArgs.builder()
                .instance(ibm_is_instance.example().id())
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ibm:getIsInstanceVolumeAttachments
          arguments:
            instance: ${ibm_is_instance.example.id}
    

    Using getIsInstanceVolumeAttachments

    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 getIsInstanceVolumeAttachments(args: GetIsInstanceVolumeAttachmentsArgs, opts?: InvokeOptions): Promise<GetIsInstanceVolumeAttachmentsResult>
    function getIsInstanceVolumeAttachmentsOutput(args: GetIsInstanceVolumeAttachmentsOutputArgs, opts?: InvokeOptions): Output<GetIsInstanceVolumeAttachmentsResult>
    def get_is_instance_volume_attachments(id: Optional[str] = None,
                                           instance: Optional[str] = None,
                                           opts: Optional[InvokeOptions] = None) -> GetIsInstanceVolumeAttachmentsResult
    def get_is_instance_volume_attachments_output(id: Optional[pulumi.Input[str]] = None,
                                           instance: Optional[pulumi.Input[str]] = None,
                                           opts: Optional[InvokeOptions] = None) -> Output[GetIsInstanceVolumeAttachmentsResult]
    func GetIsInstanceVolumeAttachments(ctx *Context, args *GetIsInstanceVolumeAttachmentsArgs, opts ...InvokeOption) (*GetIsInstanceVolumeAttachmentsResult, error)
    func GetIsInstanceVolumeAttachmentsOutput(ctx *Context, args *GetIsInstanceVolumeAttachmentsOutputArgs, opts ...InvokeOption) GetIsInstanceVolumeAttachmentsResultOutput

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

    public static class GetIsInstanceVolumeAttachments 
    {
        public static Task<GetIsInstanceVolumeAttachmentsResult> InvokeAsync(GetIsInstanceVolumeAttachmentsArgs args, InvokeOptions? opts = null)
        public static Output<GetIsInstanceVolumeAttachmentsResult> Invoke(GetIsInstanceVolumeAttachmentsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIsInstanceVolumeAttachmentsResult> getIsInstanceVolumeAttachments(GetIsInstanceVolumeAttachmentsArgs args, InvokeOptions options)
    public static Output<GetIsInstanceVolumeAttachmentsResult> getIsInstanceVolumeAttachments(GetIsInstanceVolumeAttachmentsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIsInstanceVolumeAttachments:getIsInstanceVolumeAttachments
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Instance string
    The id of the instance.
    Id string
    (String) The unique identifier for this volume.
    Instance string
    The id of the instance.
    Id string
    (String) The unique identifier for this volume.
    instance String
    The id of the instance.
    id String
    (String) The unique identifier for this volume.
    instance string
    The id of the instance.
    id string
    (String) The unique identifier for this volume.
    instance str
    The id of the instance.
    id str
    (String) The unique identifier for this volume.
    instance String
    The id of the instance.
    id String
    (String) The unique identifier for this volume.

    getIsInstanceVolumeAttachments Result

    The following output properties are available:

    Id string
    (String) The unique identifier for this volume.
    Instance string
    VolumeAttachments List<GetIsInstanceVolumeAttachmentsVolumeAttachment>
    (List of Object) A list of volume attachments on an instance.
    Id string
    (String) The unique identifier for this volume.
    Instance string
    VolumeAttachments []GetIsInstanceVolumeAttachmentsVolumeAttachment
    (List of Object) A list of volume attachments on an instance.
    id String
    (String) The unique identifier for this volume.
    instance String
    volumeAttachments List<GetIsInstanceVolumeAttachmentsVolumeAttachment>
    (List of Object) A list of volume attachments on an instance.
    id string
    (String) The unique identifier for this volume.
    instance string
    volumeAttachments GetIsInstanceVolumeAttachmentsVolumeAttachment[]
    (List of Object) A list of volume attachments on an instance.
    id str
    (String) The unique identifier for this volume.
    instance str
    volume_attachments Sequence[GetIsInstanceVolumeAttachmentsVolumeAttachment]
    (List of Object) A list of volume attachments on an instance.
    id String
    (String) The unique identifier for this volume.
    instance String
    volumeAttachments List<Property Map>
    (List of Object) A list of volume attachments on an instance.

    Supporting Types

    GetIsInstanceVolumeAttachmentsVolumeAttachment

    Bandwidth double
    (Optional, Integer) The maximum bandwidth (in megabits per second) for the volume. For this property to be specified, the volume storage_generation must be 2.
    DeleteVolumeOnInstanceDelete bool
    (Boolean) If set to true, when deleting the instance the volume will also be deleted.
    Device string
    (String) A unique identifier for the device which is exposed to the instance operating system.
    Href string
    (String) The URL for this volume.
    Name string
    (String) The unique user-defined name for this volume.
    Status string
    (String) The status of this volume attachment.
    Type string
    (String) The type of volume attachment. Supported values are boot, data.
    VolumeAttachmentId string
    (String) The unique identifier for this volume attachment.
    VolumeCrn string
    VolumeDeleted string
    VolumeHref string
    VolumeId string
    VolumeName string
    VolumeReferences List<GetIsInstanceVolumeAttachmentsVolumeAttachmentVolumeReference>
    Bandwidth float64
    (Optional, Integer) The maximum bandwidth (in megabits per second) for the volume. For this property to be specified, the volume storage_generation must be 2.
    DeleteVolumeOnInstanceDelete bool
    (Boolean) If set to true, when deleting the instance the volume will also be deleted.
    Device string
    (String) A unique identifier for the device which is exposed to the instance operating system.
    Href string
    (String) The URL for this volume.
    Name string
    (String) The unique user-defined name for this volume.
    Status string
    (String) The status of this volume attachment.
    Type string
    (String) The type of volume attachment. Supported values are boot, data.
    VolumeAttachmentId string
    (String) The unique identifier for this volume attachment.
    VolumeCrn string
    VolumeDeleted string
    VolumeHref string
    VolumeId string
    VolumeName string
    VolumeReferences []GetIsInstanceVolumeAttachmentsVolumeAttachmentVolumeReference
    bandwidth Double
    (Optional, Integer) The maximum bandwidth (in megabits per second) for the volume. For this property to be specified, the volume storage_generation must be 2.
    deleteVolumeOnInstanceDelete Boolean
    (Boolean) If set to true, when deleting the instance the volume will also be deleted.
    device String
    (String) A unique identifier for the device which is exposed to the instance operating system.
    href String
    (String) The URL for this volume.
    name String
    (String) The unique user-defined name for this volume.
    status String
    (String) The status of this volume attachment.
    type String
    (String) The type of volume attachment. Supported values are boot, data.
    volumeAttachmentId String
    (String) The unique identifier for this volume attachment.
    volumeCrn String
    volumeDeleted String
    volumeHref String
    volumeId String
    volumeName String
    volumeReferences List<GetIsInstanceVolumeAttachmentsVolumeAttachmentVolumeReference>
    bandwidth number
    (Optional, Integer) The maximum bandwidth (in megabits per second) for the volume. For this property to be specified, the volume storage_generation must be 2.
    deleteVolumeOnInstanceDelete boolean
    (Boolean) If set to true, when deleting the instance the volume will also be deleted.
    device string
    (String) A unique identifier for the device which is exposed to the instance operating system.
    href string
    (String) The URL for this volume.
    name string
    (String) The unique user-defined name for this volume.
    status string
    (String) The status of this volume attachment.
    type string
    (String) The type of volume attachment. Supported values are boot, data.
    volumeAttachmentId string
    (String) The unique identifier for this volume attachment.
    volumeCrn string
    volumeDeleted string
    volumeHref string
    volumeId string
    volumeName string
    volumeReferences GetIsInstanceVolumeAttachmentsVolumeAttachmentVolumeReference[]
    bandwidth float
    (Optional, Integer) The maximum bandwidth (in megabits per second) for the volume. For this property to be specified, the volume storage_generation must be 2.
    delete_volume_on_instance_delete bool
    (Boolean) If set to true, when deleting the instance the volume will also be deleted.
    device str
    (String) A unique identifier for the device which is exposed to the instance operating system.
    href str
    (String) The URL for this volume.
    name str
    (String) The unique user-defined name for this volume.
    status str
    (String) The status of this volume attachment.
    type str
    (String) The type of volume attachment. Supported values are boot, data.
    volume_attachment_id str
    (String) The unique identifier for this volume attachment.
    volume_crn str
    volume_deleted str
    volume_href str
    volume_id str
    volume_name str
    volume_references Sequence[GetIsInstanceVolumeAttachmentsVolumeAttachmentVolumeReference]
    bandwidth Number
    (Optional, Integer) The maximum bandwidth (in megabits per second) for the volume. For this property to be specified, the volume storage_generation must be 2.
    deleteVolumeOnInstanceDelete Boolean
    (Boolean) If set to true, when deleting the instance the volume will also be deleted.
    device String
    (String) A unique identifier for the device which is exposed to the instance operating system.
    href String
    (String) The URL for this volume.
    name String
    (String) The unique user-defined name for this volume.
    status String
    (String) The status of this volume attachment.
    type String
    (String) The type of volume attachment. Supported values are boot, data.
    volumeAttachmentId String
    (String) The unique identifier for this volume attachment.
    volumeCrn String
    volumeDeleted String
    volumeHref String
    volumeId String
    volumeName String
    volumeReferences List<Property Map>

    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