# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs

__all__ = [
    'GetDatabaseMaintenanceRunHistoryResult',
    'AwaitableGetDatabaseMaintenanceRunHistoryResult',
    'get_database_maintenance_run_history',
    'get_database_maintenance_run_history_output',
]

@pulumi.output_type
class GetDatabaseMaintenanceRunHistoryResult:
    """
    A collection of values returned by getDatabaseMaintenanceRunHistory.
    """
    def __init__(__self__, db_servers_history_details=None, id=None, maintenance_run_details=None, maintenance_run_history_id=None):
        if db_servers_history_details and not isinstance(db_servers_history_details, list):
            raise TypeError("Expected argument 'db_servers_history_details' to be a list")
        pulumi.set(__self__, "db_servers_history_details", db_servers_history_details)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if maintenance_run_details and not isinstance(maintenance_run_details, list):
            raise TypeError("Expected argument 'maintenance_run_details' to be a list")
        pulumi.set(__self__, "maintenance_run_details", maintenance_run_details)
        if maintenance_run_history_id and not isinstance(maintenance_run_history_id, str):
            raise TypeError("Expected argument 'maintenance_run_history_id' to be a str")
        pulumi.set(__self__, "maintenance_run_history_id", maintenance_run_history_id)

    @property
    @pulumi.getter(name="dbServersHistoryDetails")
    def db_servers_history_details(self) -> Sequence['outputs.GetDatabaseMaintenanceRunHistoryDbServersHistoryDetailResult']:
        """
        List of database server history details.
        """
        return pulumi.get(self, "db_servers_history_details")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="maintenanceRunDetails")
    def maintenance_run_details(self) -> Sequence['outputs.GetDatabaseMaintenanceRunHistoryMaintenanceRunDetailResult']:
        """
        Details of a maintenance run.
        """
        return pulumi.get(self, "maintenance_run_details")

    @property
    @pulumi.getter(name="maintenanceRunHistoryId")
    def maintenance_run_history_id(self) -> str:
        return pulumi.get(self, "maintenance_run_history_id")


class AwaitableGetDatabaseMaintenanceRunHistoryResult(GetDatabaseMaintenanceRunHistoryResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetDatabaseMaintenanceRunHistoryResult(
            db_servers_history_details=self.db_servers_history_details,
            id=self.id,
            maintenance_run_details=self.maintenance_run_details,
            maintenance_run_history_id=self.maintenance_run_history_id)


def get_database_maintenance_run_history(maintenance_run_history_id: Optional[str] = None,
                                         opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDatabaseMaintenanceRunHistoryResult:
    """
    This data source provides details about a specific Maintenance Run History resource in Oracle Cloud Infrastructure Database service.

    Gets information about the specified maintenance run history.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_maintenance_run_history = oci.Database.get_database_maintenance_run_history(maintenance_run_history_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str maintenance_run_history_id: The maintenance run history OCID.
    """
    __args__ = dict()
    __args__['maintenanceRunHistoryId'] = maintenance_run_history_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('oci:Database/getDatabaseMaintenanceRunHistory:getDatabaseMaintenanceRunHistory', __args__, opts=opts, typ=GetDatabaseMaintenanceRunHistoryResult).value

    return AwaitableGetDatabaseMaintenanceRunHistoryResult(
        db_servers_history_details=__ret__.db_servers_history_details,
        id=__ret__.id,
        maintenance_run_details=__ret__.maintenance_run_details,
        maintenance_run_history_id=__ret__.maintenance_run_history_id)


@_utilities.lift_output_func(get_database_maintenance_run_history)
def get_database_maintenance_run_history_output(maintenance_run_history_id: Optional[pulumi.Input[str]] = None,
                                                opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetDatabaseMaintenanceRunHistoryResult]:
    """
    This data source provides details about a specific Maintenance Run History resource in Oracle Cloud Infrastructure Database service.

    Gets information about the specified maintenance run history.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_maintenance_run_history = oci.Database.get_database_maintenance_run_history(maintenance_run_history_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str maintenance_run_history_id: The maintenance run history OCID.
    """
    ...
