# 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__ = [
    'GetAuditProfilesResult',
    'AwaitableGetAuditProfilesResult',
    'get_audit_profiles',
    'get_audit_profiles_output',
]

@pulumi.output_type
class GetAuditProfilesResult:
    """
    A collection of values returned by getAuditProfiles.
    """
    def __init__(__self__, access_level=None, audit_collected_volume_greater_than_or_equal_to=None, audit_profile_collections=None, audit_profile_id=None, compartment_id=None, compartment_id_in_subtree=None, display_name=None, filters=None, id=None, is_override_global_retention_setting=None, is_paid_usage_enabled=None, state=None, target_id=None):
        if access_level and not isinstance(access_level, str):
            raise TypeError("Expected argument 'access_level' to be a str")
        pulumi.set(__self__, "access_level", access_level)
        if audit_collected_volume_greater_than_or_equal_to and not isinstance(audit_collected_volume_greater_than_or_equal_to, str):
            raise TypeError("Expected argument 'audit_collected_volume_greater_than_or_equal_to' to be a str")
        pulumi.set(__self__, "audit_collected_volume_greater_than_or_equal_to", audit_collected_volume_greater_than_or_equal_to)
        if audit_profile_collections and not isinstance(audit_profile_collections, list):
            raise TypeError("Expected argument 'audit_profile_collections' to be a list")
        pulumi.set(__self__, "audit_profile_collections", audit_profile_collections)
        if audit_profile_id and not isinstance(audit_profile_id, str):
            raise TypeError("Expected argument 'audit_profile_id' to be a str")
        pulumi.set(__self__, "audit_profile_id", audit_profile_id)
        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 compartment_id_in_subtree and not isinstance(compartment_id_in_subtree, bool):
            raise TypeError("Expected argument 'compartment_id_in_subtree' to be a bool")
        pulumi.set(__self__, "compartment_id_in_subtree", compartment_id_in_subtree)
        if display_name and not isinstance(display_name, str):
            raise TypeError("Expected argument 'display_name' to be a str")
        pulumi.set(__self__, "display_name", display_name)
        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)
        if is_override_global_retention_setting and not isinstance(is_override_global_retention_setting, bool):
            raise TypeError("Expected argument 'is_override_global_retention_setting' to be a bool")
        pulumi.set(__self__, "is_override_global_retention_setting", is_override_global_retention_setting)
        if is_paid_usage_enabled and not isinstance(is_paid_usage_enabled, bool):
            raise TypeError("Expected argument 'is_paid_usage_enabled' to be a bool")
        pulumi.set(__self__, "is_paid_usage_enabled", is_paid_usage_enabled)
        if state and not isinstance(state, str):
            raise TypeError("Expected argument 'state' to be a str")
        pulumi.set(__self__, "state", state)
        if target_id and not isinstance(target_id, str):
            raise TypeError("Expected argument 'target_id' to be a str")
        pulumi.set(__self__, "target_id", target_id)

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

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

    @property
    @pulumi.getter(name="auditProfileCollections")
    def audit_profile_collections(self) -> Sequence['outputs.GetAuditProfilesAuditProfileCollectionResult']:
        """
        The list of audit_profile_collection.
        """
        return pulumi.get(self, "audit_profile_collections")

    @property
    @pulumi.getter(name="auditProfileId")
    def audit_profile_id(self) -> Optional[str]:
        """
        The OCID of the  parent audit.
        """
        return pulumi.get(self, "audit_profile_id")

    @property
    @pulumi.getter(name="compartmentId")
    def compartment_id(self) -> str:
        """
        The OCID of the compartment that contains the audit.
        """
        return pulumi.get(self, "compartment_id")

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

    @property
    @pulumi.getter(name="displayName")
    def display_name(self) -> Optional[str]:
        """
        The display name of the audit profile.
        """
        return pulumi.get(self, "display_name")

    @property
    @pulumi.getter
    def filters(self) -> Optional[Sequence['outputs.GetAuditProfilesFilterResult']]:
        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")

    @property
    @pulumi.getter(name="isOverrideGlobalRetentionSetting")
    def is_override_global_retention_setting(self) -> Optional[bool]:
        """
        Indicates whether audit retention settings like online and offline months is set at the target level overriding the global audit retention settings.
        """
        return pulumi.get(self, "is_override_global_retention_setting")

    @property
    @pulumi.getter(name="isPaidUsageEnabled")
    def is_paid_usage_enabled(self) -> Optional[bool]:
        """
        Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, potentially incurring additional charges. The default value is inherited from the global settings.  You can change at the global level or at the target level.
        """
        return pulumi.get(self, "is_paid_usage_enabled")

    @property
    @pulumi.getter
    def state(self) -> Optional[str]:
        """
        The current state of the audit profile.
        """
        return pulumi.get(self, "state")

    @property
    @pulumi.getter(name="targetId")
    def target_id(self) -> Optional[str]:
        """
        The OCID of the Data Safe target for which the audit profile is created.
        """
        return pulumi.get(self, "target_id")


class AwaitableGetAuditProfilesResult(GetAuditProfilesResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetAuditProfilesResult(
            access_level=self.access_level,
            audit_collected_volume_greater_than_or_equal_to=self.audit_collected_volume_greater_than_or_equal_to,
            audit_profile_collections=self.audit_profile_collections,
            audit_profile_id=self.audit_profile_id,
            compartment_id=self.compartment_id,
            compartment_id_in_subtree=self.compartment_id_in_subtree,
            display_name=self.display_name,
            filters=self.filters,
            id=self.id,
            is_override_global_retention_setting=self.is_override_global_retention_setting,
            is_paid_usage_enabled=self.is_paid_usage_enabled,
            state=self.state,
            target_id=self.target_id)


def get_audit_profiles(access_level: Optional[str] = None,
                       audit_collected_volume_greater_than_or_equal_to: Optional[str] = None,
                       audit_profile_id: Optional[str] = None,
                       compartment_id: Optional[str] = None,
                       compartment_id_in_subtree: Optional[bool] = None,
                       display_name: Optional[str] = None,
                       filters: Optional[Sequence[pulumi.InputType['GetAuditProfilesFilterArgs']]] = None,
                       is_override_global_retention_setting: Optional[bool] = None,
                       is_paid_usage_enabled: Optional[bool] = None,
                       state: Optional[str] = None,
                       target_id: Optional[str] = None,
                       opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAuditProfilesResult:
    """
    This data source provides the list of Audit Profiles in Oracle Cloud Infrastructure Data Safe service.

    Gets a list of all audit profiles.

    The ListAuditProfiles operation returns only the audit profiles in the specified `compartmentId`.
    The list does not include any subcompartments of the compartmentId passed.

    The parameter `accessLevel` specifies whether to return only those compartments for which the
    requestor has INSPECT permissions on at least one resource directly
    or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
    Principal doesn't have access to even one of the child compartments. This is valid only when
    `compartmentIdInSubtree` is set to `true`.

    The parameter `compartmentIdInSubtree` applies when you perform ListAuditProfiles on the
    `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
    To get a full list of all compartments and subcompartments in the tenancy (root compartment),
    set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_audit_profiles = oci.DataSafe.get_audit_profiles(compartment_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        access_level=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        audit_collected_volume_greater_than_or_equal_to=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        audit_profile_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        compartment_id_in_subtree=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        display_name=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        is_override_global_retention_setting=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        is_paid_usage_enabled=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        state=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        target_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str access_level: Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
    :param str audit_collected_volume_greater_than_or_equal_to: A filter to return only items that have count of audit records collected greater than or equal to the specified value.
    :param str audit_profile_id: A optional filter to return only resources that match the specified id.
    :param str compartment_id: A filter to return only resources that match the specified compartment OCID.
    :param bool compartment_id_in_subtree: Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
    :param str display_name: A filter to return only resources that match the specified display name.
    :param bool is_override_global_retention_setting: A optional filter to return only resources that match the specified retention configured value.
    :param bool is_paid_usage_enabled: Indicates if you want to continue audit record collection beyond the free limit of one million audit records per month per target database, incurring additional charges. The default value is inherited from the global settings. You can change at the global level or at the target level.
    :param str state: A optional filter to return only resources that match the specified lifecycle state.
    :param str target_id: A filter to return only items related to a specific target OCID.
    """
    __args__ = dict()
    __args__['accessLevel'] = access_level
    __args__['auditCollectedVolumeGreaterThanOrEqualTo'] = audit_collected_volume_greater_than_or_equal_to
    __args__['auditProfileId'] = audit_profile_id
    __args__['compartmentId'] = compartment_id
    __args__['compartmentIdInSubtree'] = compartment_id_in_subtree
    __args__['displayName'] = display_name
    __args__['filters'] = filters
    __args__['isOverrideGlobalRetentionSetting'] = is_override_global_retention_setting
    __args__['isPaidUsageEnabled'] = is_paid_usage_enabled
    __args__['state'] = state
    __args__['targetId'] = target_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('oci:DataSafe/getAuditProfiles:getAuditProfiles', __args__, opts=opts, typ=GetAuditProfilesResult).value

    return AwaitableGetAuditProfilesResult(
        access_level=__ret__.access_level,
        audit_collected_volume_greater_than_or_equal_to=__ret__.audit_collected_volume_greater_than_or_equal_to,
        audit_profile_collections=__ret__.audit_profile_collections,
        audit_profile_id=__ret__.audit_profile_id,
        compartment_id=__ret__.compartment_id,
        compartment_id_in_subtree=__ret__.compartment_id_in_subtree,
        display_name=__ret__.display_name,
        filters=__ret__.filters,
        id=__ret__.id,
        is_override_global_retention_setting=__ret__.is_override_global_retention_setting,
        is_paid_usage_enabled=__ret__.is_paid_usage_enabled,
        state=__ret__.state,
        target_id=__ret__.target_id)


@_utilities.lift_output_func(get_audit_profiles)
def get_audit_profiles_output(access_level: Optional[pulumi.Input[Optional[str]]] = None,
                              audit_collected_volume_greater_than_or_equal_to: Optional[pulumi.Input[Optional[str]]] = None,
                              audit_profile_id: Optional[pulumi.Input[Optional[str]]] = None,
                              compartment_id: Optional[pulumi.Input[str]] = None,
                              compartment_id_in_subtree: Optional[pulumi.Input[Optional[bool]]] = None,
                              display_name: Optional[pulumi.Input[Optional[str]]] = None,
                              filters: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetAuditProfilesFilterArgs']]]]] = None,
                              is_override_global_retention_setting: Optional[pulumi.Input[Optional[bool]]] = None,
                              is_paid_usage_enabled: Optional[pulumi.Input[Optional[bool]]] = None,
                              state: Optional[pulumi.Input[Optional[str]]] = None,
                              target_id: Optional[pulumi.Input[Optional[str]]] = None,
                              opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetAuditProfilesResult]:
    """
    This data source provides the list of Audit Profiles in Oracle Cloud Infrastructure Data Safe service.

    Gets a list of all audit profiles.

    The ListAuditProfiles operation returns only the audit profiles in the specified `compartmentId`.
    The list does not include any subcompartments of the compartmentId passed.

    The parameter `accessLevel` specifies whether to return only those compartments for which the
    requestor has INSPECT permissions on at least one resource directly
    or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
    Principal doesn't have access to even one of the child compartments. This is valid only when
    `compartmentIdInSubtree` is set to `true`.

    The parameter `compartmentIdInSubtree` applies when you perform ListAuditProfiles on the
    `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
    To get a full list of all compartments and subcompartments in the tenancy (root compartment),
    set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_audit_profiles = oci.DataSafe.get_audit_profiles(compartment_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        access_level=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        audit_collected_volume_greater_than_or_equal_to=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        audit_profile_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        compartment_id_in_subtree=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        display_name=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        is_override_global_retention_setting=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        is_paid_usage_enabled=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        state=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        target_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str access_level: Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
    :param str audit_collected_volume_greater_than_or_equal_to: A filter to return only items that have count of audit records collected greater than or equal to the specified value.
    :param str audit_profile_id: A optional filter to return only resources that match the specified id.
    :param str compartment_id: A filter to return only resources that match the specified compartment OCID.
    :param bool compartment_id_in_subtree: Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
    :param str display_name: A filter to return only resources that match the specified display name.
    :param bool is_override_global_retention_setting: A optional filter to return only resources that match the specified retention configured value.
    :param bool is_paid_usage_enabled: Indicates if you want to continue audit record collection beyond the free limit of one million audit records per month per target database, incurring additional charges. The default value is inherited from the global settings. You can change at the global level or at the target level.
    :param str state: A optional filter to return only resources that match the specified lifecycle state.
    :param str target_id: A filter to return only items related to a specific target OCID.
    """
    ...
