Skip to main content

instance_maintenance_events

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

Overview​

Nameinstance_maintenance_events
TypeResource
Idoci.compute.instance_maintenance_events

Fields​

The following fields are returned by SELECT queries:

Maintenance event of an instance.

NameDatatypeDescription
idstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the maintenance event.
additionalDetailsobjectAdditional details of the maintenance in the form of json.
alternativeResolutionActionsarrayThese are alternative actions to the requested instanceAction that can be taken to resolve the Maintenance.
canDeleteLocalStoragebooleanFor Instances that have local storage, this field is set to true when local storage will be deleted as a result of the Maintenance.
canReschedulebooleanIndicates if this MaintenanceEvent is capable of being rescheduled up to the timeHardDueDate.
compartmentIdstringThe OCID of the compartment that contains the instance.
correlationTokenstringA unique identifier that will group Instances that have a relationship with one another and must be scheduled together for the Maintenance to proceed. Any Instances that have a relationship with one another from a Maintenance perspective will have a matching correlationToken.
createdBystringThe creator of the maintenance event. (CUSTOMER, SYSTEM)
definedTagsobjectDefined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: {"Operations": {"CostCenter": "42"}}
descriptionstringIt is the descriptive information about the maintenance taking place on the customer instance.
displayNamestringA user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
estimatedDurationstring (x-obmcs-duration)This is the estimated duration of the Maintenance, once the Maintenance has entered the STARTED state.
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](/iaas/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"}
instanceActionstringThis is the action that will be performed on the Instance by OCI when the Maintenance begins. (REBOOT_MIGRATION, TERMINATE, STOP, NONE)
instanceIdstringThe OCID of the instance.
lifecycleDetailsstringProvides more details about the state of the maintenance event.
lifecycleStatestringThe current state of the maintenance event. (SCHEDULED, STARTED, PROCESSING, SUCCEEDED, FAILED, CANCELED)
maintenanceCategorystringThis indicates the priority and allowed actions for this Maintenance. Higher priority forms of Maintenance have tighter restrictions and may not be rescheduled, while lower priority/severity Maintenance can be rescheduled, deferred, or even cancelled. Please see the [Instance Maintenance](/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. (EMERGENCY, MANDATORY, FLEXIBLE, OPTIONAL, NOTIFICATION)
maintenanceReasonstringThis is the reason that Maintenance is being performed. See [Instance Maintenance](/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. (EVACUATION, ENVIRONMENTAL_FACTORS, DECOMMISSION, HARDWARE_REPLACEMENT, FIRMWARE_UPDATE, SECURITY_UPDATE)
startWindowDurationstring (x-obmcs-duration)The duration of the time window Maintenance is scheduled to begin within.
timeCreatedstring (date-time)The date and time the maintenance event was created, in the format defined by [RFC3339](https:​//tools.ietf.org/html/rfc3339). Example: 2016-08-25T21:10:29.600Z
timeFinishedstring (date-time)The time at which the Maintenance actually finished.
timeHardDueDatestring (date-time)It is the scheduled hard due date and time of the maintenance event. The maintenance event will happen at this time and the due date will not be extended.
timeStartedstring (date-time)The time at which the Maintenance actually started.
timeWindowStartstring (date-time)The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before this time.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectinstanceMaintenanceEventId, regionopc-request-idGets the maintenance event for the given instance.<br />
listselectcompartmentId, regioninstanceId, lifecycleState, correlationToken, instanceAction, timeWindowStartGreaterThanOrEqualTo, timeWindowStartLessThanOrEqualTo, limit, page, sortBy, sortOrder, opc-request-idGets a list of all the maintenance events for the given compartment.<br />
updateupdateinstanceMaintenanceEventId, regionopc-request-id, if-match, opc-retry-tokenUpdates the maintenance event for the given instance.<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 [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
instanceMaintenanceEventIdstringThe OCID of the instance maintenance event.
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)
correlationTokenstringA filter to only return resources that have a matching correlationToken.
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.
instanceActionstringA filter to only return resources that match the given instance action.
instanceIdstringThe OCID of the instance.
lifecycleStatestringA filter to only return resources that match the given lifecycle state.
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-request-idstringUnique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
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).
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. Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.
sortOrderstringThe sort order to use, either ascending (ASC) or descending (DESC). The DISPLAYNAME sort order is case sensitive.
timeWindowStartGreaterThanOrEqualTostring (date-time)Starting range to return the maintenances which are not completed (date-time is in [RFC3339](https:​//tools.ietf.org/html/rfc3339) format).
timeWindowStartLessThanOrEqualTostring (date-time)Ending range to return the maintenances which are not completed (date-time is in [RFC3339](https:​//tools.ietf.org/html/rfc3339) format).

SELECT examples​

Gets the maintenance event for the given instance.<br />

SELECT
id,
additionalDetails,
alternativeResolutionActions,
canDeleteLocalStorage,
canReschedule,
compartmentId,
correlationToken,
createdBy,
definedTags,
description,
displayName,
estimatedDuration,
freeformTags,
instanceAction,
instanceId,
lifecycleDetails,
lifecycleState,
maintenanceCategory,
maintenanceReason,
startWindowDuration,
timeCreated,
timeFinished,
timeHardDueDate,
timeStarted,
timeWindowStart
FROM oci.compute.instance_maintenance_events
WHERE instanceMaintenanceEventId = '{{ instanceMaintenanceEventId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
;

UPDATE examples​

Updates the maintenance event for the given instance.<br />

UPDATE oci.compute.instance_maintenance_events
SET
alternativeResolutionAction = '{{ alternativeResolutionAction }}',
canDeleteLocalStorage = {{ canDeleteLocalStorage }},
definedTags = '{{ definedTags }}',
displayName = '{{ displayName }}',
freeformTags = '{{ freeformTags }}',
timeWindowStart = '{{ timeWindowStart }}'
WHERE
instanceMaintenanceEventId = '{{ instanceMaintenanceEventId }}' --required
AND region = '{{ region }}' --required
AND opc-request-id = '{{ opc-request-id}}'
AND if-match = '{{ if-match}}'
AND opc-retry-token = '{{ opc-retry-token}}';