Skip to main content

oneoff_patches

Creates, updates, deletes, gets or lists an oneoff_patches resource.

Overview​

Nameoneoff_patches
TypeResource
Idoci.database.oneoff_patches

Fields​

The following fields are returned by SELECT queries:

One-off patch information was retrieved.

NameDatatypeDescription
idstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the one-off patch.
compartmentIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the compartment.
dbVersionstringA valid Oracle Database version. For a list of supported versions, use the ListDbVersions operation. This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier.
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).
displayNamestringOne-off patch name.
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"}
lifecycleDetailsstringDetailed message for the lifecycle state.
lifecycleStatestringThe current state of the one-off patch. (CREATING, AVAILABLE, UPDATING, INACTIVE, FAILED, EXPIRED, DELETING, DELETED, TERMINATING, TERMINATED)
oneOffPatchesarrayList of one-off patches for Database Homes.
releaseUpdatestringThe PSU or PBP or Release Updates. To get a list of supported versions, use the [ListDbVersions](#/en/database/latest/DbVersionSummary/ListDbVersions) operation.
sha256SumstringSHA-256 checksum of the one-off patch.
sizeInKBsnumber (float)The size of one-off patch in kilobytes.
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 one-off patch was created.
timeOfExpirationstring (date-time)The date and time until which the one-off patch will be available for download.
timeUpdatedstring (date-time)The date and time one-off patch was updated.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectoneoffPatchId, regionopc-request-idGets information about the specified one-off patch.<br />
listselectcompartmentId, regionlimit, page, sortBy, sortOrder, lifecycleState, displayName, opc-request-idLists one-off patches in the specified compartment.<br />
createinsertregion, compartmentId, displayName, dbVersion, releaseUpdateopc-retry-token, opc-request-idCreates one-off patch for specified database version to download.<br />
updateupdateoneoffPatchId, regionif-match, opc-request-idUpdates the properties of the specified one-off patch.<br />
deletedeleteoneoffPatchId, regionopc-request-id, if-matchDeletes a one-off patch.<br />
change_compartmentexeconeoffPatchId, region, compartmentIdopc-retry-token, opc-request-id, if-matchMove the one-off patch to the specified compartment.<br />
download_oneoff_patchexeconeoffPatchId, regionopc-retry-token, opc-request-id, if-matchDownload one-off patch.<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).
oneoffPatchIdstringThe one-off patch [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.
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.
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.
sortOrderstringThe sort order to use, either ascending (ASC) or descending (DESC).

SELECT examples​

Gets information about the specified one-off patch.<br />

SELECT
id,
compartmentId,
dbVersion,
definedTags,
displayName,
freeformTags,
lifecycleDetails,
lifecycleState,
oneOffPatches,
releaseUpdate,
sha256Sum,
sizeInKBs,
systemTags,
timeCreated,
timeOfExpiration,
timeUpdated
FROM oci.database.oneoff_patches
WHERE oneoffPatchId = '{{ oneoffPatchId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
;

INSERT examples​

Creates one-off patch for specified database version to download.<br />

INSERT INTO oci.database.oneoff_patches (
compartmentId,
dbVersion,
definedTags,
displayName,
freeformTags,
oneOffPatches,
releaseUpdate,
region,
opc-retry-token,
opc-request-id
)
SELECT
'{{ compartmentId }}' /* required */,
'{{ dbVersion }}' /* required */,
'{{ definedTags }}',
'{{ displayName }}' /* required */,
'{{ freeformTags }}',
'{{ oneOffPatches }}',
'{{ releaseUpdate }}' /* required */,
'{{ region }}',
'{{ opc-retry-token }}',
'{{ opc-request-id }}'
RETURNING
id,
compartmentId,
dbVersion,
definedTags,
displayName,
freeformTags,
lifecycleDetails,
lifecycleState,
oneOffPatches,
releaseUpdate,
sha256Sum,
sizeInKBs,
systemTags,
timeCreated,
timeOfExpiration,
timeUpdated
;

UPDATE examples​

Updates the properties of the specified one-off patch.<br />

UPDATE oci.database.oneoff_patches
SET
definedTags = '{{ definedTags }}',
freeformTags = '{{ freeformTags }}'
WHERE
oneoffPatchId = '{{ oneoffPatchId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
AND opc-request-id = '{{ opc-request-id}}'
RETURNING
id,
compartmentId,
dbVersion,
definedTags,
displayName,
freeformTags,
lifecycleDetails,
lifecycleState,
oneOffPatches,
releaseUpdate,
sha256Sum,
sizeInKBs,
systemTags,
timeCreated,
timeOfExpiration,
timeUpdated;

DELETE examples​

Deletes a one-off patch.<br />

DELETE FROM oci.database.oneoff_patches
WHERE oneoffPatchId = '{{ oneoffPatchId }}' --required
AND region = '{{ region }}' --required
AND opc-request-id = '{{ opc-request-id }}'
AND if-match = '{{ if-match }}'
;

Lifecycle Methods​

Move the one-off patch to the specified compartment.<br />

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