Skip to main content

boot_volume_attachments

Creates, updates, deletes, gets or lists a boot_volume_attachments resource.

Overview​

Nameboot_volume_attachments
TypeResource
Idoci.compute.boot_volume_attachments

Fields​

The following fields are returned by SELECT queries:

The boot volume attachment was retrieved.

NameDatatypeDescription
idstringThe OCID of the boot volume attachment.
availabilityDomainstringThe availability domain of an instance. Example: Uocm:PHX-AD-1
bootVolumeIdstringThe OCID of the boot volume.
compartmentIdstringThe OCID of the compartment.
displayNamestringA user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
encryptionInTransitTypestringRefer the top-level definition of encryptionInTransitType. The default value is NONE. (NONE, BM_ENCRYPTION_IN_TRANSIT) (default: NONE, x-obmcs-top-level-enum: #/definitions/EncryptionInTransitType)
instanceIdstringThe OCID of the instance the boot volume is attached to.
isPvEncryptionInTransitEnabledbooleanWhether in-transit encryption for the boot volume's paravirtualized attachment is enabled or not.
lifecycleStatestringThe current state of the boot volume attachment. (ATTACHING, ATTACHED, DETACHING, DETACHED)
timeCreatedstring (date-time)The date and time the boot volume was created, in the format defined by [RFC3339](https:​//tools.ietf.org/html/rfc3339). Example: 2016-08-25T21:10:29.600Z
timeUpdatedstring (date-time)The date and time the boot volume attachment was updated, in the format defined by [RFC3339](https:​//tools.ietf.org/html/rfc3339). Example: 2016-08-25T21:10:29.600Z

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectbootVolumeAttachmentId, regionGets information about the specified boot volume attachment.
listselectavailabilityDomain, compartmentId, regionlimit, page, instanceId, bootVolumeIdLists the boot volume attachments in the specified compartment. You can filter the<br />list by specifying an instance OCID, boot volume OCID, or both.<br />
attachinsertregion, instanceId, bootVolumeIdopc-retry-tokenAttaches the specified boot volume to the specified instance.<br />
detachdeletebootVolumeAttachmentId, regionif-matchDetaches a boot volume from an instance. You must specify the OCID of the boot volume attachment.<br /><br />This is an asynchronous operation. The attachment's lifecycleState will change to DETACHING temporarily<br />until the attachment is completely removed.<br />

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
availabilityDomainstringThe name of the availability domain. Example: Uocm:PHX-AD-1
bootVolumeAttachmentIdstringThe OCID of the boot volume attachment.
compartmentIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
regionstringOCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION)
bootVolumeIdstringThe OCID of the boot volume.
if-matchstringFor optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
instanceIdstringThe OCID of the instance.
limitintegerFor list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). Example: 50
opc-retry-tokenstringA token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
pagestringFor list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine).

SELECT examples​

Gets information about the specified boot volume attachment.

SELECT
id,
availabilityDomain,
bootVolumeId,
compartmentId,
displayName,
encryptionInTransitType,
instanceId,
isPvEncryptionInTransitEnabled,
lifecycleState,
timeCreated,
timeUpdated
FROM oci.compute.boot_volume_attachments
WHERE bootVolumeAttachmentId = '{{ bootVolumeAttachmentId }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples​

Attaches the specified boot volume to the specified instance.<br />

INSERT INTO oci.compute.boot_volume_attachments (
bootVolumeId,
displayName,
encryptionInTransitType,
instanceId,
region,
opc-retry-token
)
SELECT
'{{ bootVolumeId }}' /* required */,
'{{ displayName }}',
'{{ encryptionInTransitType }}',
'{{ instanceId }}' /* required */,
'{{ region }}',
'{{ opc-retry-token }}'
RETURNING
id,
availabilityDomain,
bootVolumeId,
compartmentId,
displayName,
encryptionInTransitType,
instanceId,
isPvEncryptionInTransitEnabled,
lifecycleState,
timeCreated,
timeUpdated
;

DELETE examples​

Detaches a boot volume from an instance. You must specify the OCID of the boot volume attachment.<br /><br />This is an asynchronous operation. The attachment's lifecycleState will change to DETACHING temporarily<br />until the attachment is completely removed.<br />

DELETE FROM oci.compute.boot_volume_attachments
WHERE bootVolumeAttachmentId = '{{ bootVolumeAttachmentId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
;