# 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__ = [
    'GetManagedListsResult',
    'AwaitableGetManagedListsResult',
    'get_managed_lists',
    'get_managed_lists_output',
]

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

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

    @property
    @pulumi.getter(name="compartmentId")
    def compartment_id(self) -> str:
        """
        Compartment Identifier where the resource is created
        """
        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]:
        """
        ManagedList display name.
        """
        return pulumi.get(self, "display_name")

    @property
    @pulumi.getter
    def filters(self) -> Optional[Sequence['outputs.GetManagedListsFilterResult']]:
        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="listType")
    def list_type(self) -> Optional[str]:
        """
        type of the list
        """
        return pulumi.get(self, "list_type")

    @property
    @pulumi.getter(name="managedListCollections")
    def managed_list_collections(self) -> Sequence['outputs.GetManagedListsManagedListCollectionResult']:
        """
        The list of managed_list_collection.
        """
        return pulumi.get(self, "managed_list_collections")

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

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


class AwaitableGetManagedListsResult(GetManagedListsResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetManagedListsResult(
            access_level=self.access_level,
            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,
            list_type=self.list_type,
            managed_list_collections=self.managed_list_collections,
            resource_metadata_only=self.resource_metadata_only,
            state=self.state)


def get_managed_lists(access_level: 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['GetManagedListsFilterArgs']]] = None,
                      list_type: Optional[str] = None,
                      resource_metadata_only: Optional[bool] = None,
                      state: Optional[str] = None,
                      opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetManagedListsResult:
    """
    This data source provides the list of Managed Lists in Oracle Cloud Infrastructure Cloud Guard service.

    Returns a list of ListManagedLists.
    The ListManagedLists operation returns only the managed lists in `compartmentId` passed.
    The list does not include any subcompartments of the compartmentId passed.

    The parameter `accessLevel` specifies whether to return ManagedLists in 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 ListManagedLists 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_managed_lists = oci.CloudGuard.get_managed_lists(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),
        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),
        list_type=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        resource_metadata_only=%!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))
    ```


    :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 compartment_id: The ID of the compartment in which to list resources.
    :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 depending on the the setting of `accessLevel`.
    :param str display_name: A filter to return only resources that match the entire display name given.
    :param str list_type: The type of the ManagedList.
    :param bool resource_metadata_only: Default is false. When set to true, the list of all Oracle Managed Resources Metadata supported by Cloud Guard are returned.
    :param str state: The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
    """
    __args__ = dict()
    __args__['accessLevel'] = access_level
    __args__['compartmentId'] = compartment_id
    __args__['compartmentIdInSubtree'] = compartment_id_in_subtree
    __args__['displayName'] = display_name
    __args__['filters'] = filters
    __args__['listType'] = list_type
    __args__['resourceMetadataOnly'] = resource_metadata_only
    __args__['state'] = state
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('oci:CloudGuard/getManagedLists:getManagedLists', __args__, opts=opts, typ=GetManagedListsResult).value

    return AwaitableGetManagedListsResult(
        access_level=__ret__.access_level,
        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,
        list_type=__ret__.list_type,
        managed_list_collections=__ret__.managed_list_collections,
        resource_metadata_only=__ret__.resource_metadata_only,
        state=__ret__.state)


@_utilities.lift_output_func(get_managed_lists)
def get_managed_lists_output(access_level: 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['GetManagedListsFilterArgs']]]]] = None,
                             list_type: Optional[pulumi.Input[Optional[str]]] = None,
                             resource_metadata_only: Optional[pulumi.Input[Optional[bool]]] = None,
                             state: Optional[pulumi.Input[Optional[str]]] = None,
                             opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetManagedListsResult]:
    """
    This data source provides the list of Managed Lists in Oracle Cloud Infrastructure Cloud Guard service.

    Returns a list of ListManagedLists.
    The ListManagedLists operation returns only the managed lists in `compartmentId` passed.
    The list does not include any subcompartments of the compartmentId passed.

    The parameter `accessLevel` specifies whether to return ManagedLists in 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 ListManagedLists 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_managed_lists = oci.CloudGuard.get_managed_lists(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),
        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),
        list_type=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        resource_metadata_only=%!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))
    ```


    :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 compartment_id: The ID of the compartment in which to list resources.
    :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 depending on the the setting of `accessLevel`.
    :param str display_name: A filter to return only resources that match the entire display name given.
    :param str list_type: The type of the ManagedList.
    :param bool resource_metadata_only: Default is false. When set to true, the list of all Oracle Managed Resources Metadata supported by Cloud Guard are returned.
    :param str state: The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
    """
    ...
