# 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 builtins
import copy
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from .. import _utilities

__all__ = [
    'GetRecordResult',
    'AwaitableGetRecordResult',
    'get_record',
    'get_record_output',
]

@pulumi.output_type
class GetRecordResult:
    """
    A collection of values returned by getRecord.
    """
    def __init__(__self__, created_at=None, enable=None, host=None, id=None, last_operator=None, line=None, record_id=None, remark=None, ttl=None, type=None, updated_at=None, value=None, weight=None, zid=None):
        if created_at and not isinstance(created_at, str):
            raise TypeError("Expected argument 'created_at' to be a str")
        pulumi.set(__self__, "created_at", created_at)
        if enable and not isinstance(enable, bool):
            raise TypeError("Expected argument 'enable' to be a bool")
        pulumi.set(__self__, "enable", enable)
        if host and not isinstance(host, str):
            raise TypeError("Expected argument 'host' to be a str")
        pulumi.set(__self__, "host", host)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if last_operator and not isinstance(last_operator, str):
            raise TypeError("Expected argument 'last_operator' to be a str")
        pulumi.set(__self__, "last_operator", last_operator)
        if line and not isinstance(line, str):
            raise TypeError("Expected argument 'line' to be a str")
        pulumi.set(__self__, "line", line)
        if record_id and not isinstance(record_id, str):
            raise TypeError("Expected argument 'record_id' to be a str")
        pulumi.set(__self__, "record_id", record_id)
        if remark and not isinstance(remark, str):
            raise TypeError("Expected argument 'remark' to be a str")
        pulumi.set(__self__, "remark", remark)
        if ttl and not isinstance(ttl, int):
            raise TypeError("Expected argument 'ttl' to be a int")
        pulumi.set(__self__, "ttl", ttl)
        if type and not isinstance(type, str):
            raise TypeError("Expected argument 'type' to be a str")
        pulumi.set(__self__, "type", type)
        if updated_at and not isinstance(updated_at, str):
            raise TypeError("Expected argument 'updated_at' to be a str")
        pulumi.set(__self__, "updated_at", updated_at)
        if value and not isinstance(value, str):
            raise TypeError("Expected argument 'value' to be a str")
        pulumi.set(__self__, "value", value)
        if weight and not isinstance(weight, int):
            raise TypeError("Expected argument 'weight' to be a int")
        pulumi.set(__self__, "weight", weight)
        if zid and not isinstance(zid, int):
            raise TypeError("Expected argument 'zid' to be a int")
        pulumi.set(__self__, "zid", zid)

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> builtins.str:
        """
        解析记录的创建时间。
        """
        return pulumi.get(self, "created_at")

    @property
    @pulumi.getter
    def enable(self) -> builtins.bool:
        """
        解析记录是否被启用。
        """
        return pulumi.get(self, "enable")

    @property
    @pulumi.getter
    def host(self) -> builtins.str:
        """
        子域名的域名前缀。
        """
        return pulumi.get(self, "host")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        Uniquely identifies the resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="lastOperator")
    def last_operator(self) -> builtins.str:
        """
        最近一次更新解析记录的账号 ID。
        """
        return pulumi.get(self, "last_operator")

    @property
    @pulumi.getter
    def line(self) -> builtins.str:
        """
        解析记录的线路，只能是默认线路 default。
        """
        return pulumi.get(self, "line")

    @property
    @pulumi.getter(name="recordId")
    def record_id(self) -> builtins.str:
        """
        解析记录 ID。
        """
        return pulumi.get(self, "record_id")

    @property
    @pulumi.getter
    def remark(self) -> builtins.str:
        """
        备注。支持 UTF-8 字符。不能超过 16 个字符。默认值为空字符串。
        """
        return pulumi.get(self, "remark")

    @property
    @pulumi.getter
    def ttl(self) -> builtins.int:
        """
        解析记录的过期时间。单位为秒。默认值为 600。
        """
        return pulumi.get(self, "ttl")

    @property
    @pulumi.getter
    def type(self) -> builtins.str:
        """
        解析记录类型。该参数的取值如下：A：A 记录。AAAA：AAAA 记录。CNAME：CNAME 记录。TXT：TXT 记录。MX：MX 记录。PTR：PTR 记录。A：A 记录。AAAA：AAAA 记录。CNAME：CNAME 记录。TXT：TXT 记录。MX：MX 记录。PTR：PTR 记录。
        """
        return pulumi.get(self, "type")

    @property
    @pulumi.getter(name="updatedAt")
    def updated_at(self) -> builtins.str:
        """
        解析记录最近一次的更新时间。
        """
        return pulumi.get(self, "updated_at")

    @property
    @pulumi.getter
    def value(self) -> builtins.str:
        """
        记录值。
        """
        return pulumi.get(self, "value")

    @property
    @pulumi.getter
    def weight(self) -> builtins.int:
        """
        记录的权重。只有域名开启了负载均衡后，记录值的权重才会生效。
        """
        return pulumi.get(self, "weight")

    @property
    @pulumi.getter
    def zid(self) -> builtins.int:
        """
        域名 ID。
        """
        return pulumi.get(self, "zid")


class AwaitableGetRecordResult(GetRecordResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetRecordResult(
            created_at=self.created_at,
            enable=self.enable,
            host=self.host,
            id=self.id,
            last_operator=self.last_operator,
            line=self.line,
            record_id=self.record_id,
            remark=self.remark,
            ttl=self.ttl,
            type=self.type,
            updated_at=self.updated_at,
            value=self.value,
            weight=self.weight,
            zid=self.zid)


def get_record(id: Optional[builtins.str] = None,
               opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRecordResult:
    """
    Data Source schema for Byteplus::PrivateZone::Record


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('bytepluscc:privatezone/getRecord:getRecord', __args__, opts=opts, typ=GetRecordResult).value

    return AwaitableGetRecordResult(
        created_at=pulumi.get(__ret__, 'created_at'),
        enable=pulumi.get(__ret__, 'enable'),
        host=pulumi.get(__ret__, 'host'),
        id=pulumi.get(__ret__, 'id'),
        last_operator=pulumi.get(__ret__, 'last_operator'),
        line=pulumi.get(__ret__, 'line'),
        record_id=pulumi.get(__ret__, 'record_id'),
        remark=pulumi.get(__ret__, 'remark'),
        ttl=pulumi.get(__ret__, 'ttl'),
        type=pulumi.get(__ret__, 'type'),
        updated_at=pulumi.get(__ret__, 'updated_at'),
        value=pulumi.get(__ret__, 'value'),
        weight=pulumi.get(__ret__, 'weight'),
        zid=pulumi.get(__ret__, 'zid'))
def get_record_output(id: Optional[pulumi.Input[builtins.str]] = None,
                      opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetRecordResult]:
    """
    Data Source schema for Byteplus::PrivateZone::Record


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('bytepluscc:privatezone/getRecord:getRecord', __args__, opts=opts, typ=GetRecordResult)
    return __ret__.apply(lambda __response__: GetRecordResult(
        created_at=pulumi.get(__response__, 'created_at'),
        enable=pulumi.get(__response__, 'enable'),
        host=pulumi.get(__response__, 'host'),
        id=pulumi.get(__response__, 'id'),
        last_operator=pulumi.get(__response__, 'last_operator'),
        line=pulumi.get(__response__, 'line'),
        record_id=pulumi.get(__response__, 'record_id'),
        remark=pulumi.get(__response__, 'remark'),
        ttl=pulumi.get(__response__, 'ttl'),
        type=pulumi.get(__response__, 'type'),
        updated_at=pulumi.get(__response__, 'updated_at'),
        value=pulumi.get(__response__, 'value'),
        weight=pulumi.get(__response__, 'weight'),
        zid=pulumi.get(__response__, 'zid')))
