# 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

__all__ = [
    'GetCertResult',
    'AwaitableGetCertResult',
    'get_cert',
    'get_cert_output',
]

@pulumi.output_type
class GetCertResult:
    """
    A collection of values returned by getCert.
    """
    def __init__(__self__, app=None, check=None, dns_validation_hostname=None, dns_validation_instructions=None, dns_validation_target=None, hostname=None, id=None):
        if app and not isinstance(app, str):
            raise TypeError("Expected argument 'app' to be a str")
        pulumi.set(__self__, "app", app)
        if check and not isinstance(check, bool):
            raise TypeError("Expected argument 'check' to be a bool")
        pulumi.set(__self__, "check", check)
        if dns_validation_hostname and not isinstance(dns_validation_hostname, str):
            raise TypeError("Expected argument 'dns_validation_hostname' to be a str")
        pulumi.set(__self__, "dns_validation_hostname", dns_validation_hostname)
        if dns_validation_instructions and not isinstance(dns_validation_instructions, str):
            raise TypeError("Expected argument 'dns_validation_instructions' to be a str")
        pulumi.set(__self__, "dns_validation_instructions", dns_validation_instructions)
        if dns_validation_target and not isinstance(dns_validation_target, str):
            raise TypeError("Expected argument 'dns_validation_target' to be a str")
        pulumi.set(__self__, "dns_validation_target", dns_validation_target)
        if hostname and not isinstance(hostname, str):
            raise TypeError("Expected argument 'hostname' to be a str")
        pulumi.set(__self__, "hostname", hostname)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)

    @property
    @pulumi.getter
    def app(self) -> str:
        """
        The App this resource will be created in
        """
        return pulumi.get(self, "app")

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

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

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

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

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

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        A fly-generated ID
        """
        return pulumi.get(self, "id")


class AwaitableGetCertResult(GetCertResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetCertResult(
            app=self.app,
            check=self.check,
            dns_validation_hostname=self.dns_validation_hostname,
            dns_validation_instructions=self.dns_validation_instructions,
            dns_validation_target=self.dns_validation_target,
            hostname=self.hostname,
            id=self.id)


def get_cert(app: Optional[str] = None,
             hostname: Optional[str] = None,
             opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetCertResult:
    """
    Use this data source to access information about an existing resource.

    :param str app: The App this resource will be created in
    """
    __args__ = dict()
    __args__['app'] = app
    __args__['hostname'] = hostname
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('fly:index/getCert:getCert', __args__, opts=opts, typ=GetCertResult).value

    return AwaitableGetCertResult(
        app=pulumi.get(__ret__, 'app'),
        check=pulumi.get(__ret__, 'check'),
        dns_validation_hostname=pulumi.get(__ret__, 'dns_validation_hostname'),
        dns_validation_instructions=pulumi.get(__ret__, 'dns_validation_instructions'),
        dns_validation_target=pulumi.get(__ret__, 'dns_validation_target'),
        hostname=pulumi.get(__ret__, 'hostname'),
        id=pulumi.get(__ret__, 'id'))


@_utilities.lift_output_func(get_cert)
def get_cert_output(app: Optional[pulumi.Input[str]] = None,
                    hostname: Optional[pulumi.Input[str]] = None,
                    opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetCertResult]:
    """
    Use this data source to access information about an existing resource.

    :param str app: The App this resource will be created in
    """
    ...
