1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. getBootVolumeAttachments
Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi

oci.Core.getBootVolumeAttachments

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi

This data source provides the list of Boot Volume Attachments in Oracle Cloud Infrastructure Core service.

Lists the boot volume attachments in the specified compartment. You can filter the list by specifying an instance OCID, boot volume OCID, or both.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testBootVolumeAttachments = oci.Core.getBootVolumeAttachments({
    availabilityDomain: bootVolumeAttachmentAvailabilityDomain,
    compartmentId: compartmentId,
    bootVolumeId: testBootVolume.id,
    instanceId: testInstance.id,
});
Copy
import pulumi
import pulumi_oci as oci

test_boot_volume_attachments = oci.Core.get_boot_volume_attachments(availability_domain=boot_volume_attachment_availability_domain,
    compartment_id=compartment_id,
    boot_volume_id=test_boot_volume["id"],
    instance_id=test_instance["id"])
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/core"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := core.GetBootVolumeAttachments(ctx, &core.GetBootVolumeAttachmentsArgs{
			AvailabilityDomain: bootVolumeAttachmentAvailabilityDomain,
			CompartmentId:      compartmentId,
			BootVolumeId:       pulumi.StringRef(testBootVolume.Id),
			InstanceId:         pulumi.StringRef(testInstance.Id),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testBootVolumeAttachments = Oci.Core.GetBootVolumeAttachments.Invoke(new()
    {
        AvailabilityDomain = bootVolumeAttachmentAvailabilityDomain,
        CompartmentId = compartmentId,
        BootVolumeId = testBootVolume.Id,
        InstanceId = testInstance.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Core.CoreFunctions;
import com.pulumi.oci.Core.inputs.GetBootVolumeAttachmentsArgs;
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 testBootVolumeAttachments = CoreFunctions.getBootVolumeAttachments(GetBootVolumeAttachmentsArgs.builder()
            .availabilityDomain(bootVolumeAttachmentAvailabilityDomain)
            .compartmentId(compartmentId)
            .bootVolumeId(testBootVolume.id())
            .instanceId(testInstance.id())
            .build());

    }
}
Copy
variables:
  testBootVolumeAttachments:
    fn::invoke:
      function: oci:Core:getBootVolumeAttachments
      arguments:
        availabilityDomain: ${bootVolumeAttachmentAvailabilityDomain}
        compartmentId: ${compartmentId}
        bootVolumeId: ${testBootVolume.id}
        instanceId: ${testInstance.id}
Copy

For more detailed implementation refer the instance example

Using getBootVolumeAttachments

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 getBootVolumeAttachments(args: GetBootVolumeAttachmentsArgs, opts?: InvokeOptions): Promise<GetBootVolumeAttachmentsResult>
function getBootVolumeAttachmentsOutput(args: GetBootVolumeAttachmentsOutputArgs, opts?: InvokeOptions): Output<GetBootVolumeAttachmentsResult>
Copy
def get_boot_volume_attachments(availability_domain: Optional[str] = None,
                                boot_volume_id: Optional[str] = None,
                                compartment_id: Optional[str] = None,
                                filters: Optional[Sequence[_core.GetBootVolumeAttachmentsFilter]] = None,
                                instance_id: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetBootVolumeAttachmentsResult
def get_boot_volume_attachments_output(availability_domain: Optional[pulumi.Input[str]] = None,
                                boot_volume_id: Optional[pulumi.Input[str]] = None,
                                compartment_id: Optional[pulumi.Input[str]] = None,
                                filters: Optional[pulumi.Input[Sequence[pulumi.Input[_core.GetBootVolumeAttachmentsFilterArgs]]]] = None,
                                instance_id: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetBootVolumeAttachmentsResult]
Copy
func GetBootVolumeAttachments(ctx *Context, args *GetBootVolumeAttachmentsArgs, opts ...InvokeOption) (*GetBootVolumeAttachmentsResult, error)
func GetBootVolumeAttachmentsOutput(ctx *Context, args *GetBootVolumeAttachmentsOutputArgs, opts ...InvokeOption) GetBootVolumeAttachmentsResultOutput
Copy

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

public static class GetBootVolumeAttachments 
{
    public static Task<GetBootVolumeAttachmentsResult> InvokeAsync(GetBootVolumeAttachmentsArgs args, InvokeOptions? opts = null)
    public static Output<GetBootVolumeAttachmentsResult> Invoke(GetBootVolumeAttachmentsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetBootVolumeAttachmentsResult> getBootVolumeAttachments(GetBootVolumeAttachmentsArgs args, InvokeOptions options)
public static Output<GetBootVolumeAttachmentsResult> getBootVolumeAttachments(GetBootVolumeAttachmentsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Core/getBootVolumeAttachments:getBootVolumeAttachments
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AvailabilityDomain This property is required. string
The name of the availability domain. Example: Uocm:PHX-AD-1
CompartmentId This property is required. string
The OCID of the compartment.
BootVolumeId string
The OCID of the boot volume.
Filters Changes to this property will trigger replacement. List<GetBootVolumeAttachmentsFilter>
InstanceId string
The OCID of the instance.
AvailabilityDomain This property is required. string
The name of the availability domain. Example: Uocm:PHX-AD-1
CompartmentId This property is required. string
The OCID of the compartment.
BootVolumeId string
The OCID of the boot volume.
Filters Changes to this property will trigger replacement. []GetBootVolumeAttachmentsFilter
InstanceId string
The OCID of the instance.
availabilityDomain This property is required. String
The name of the availability domain. Example: Uocm:PHX-AD-1
compartmentId This property is required. String
The OCID of the compartment.
bootVolumeId String
The OCID of the boot volume.
filters Changes to this property will trigger replacement. List<GetBootVolumeAttachmentsFilter>
instanceId String
The OCID of the instance.
availabilityDomain This property is required. string
The name of the availability domain. Example: Uocm:PHX-AD-1
compartmentId This property is required. string
The OCID of the compartment.
bootVolumeId string
The OCID of the boot volume.
filters Changes to this property will trigger replacement. GetBootVolumeAttachmentsFilter[]
instanceId string
The OCID of the instance.
availability_domain This property is required. str
The name of the availability domain. Example: Uocm:PHX-AD-1
compartment_id This property is required. str
The OCID of the compartment.
boot_volume_id str
The OCID of the boot volume.
filters Changes to this property will trigger replacement. Sequence[core.GetBootVolumeAttachmentsFilter]
instance_id str
The OCID of the instance.
availabilityDomain This property is required. String
The name of the availability domain. Example: Uocm:PHX-AD-1
compartmentId This property is required. String
The OCID of the compartment.
bootVolumeId String
The OCID of the boot volume.
filters Changes to this property will trigger replacement. List<Property Map>
instanceId String
The OCID of the instance.

getBootVolumeAttachments Result

The following output properties are available:

AvailabilityDomain string
The availability domain of an instance. Example: Uocm:PHX-AD-1
BootVolumeAttachments List<GetBootVolumeAttachmentsBootVolumeAttachment>
The list of boot_volume_attachments.
CompartmentId string
The OCID of the compartment.
Id string
The provider-assigned unique ID for this managed resource.
BootVolumeId string
The OCID of the boot volume.
Filters List<GetBootVolumeAttachmentsFilter>
InstanceId string
The OCID of the instance the boot volume is attached to.
AvailabilityDomain string
The availability domain of an instance. Example: Uocm:PHX-AD-1
BootVolumeAttachments []GetBootVolumeAttachmentsBootVolumeAttachment
The list of boot_volume_attachments.
CompartmentId string
The OCID of the compartment.
Id string
The provider-assigned unique ID for this managed resource.
BootVolumeId string
The OCID of the boot volume.
Filters []GetBootVolumeAttachmentsFilter
InstanceId string
The OCID of the instance the boot volume is attached to.
availabilityDomain String
The availability domain of an instance. Example: Uocm:PHX-AD-1
bootVolumeAttachments List<GetBootVolumeAttachmentsBootVolumeAttachment>
The list of boot_volume_attachments.
compartmentId String
The OCID of the compartment.
id String
The provider-assigned unique ID for this managed resource.
bootVolumeId String
The OCID of the boot volume.
filters List<GetBootVolumeAttachmentsFilter>
instanceId String
The OCID of the instance the boot volume is attached to.
availabilityDomain string
The availability domain of an instance. Example: Uocm:PHX-AD-1
bootVolumeAttachments GetBootVolumeAttachmentsBootVolumeAttachment[]
The list of boot_volume_attachments.
compartmentId string
The OCID of the compartment.
id string
The provider-assigned unique ID for this managed resource.
bootVolumeId string
The OCID of the boot volume.
filters GetBootVolumeAttachmentsFilter[]
instanceId string
The OCID of the instance the boot volume is attached to.
availability_domain str
The availability domain of an instance. Example: Uocm:PHX-AD-1
boot_volume_attachments Sequence[core.GetBootVolumeAttachmentsBootVolumeAttachment]
The list of boot_volume_attachments.
compartment_id str
The OCID of the compartment.
id str
The provider-assigned unique ID for this managed resource.
boot_volume_id str
The OCID of the boot volume.
filters Sequence[core.GetBootVolumeAttachmentsFilter]
instance_id str
The OCID of the instance the boot volume is attached to.
availabilityDomain String
The availability domain of an instance. Example: Uocm:PHX-AD-1
bootVolumeAttachments List<Property Map>
The list of boot_volume_attachments.
compartmentId String
The OCID of the compartment.
id String
The provider-assigned unique ID for this managed resource.
bootVolumeId String
The OCID of the boot volume.
filters List<Property Map>
instanceId String
The OCID of the instance the boot volume is attached to.

Supporting Types

GetBootVolumeAttachmentsBootVolumeAttachment

AvailabilityDomain This property is required. string
The name of the availability domain. Example: Uocm:PHX-AD-1
BootVolumeId This property is required. string
The OCID of the boot volume.
CompartmentId This property is required. string
The OCID of the compartment.
DisplayName This property is required. string
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
EncryptionInTransitType This property is required. string
Refer the top-level definition of encryptionInTransitType. The default value is NONE.
Id This property is required. string
The OCID of the boot volume attachment.
InstanceId This property is required. string
The OCID of the instance.
IsPvEncryptionInTransitEnabled This property is required. bool
Whether in-transit encryption for the boot volume's paravirtualized attachment is enabled or not.
State This property is required. string
The current state of the boot volume attachment.
TimeCreated This property is required. string
The date and time the boot volume was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
TimeUpdated This property is required. string
The date and time the boot volume attachment was updated, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
AvailabilityDomain This property is required. string
The name of the availability domain. Example: Uocm:PHX-AD-1
BootVolumeId This property is required. string
The OCID of the boot volume.
CompartmentId This property is required. string
The OCID of the compartment.
DisplayName This property is required. string
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
EncryptionInTransitType This property is required. string
Refer the top-level definition of encryptionInTransitType. The default value is NONE.
Id This property is required. string
The OCID of the boot volume attachment.
InstanceId This property is required. string
The OCID of the instance.
IsPvEncryptionInTransitEnabled This property is required. bool
Whether in-transit encryption for the boot volume's paravirtualized attachment is enabled or not.
State This property is required. string
The current state of the boot volume attachment.
TimeCreated This property is required. string
The date and time the boot volume was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
TimeUpdated This property is required. string
The date and time the boot volume attachment was updated, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
availabilityDomain This property is required. String
The name of the availability domain. Example: Uocm:PHX-AD-1
bootVolumeId This property is required. String
The OCID of the boot volume.
compartmentId This property is required. String
The OCID of the compartment.
displayName This property is required. String
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
encryptionInTransitType This property is required. String
Refer the top-level definition of encryptionInTransitType. The default value is NONE.
id This property is required. String
The OCID of the boot volume attachment.
instanceId This property is required. String
The OCID of the instance.
isPvEncryptionInTransitEnabled This property is required. Boolean
Whether in-transit encryption for the boot volume's paravirtualized attachment is enabled or not.
state This property is required. String
The current state of the boot volume attachment.
timeCreated This property is required. String
The date and time the boot volume was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
timeUpdated This property is required. String
The date and time the boot volume attachment was updated, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
availabilityDomain This property is required. string
The name of the availability domain. Example: Uocm:PHX-AD-1
bootVolumeId This property is required. string
The OCID of the boot volume.
compartmentId This property is required. string
The OCID of the compartment.
displayName This property is required. string
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
encryptionInTransitType This property is required. string
Refer the top-level definition of encryptionInTransitType. The default value is NONE.
id This property is required. string
The OCID of the boot volume attachment.
instanceId This property is required. string
The OCID of the instance.
isPvEncryptionInTransitEnabled This property is required. boolean
Whether in-transit encryption for the boot volume's paravirtualized attachment is enabled or not.
state This property is required. string
The current state of the boot volume attachment.
timeCreated This property is required. string
The date and time the boot volume was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
timeUpdated This property is required. string
The date and time the boot volume attachment was updated, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
availability_domain This property is required. str
The name of the availability domain. Example: Uocm:PHX-AD-1
boot_volume_id This property is required. str
The OCID of the boot volume.
compartment_id This property is required. str
The OCID of the compartment.
display_name This property is required. str
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
encryption_in_transit_type This property is required. str
Refer the top-level definition of encryptionInTransitType. The default value is NONE.
id This property is required. str
The OCID of the boot volume attachment.
instance_id This property is required. str
The OCID of the instance.
is_pv_encryption_in_transit_enabled This property is required. bool
Whether in-transit encryption for the boot volume's paravirtualized attachment is enabled or not.
state This property is required. str
The current state of the boot volume attachment.
time_created This property is required. str
The date and time the boot volume was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
time_updated This property is required. str
The date and time the boot volume attachment was updated, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
availabilityDomain This property is required. String
The name of the availability domain. Example: Uocm:PHX-AD-1
bootVolumeId This property is required. String
The OCID of the boot volume.
compartmentId This property is required. String
The OCID of the compartment.
displayName This property is required. String
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
encryptionInTransitType This property is required. String
Refer the top-level definition of encryptionInTransitType. The default value is NONE.
id This property is required. String
The OCID of the boot volume attachment.
instanceId This property is required. String
The OCID of the instance.
isPvEncryptionInTransitEnabled This property is required. Boolean
Whether in-transit encryption for the boot volume's paravirtualized attachment is enabled or not.
state This property is required. String
The current state of the boot volume attachment.
timeCreated This property is required. String
The date and time the boot volume was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
timeUpdated This property is required. String
The date and time the boot volume attachment was updated, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

GetBootVolumeAttachmentsFilter

Name This property is required. string
Values This property is required. List<string>
Regex bool
Name This property is required. string
Values This property is required. []string
Regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean
name This property is required. string
values This property is required. string[]
regex boolean
name This property is required. str
values This property is required. Sequence[str]
regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi