# 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

__all__ = [
    'GetYamlConfigResult',
    'AwaitableGetYamlConfigResult',
    'get_yaml_config',
    'get_yaml_config_output',
]

@pulumi.output_type
class GetYamlConfigResult:
    """
    A collection of values returned by getYamlConfig.
    """
    def __init__(__self__, app_id=None, content=None, id=None, name=None, path=None):
        if app_id and not isinstance(app_id, str):
            raise TypeError("Expected argument 'app_id' to be a str")
        pulumi.set(__self__, "app_id", app_id)
        if content and not isinstance(content, str):
            raise TypeError("Expected argument 'content' to be a str")
        pulumi.set(__self__, "content", content)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if path and not isinstance(path, str):
            raise TypeError("Expected argument 'path' to be a str")
        pulumi.set(__self__, "path", path)

    @_builtins.property
    @pulumi.getter(name="appId")
    def app_id(self) -> Optional[_builtins.str]:
        """
        Unique identifier of the application. This is not required for account level resources (i.e. cloud providers, connectors, etc.).
        """
        return pulumi.get(self, "app_id")

    @_builtins.property
    @pulumi.getter
    def content(self) -> _builtins.str:
        """
        Content of the yaml file.
        """
        return pulumi.get(self, "content")

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        Unique identifier of the yaml resource.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter
    def name(self) -> _builtins.str:
        """
        Name of the yaml resource.
        """
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter
    def path(self) -> _builtins.str:
        """
        Path to the yaml file.
        """
        return pulumi.get(self, "path")


class AwaitableGetYamlConfigResult(GetYamlConfigResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetYamlConfigResult(
            app_id=self.app_id,
            content=self.content,
            id=self.id,
            name=self.name,
            path=self.path)


def get_yaml_config(app_id: Optional[_builtins.str] = None,
                    path: Optional[_builtins.str] = None,
                    opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetYamlConfigResult:
    """
    Data source for retrieving a yaml config.


    :param _builtins.str app_id: Unique identifier of the application. This is not required for account level resources (i.e. cloud providers, connectors, etc.).
    :param _builtins.str path: Path to the yaml file.
    """
    __args__ = dict()
    __args__['appId'] = app_id
    __args__['path'] = path
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('harness:index/getYamlConfig:getYamlConfig', __args__, opts=opts, typ=GetYamlConfigResult).value

    return AwaitableGetYamlConfigResult(
        app_id=pulumi.get(__ret__, 'app_id'),
        content=pulumi.get(__ret__, 'content'),
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        path=pulumi.get(__ret__, 'path'))
def get_yaml_config_output(app_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                           path: Optional[pulumi.Input[_builtins.str]] = None,
                           opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetYamlConfigResult]:
    """
    Data source for retrieving a yaml config.


    :param _builtins.str app_id: Unique identifier of the application. This is not required for account level resources (i.e. cloud providers, connectors, etc.).
    :param _builtins.str path: Path to the yaml file.
    """
    __args__ = dict()
    __args__['appId'] = app_id
    __args__['path'] = path
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('harness:index/getYamlConfig:getYamlConfig', __args__, opts=opts, typ=GetYamlConfigResult)
    return __ret__.apply(lambda __response__: GetYamlConfigResult(
        app_id=pulumi.get(__response__, 'app_id'),
        content=pulumi.get(__response__, 'content'),
        id=pulumi.get(__response__, 'id'),
        name=pulumi.get(__response__, 'name'),
        path=pulumi.get(__response__, 'path')))
