# 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 GetDomainResult:
    """
    A collection of values returned by getDomain.
    """
    def __init__(__self__, id=None, name=None, ttl=None, urn=None, zone_file=None):
        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 ttl and not isinstance(ttl, float):
            raise TypeError("Expected argument 'ttl' to be a float")
        __self__.ttl = ttl
        if urn and not isinstance(urn, str):
            raise TypeError("Expected argument 'urn' to be a str")
        __self__.urn = urn
        """
        The uniform resource name of the domain
        * `zone_file`: The zone file of the domain.
        """
        if zone_file and not isinstance(zone_file, str):
            raise TypeError("Expected argument 'zone_file' to be a str")
        __self__.zone_file = zone_file
class AwaitableGetDomainResult(GetDomainResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetDomainResult(
            id=self.id,
            name=self.name,
            ttl=self.ttl,
            urn=self.urn,
            zone_file=self.zone_file)

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

    :param str name: The name of the domain.
    """
    __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/getDomain:getDomain', __args__, opts=opts).value

    return AwaitableGetDomainResult(
        id=__ret__.get('id'),
        name=__ret__.get('name'),
        ttl=__ret__.get('ttl'),
        urn=__ret__.get('urn'),
        zone_file=__ret__.get('zoneFile'))
