database_software_images
Creates, updates, deletes, gets or lists a database_software_images resource.
Overview​
| Name | database_software_images |
| Type | Resource |
| Id | oci.database.database_software_images |
Fields​
The following fields are returned by SELECT queries:
- get
- list
The Database Software Image.
| Name | Datatype | Description |
|---|---|---|
id | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the database software image. |
compartmentId | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the compartment. |
databaseSoftwareImageIncludedPatches | array | List of one-off patches for Database Homes. |
databaseSoftwareImageOneOffPatches | array | List of one-off patches for Database Homes. |
databaseVersion | string | The database version with which the database software image is to be built. |
definedTags | object | Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). |
displayName | string | The user-friendly name for the database software image. The name does not have to be unique. |
freeformTags | object | Free-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"} |
imageShapeFamily | string | To what shape the image is meant for. (VM_BM_SHAPE, EXADATA_SHAPE, EXACC_SHAPE, EXADBXS_SHAPE) |
imageType | string | The type of software image. Can be grid or database. (GRID_IMAGE, DATABASE_IMAGE) |
includedPatchesSummary | string | The patches included in the image and the version of the image. |
isUpgradeSupported | boolean | True if this Database software image is supported for Upgrade. |
lifecycleDetails | string | Detailed message for the lifecycle state. |
lifecycleState | string | The current state of the database software image. (PROVISIONING, AVAILABLE, DELETING, DELETED, FAILED, TERMINATING, TERMINATED, UPDATING) |
lsInventory | string | The output from the OPatch lsInventory command, which is passed as a string. |
patchSet | string | The PSU or PBP or Release Updates. To get a list of supported versions, use the [ListDbVersions](#/en/database/latest/DbVersionSummary/ListDbVersions) operation. |
systemTags | object | System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). |
timeCreated | string (date-time) | The date and time the database software image was created. |
The Database service supports the creation of database software images for use in creating and patching DB systems and databases.<br /><br />To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, talk to an administrator. If you are an administrator who needs to write policies to give users access, see [Getting Started with Policies](/Content/Identity/Concepts/policygetstarted.htm).<br /><br />For information about access control and compartments, see [Overview of the Identity Service](/Content/Identity/Concepts/overview.htm).<br /><br />Warning: Oracle recommends that you avoid using any confidential information when you supply string values using the API.<br />
| Name | Datatype | Description |
|---|---|---|
id | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the database software image. |
compartmentId | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the compartment. |
databaseSoftwareImageIncludedPatches | array | List of one-off patches for Database Homes. |
databaseSoftwareImageOneOffPatches | array | List of one-off patches for Database Homes. |
databaseVersion | string | The database version with which the database software image is to be built. |
definedTags | object | Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). |
displayName | string | The user-friendly name for the database software image. The name does not have to be unique. |
freeformTags | object | Free-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"} |
imageShapeFamily | string | To what shape the image is meant for. (VM_BM_SHAPE, EXADATA_SHAPE, EXACC_SHAPE, EXADBXS_SHAPE) |
imageType | string | The type of software image. Can be grid or database. (GRID_IMAGE, DATABASE_IMAGE) |
includedPatchesSummary | string | The patches included in the image and the version of the image. |
isUpgradeSupported | boolean | True if this Database software image is supported for Upgrade. |
lifecycleDetails | string | Detailed message for the lifecycle state. |
lifecycleState | string | The current state of the database software image. (PROVISIONING, AVAILABLE, DELETING, DELETED, FAILED, TERMINATING, TERMINATED, UPDATING) |
lsInventory | string | The output from the OPatch lsInventory command, which is passed as a string. |
patchSet | string | The PSU or PBP or Release Updates. To get a list of supported versions, use the [ListDbVersions](#/en/database/latest/DbVersionSummary/ListDbVersions) operation. |
systemTags | object | System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). |
timeCreated | string (date-time) | The date and time the database software image was created. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | databaseSoftwareImageId, region | Gets information about the specified database software image. | |
list | select | compartmentId, region | limit, page, sortBy, sortOrder, lifecycleState, displayName, imageType, imageShapeFamily, patchSetGreaterThanOrEqualTo, isUpgradeSupported | Gets a list of the database software images in the specified compartment.<br /> |
create | insert | region, compartmentId, displayName | opc-retry-token | create database software image in the specified compartment.<br /> |
update | update | databaseSoftwareImageId, region | if-match | Updates the properties of a Database Software Image, like Display Nmae |
delete | delete | databaseSoftwareImageId, region | if-match | Delete a database software image |
change_compartment | exec | databaseSoftwareImageId, region, compartmentId | opc-retry-token, opc-request-id, if-match | 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 /> |
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.
| Name | Datatype | Description |
|---|---|---|
compartmentId | string | The compartment [OCID](/Content/General/Concepts/identifiers.htm). |
databaseSoftwareImageId | string | The DB system [OCID](/Content/General/Concepts/identifiers.htm). |
region | string | OCI 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) |
displayName | string | A filter to return only resources that match the entire display name given. The match is not case sensitive. |
if-match | string | For 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. |
imageShapeFamily | string | A filter to return only resources that match the given image shape family exactly. |
imageType | string | A filter to return only resources that match the given image type exactly. |
isUpgradeSupported | boolean | If provided, filters the results to the set of database versions which are supported for Upgrade. |
lifecycleState | string | A filter to return only resources that match the given lifecycle state exactly. |
limit | integer | The maximum number of items to return per page. |
opc-request-id | string | Unique identifier for the request. |
opc-retry-token | string | A 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). |
page | string | The pagination token to continue listing from. |
patchSetGreaterThanOrEqualTo | string | A filter to return only resources with patchSet greater than or equal to given value. |
sortBy | string | The 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. |
sortOrder | string | The sort order to use, either ascending (ASC) or descending (DESC). |
SELECT examples​
- get
- list
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
;
Gets a list of the database software images in the specified compartment.<br />
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 compartmentId = '{{ compartmentId }}' -- required
AND region = '{{ region }}' -- required
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND sortBy = '{{ sortBy }}'
AND sortOrder = '{{ sortOrder }}'
AND lifecycleState = '{{ lifecycleState }}'
AND displayName = '{{ displayName }}'
AND imageType = '{{ imageType }}'
AND imageShapeFamily = '{{ imageShapeFamily }}'
AND patchSetGreaterThanOrEqualTo = '{{ patchSetGreaterThanOrEqualTo }}'
AND isUpgradeSupported = '{{ isUpgradeSupported }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: database_software_images
props:
- name: region
value: "{{ region }}"
description: Required parameter for the database_software_images resource.
- name: compartmentId
value: "{{ compartmentId }}"
description: |
The [OCID](/Content/General/Concepts/identifiers.htm) of the compartment the database software image belongs in.
- name: databaseSoftwareImageOneOffPatches
value:
- "{{ databaseSoftwareImageOneOffPatches }}"
description: |
List of one-off patches for Database Homes.
- name: databaseVersion
value: "{{ databaseVersion }}"
description: |
The database version with which the database software image is to be built.
- name: definedTags
value: "{{ definedTags }}"
description: |
Defined tags for this resource. Each key is predefined and scoped to a namespace.
For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm).
- name: displayName
value: "{{ displayName }}"
description: |
The user-friendly name for the database software image. The name does not have to be unique.
- name: freeformTags
value: "{{ freeformTags }}"
description: |
Free-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"}`
- name: imageShapeFamily
value: "{{ imageShapeFamily }}"
description: |
To what shape the image is meant for.
valid_values: ['VM_BM_SHAPE', 'EXADATA_SHAPE', 'EXACC_SHAPE', 'EXADBXS_SHAPE']
default: VM_BM_SHAPE
- name: imageType
value: "{{ imageType }}"
description: |
The type of software image. Can be grid or database.
valid_values: ['GRID_IMAGE', 'DATABASE_IMAGE']
default: DATABASE_IMAGE
- name: lsInventory
value: "{{ lsInventory }}"
description: |
The output from the OPatch lsInventory command, which is passed as a string.
- name: patchSet
value: "{{ patchSet }}"
description: |
The PSU or PBP or Release Updates. To get a list of supported versions, use the [ListDbVersions](#/en/database/latest/DbVersionSummary/ListDbVersions) operation.
- name: sourceDbHomeId
value: "{{ sourceDbHomeId }}"
description: |
The [OCID](/Content/General/Concepts/identifiers.htm) of the Database Home.
- name: opc-retry-token
value: "{{ opc-retry-token }}"
description: A 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).
description: A 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).
UPDATE examples​
- update
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
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​
- change_compartment
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 }}"
}'
;