# 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
from ._inputs import *

__all__ = [
    'GetDataGuardAssociationsResult',
    'AwaitableGetDataGuardAssociationsResult',
    'get_data_guard_associations',
    'get_data_guard_associations_output',
]

@pulumi.output_type
class GetDataGuardAssociationsResult:
    """
    A collection of values returned by getDataGuardAssociations.
    """
    def __init__(__self__, data_guard_associations=None, database_id=None, filters=None, id=None):
        if data_guard_associations and not isinstance(data_guard_associations, list):
            raise TypeError("Expected argument 'data_guard_associations' to be a list")
        pulumi.set(__self__, "data_guard_associations", data_guard_associations)
        if database_id and not isinstance(database_id, str):
            raise TypeError("Expected argument 'database_id' to be a str")
        pulumi.set(__self__, "database_id", database_id)
        if filters and not isinstance(filters, list):
            raise TypeError("Expected argument 'filters' to be a list")
        pulumi.set(__self__, "filters", filters)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)

    @property
    @pulumi.getter(name="dataGuardAssociations")
    def data_guard_associations(self) -> Sequence['outputs.GetDataGuardAssociationsDataGuardAssociationResult']:
        """
        The list of data_guard_associations.
        """
        return pulumi.get(self, "data_guard_associations")

    @property
    @pulumi.getter(name="databaseId")
    def database_id(self) -> str:
        """
        The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the reporting database.
        """
        return pulumi.get(self, "database_id")

    @property
    @pulumi.getter
    def filters(self) -> Optional[Sequence['outputs.GetDataGuardAssociationsFilterResult']]:
        return pulumi.get(self, "filters")

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


class AwaitableGetDataGuardAssociationsResult(GetDataGuardAssociationsResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetDataGuardAssociationsResult(
            data_guard_associations=self.data_guard_associations,
            database_id=self.database_id,
            filters=self.filters,
            id=self.id)


def get_data_guard_associations(database_id: Optional[str] = None,
                                filters: Optional[Sequence[pulumi.InputType['GetDataGuardAssociationsFilterArgs']]] = None,
                                opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDataGuardAssociationsResult:
    """
    This data source provides the list of Data Guard Associations in Oracle Cloud Infrastructure Database service.

    Lists all Data Guard associations for the specified database.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_data_guard_associations = oci.Database.get_data_guard_associations(database_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str database_id: The database [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
    """
    __args__ = dict()
    __args__['databaseId'] = database_id
    __args__['filters'] = filters
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('oci:Database/getDataGuardAssociations:getDataGuardAssociations', __args__, opts=opts, typ=GetDataGuardAssociationsResult).value

    return AwaitableGetDataGuardAssociationsResult(
        data_guard_associations=__ret__.data_guard_associations,
        database_id=__ret__.database_id,
        filters=__ret__.filters,
        id=__ret__.id)


@_utilities.lift_output_func(get_data_guard_associations)
def get_data_guard_associations_output(database_id: Optional[pulumi.Input[str]] = None,
                                       filters: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetDataGuardAssociationsFilterArgs']]]]] = None,
                                       opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetDataGuardAssociationsResult]:
    """
    This data source provides the list of Data Guard Associations in Oracle Cloud Infrastructure Database service.

    Lists all Data Guard associations for the specified database.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_data_guard_associations = oci.Database.get_data_guard_associations(database_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str database_id: The database [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
    """
    ...
