# 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__ = [
    'GetJobExecutionsStatusResult',
    'AwaitableGetJobExecutionsStatusResult',
    'get_job_executions_status',
    'get_job_executions_status_output',
]

@pulumi.output_type
class GetJobExecutionsStatusResult:
    """
    A collection of values returned by getJobExecutionsStatus.
    """
    def __init__(__self__, compartment_id=None, end_time=None, id=None, items=None, managed_database_group_id=None, managed_database_id=None, name=None, start_time=None):
        if compartment_id and not isinstance(compartment_id, str):
            raise TypeError("Expected argument 'compartment_id' to be a str")
        pulumi.set(__self__, "compartment_id", compartment_id)
        if end_time and not isinstance(end_time, str):
            raise TypeError("Expected argument 'end_time' to be a str")
        pulumi.set(__self__, "end_time", end_time)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if items and not isinstance(items, list):
            raise TypeError("Expected argument 'items' to be a list")
        pulumi.set(__self__, "items", items)
        if managed_database_group_id and not isinstance(managed_database_group_id, str):
            raise TypeError("Expected argument 'managed_database_group_id' to be a str")
        pulumi.set(__self__, "managed_database_group_id", managed_database_group_id)
        if managed_database_id and not isinstance(managed_database_id, str):
            raise TypeError("Expected argument 'managed_database_id' to be a str")
        pulumi.set(__self__, "managed_database_id", managed_database_id)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if start_time and not isinstance(start_time, str):
            raise TypeError("Expected argument 'start_time' to be a str")
        pulumi.set(__self__, "start_time", start_time)

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

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

    @property
    @pulumi.getter
    def id(self) -> Optional[str]:
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def items(self) -> Sequence['outputs.GetJobExecutionsStatusItemResult']:
        """
        A list of JobExecutionsSummary objects.
        """
        return pulumi.get(self, "items")

    @property
    @pulumi.getter(name="managedDatabaseGroupId")
    def managed_database_group_id(self) -> Optional[str]:
        return pulumi.get(self, "managed_database_group_id")

    @property
    @pulumi.getter(name="managedDatabaseId")
    def managed_database_id(self) -> Optional[str]:
        return pulumi.get(self, "managed_database_id")

    @property
    @pulumi.getter
    def name(self) -> Optional[str]:
        return pulumi.get(self, "name")

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


class AwaitableGetJobExecutionsStatusResult(GetJobExecutionsStatusResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetJobExecutionsStatusResult(
            compartment_id=self.compartment_id,
            end_time=self.end_time,
            id=self.id,
            items=self.items,
            managed_database_group_id=self.managed_database_group_id,
            managed_database_id=self.managed_database_id,
            name=self.name,
            start_time=self.start_time)


def get_job_executions_status(compartment_id: Optional[str] = None,
                              end_time: Optional[str] = None,
                              id: Optional[str] = None,
                              managed_database_group_id: Optional[str] = None,
                              managed_database_id: Optional[str] = None,
                              name: Optional[str] = None,
                              start_time: Optional[str] = None,
                              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetJobExecutionsStatusResult:
    """
    This data source provides details about a specific Job Executions Status resource in Oracle Cloud Infrastructure Database Management service.

    Gets the number of job executions grouped by status for a job, Managed Database, or Database Group in a specific compartment. Only one of the parameters, jobId, managedDatabaseId, or managedDatabaseGroupId should be provided.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_job_executions_status = oci.DatabaseManagement.get_job_executions_status(compartment_id=var["compartment_id"],
        end_time=var["job_executions_status_end_time"],
        start_time=var["job_executions_status_start_time"],
        id=var["job_executions_status_id"],
        managed_database_group_id=oci_database_management_managed_database_group["test_managed_database_group"]["id"],
        managed_database_id=oci_database_management_managed_database["test_managed_database"]["id"],
        name=var["job_executions_status_name"])
    ```


    :param str compartment_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
    :param str end_time: The end time of the time range to retrieve the status summary of job executions in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'".
    :param str id: The identifier of the resource.
    :param str managed_database_group_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Managed Database Group.
    :param str managed_database_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Managed Database.
    :param str name: A filter to return only resources that match the entire name.
    :param str start_time: The start time of the time range to retrieve the status summary of job executions in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'".
    """
    __args__ = dict()
    __args__['compartmentId'] = compartment_id
    __args__['endTime'] = end_time
    __args__['id'] = id
    __args__['managedDatabaseGroupId'] = managed_database_group_id
    __args__['managedDatabaseId'] = managed_database_id
    __args__['name'] = name
    __args__['startTime'] = start_time
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('oci:DatabaseManagement/getJobExecutionsStatus:getJobExecutionsStatus', __args__, opts=opts, typ=GetJobExecutionsStatusResult).value

    return AwaitableGetJobExecutionsStatusResult(
        compartment_id=__ret__.compartment_id,
        end_time=__ret__.end_time,
        id=__ret__.id,
        items=__ret__.items,
        managed_database_group_id=__ret__.managed_database_group_id,
        managed_database_id=__ret__.managed_database_id,
        name=__ret__.name,
        start_time=__ret__.start_time)


@_utilities.lift_output_func(get_job_executions_status)
def get_job_executions_status_output(compartment_id: Optional[pulumi.Input[str]] = None,
                                     end_time: Optional[pulumi.Input[str]] = None,
                                     id: Optional[pulumi.Input[Optional[str]]] = None,
                                     managed_database_group_id: Optional[pulumi.Input[Optional[str]]] = None,
                                     managed_database_id: Optional[pulumi.Input[Optional[str]]] = None,
                                     name: Optional[pulumi.Input[Optional[str]]] = None,
                                     start_time: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetJobExecutionsStatusResult]:
    """
    This data source provides details about a specific Job Executions Status resource in Oracle Cloud Infrastructure Database Management service.

    Gets the number of job executions grouped by status for a job, Managed Database, or Database Group in a specific compartment. Only one of the parameters, jobId, managedDatabaseId, or managedDatabaseGroupId should be provided.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_job_executions_status = oci.DatabaseManagement.get_job_executions_status(compartment_id=var["compartment_id"],
        end_time=var["job_executions_status_end_time"],
        start_time=var["job_executions_status_start_time"],
        id=var["job_executions_status_id"],
        managed_database_group_id=oci_database_management_managed_database_group["test_managed_database_group"]["id"],
        managed_database_id=oci_database_management_managed_database["test_managed_database"]["id"],
        name=var["job_executions_status_name"])
    ```


    :param str compartment_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
    :param str end_time: The end time of the time range to retrieve the status summary of job executions in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'".
    :param str id: The identifier of the resource.
    :param str managed_database_group_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Managed Database Group.
    :param str managed_database_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Managed Database.
    :param str name: A filter to return only resources that match the entire name.
    :param str start_time: The start time of the time range to retrieve the status summary of job executions in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'".
    """
    ...
