oracle.oci.oci_database_maintenance_run (5.0.0) — module

Manage a MaintenanceRun resource in Oracle Cloud Infrastructure

| "added in version" 2.9.0 of oracle.oci"

Authors: Oracle (@oracle)

preview | supported by community

Install collection

Install with ansible-galaxy collection install oracle.oci:==5.0.0


Add to requirements.yml

  collections:
    - name: oracle.oci
      version: 5.0.0

Description

This module allows the user to update a MaintenanceRun resource in Oracle Cloud Infrastructure


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Update maintenance_run
  oci_database_maintenance_run:
    # required
    maintenance_run_id: "ocid1.maintenancerun.oc1..xxxxxxEXAMPLExxxxxx"

    # optional
    is_enabled: true
    time_scheduled: time_scheduled_example
    is_patch_now_enabled: true
    patch_id: "ocid1.patch.oc1..xxxxxxEXAMPLExxxxxx"
    patching_mode: ROLLING
    is_custom_action_timeout_enabled: true
    custom_action_timeout_in_mins: 56
    current_custom_action_timeout_in_mins: 56
    is_resume_patching: true
    target_db_server_version: target_db_server_version_example
    target_storage_server_version: target_storage_server_version_example

Inputs

    
wait:
    default: true
    description: Whether to wait for create or delete operation to complete.
    type: bool

state:
    choices:
    - present
    default: present
    description:
    - The state of the MaintenanceRun.
    - Use I(state=present) to update an existing a MaintenanceRun.
    required: false
    type: str

region:
    description:
    - 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 C(config_file_location)).
      Please refer to U(https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm)
      for more information on OCI regions.
    type: str

tenancy:
    description:
    - 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 C(config_file_location)). To get the tenancy OCID, please
      refer U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm)
    type: str

api_user:
    description:
    - 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 C(config_file_location)).
      To get the user's OCID, please refer U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm).
    type: str

patch_id:
    description:
    - The L(OCID,https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)
      of the patch to be applied in the maintenance run.
    - This parameter is updatable.
    type: str

auth_type:
    choices:
    - api_key
    - instance_principal
    - instance_obo_user
    - resource_principal
    - security_token
    default: api_key
    description:
    - The type of authentication to use for making API requests. By default C(auth_type="api_key")
      based authentication is performed and the API key (see I(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 C(auth_type="instance_principal")
      to use instance principal based authentication when running ansible playbooks within
      an OCI compute instance.
    type: str

is_enabled:
    description:
    - If `FALSE`, skips the maintenance run.
    - This parameter is updatable.
    type: bool

cert_bundle:
    description:
    - 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.
    type: str

auth_purpose:
    choices:
    - service_principal
    description:
    - The auth purpose which can be used in conjunction with 'auth_type=instance_principal'.
      The default auth_purpose for instance_principal is None.
    type: str

wait_timeout:
    description: Time, in seconds, to wait when I(wait=yes). Defaults to 1200 for most
      of the services but some services might have a longer wait timeout.
    type: int

patching_mode:
    choices:
    - ROLLING
    - NONROLLING
    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
      L(Oracle-Managed Infrastructure Maintenance Updates,https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/examaintenance.htm#Oracle)
      for more information.'
    - This parameter is updatable.
    type: str

time_scheduled:
    description:
    - The scheduled date and time of the maintenance run to update.
    - This parameter is updatable.
    type: str

api_user_key_file:
    description:
    - 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 C(config_file_location)).
      If the key is encrypted with a pass-phrase, the C(api_user_key_pass_phrase) option
      must also be provided.
    type: str

is_resume_patching:
    description:
    - If true, then the patching is resumed and the next component will be patched immediately.
    - This parameter is updatable.
    type: bool

maintenance_run_id:
    aliases:
    - id
    description:
    - The maintenance run OCID.
    required: true
    type: str

config_profile_name:
    description:
    - The profile to load from the config file referenced by C(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 C(config_file_location).
    type: str

api_user_fingerprint:
    description:
    - 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 C(config_file_location)). To
      get the key pair's fingerprint value please refer U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm).
    type: str

config_file_location:
    description:
    - 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.
    type: str

is_patch_now_enabled:
    description:
    - If set to `TRUE`, starts patching immediately.
    - This parameter is updatable.
    type: bool

api_user_key_pass_phrase:
    description:
    - Passphrase used by the key referenced in C(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 C(config_file_location)).
    type: str

target_db_server_version:
    description:
    - The target database server system software version for the patching operation.
    - This parameter is updatable.
    type: str

custom_action_timeout_in_mins:
    description:
    - 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.
    - This parameter is updatable.
    type: int

target_storage_server_version:
    description:
    - The target storage cell system software version for the patching operation.
    - This parameter is updatable.
    type: str

is_custom_action_timeout_enabled:
    description:
    - If true, enables the configuration of a custom action timeout (waiting period) between
      database servers patching operations.
    - This parameter is updatable.
    type: bool

current_custom_action_timeout_in_mins:
    description:
    - The current custom action timeout between the current database servers during waiting
      state in addition to custom action timeout, from 0 (zero) to 30 minutes.
    - This parameter is updatable.
    type: int

realm_specific_endpoint_template_enabled:
    description:
    - Enable/Disable realm specific endpoint template for service client. By Default,
      realm specific endpoint template is disabled. If not set, then the value of the
      OCI_REALM_SPECIFIC_SERVICE_ENDPOINT_TEMPLATE_ENABLED variable, if any, is used.
    type: bool

Outputs

maintenance_run:
  contains:
    compartment_id:
      description:
      - The OCID of the compartment.
      returned: on success
      sample: ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
      type: str
    current_custom_action_timeout_in_mins:
      description:
      - Extend current custom action timeout between the current database servers
        during waiting state, from 0 (zero) to 30 minutes.
      returned: on success
      sample: 56
      type: int
    current_patching_component:
      description:
      - The name of the current infrastruture component that is getting patched.
      returned: on success
      sample: current_patching_component_example
      type: str
    custom_action_timeout_in_mins:
      description:
      - 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.
      returned: on success
      sample: 56
      type: int
    description:
      description:
      - Description of the maintenance run.
      returned: on success
      sample: description_example
      type: str
    display_name:
      description:
      - The user-friendly name for the maintenance run.
      returned: on success
      sample: display_name_example
      type: str
    estimated_component_patching_start_time:
      description:
      - The estimated start time of the next infrastruture component patching operation.
      returned: on success
      sample: '2013-10-20T19:20:30+01:00'
      type: str
    estimated_patching_time:
      contains:
        estimated_db_server_patching_time:
          description:
          - The estimated time required in minutes for database server patching.
          returned: on success
          sample: 56
          type: int
        estimated_network_switches_patching_time:
          description:
          - The estimated time required in minutes for network switch patching.
          returned: on success
          sample: 56
          type: int
        estimated_storage_server_patching_time:
          description:
          - The estimated time required in minutes for storage server patching.
          returned: on success
          sample: 56
          type: int
        total_estimated_patching_time:
          description:
          - The estimated total time required in minutes for all patching operations.
          returned: on success
          sample: 56
          type: int
      description:
      - ''
      returned: on success
      type: complex
    id:
      description:
      - The OCID of the maintenance run.
      returned: on success
      sample: ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
      type: str
    is_custom_action_timeout_enabled:
      description:
      - If true, enables the configuration of a custom action timeout (waiting period)
        between database servers patching operations.
      returned: on success
      sample: true
      type: bool
    lifecycle_details:
      description:
      - Additional information about the current lifecycle state.
      returned: on success
      sample: lifecycle_details_example
      type: str
    lifecycle_state:
      description:
      - The current state of the maintenance run. For Autonomous Database Serverless
        instances, valid states are IN_PROGRESS, SUCCEEDED, and FAILED.
      returned: on success
      sample: SCHEDULED
      type: str
    maintenance_subtype:
      description:
      - Maintenance sub-type.
      returned: on success
      sample: QUARTERLY
      type: str
    maintenance_type:
      description:
      - Maintenance type.
      returned: on success
      sample: PLANNED
      type: str
    patch_failure_count:
      description:
      - Contain the patch failure count.
      returned: on success
      sample: 56
      type: int
    patch_id:
      description:
      - 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.
      returned: on success
      sample: ocid1.patch.oc1..xxxxxxEXAMPLExxxxxx
      type: str
    patching_end_time:
      description:
      - The time when the patching operation ended.
      returned: on success
      sample: '2013-10-20T19:20:30+01:00'
      type: str
    patching_mode:
      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 L(Oracle-Managed Infrastructure Maintenance Updates,https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/examaintenance.htm#Oracle)
        for more information.'
      returned: on success
      sample: ROLLING
      type: str
    patching_start_time:
      description:
      - The time when the patching operation started.
      returned: on success
      sample: '2013-10-20T19:20:30+01:00'
      type: str
    patching_status:
      description:
      - The status of the patching operation.
      returned: on success
      sample: PATCHING
      type: str
    peer_maintenance_run_id:
      description:
      - The L(OCID,https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)
        of the maintenance run for the Autonomous Data Guard association's peer container
        database.
      returned: on success
      sample: ocid1.peermaintenancerun.oc1..xxxxxxEXAMPLExxxxxx
      type: str
    target_db_server_version:
      description:
      - The target software version for the database server patching operation.
      returned: on success
      sample: target_db_server_version_example
      type: str
    target_resource_id:
      description:
      - The ID of the target resource on which the maintenance run occurs.
      returned: on success
      sample: ocid1.targetresource.oc1..xxxxxxEXAMPLExxxxxx
      type: str
    target_resource_type:
      description:
      - The type of the target resource on which the maintenance run occurs.
      returned: on success
      sample: AUTONOMOUS_EXADATA_INFRASTRUCTURE
      type: str
    target_storage_server_version:
      description:
      - The target Cell version that is to be patched to.
      returned: on success
      sample: target_storage_server_version_example
      type: str
    time_ended:
      description:
      - The date and time the maintenance run was completed.
      returned: on success
      sample: '2013-10-20T19:20:30+01:00'
      type: str
    time_scheduled:
      description:
      - The date and time the maintenance run is scheduled to occur.
      returned: on success
      sample: '2013-10-20T19:20:30+01:00'
      type: str
    time_started:
      description:
      - The date and time the maintenance run starts.
      returned: on success
      sample: '2013-10-20T19:20:30+01:00'
      type: str
  description:
  - Details of the MaintenanceRun resource acted upon by the current operation
  returned: on success
  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'
  type: complex