# 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__ = [
    'GetLimitDefinitionsResult',
    'AwaitableGetLimitDefinitionsResult',
    'get_limit_definitions',
    'get_limit_definitions_output',
]

@pulumi.output_type
class GetLimitDefinitionsResult:
    """
    A collection of values returned by getLimitDefinitions.
    """
    def __init__(__self__, compartment_id=None, filters=None, id=None, limit_definitions=None, name=None, service_name=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 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 limit_definitions and not isinstance(limit_definitions, list):
            raise TypeError("Expected argument 'limit_definitions' to be a list")
        pulumi.set(__self__, "limit_definitions", limit_definitions)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if service_name and not isinstance(service_name, str):
            raise TypeError("Expected argument 'service_name' to be a str")
        pulumi.set(__self__, "service_name", service_name)

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

    @property
    @pulumi.getter
    def filters(self) -> Optional[Sequence['outputs.GetLimitDefinitionsFilterResult']]:
        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="limitDefinitions")
    def limit_definitions(self) -> Sequence['outputs.GetLimitDefinitionsLimitDefinitionResult']:
        """
        The list of limit_definitions.
        """
        return pulumi.get(self, "limit_definitions")

    @property
    @pulumi.getter
    def name(self) -> Optional[str]:
        """
        The resource limit name. To be used for writing policies (in case of quotas) or other programmatic calls.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="serviceName")
    def service_name(self) -> Optional[str]:
        """
        The service name of the limit.
        """
        return pulumi.get(self, "service_name")


class AwaitableGetLimitDefinitionsResult(GetLimitDefinitionsResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetLimitDefinitionsResult(
            compartment_id=self.compartment_id,
            filters=self.filters,
            id=self.id,
            limit_definitions=self.limit_definitions,
            name=self.name,
            service_name=self.service_name)


def get_limit_definitions(compartment_id: Optional[str] = None,
                          filters: Optional[Sequence[pulumi.InputType['GetLimitDefinitionsFilterArgs']]] = None,
                          name: Optional[str] = None,
                          service_name: Optional[str] = None,
                          opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetLimitDefinitionsResult:
    """
    This data source provides the list of Limit Definitions in Oracle Cloud Infrastructure Limits service.

    Includes a list of resource limits that are currently supported.
    If the 'areQuotasSupported' property is true, you can create quota policies on top of this limit at the
    compartment level.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_limit_definitions = oci.Limits.get_limit_definitions(compartment_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        name=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        service_name=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str compartment_id: The OCID of the parent compartment (remember that the tenancy is simply the root compartment).
    :param str name: Optional field, filter for a specific resource limit.
    :param str service_name: The target service name.
    """
    __args__ = dict()
    __args__['compartmentId'] = compartment_id
    __args__['filters'] = filters
    __args__['name'] = name
    __args__['serviceName'] = service_name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('oci:Limits/getLimitDefinitions:getLimitDefinitions', __args__, opts=opts, typ=GetLimitDefinitionsResult).value

    return AwaitableGetLimitDefinitionsResult(
        compartment_id=__ret__.compartment_id,
        filters=__ret__.filters,
        id=__ret__.id,
        limit_definitions=__ret__.limit_definitions,
        name=__ret__.name,
        service_name=__ret__.service_name)


@_utilities.lift_output_func(get_limit_definitions)
def get_limit_definitions_output(compartment_id: Optional[pulumi.Input[str]] = None,
                                 filters: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetLimitDefinitionsFilterArgs']]]]] = None,
                                 name: Optional[pulumi.Input[Optional[str]]] = None,
                                 service_name: Optional[pulumi.Input[Optional[str]]] = None,
                                 opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetLimitDefinitionsResult]:
    """
    This data source provides the list of Limit Definitions in Oracle Cloud Infrastructure Limits service.

    Includes a list of resource limits that are currently supported.
    If the 'areQuotasSupported' property is true, you can create quota policies on top of this limit at the
    compartment level.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_limit_definitions = oci.Limits.get_limit_definitions(compartment_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        name=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        service_name=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str compartment_id: The OCID of the parent compartment (remember that the tenancy is simply the root compartment).
    :param str name: Optional field, filter for a specific resource limit.
    :param str service_name: The target service name.
    """
    ...
