# coding=utf-8
# *** WARNING: this file was generated by pulumigen. ***
# *** 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, Awaitable
from .. import _utilities

__all__ = [
    'SecretFile',
    'AwaitableSecretFile',
    'get_secret_file',
    'get_secret_file_output',
]

@pulumi.output_type
class SecretFile:
    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)

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

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


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


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

    :param str secret_file_name: The file name of the secret file
    :param 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=SecretFile).value

    return AwaitableSecretFile(
        content=pulumi.get(__ret__, 'content'),
        name=pulumi.get(__ret__, 'name'))


@_utilities.lift_output_func(get_secret_file)
def get_secret_file_output(secret_file_name: Optional[pulumi.Input[str]] = None,
                           service_id: Optional[pulumi.Input[str]] = None,
                           opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[SecretFile]:
    """
    Use this data source to access information about an existing resource.

    :param str secret_file_name: The file name of the secret file
    :param str service_id: The ID of the service
    """
    ...
