# 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 json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from . import utilities, tables

class GetCertificateResult:
    """
    A collection of values returned by getCertificate.
    """
    def __init__(__self__, domains=None, id=None, name=None, not_after=None, sha1_fingerprint=None, state=None, type=None):
        if domains and not isinstance(domains, list):
            raise TypeError("Expected argument 'domains' to be a list")
        __self__.domains = domains
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        __self__.id = id
        """
        id is the provider-assigned unique ID for this managed resource.
        """
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        __self__.name = name
        if not_after and not isinstance(not_after, str):
            raise TypeError("Expected argument 'not_after' to be a str")
        __self__.not_after = not_after
        if sha1_fingerprint and not isinstance(sha1_fingerprint, str):
            raise TypeError("Expected argument 'sha1_fingerprint' to be a str")
        __self__.sha1_fingerprint = sha1_fingerprint
        if state and not isinstance(state, str):
            raise TypeError("Expected argument 'state' to be a str")
        __self__.state = state
        if type and not isinstance(type, str):
            raise TypeError("Expected argument 'type' to be a str")
        __self__.type = type
class AwaitableGetCertificateResult(GetCertificateResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetCertificateResult(
            domains=self.domains,
            id=self.id,
            name=self.name,
            not_after=self.not_after,
            sha1_fingerprint=self.sha1_fingerprint,
            state=self.state,
            type=self.type)

def get_certificate(name=None,opts=None):
    """
    Use this data source to access information about an existing resource.

    :param str name: The name of certificate.
    """
    __args__ = dict()


    __args__['name'] = name
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = utilities.get_version()
    __ret__ = pulumi.runtime.invoke('digitalocean:index/getCertificate:getCertificate', __args__, opts=opts).value

    return AwaitableGetCertificateResult(
        domains=__ret__.get('domains'),
        id=__ret__.get('id'),
        name=__ret__.get('name'),
        not_after=__ret__.get('notAfter'),
        sha1_fingerprint=__ret__.get('sha1Fingerprint'),
        state=__ret__.get('state'),
        type=__ret__.get('type'))
