oracle.oci.oci_database_maintenance_run_facts – Fetches details about one or multiple MaintenanceRun resources in Oracle Cloud Infrastructure

Note

This plugin is part of the oracle.oci collection (version 4.14.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install oracle.oci.

To use it in a playbook, specify: oracle.oci.oci_database_maintenance_run_facts.

New in version 2.9.0: of oracle.oci

Synopsis

  • Fetches details about one or multiple MaintenanceRun resources in Oracle Cloud Infrastructure

  • Gets a list of the maintenance runs in the specified compartment.

  • If maintenance_run_id is specified, the details of a single MaintenanceRun will be returned.

Requirements

The below requirements are needed on the host that executes this module.

Parameters

Parameter Choices/Defaults Comments
api_user
string
The OCID of the user, on whose behalf, OCI APIs are invoked. If not set, then the value of the OCI_USER_ID environment variable, if any, is used. This option is required if the user is not specified through a configuration file (See config_file_location). To get the user's OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.
api_user_fingerprint
string
Fingerprint for the key pair being used. If not set, then the value of the OCI_USER_FINGERPRINT environment variable, if any, is used. This option is required if the key fingerprint is not specified through a configuration file (See config_file_location). To get the key pair's fingerprint value please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.
api_user_key_file
string
Full path and filename of the private key (in PEM format). If not set, then the value of the OCI_USER_KEY_FILE variable, if any, is used. This option is required if the private key is not specified through a configuration file (See config_file_location). If the key is encrypted with a pass-phrase, the api_user_key_pass_phrase option must also be provided.
api_user_key_pass_phrase
string
Passphrase used by the key referenced in api_user_key_file, if it is encrypted. If not set, then the value of the OCI_USER_KEY_PASS_PHRASE variable, if any, is used. This option is required if the key passphrase is not specified through a configuration file (See config_file_location).
auth_purpose
string
    Choices:
  • service_principal
The auth purpose which can be used in conjunction with 'auth_type=instance_principal'. The default auth_purpose for instance_principal is None.
auth_type
string
    Choices:
  • api_key ←
  • instance_principal
  • instance_obo_user
  • resource_principal
The type of authentication to use for making API requests. By default auth_type="api_key" based authentication is performed and the API key (see api_user_key_file) in your config file will be used. If this 'auth_type' module option is not specified, the value of the OCI_ANSIBLE_AUTH_TYPE, if any, is used. Use auth_type="instance_principal" to use instance principal based authentication when running ansible playbooks within an OCI compute instance.
availability_domain
string
A filter to return only resources that match the given availability domain exactly.
cert_bundle
string
The full path to a CA certificate bundle to be used for SSL verification. This will override the default CA certificate bundle. If not set, then the value of the OCI_ANSIBLE_CERT_BUNDLE variable, if any, is used.
compartment_id
string
The compartment OCID.
Required to list multiple maintenance_runs.
config_file_location
string
Path to configuration file. If not set then the value of the OCI_CONFIG_FILE environment variable, if any, is used. Otherwise, defaults to ~/.oci/config.
config_profile_name
string
The profile to load from the config file referenced by config_file_location. If not set, then the value of the OCI_CONFIG_PROFILE environment variable, if any, is used. Otherwise, defaults to the "DEFAULT" profile in config_file_location.
display_name
string
Use display_name along with the other options to return only resources that match the given display name exactly.
lifecycle_state
string
    Choices:
  • SCHEDULED
  • IN_PROGRESS
  • SUCCEEDED
  • SKIPPED
  • FAILED
  • UPDATING
  • DELETING
  • DELETED
  • CANCELED
A filter to return only resources that match the given lifecycle state exactly.
maintenance_run_id
string
The maintenance run OCID.
Required to get a specific maintenance_run.

aliases: id
maintenance_subtype
string
    Choices:
  • QUARTERLY
  • HARDWARE
  • CRITICAL
  • INFRASTRUCTURE
  • DATABASE
  • ONEOFF
  • SECURITY_MONTHLY
The sub-type of the maintenance run.
maintenance_type
string
    Choices:
  • PLANNED
  • UNPLANNED
The maintenance type.
region
string
The Oracle Cloud Infrastructure region to use for all OCI API requests. If not set, then the value of the OCI_REGION variable, if any, is used. This option is required if the region is not specified through a configuration file (See config_file_location). Please refer to https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm for more information on OCI regions.
sort_by
string
    Choices:
  • TIME_SCHEDULED
  • TIME_ENDED
  • DISPLAYNAME
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.
sort_order
string
    Choices:
  • ASC
  • DESC
The sort order to use, either ascending (`ASC`) or descending (`DESC`).
target_resource_id
string
The target resource ID.
target_resource_type
string
    Choices:
  • AUTONOMOUS_EXADATA_INFRASTRUCTURE
  • AUTONOMOUS_CONTAINER_DATABASE
  • EXADATA_DB_SYSTEM
  • CLOUD_EXADATA_INFRASTRUCTURE
  • EXACC_INFRASTRUCTURE
  • AUTONOMOUS_VM_CLUSTER
  • AUTONOMOUS_DATABASE
  • CLOUD_AUTONOMOUS_VM_CLUSTER
The type of the target resource.
tenancy
string
OCID of your tenancy. If not set, then the value of the OCI_TENANCY variable, if any, is used. This option is required if the tenancy OCID is not specified through a configuration file (See config_file_location). To get the tenancy OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm

Examples

- name: Get a specific maintenance_run
  oci_database_maintenance_run_facts:
    # required
    maintenance_run_id: "ocid1.maintenancerun.oc1..xxxxxxEXAMPLExxxxxx"

- name: List maintenance_runs
  oci_database_maintenance_run_facts:
    # required
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"

    # optional
    target_resource_id: "ocid1.targetresource.oc1..xxxxxxEXAMPLExxxxxx"
    target_resource_type: AUTONOMOUS_EXADATA_INFRASTRUCTURE
    maintenance_type: PLANNED
    sort_by: TIME_SCHEDULED
    sort_order: ASC
    lifecycle_state: SCHEDULED
    availability_domain: Uocm:PHX-AD-1
    maintenance_subtype: QUARTERLY

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
maintenance_runs
complex
on success
List of MaintenanceRun resources

Sample:
[{'compartment_id': 'ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx', 'current_custom_action_timeout_in_mins': 56, 'current_patching_component': 'current_patching_component_example', 'custom_action_timeout_in_mins': 56, 'description': 'description_example', 'display_name': 'display_name_example', 'estimated_component_patching_start_time': '2013-10-20T19:20:30+01:00', 'estimated_patching_time': {'estimated_db_server_patching_time': 56, 'estimated_network_switches_patching_time': 56, 'estimated_storage_server_patching_time': 56, 'total_estimated_patching_time': 56}, 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'is_custom_action_timeout_enabled': True, 'lifecycle_details': 'lifecycle_details_example', 'lifecycle_state': 'SCHEDULED', 'maintenance_subtype': 'QUARTERLY', 'maintenance_type': 'PLANNED', 'patch_failure_count': 56, 'patch_id': 'ocid1.patch.oc1..xxxxxxEXAMPLExxxxxx', 'patching_end_time': '2013-10-20T19:20:30+01:00', 'patching_mode': 'ROLLING', 'patching_start_time': '2013-10-20T19:20:30+01:00', 'patching_status': 'PATCHING', 'peer_maintenance_run_id': 'ocid1.peermaintenancerun.oc1..xxxxxxEXAMPLExxxxxx', 'target_db_server_version': 'target_db_server_version_example', 'target_resource_id': 'ocid1.targetresource.oc1..xxxxxxEXAMPLExxxxxx', 'target_resource_type': 'AUTONOMOUS_EXADATA_INFRASTRUCTURE', 'target_storage_server_version': 'target_storage_server_version_example', 'time_ended': '2013-10-20T19:20:30+01:00', 'time_scheduled': '2013-10-20T19:20:30+01:00', 'time_started': '2013-10-20T19:20:30+01:00'}]
 
compartment_id
string
on success
The OCID of the compartment.

Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
 
current_custom_action_timeout_in_mins
integer
on success
Extend current custom action timeout between the current database servers during waiting state, from 0 (zero) to 30 minutes.

Sample:
56
 
current_patching_component
string
on success
The name of the current infrastruture component that is getting patched.

Sample:
current_patching_component_example
 
custom_action_timeout_in_mins
integer
on success
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.

Sample:
56
 
description
string
on success
Description of the maintenance run.

Sample:
description_example
 
display_name
string
on success
The user-friendly name for the maintenance run.

Sample:
display_name_example
 
estimated_component_patching_start_time
string
on success
The estimated start time of the next infrastruture component patching operation.

Sample:
2013-10-20T19:20:30+01:00
 
estimated_patching_time
complex
on success

   
estimated_db_server_patching_time
integer
on success
The estimated time required in minutes for database server patching.

Sample:
56
   
estimated_network_switches_patching_time
integer
on success
The estimated time required in minutes for network switch patching.

Sample:
56
   
estimated_storage_server_patching_time
integer
on success
The estimated time required in minutes for storage server patching.

Sample:
56
   
total_estimated_patching_time
integer
on success
The estimated total time required in minutes for all patching operations.

Sample:
56
 
id
string
on success
The OCID of the maintenance run.

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
 
is_custom_action_timeout_enabled
boolean
on success
If true, enables the configuration of a custom action timeout (waiting period) between database servers patching operations.

Sample:
True
 
lifecycle_details
string
on success
Additional information about the current lifecycle state.

Sample:
lifecycle_details_example
 
lifecycle_state
string
on success
The current state of the maintenance run. For Autonomous Database on shared Exadata infrastructure, valid states are IN_PROGRESS, SUCCEEDED and FAILED.

Sample:
SCHEDULED
 
maintenance_subtype
string
on success
Maintenance sub-type.

Sample:
QUARTERLY
 
maintenance_type
string
on success
Maintenance type.

Sample:
PLANNED
 
patch_failure_count
integer
on success
Contain the patch failure count.

Sample:
56
 
patch_id
string
on success
The unique identifier of the patch. The identifier string includes the patch type, the Oracle 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 Database 19.9.0.0 that was released October 30, 2020.

Sample:
ocid1.patch.oc1..xxxxxxEXAMPLExxxxxx
 
patching_end_time
string
on success
The time when the patching operation ended.

Sample:
2013-10-20T19:20:30+01:00
 
patching_mode
string
on success
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 for more information.

Sample:
ROLLING
 
patching_start_time
string
on success
The time when the patching operation started.

Sample:
2013-10-20T19:20:30+01:00
 
patching_status
string
on success
The status of the patching operation.

Sample:
PATCHING
 
peer_maintenance_run_id
string
on success
The OCID of the maintenance run for the Autonomous Data Guard association's peer container database.

Sample:
ocid1.peermaintenancerun.oc1..xxxxxxEXAMPLExxxxxx
 
target_db_server_version
string
on success
The target software version for the database server patching operation.

Sample:
target_db_server_version_example
 
target_resource_id
string
on success
The ID of the target resource on which the maintenance run occurs.

Sample:
ocid1.targetresource.oc1..xxxxxxEXAMPLExxxxxx
 
target_resource_type
string
on success
The type of the target resource on which the maintenance run occurs.

Sample:
AUTONOMOUS_EXADATA_INFRASTRUCTURE
 
target_storage_server_version
string
on success
The target Cell version that is to be patched to.

Sample:
target_storage_server_version_example
 
time_ended
string
on success
The date and time the maintenance run was completed.

Sample:
2013-10-20T19:20:30+01:00
 
time_scheduled
string
on success
The date and time the maintenance run is scheduled to occur.

Sample:
2013-10-20T19:20:30+01:00
 
time_started
string
on success
The date and time the maintenance run starts.

Sample:
2013-10-20T19:20:30+01:00


Authors

  • Oracle (@oracle)