# 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__ = [
    'GetSecretFileResult',
    'AwaitableGetSecretFileResult',
    'get_secret_file',
    'get_secret_file_output',
]

@pulumi.output_type
class GetSecretFileResult:
    def __init__(__self__, content=None, name=None):
        if content and not isinstance(content, str):
            raise TypeError("Expected argument 'content' to be a str")
        pulumi.set(__self__, "content", content)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)

    @_builtins.property
    @pulumi.getter
    def content(self) -> _builtins.str:
        return pulumi.get(self, "content")

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


class AwaitableGetSecretFileResult(GetSecretFileResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetSecretFileResult(
            content=self.content,
            name=self.name)


def get_secret_file(secret_file_name: Optional[_builtins.str] = None,
                    service_id: Optional[_builtins.str] = None,
                    opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetSecretFileResult:
    """
    Use this data source to access information about an existing resource.

    :param _builtins.str secret_file_name: The file name of the secret file
    :param _builtins.str service_id: The ID of the service
    """
    __args__ = dict()
    __args__['secretFileName'] = secret_file_name
    __args__['serviceId'] = service_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('render:services:getSecretFile', __args__, opts=opts, typ=GetSecretFileResult).value

    return AwaitableGetSecretFileResult(
        content=pulumi.get(__ret__, 'content'),
        name=pulumi.get(__ret__, 'name'))
def get_secret_file_output(secret_file_name: Optional[pulumi.Input[_builtins.str]] = None,
                           service_id: Optional[pulumi.Input[_builtins.str]] = None,
                           opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetSecretFileResult]:
    """
    Use this data source to access information about an existing resource.

    :param _builtins.str secret_file_name: The file name of the secret file
    :param _builtins.str service_id: The ID of the service
    """
    __args__ = dict()
    __args__['secretFileName'] = secret_file_name
    __args__['serviceId'] = service_id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('render:services:getSecretFile', __args__, opts=opts, typ=GetSecretFileResult)
    return __ret__.apply(lambda __response__: GetSecretFileResult(
        content=pulumi.get(__response__, 'content'),
        name=pulumi.get(__response__, 'name')))
