instance_maintenance_events
Creates, updates, deletes, gets or lists an instance_maintenance_events resource.
Overview​
| Name | instance_maintenance_events |
| Type | Resource |
| Id | oci.compute.instance_maintenance_events |
Fields​
The following fields are returned by SELECT queries:
- get
- list
Maintenance event of an instance.
| Name | Datatype | Description |
|---|---|---|
id | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the maintenance event. |
additionalDetails | object | Additional details of the maintenance in the form of json. |
alternativeResolutionActions | array | These are alternative actions to the requested instanceAction that can be taken to resolve the Maintenance. |
canDeleteLocalStorage | boolean | For Instances that have local storage, this field is set to true when local storage will be deleted as a result of the Maintenance. |
canReschedule | boolean | Indicates if this MaintenanceEvent is capable of being rescheduled up to the timeHardDueDate. |
compartmentId | string | The OCID of the compartment that contains the instance. |
correlationToken | string | A 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. |
createdBy | string | The creator of the maintenance event. (CUSTOMER, SYSTEM) |
definedTags | object | Defined 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"}} |
description | string | It is the descriptive information about the maintenance taking place on the customer instance. |
displayName | string | A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. |
estimatedDuration | string (x-obmcs-duration) | This is the estimated duration of the Maintenance, once the Maintenance has entered the STARTED state. |
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](/iaas/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"} |
instanceAction | string | This is the action that will be performed on the Instance by OCI when the Maintenance begins. (REBOOT_MIGRATION, TERMINATE, STOP, NONE) |
instanceId | string | The OCID of the instance. |
lifecycleDetails | string | Provides more details about the state of the maintenance event. |
lifecycleState | string | The current state of the maintenance event. (SCHEDULED, STARTED, PROCESSING, SUCCEEDED, FAILED, CANCELED) |
maintenanceCategory | string | This 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) |
maintenanceReason | string | This 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) |
startWindowDuration | string (x-obmcs-duration) | The duration of the time window Maintenance is scheduled to begin within. |
timeCreated | string (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 |
timeFinished | string (date-time) | The time at which the Maintenance actually finished. |
timeHardDueDate | string (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. |
timeStarted | string (date-time) | The time at which the Maintenance actually started. |
timeWindowStart | string (date-time) | The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before this time. |
It is the event in which the maintenance action will be be performed on the customer instance on the scheduled date and time.<br />
| Name | Datatype | Description |
|---|---|---|
id | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the maintenance event. |
alternativeResolutionActions | array | These are alternative actions to the requested instanceAction that can be taken to resolve the Maintenance. |
canReschedule | boolean | Indicates if this MaintenanceEvent is capable of being rescheduled up to the timeHardDueDate. |
compartmentId | string | The OCID of the compartment that contains the instance. |
correlationToken | string | A 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. |
createdBy | string | The creator of the maintenance event. (x-obmcs-enumref: #/definitions/InstanceMaintenanceEvent/createdBy) |
definedTags | object | Defined 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"}} |
description | string | It is the descriptive information about the maintenance taking place on the customer instance. |
displayName | string | A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. |
estimatedDuration | string (x-obmcs-duration) | This is the estimated duration of the Maintenance, once the Maintenance has entered the STARTED state. |
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](/iaas/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"} |
instanceAction | string | This is the action that will be performed on the Instance by OCI when the Maintenance begins. (x-obmcs-enumref: #/definitions/InstanceMaintenanceEvent/instanceAction) |
instanceId | string | The OCID of the instance. |
lifecycleState | string | The current state of the maintenance event. (x-obmcs-enumref: #/definitions/InstanceMaintenanceEvent/lifecycleState) |
maintenanceCategory | string | This 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. (x-obmcs-enumref: #/definitions/InstanceMaintenanceEvent/maintenanceCategory) |
maintenanceReason | string | This is the reason that Maintenance is being performed. See [Instance Maintenance](/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. (x-obmcs-enumref: #/definitions/InstanceMaintenanceEvent/maintenanceReason) |
startWindowDuration | string (x-obmcs-duration) | The duration of the time window Maintenance is scheduled to begin within. |
timeCreated | string (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 |
timeFinished | string (date-time) | The time at which the Maintenance actually finished. |
timeHardDueDate | string (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. |
timeStarted | string (date-time) | The time at which the Maintenance actually started. |
timeWindowStart | string (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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | instanceMaintenanceEventId, region | opc-request-id | Gets the maintenance event for the given instance.<br /> |
list | select | compartmentId, region | instanceId, lifecycleState, correlationToken, instanceAction, timeWindowStartGreaterThanOrEqualTo, timeWindowStartLessThanOrEqualTo, limit, page, sortBy, sortOrder, opc-request-id | Gets a list of all the maintenance events for the given compartment.<br /> |
update | update | instanceMaintenanceEventId, region | opc-request-id, if-match, opc-retry-token | Updates 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.
| Name | Datatype | Description |
|---|---|---|
compartmentId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment. |
instanceMaintenanceEventId | string | The OCID of the instance maintenance event. |
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) |
correlationToken | string | A filter to only return resources that have a matching correlationToken. |
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. |
instanceAction | string | A filter to only return resources that match the given instance action. |
instanceId | string | The OCID of the instance. |
lifecycleState | string | A filter to only return resources that match the given lifecycle state. |
limit | integer | For 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-id | string | Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. |
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 | For 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). |
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. 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. |
sortOrder | string | The sort order to use, either ascending (ASC) or descending (DESC). The DISPLAYNAME sort order is case sensitive. |
timeWindowStartGreaterThanOrEqualTo | string (date-time) | Starting range to return the maintenances which are not completed (date-time is in [RFC3339](https:​//tools.ietf.org/html/rfc3339) format). |
timeWindowStartLessThanOrEqualTo | string (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​
- get
- list
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 }}'
;
Gets a list of all the maintenance events for the given compartment.<br />
SELECT
id,
alternativeResolutionActions,
canReschedule,
compartmentId,
correlationToken,
createdBy,
definedTags,
description,
displayName,
estimatedDuration,
freeformTags,
instanceAction,
instanceId,
lifecycleState,
maintenanceCategory,
maintenanceReason,
startWindowDuration,
timeCreated,
timeFinished,
timeHardDueDate,
timeStarted,
timeWindowStart
FROM oci.compute.instance_maintenance_events
WHERE compartmentId = '{{ compartmentId }}' -- required
AND region = '{{ region }}' -- required
AND instanceId = '{{ instanceId }}'
AND lifecycleState = '{{ lifecycleState }}'
AND correlationToken = '{{ correlationToken }}'
AND instanceAction = '{{ instanceAction }}'
AND timeWindowStartGreaterThanOrEqualTo = '{{ timeWindowStartGreaterThanOrEqualTo }}'
AND timeWindowStartLessThanOrEqualTo = '{{ timeWindowStartLessThanOrEqualTo }}'
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND sortBy = '{{ sortBy }}'
AND sortOrder = '{{ sortOrder }}'
AND opc-request-id = '{{ opc-request-id }}'
;
UPDATE examples​
- update
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}}';