# 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__ = [
    'GetBaCertificateResult',
    'AwaitableGetBaCertificateResult',
    'get_ba_certificate',
    'get_ba_certificate_output',
]

@pulumi.output_type
class GetBaCertificateResult:
    """
    A collection of values returned by getBaCertificate.
    """
    def __init__(__self__, cert_chain=None, certificate=None, cname=None, creation_time=None, description=None, id=None, issued_by=None, issued_to=None, microtenant_id=None, modified_time=None, modifiedby=None, name=None, public_key=None, sans=None, serial_no=None, status=None, valid_from_in_epochsec=None, valid_to_in_epochsec=None):
        if cert_chain and not isinstance(cert_chain, str):
            raise TypeError("Expected argument 'cert_chain' to be a str")
        pulumi.set(__self__, "cert_chain", cert_chain)
        if certificate and not isinstance(certificate, str):
            raise TypeError("Expected argument 'certificate' to be a str")
        pulumi.set(__self__, "certificate", certificate)
        if cname and not isinstance(cname, str):
            raise TypeError("Expected argument 'cname' to be a str")
        pulumi.set(__self__, "cname", cname)
        if creation_time and not isinstance(creation_time, str):
            raise TypeError("Expected argument 'creation_time' to be a str")
        pulumi.set(__self__, "creation_time", creation_time)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if issued_by and not isinstance(issued_by, str):
            raise TypeError("Expected argument 'issued_by' to be a str")
        pulumi.set(__self__, "issued_by", issued_by)
        if issued_to and not isinstance(issued_to, str):
            raise TypeError("Expected argument 'issued_to' to be a str")
        pulumi.set(__self__, "issued_to", issued_to)
        if microtenant_id and not isinstance(microtenant_id, str):
            raise TypeError("Expected argument 'microtenant_id' to be a str")
        pulumi.set(__self__, "microtenant_id", microtenant_id)
        if modified_time and not isinstance(modified_time, str):
            raise TypeError("Expected argument 'modified_time' to be a str")
        pulumi.set(__self__, "modified_time", modified_time)
        if modifiedby and not isinstance(modifiedby, str):
            raise TypeError("Expected argument 'modifiedby' to be a str")
        pulumi.set(__self__, "modifiedby", modifiedby)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if public_key and not isinstance(public_key, str):
            raise TypeError("Expected argument 'public_key' to be a str")
        pulumi.set(__self__, "public_key", public_key)
        if sans and not isinstance(sans, list):
            raise TypeError("Expected argument 'sans' to be a list")
        pulumi.set(__self__, "sans", sans)
        if serial_no and not isinstance(serial_no, str):
            raise TypeError("Expected argument 'serial_no' to be a str")
        pulumi.set(__self__, "serial_no", serial_no)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if valid_from_in_epochsec and not isinstance(valid_from_in_epochsec, str):
            raise TypeError("Expected argument 'valid_from_in_epochsec' to be a str")
        pulumi.set(__self__, "valid_from_in_epochsec", valid_from_in_epochsec)
        if valid_to_in_epochsec and not isinstance(valid_to_in_epochsec, str):
            raise TypeError("Expected argument 'valid_to_in_epochsec' to be a str")
        pulumi.set(__self__, "valid_to_in_epochsec", valid_to_in_epochsec)

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

    @property
    @pulumi.getter
    def certificate(self) -> str:
        """
        (string) The certificate text is in PEM format.
        """
        return pulumi.get(self, "certificate")

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

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

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

    @property
    @pulumi.getter
    def id(self) -> Optional[str]:
        return pulumi.get(self, "id")

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

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

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

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

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

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

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

    @property
    @pulumi.getter
    def sans(self) -> Sequence[str]:
        """
        (string)
        """
        return pulumi.get(self, "sans")

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

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

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

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


class AwaitableGetBaCertificateResult(GetBaCertificateResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetBaCertificateResult(
            cert_chain=self.cert_chain,
            certificate=self.certificate,
            cname=self.cname,
            creation_time=self.creation_time,
            description=self.description,
            id=self.id,
            issued_by=self.issued_by,
            issued_to=self.issued_to,
            microtenant_id=self.microtenant_id,
            modified_time=self.modified_time,
            modifiedby=self.modifiedby,
            name=self.name,
            public_key=self.public_key,
            sans=self.sans,
            serial_no=self.serial_no,
            status=self.status,
            valid_from_in_epochsec=self.valid_from_in_epochsec,
            valid_to_in_epochsec=self.valid_to_in_epochsec)


def get_ba_certificate(id: Optional[str] = None,
                       name: Optional[str] = None,
                       opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetBaCertificateResult:
    """
    Use the **zpa_ba_certificate** data source to get information about a browser access certificate created in the Zscaler Private Access cloud. This data source is required when creating a browser access application segment resource.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_zpa as zpa

    foo = zpa.get_ba_certificate(name="example.acme.com")
    ```

    ```python
    import pulumi
    import pulumi_zpa as zpa

    foo = zpa.get_ba_certificate(id="1234567890")
    ```


    :param str id: The id of the browser access certificate to be exported.
    :param str name: The name of the browser access certificate to be exported.
    """
    __args__ = dict()
    __args__['id'] = id
    __args__['name'] = name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('zpa:index/getBaCertificate:getBaCertificate', __args__, opts=opts, typ=GetBaCertificateResult).value

    return AwaitableGetBaCertificateResult(
        cert_chain=pulumi.get(__ret__, 'cert_chain'),
        certificate=pulumi.get(__ret__, 'certificate'),
        cname=pulumi.get(__ret__, 'cname'),
        creation_time=pulumi.get(__ret__, 'creation_time'),
        description=pulumi.get(__ret__, 'description'),
        id=pulumi.get(__ret__, 'id'),
        issued_by=pulumi.get(__ret__, 'issued_by'),
        issued_to=pulumi.get(__ret__, 'issued_to'),
        microtenant_id=pulumi.get(__ret__, 'microtenant_id'),
        modified_time=pulumi.get(__ret__, 'modified_time'),
        modifiedby=pulumi.get(__ret__, 'modifiedby'),
        name=pulumi.get(__ret__, 'name'),
        public_key=pulumi.get(__ret__, 'public_key'),
        sans=pulumi.get(__ret__, 'sans'),
        serial_no=pulumi.get(__ret__, 'serial_no'),
        status=pulumi.get(__ret__, 'status'),
        valid_from_in_epochsec=pulumi.get(__ret__, 'valid_from_in_epochsec'),
        valid_to_in_epochsec=pulumi.get(__ret__, 'valid_to_in_epochsec'))


@_utilities.lift_output_func(get_ba_certificate)
def get_ba_certificate_output(id: Optional[pulumi.Input[Optional[str]]] = None,
                              name: Optional[pulumi.Input[Optional[str]]] = None,
                              opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetBaCertificateResult]:
    """
    Use the **zpa_ba_certificate** data source to get information about a browser access certificate created in the Zscaler Private Access cloud. This data source is required when creating a browser access application segment resource.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_zpa as zpa

    foo = zpa.get_ba_certificate(name="example.acme.com")
    ```

    ```python
    import pulumi
    import pulumi_zpa as zpa

    foo = zpa.get_ba_certificate(id="1234567890")
    ```


    :param str id: The id of the browser access certificate to be exported.
    :param str name: The name of the browser access certificate to be exported.
    """
    ...
