1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. getBootVolumeAttachments
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

oci.Core.getBootVolumeAttachments

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 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: _var.boot_volume_attachment_availability_domain,
        compartmentId: _var.compartment_id,
        bootVolumeId: oci_core_boot_volume.test_boot_volume.id,
        instanceId: oci_core_instance.test_instance.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_boot_volume_attachments = oci.Core.get_boot_volume_attachments(availability_domain=var["boot_volume_attachment_availability_domain"],
        compartment_id=var["compartment_id"],
        boot_volume_id=oci_core_boot_volume["test_boot_volume"]["id"],
        instance_id=oci_core_instance["test_instance"]["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/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: _var.Boot_volume_attachment_availability_domain,
    			CompartmentId:      _var.Compartment_id,
    			BootVolumeId:       pulumi.StringRef(oci_core_boot_volume.Test_boot_volume.Id),
    			InstanceId:         pulumi.StringRef(oci_core_instance.Test_instance.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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 = @var.Boot_volume_attachment_availability_domain,
            CompartmentId = @var.Compartment_id,
            BootVolumeId = oci_core_boot_volume.Test_boot_volume.Id,
            InstanceId = oci_core_instance.Test_instance.Id,
        });
    
    });
    
    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(var_.boot_volume_attachment_availability_domain())
                .compartmentId(var_.compartment_id())
                .bootVolumeId(oci_core_boot_volume.test_boot_volume().id())
                .instanceId(oci_core_instance.test_instance().id())
                .build());
    
        }
    }
    
    variables:
      testBootVolumeAttachments:
        fn::invoke:
          Function: oci:Core:getBootVolumeAttachments
          Arguments:
            availabilityDomain: ${var.boot_volume_attachment_availability_domain}
            compartmentId: ${var.compartment_id}
            bootVolumeId: ${oci_core_boot_volume.test_boot_volume.id}
            instanceId: ${oci_core_instance.test_instance.id}
    

    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>
    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]
    func GetBootVolumeAttachments(ctx *Context, args *GetBootVolumeAttachmentsArgs, opts ...InvokeOption) (*GetBootVolumeAttachmentsResult, error)
    func GetBootVolumeAttachmentsOutput(ctx *Context, args *GetBootVolumeAttachmentsOutputArgs, opts ...InvokeOption) GetBootVolumeAttachmentsResultOutput

    > 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)
    }
    public static CompletableFuture<GetBootVolumeAttachmentsResult> getBootVolumeAttachments(GetBootVolumeAttachmentsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Core/getBootVolumeAttachments:getBootVolumeAttachments
      arguments:
        # arguments dictionary

    The following arguments are supported:

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

    GetBootVolumeAttachmentsFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values 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.
    oci logo
    Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi