Skip to main content

database_software_images

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

Overview​

Namedatabase_software_images
TypeResource
Idoci.database.database_software_images

Fields​

The following fields are returned by SELECT queries:

The Database Software Image.

NameDatatypeDescription
idstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the database software image.
compartmentIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the compartment.
databaseSoftwareImageIncludedPatchesarrayList of one-off patches for Database Homes.
databaseSoftwareImageOneOffPatchesarrayList of one-off patches for Database Homes.
databaseVersionstringThe database version with which the database software image is to be built.
definedTagsobjectDefined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm).
displayNamestringThe user-friendly name for the database software image. The name does not have to be unique.
freeformTagsobjectFree-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"}
imageShapeFamilystringTo what shape the image is meant for. (VM_BM_SHAPE, EXADATA_SHAPE, EXACC_SHAPE, EXADBXS_SHAPE)
imageTypestringThe type of software image. Can be grid or database. (GRID_IMAGE, DATABASE_IMAGE)
includedPatchesSummarystringThe patches included in the image and the version of the image.
isUpgradeSupportedbooleanTrue if this Database software image is supported for Upgrade.
lifecycleDetailsstringDetailed message for the lifecycle state.
lifecycleStatestringThe current state of the database software image. (PROVISIONING, AVAILABLE, DELETING, DELETED, FAILED, TERMINATING, TERMINATED, UPDATING)
lsInventorystringThe output from the OPatch lsInventory command, which is passed as a string.
patchSetstringThe PSU or PBP or Release Updates. To get a list of supported versions, use the [ListDbVersions](#/en/database/latest/DbVersionSummary/ListDbVersions) operation.
systemTagsobjectSystem tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm).
timeCreatedstring (date-time)The date and time the database software image was created.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdatabaseSoftwareImageId, regionGets information about the specified database software image.
listselectcompartmentId, regionlimit, page, sortBy, sortOrder, lifecycleState, displayName, imageType, imageShapeFamily, patchSetGreaterThanOrEqualTo, isUpgradeSupportedGets a list of the database software images in the specified compartment.<br />
createinsertregion, compartmentId, displayNameopc-retry-tokencreate database software image in the specified compartment.<br />
updateupdatedatabaseSoftwareImageId, regionif-matchUpdates the properties of a Database Software Image, like Display Nmae
deletedeletedatabaseSoftwareImageId, regionif-matchDelete a database software image
change_compartmentexecdatabaseSoftwareImageId, region, compartmentIdopc-retry-token, opc-request-id, if-matchMove the Database Software Image and its dependent resources to the specified compartment.<br />For more information about moving Databse Software Images, see<br />[Moving Database Resources to a Different Compartment](/Content/Database/Concepts/databaseoverview.htm#moveRes).<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
compartmentIdstringThe compartment [OCID](/Content/General/Concepts/identifiers.htm).
databaseSoftwareImageIdstringThe DB system [OCID](/Content/General/Concepts/identifiers.htm).
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)
displayNamestringA filter to return only resources that match the entire display name given. The match is not case sensitive.
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.
imageShapeFamilystringA filter to return only resources that match the given image shape family exactly.
imageTypestringA filter to return only resources that match the given image type exactly.
isUpgradeSupportedbooleanIf provided, filters the results to the set of database versions which are supported for Upgrade.
lifecycleStatestringA filter to return only resources that match the given lifecycle state exactly.
limitintegerThe maximum number of items to return per page.
opc-request-idstringUnique identifier for the request.
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).
pagestringThe pagination token to continue listing from.
patchSetGreaterThanOrEqualTostringA filter to return only resources with patchSet greater than or equal to given value.
sortBystringThe field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. Default order for PATCHSET is descending.
sortOrderstringThe sort order to use, either ascending (ASC) or descending (DESC).

SELECT examples​

Gets information about the specified database software image.

SELECT
id,
compartmentId,
databaseSoftwareImageIncludedPatches,
databaseSoftwareImageOneOffPatches,
databaseVersion,
definedTags,
displayName,
freeformTags,
imageShapeFamily,
imageType,
includedPatchesSummary,
isUpgradeSupported,
lifecycleDetails,
lifecycleState,
lsInventory,
patchSet,
systemTags,
timeCreated
FROM oci.database.database_software_images
WHERE databaseSoftwareImageId = '{{ databaseSoftwareImageId }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples​

create database software image in the specified compartment.<br />

INSERT INTO oci.database.database_software_images (
compartmentId,
databaseSoftwareImageOneOffPatches,
databaseVersion,
definedTags,
displayName,
freeformTags,
imageShapeFamily,
imageType,
lsInventory,
patchSet,
sourceDbHomeId,
region,
opc-retry-token
)
SELECT
'{{ compartmentId }}' /* required */,
'{{ databaseSoftwareImageOneOffPatches }}',
'{{ databaseVersion }}',
'{{ definedTags }}',
'{{ displayName }}' /* required */,
'{{ freeformTags }}',
'{{ imageShapeFamily }}',
'{{ imageType }}',
'{{ lsInventory }}',
'{{ patchSet }}',
'{{ sourceDbHomeId }}',
'{{ region }}',
'{{ opc-retry-token }}'
RETURNING
id,
compartmentId,
databaseSoftwareImageIncludedPatches,
databaseSoftwareImageOneOffPatches,
databaseVersion,
definedTags,
displayName,
freeformTags,
imageShapeFamily,
imageType,
includedPatchesSummary,
isUpgradeSupported,
lifecycleDetails,
lifecycleState,
lsInventory,
patchSet,
systemTags,
timeCreated
;

UPDATE examples​

Updates the properties of a Database Software Image, like Display Nmae

UPDATE oci.database.database_software_images
SET
definedTags = '{{ definedTags }}',
displayName = '{{ displayName }}',
freeformTags = '{{ freeformTags }}'
WHERE
databaseSoftwareImageId = '{{ databaseSoftwareImageId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
RETURNING
id,
compartmentId,
databaseSoftwareImageIncludedPatches,
databaseSoftwareImageOneOffPatches,
databaseVersion,
definedTags,
displayName,
freeformTags,
imageShapeFamily,
imageType,
includedPatchesSummary,
isUpgradeSupported,
lifecycleDetails,
lifecycleState,
lsInventory,
patchSet,
systemTags,
timeCreated;

DELETE examples​

Delete a database software image

DELETE FROM oci.database.database_software_images
WHERE databaseSoftwareImageId = '{{ databaseSoftwareImageId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
;

Lifecycle Methods​

Move the Database Software Image and its dependent resources to the specified compartment.<br />For more information about moving Databse Software Images, see<br />[Moving Database Resources to a Different Compartment](/Content/Database/Concepts/databaseoverview.htm#moveRes).<br />

EXEC oci.database.database_software_images.change_compartment
@databaseSoftwareImageId='{{ databaseSoftwareImageId }}' --required,
@region='{{ region }}' --required,
@opc-retry-token='{{ opc-retry-token }}',
@opc-request-id='{{ opc-request-id }}',
@if-match='{{ if-match }}'
@@json=
'{
"compartmentId": "{{ compartmentId }}"
}'
;