# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from .. import _utilities
from . import outputs

__all__ = [
    'GetInfraModulesResult',
    'AwaitableGetInfraModulesResult',
    'get_infra_modules',
    'get_infra_modules_output',
]

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

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

    @_builtins.property
    @pulumi.getter
    def modules(self) -> Sequence['outputs.GetInfraModulesModuleResult']:
        """
        List of modules
        """
        return pulumi.get(self, "modules")


class AwaitableGetInfraModulesResult(GetInfraModulesResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetInfraModulesResult(
            id=self.id,
            modules=self.modules)


def get_infra_modules(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetInfraModulesResult:
    """
    Data source for retrieving a list of modules from the module registry.

    ## Example Usage
    """
    __args__ = dict()
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('harness:platform/getInfraModules:getInfraModules', __args__, opts=opts, typ=GetInfraModulesResult).value

    return AwaitableGetInfraModulesResult(
        id=pulumi.get(__ret__, 'id'),
        modules=pulumi.get(__ret__, 'modules'))
def get_infra_modules_output(opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetInfraModulesResult]:
    """
    Data source for retrieving a list of modules from the module registry.

    ## Example Usage
    """
    __args__ = dict()
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('harness:platform/getInfraModules:getInfraModules', __args__, opts=opts, typ=GetInfraModulesResult)
    return __ret__.apply(lambda __response__: GetInfraModulesResult(
        id=pulumi.get(__response__, 'id'),
        modules=pulumi.get(__response__, 'modules')))
