maintenance_runs
Creates, updates, deletes, gets or lists a maintenance_runs resource.
Overview​
| Name | maintenance_runs |
| Type | Resource |
| Id | oci.database.maintenance_runs |
Fields​
The following fields are returned by SELECT queries:
- get
- list
Information about the specified maintenance run.
| Name | Datatype | Description |
|---|---|---|
id | string | The OCID of the maintenance run. |
compartmentId | string | The OCID of the compartment. |
currentCustomActionTimeoutInMins | integer | Extend current custom action timeout between the current database servers during waiting state, from 0 (zero) to 30 minutes. |
currentPatchingComponent | string | The name of the current infrastruture component that is getting patched. |
customActionTimeoutInMins | integer | Determines the amount of time the system will wait before the start of each database server patching operation. Specify a number of minutes, from 15 to 120. |
description | string | Description of the maintenance run. |
displayName | string | The user-friendly name for the maintenance run. |
estimatedComponentPatchingStartTime | string (date-time) | The estimated start time of the next infrastruture component patching operation. |
estimatedPatchingTime | object | The estimated total time required in minutes for all patching operations (database server, storage server, and network switch patching). |
isCustomActionTimeoutEnabled | boolean | If true, enables the configuration of a custom action timeout (waiting period) between database servers patching operations. |
isDstFileUpdateEnabled | boolean | Indicates if an automatic DST Time Zone file update is enabled for the Autonomous Container Database. If enabled along with Release Update, patching will be done in a Non-Rolling manner. |
lifecycleDetails | string | Additional information about the current lifecycle state. |
lifecycleState | string | The current state of the maintenance run. For Autonomous AI Database Serverless instances, valid states are IN_PROGRESS, SUCCEEDED, and FAILED. (SCHEDULED, IN_PROGRESS, SUCCEEDED, SKIPPED, FAILED, UPDATING, DELETING, DELETED, CANCELED) |
maintenanceSubtype | string | Maintenance sub-type. (QUARTERLY, HARDWARE, CRITICAL, INFRASTRUCTURE, DATABASE, ONEOFF, SECURITY_MONTHLY, TIMEZONE) |
maintenanceType | string | Maintenance type. (PLANNED, UNPLANNED) |
patchFailureCount | integer | Contain the patch failure count. |
patchId | string | The unique identifier of the patch. The identifier string includes the patch type, the Oracle AI Database version, and the patch creation date (using the format YYMMDD). For example, the identifier ru_patch_19.9.0.0_201030 is used for an RU patch for Oracle AI Database 19.9.0.0 that was released October 30, 2020. |
patchingEndTime | string (date-time) | The time when the patching operation ended. |
patchingMode | string | Cloud Exadata infrastructure node patching method, either "ROLLING" or "NONROLLING". Default value is ROLLING. IMPORTANT: Non-rolling infrastructure patching involves system down time. See [Oracle-Managed Infrastructure Maintenance Updates](/iaas/Content/Database/Concepts/examaintenance.htm#Oracle) for more information. (ROLLING, NONROLLING) |
patchingStartTime | string (date-time) | The time when the patching operation started. |
patchingStatus | string | The status of the patching operation. (PATCHING, WAITING, SCHEDULED) |
peerMaintenanceRunId | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the maintenance run for the Autonomous Data Guard association's peer container database. |
peerMaintenanceRunIds | array | The list of OCIDs for the maintenance runs associated with their Autonomous Data Guard peer container databases. |
referenceResourceIdForImageUpdates | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the resource the maintenance run will refer to when trying to fetch target versions. This field is set during maintenance run creation based on infrastructure's maintenance run version preferences. Currently this is only be supported for monthly maintenance runs created via scheduling plans. |
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). |
targetDbServerVersion | string | The target software version for the database server patching operation. |
targetResourceId | string | The ID of the target resource on which the maintenance run occurs. |
targetResourceType | string | The type of the target resource on which the maintenance run occurs. (AUTONOMOUS_EXADATA_INFRASTRUCTURE, AUTONOMOUS_CONTAINER_DATABASE, EXADATA_DB_SYSTEM, CLOUD_EXADATA_INFRASTRUCTURE, EXACC_INFRASTRUCTURE, AUTONOMOUS_VM_CLUSTER, AUTONOMOUS_DATABASE, CLOUD_AUTONOMOUS_VM_CLUSTER) |
targetStorageServerVersion | string | The target Cell version that is to be patched to. |
timeEnded | string (date-time) | The date and time the maintenance run was completed. |
timeScheduled | string (date-time) | The date and time the maintenance run is scheduled to occur. |
timeStarted | string (date-time) | The date and time the maintenance run starts. |
Details of a maintenance run.<br />
| Name | Datatype | Description |
|---|---|---|
id | string | The OCID of the maintenance run. |
compartmentId | string | The OCID of the compartment. |
currentCustomActionTimeoutInMins | integer | Extend current custom action timeout between the current database servers during waiting state, from 0 (zero) to 30 minutes. |
currentPatchingComponent | string | The name of the current infrastruture component that is getting patched. |
customActionTimeoutInMins | integer | Determines the amount of time the system will wait before the start of each database server patching operation. Specify a number of minutes, from 15 to 120. |
description | string | Description of the maintenance run. |
displayName | string | The user-friendly name for the maintenance run. |
estimatedComponentPatchingStartTime | string (date-time) | The estimated start time of the next infrastruture component patching operation. |
estimatedPatchingTime | object | The estimated total time required in minutes for all patching operations (database server, storage server, and network switch patching). |
isCustomActionTimeoutEnabled | boolean | If true, enables the configuration of a custom action timeout (waiting period) between database servers patching operations. |
isDstFileUpdateEnabled | boolean | Indicates if an automatic DST Time Zone file update is enabled for the Autonomous Container Database. If enabled along with Release Update, patching will be done in a Non-Rolling manner. |
lifecycleDetails | string | Additional information about the current lifecycle state. |
lifecycleState | string | The current state of the maintenance run. For Autonomous AI Database Serverless instances, valid states are IN_PROGRESS, SUCCEEDED, and FAILED. (SCHEDULED, IN_PROGRESS, SUCCEEDED, SKIPPED, FAILED, UPDATING, DELETING, DELETED, CANCELED) |
maintenanceSubtype | string | Maintenance sub-type. (QUARTERLY, HARDWARE, CRITICAL, INFRASTRUCTURE, DATABASE, ONEOFF, SECURITY_MONTHLY, TIMEZONE) |
maintenanceType | string | Maintenance type. (PLANNED, UNPLANNED) |
patchFailureCount | integer | Contain the patch failure count. |
patchId | string | The unique identifier of the patch. The identifier string includes the patch type, the Oracle AI Database version, and the patch creation date (using the format YYMMDD). For example, the identifier ru_patch_19.9.0.0_201030 is used for an RU patch for Oracle AI Database 19.9.0.0 that was released October 30, 2020. |
patchingEndTime | string (date-time) | The time when the patching operation ended. |
patchingMode | string | Cloud Exadata infrastructure node patching method, either "ROLLING" or "NONROLLING". Default value is ROLLING. IMPORTANT: Non-rolling infrastructure patching involves system down time. See [Oracle-Managed Infrastructure Maintenance Updates](/iaas/Content/Database/Concepts/examaintenance.htm#Oracle) for more information. (ROLLING, NONROLLING) |
patchingStartTime | string (date-time) | The time when the patching operation started. |
patchingStatus | string | The status of the patching operation. (PATCHING, WAITING, SCHEDULED) |
peerMaintenanceRunId | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the maintenance run for the Autonomous Data Guard association's peer container database. |
peerMaintenanceRunIds | array | The list of OCIDs for the maintenance runs associated with their Autonomous Data Guard peer container databases. |
referenceResourceIdForImageUpdates | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the resource the maintenance run will refer to when trying to fetch target versions. This field is set during maintenance run creation based on infrastructure's maintenance run version preferences. Currently this is only be supported for monthly maintenance runs created via scheduling plans. |
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). |
targetDbServerVersion | string | The target software version for the database server patching operation. |
targetResourceId | string | The ID of the target resource on which the maintenance run occurs. |
targetResourceType | string | The type of the target resource on which the maintenance run occurs. (AUTONOMOUS_EXADATA_INFRASTRUCTURE, AUTONOMOUS_CONTAINER_DATABASE, EXADATA_DB_SYSTEM, CLOUD_EXADATA_INFRASTRUCTURE, EXACC_INFRASTRUCTURE, AUTONOMOUS_VM_CLUSTER, AUTONOMOUS_DATABASE, CLOUD_AUTONOMOUS_VM_CLUSTER) |
targetStorageServerVersion | string | The target Cell version that is to be patched to. |
timeEnded | string (date-time) | The date and time the maintenance run was completed. |
timeScheduled | string (date-time) | The date and time the maintenance run is scheduled to occur. |
timeStarted | string (date-time) | The date and time the maintenance run starts. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | maintenanceRunId, region | Gets information about the specified maintenance run. | |
list | select | compartmentId, region | targetResourceId, targetResourceType, maintenanceType, limit, page, isLocalAdg, sortBy, sortOrder, lifecycleState, availabilityDomain, maintenanceSubtype | Gets a list of the maintenance runs in the specified compartment.<br /> |
create | insert | region, targetResourceId, timeScheduled, patchType | opc-request-id, opc-retry-token | Creates a maintenance run with one of the following:<br />1. The latest available release update patch (RUP) for the Autonomous Container Database.<br />2. The latest available RUP and DST time-zone (TZ) file updates for the Autonomous Container Database.<br />3. The DST TZ file updates for the Autonomous Container Database.<br /> |
update | update | maintenanceRunId, region | if-match | Updates the properties of a maintenance run, such as the state of a maintenance run. |
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). |
maintenanceRunId | string | The maintenance run OCID. |
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) |
availabilityDomain | string | A filter to return only resources that match the given availability domain exactly. |
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. |
isLocalAdg | boolean | A filter to return the maintenance history results for the local standby Autonomous AI Database Serverless only. |
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. |
maintenanceSubtype | string | The sub-type of the maintenance run. |
maintenanceType | string | The maintenance type. |
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. |
sortBy | string | The field to sort by. You can provide one sort order (sortOrder). Default order for TIME_SCHEDULED and TIME_ENDED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. Note: If you do not include the availability domain filter, the resources are grouped by availability domain, then sorted. |
sortOrder | string | The sort order to use, either ascending (ASC) or descending (DESC). |
targetResourceId | string | The target resource ID. |
targetResourceType | string | The type of the target resource. |
SELECT examples​
- get
- list
Gets information about the specified maintenance run.
SELECT
id,
compartmentId,
currentCustomActionTimeoutInMins,
currentPatchingComponent,
customActionTimeoutInMins,
description,
displayName,
estimatedComponentPatchingStartTime,
estimatedPatchingTime,
isCustomActionTimeoutEnabled,
isDstFileUpdateEnabled,
lifecycleDetails,
lifecycleState,
maintenanceSubtype,
maintenanceType,
patchFailureCount,
patchId,
patchingEndTime,
patchingMode,
patchingStartTime,
patchingStatus,
peerMaintenanceRunId,
peerMaintenanceRunIds,
referenceResourceIdForImageUpdates,
systemTags,
targetDbServerVersion,
targetResourceId,
targetResourceType,
targetStorageServerVersion,
timeEnded,
timeScheduled,
timeStarted
FROM oci.database.maintenance_runs
WHERE maintenanceRunId = '{{ maintenanceRunId }}' -- required
AND region = '{{ region }}' -- required
;
Gets a list of the maintenance runs in the specified compartment.<br />
SELECT
id,
compartmentId,
currentCustomActionTimeoutInMins,
currentPatchingComponent,
customActionTimeoutInMins,
description,
displayName,
estimatedComponentPatchingStartTime,
estimatedPatchingTime,
isCustomActionTimeoutEnabled,
isDstFileUpdateEnabled,
lifecycleDetails,
lifecycleState,
maintenanceSubtype,
maintenanceType,
patchFailureCount,
patchId,
patchingEndTime,
patchingMode,
patchingStartTime,
patchingStatus,
peerMaintenanceRunId,
peerMaintenanceRunIds,
referenceResourceIdForImageUpdates,
systemTags,
targetDbServerVersion,
targetResourceId,
targetResourceType,
targetStorageServerVersion,
timeEnded,
timeScheduled,
timeStarted
FROM oci.database.maintenance_runs
WHERE compartmentId = '{{ compartmentId }}' -- required
AND region = '{{ region }}' -- required
AND targetResourceId = '{{ targetResourceId }}'
AND targetResourceType = '{{ targetResourceType }}'
AND maintenanceType = '{{ maintenanceType }}'
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND isLocalAdg = '{{ isLocalAdg }}'
AND sortBy = '{{ sortBy }}'
AND sortOrder = '{{ sortOrder }}'
AND lifecycleState = '{{ lifecycleState }}'
AND availabilityDomain = '{{ availabilityDomain }}'
AND maintenanceSubtype = '{{ maintenanceSubtype }}'
;
INSERT examples​
- create
- Manifest
Creates a maintenance run with one of the following:<br />1. The latest available release update patch (RUP) for the Autonomous Container Database.<br />2. The latest available RUP and DST time-zone (TZ) file updates for the Autonomous Container Database.<br />3. The DST TZ file updates for the Autonomous Container Database.<br />
INSERT INTO oci.database.maintenance_runs (
compartmentId,
isDstFileUpdateEnabled,
patchType,
patchingMode,
targetResourceId,
timeScheduled,
region,
opc-request-id,
opc-retry-token
)
SELECT
'{{ compartmentId }}',
{{ isDstFileUpdateEnabled }},
'{{ patchType }}' /* required */,
'{{ patchingMode }}',
'{{ targetResourceId }}' /* required */,
'{{ timeScheduled }}' /* required */,
'{{ region }}',
'{{ opc-request-id }}',
'{{ opc-retry-token }}'
RETURNING
id,
compartmentId,
currentCustomActionTimeoutInMins,
currentPatchingComponent,
customActionTimeoutInMins,
description,
displayName,
estimatedComponentPatchingStartTime,
estimatedPatchingTime,
isCustomActionTimeoutEnabled,
isDstFileUpdateEnabled,
lifecycleDetails,
lifecycleState,
maintenanceSubtype,
maintenanceType,
patchFailureCount,
patchId,
patchingEndTime,
patchingMode,
patchingStartTime,
patchingStatus,
peerMaintenanceRunId,
peerMaintenanceRunIds,
referenceResourceIdForImageUpdates,
systemTags,
targetDbServerVersion,
targetResourceId,
targetResourceType,
targetStorageServerVersion,
timeEnded,
timeScheduled,
timeStarted
;
# Description fields are for documentation purposes
- name: maintenance_runs
props:
- name: region
value: "{{ region }}"
description: Required parameter for the maintenance_runs resource.
- name: compartmentId
value: "{{ compartmentId }}"
description: |
The [OCID](/Content/General/Concepts/identifiers.htm) of the compartment containing the Maintenance Run.
- name: isDstFileUpdateEnabled
value: {{ isDstFileUpdateEnabled }}
description: |
Indicates if an automatic DST Time Zone file update is enabled for the Autonomous Container Database. If enabled along with Release Update, patching will be done in a Non-Rolling manner.
- name: patchType
value: "{{ patchType }}"
description: |
Patch type, either "QUARTERLY" or "TIMEZONE".
valid_values: ['QUARTERLY', 'TIMEZONE']
- name: patchingMode
value: "{{ patchingMode }}"
description: |
Cloud Exadata infrastructure node patching method, either "ROLLING" or "NONROLLING". Default value is ROLLING.
*IMPORTANT*: Non-rolling infrastructure patching involves system down time. See [Oracle-Managed Infrastructure Maintenance Updates](/iaas/Content/Database/Concepts/examaintenance.htm#Oracle) for more information.
valid_values: ['ROLLING', 'NONROLLING']
- name: targetResourceId
value: "{{ targetResourceId }}"
description: |
The ID of the target resource for which the maintenance run should be created.
- name: timeScheduled
value: "{{ timeScheduled }}"
description: |
The date and time that update should be scheduled.
- name: opc-request-id
value: "{{ opc-request-id }}"
description: Unique identifier for the request.
description: Unique identifier for the request.
- 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 maintenance run, such as the state of a maintenance run.
UPDATE oci.database.maintenance_runs
SET
currentCustomActionTimeoutInMins = {{ currentCustomActionTimeoutInMins }},
customActionTimeoutInMins = {{ customActionTimeoutInMins }},
isCustomActionTimeoutEnabled = {{ isCustomActionTimeoutEnabled }},
isEnabled = {{ isEnabled }},
isPatchNowEnabled = {{ isPatchNowEnabled }},
isResumePatching = {{ isResumePatching }},
patchId = '{{ patchId }}',
patchingMode = '{{ patchingMode }}',
targetDbServerVersion = '{{ targetDbServerVersion }}',
targetStorageServerVersion = '{{ targetStorageServerVersion }}',
timeScheduled = '{{ timeScheduled }}'
WHERE
maintenanceRunId = '{{ maintenanceRunId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
RETURNING
id,
compartmentId,
currentCustomActionTimeoutInMins,
currentPatchingComponent,
customActionTimeoutInMins,
description,
displayName,
estimatedComponentPatchingStartTime,
estimatedPatchingTime,
isCustomActionTimeoutEnabled,
isDstFileUpdateEnabled,
lifecycleDetails,
lifecycleState,
maintenanceSubtype,
maintenanceType,
patchFailureCount,
patchId,
patchingEndTime,
patchingMode,
patchingStartTime,
patchingStatus,
peerMaintenanceRunId,
peerMaintenanceRunIds,
referenceResourceIdForImageUpdates,
systemTags,
targetDbServerVersion,
targetResourceId,
targetResourceType,
targetStorageServerVersion,
timeEnded,
timeScheduled,
timeStarted;