# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
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__ = ['RecordArgs', 'Record']

@pulumi.input_type
class RecordArgs:
    def __init__(__self__, *,
                 type: pulumi.Input[_builtins.str],
                 value: pulumi.Input[_builtins.str],
                 enabled: Optional[pulumi.Input[_builtins.bool]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 port: Optional[pulumi.Input[_builtins.int]] = None,
                 priority: Optional[pulumi.Input[_builtins.int]] = None,
                 site: Optional[pulumi.Input[_builtins.str]] = None,
                 ttl: Optional[pulumi.Input[_builtins.int]] = None,
                 weight: Optional[pulumi.Input[_builtins.int]] = None):
        """
        The set of arguments for constructing a Record resource.
        :param pulumi.Input[_builtins.str] type: The type of DNS record. Valid values are:
                 * `A` - Maps a hostname to IPv4 address
                 * `AAAA` - Maps a hostname to IPv6 address
                 * `CNAME` - Creates an alias for another domain name
                 * `MX` - Specifies mail servers for the domain
                 * `NS` - Delegates a subdomain to a set of name servers
                 * `PTR` - Creates a pointer to a canonical name (reverse DNS)
                 * `SOA` - Specifies authoritative information about the domain
                 * `SRV` - Specifies location of services (hostname and port)
                 * `TXT` - Holds descriptive text
        :param pulumi.Input[_builtins.str] value: The content of the DNS record. The expected value depends on the record type:
                 * For A records: IPv4 address (e.g., '192.168.1.10')
                 * For AAAA records: IPv6 address
                 * For CNAME records: Canonical name (e.g., 'server1.example.com')
                 * For MX records: Mail server hostname
                 * For TXT records: Text content (e.g., 'v=spf1 include:_spf.example.com ~all')
        :param pulumi.Input[_builtins.bool] enabled: Whether the DNS record is active. Defaults to true. Set to false to temporarily disable resolution without removing the record.
        :param pulumi.Input[_builtins.str] name: DNS record name.
        :param pulumi.Input[_builtins.int] port: The port number for SRV records. Valid values are between 1 and 65535. Only used with SRV records.
        :param pulumi.Input[_builtins.int] priority: Priority value for MX and SRV records. Lower values indicate higher priority. Required for MX and SRV records, ignored for other types.
        :param pulumi.Input[_builtins.str] site: The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
        :param pulumi.Input[_builtins.int] ttl: Time To Live (TTL) in seconds, determines how long DNS resolvers should cache this record. Set to 0 for automatic TTL. Common values: 300 (5 minutes), 3600 (1 hour), 86400 (1 day).
        :param pulumi.Input[_builtins.int] weight: A relative weight for SRV records with the same priority. Higher values get proportionally more traffic. Only used with SRV records.
        """
        pulumi.set(__self__, "type", type)
        pulumi.set(__self__, "value", value)
        if enabled is not None:
            pulumi.set(__self__, "enabled", enabled)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if port is not None:
            pulumi.set(__self__, "port", port)
        if priority is not None:
            pulumi.set(__self__, "priority", priority)
        if site is not None:
            pulumi.set(__self__, "site", site)
        if ttl is not None:
            pulumi.set(__self__, "ttl", ttl)
        if weight is not None:
            pulumi.set(__self__, "weight", weight)

    @_builtins.property
    @pulumi.getter
    def type(self) -> pulumi.Input[_builtins.str]:
        """
        The type of DNS record. Valid values are:
          * `A` - Maps a hostname to IPv4 address
          * `AAAA` - Maps a hostname to IPv6 address
          * `CNAME` - Creates an alias for another domain name
          * `MX` - Specifies mail servers for the domain
          * `NS` - Delegates a subdomain to a set of name servers
          * `PTR` - Creates a pointer to a canonical name (reverse DNS)
          * `SOA` - Specifies authoritative information about the domain
          * `SRV` - Specifies location of services (hostname and port)
          * `TXT` - Holds descriptive text
        """
        return pulumi.get(self, "type")

    @type.setter
    def type(self, value: pulumi.Input[_builtins.str]):
        pulumi.set(self, "type", value)

    @_builtins.property
    @pulumi.getter
    def value(self) -> pulumi.Input[_builtins.str]:
        """
        The content of the DNS record. The expected value depends on the record type:
          * For A records: IPv4 address (e.g., '192.168.1.10')
          * For AAAA records: IPv6 address
          * For CNAME records: Canonical name (e.g., 'server1.example.com')
          * For MX records: Mail server hostname
          * For TXT records: Text content (e.g., 'v=spf1 include:_spf.example.com ~all')
        """
        return pulumi.get(self, "value")

    @value.setter
    def value(self, value: pulumi.Input[_builtins.str]):
        pulumi.set(self, "value", value)

    @_builtins.property
    @pulumi.getter
    def enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Whether the DNS record is active. Defaults to true. Set to false to temporarily disable resolution without removing the record.
        """
        return pulumi.get(self, "enabled")

    @enabled.setter
    def enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
        pulumi.set(self, "enabled", value)

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

    @name.setter
    def name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "name", value)

    @_builtins.property
    @pulumi.getter
    def port(self) -> Optional[pulumi.Input[_builtins.int]]:
        """
        The port number for SRV records. Valid values are between 1 and 65535. Only used with SRV records.
        """
        return pulumi.get(self, "port")

    @port.setter
    def port(self, value: Optional[pulumi.Input[_builtins.int]]):
        pulumi.set(self, "port", value)

    @_builtins.property
    @pulumi.getter
    def priority(self) -> Optional[pulumi.Input[_builtins.int]]:
        """
        Priority value for MX and SRV records. Lower values indicate higher priority. Required for MX and SRV records, ignored for other types.
        """
        return pulumi.get(self, "priority")

    @priority.setter
    def priority(self, value: Optional[pulumi.Input[_builtins.int]]):
        pulumi.set(self, "priority", value)

    @_builtins.property
    @pulumi.getter
    def site(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
        """
        return pulumi.get(self, "site")

    @site.setter
    def site(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "site", value)

    @_builtins.property
    @pulumi.getter
    def ttl(self) -> Optional[pulumi.Input[_builtins.int]]:
        """
        Time To Live (TTL) in seconds, determines how long DNS resolvers should cache this record. Set to 0 for automatic TTL. Common values: 300 (5 minutes), 3600 (1 hour), 86400 (1 day).
        """
        return pulumi.get(self, "ttl")

    @ttl.setter
    def ttl(self, value: Optional[pulumi.Input[_builtins.int]]):
        pulumi.set(self, "ttl", value)

    @_builtins.property
    @pulumi.getter
    def weight(self) -> Optional[pulumi.Input[_builtins.int]]:
        """
        A relative weight for SRV records with the same priority. Higher values get proportionally more traffic. Only used with SRV records.
        """
        return pulumi.get(self, "weight")

    @weight.setter
    def weight(self, value: Optional[pulumi.Input[_builtins.int]]):
        pulumi.set(self, "weight", value)


@pulumi.input_type
class _RecordState:
    def __init__(__self__, *,
                 enabled: Optional[pulumi.Input[_builtins.bool]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 port: Optional[pulumi.Input[_builtins.int]] = None,
                 priority: Optional[pulumi.Input[_builtins.int]] = None,
                 site: Optional[pulumi.Input[_builtins.str]] = None,
                 ttl: Optional[pulumi.Input[_builtins.int]] = None,
                 type: Optional[pulumi.Input[_builtins.str]] = None,
                 value: Optional[pulumi.Input[_builtins.str]] = None,
                 weight: Optional[pulumi.Input[_builtins.int]] = None):
        """
        Input properties used for looking up and filtering Record resources.
        :param pulumi.Input[_builtins.bool] enabled: Whether the DNS record is active. Defaults to true. Set to false to temporarily disable resolution without removing the record.
        :param pulumi.Input[_builtins.str] name: DNS record name.
        :param pulumi.Input[_builtins.int] port: The port number for SRV records. Valid values are between 1 and 65535. Only used with SRV records.
        :param pulumi.Input[_builtins.int] priority: Priority value for MX and SRV records. Lower values indicate higher priority. Required for MX and SRV records, ignored for other types.
        :param pulumi.Input[_builtins.str] site: The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
        :param pulumi.Input[_builtins.int] ttl: Time To Live (TTL) in seconds, determines how long DNS resolvers should cache this record. Set to 0 for automatic TTL. Common values: 300 (5 minutes), 3600 (1 hour), 86400 (1 day).
        :param pulumi.Input[_builtins.str] type: The type of DNS record. Valid values are:
                 * `A` - Maps a hostname to IPv4 address
                 * `AAAA` - Maps a hostname to IPv6 address
                 * `CNAME` - Creates an alias for another domain name
                 * `MX` - Specifies mail servers for the domain
                 * `NS` - Delegates a subdomain to a set of name servers
                 * `PTR` - Creates a pointer to a canonical name (reverse DNS)
                 * `SOA` - Specifies authoritative information about the domain
                 * `SRV` - Specifies location of services (hostname and port)
                 * `TXT` - Holds descriptive text
        :param pulumi.Input[_builtins.str] value: The content of the DNS record. The expected value depends on the record type:
                 * For A records: IPv4 address (e.g., '192.168.1.10')
                 * For AAAA records: IPv6 address
                 * For CNAME records: Canonical name (e.g., 'server1.example.com')
                 * For MX records: Mail server hostname
                 * For TXT records: Text content (e.g., 'v=spf1 include:_spf.example.com ~all')
        :param pulumi.Input[_builtins.int] weight: A relative weight for SRV records with the same priority. Higher values get proportionally more traffic. Only used with SRV records.
        """
        if enabled is not None:
            pulumi.set(__self__, "enabled", enabled)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if port is not None:
            pulumi.set(__self__, "port", port)
        if priority is not None:
            pulumi.set(__self__, "priority", priority)
        if site is not None:
            pulumi.set(__self__, "site", site)
        if ttl is not None:
            pulumi.set(__self__, "ttl", ttl)
        if type is not None:
            pulumi.set(__self__, "type", type)
        if value is not None:
            pulumi.set(__self__, "value", value)
        if weight is not None:
            pulumi.set(__self__, "weight", weight)

    @_builtins.property
    @pulumi.getter
    def enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Whether the DNS record is active. Defaults to true. Set to false to temporarily disable resolution without removing the record.
        """
        return pulumi.get(self, "enabled")

    @enabled.setter
    def enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
        pulumi.set(self, "enabled", value)

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

    @name.setter
    def name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "name", value)

    @_builtins.property
    @pulumi.getter
    def port(self) -> Optional[pulumi.Input[_builtins.int]]:
        """
        The port number for SRV records. Valid values are between 1 and 65535. Only used with SRV records.
        """
        return pulumi.get(self, "port")

    @port.setter
    def port(self, value: Optional[pulumi.Input[_builtins.int]]):
        pulumi.set(self, "port", value)

    @_builtins.property
    @pulumi.getter
    def priority(self) -> Optional[pulumi.Input[_builtins.int]]:
        """
        Priority value for MX and SRV records. Lower values indicate higher priority. Required for MX and SRV records, ignored for other types.
        """
        return pulumi.get(self, "priority")

    @priority.setter
    def priority(self, value: Optional[pulumi.Input[_builtins.int]]):
        pulumi.set(self, "priority", value)

    @_builtins.property
    @pulumi.getter
    def site(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
        """
        return pulumi.get(self, "site")

    @site.setter
    def site(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "site", value)

    @_builtins.property
    @pulumi.getter
    def ttl(self) -> Optional[pulumi.Input[_builtins.int]]:
        """
        Time To Live (TTL) in seconds, determines how long DNS resolvers should cache this record. Set to 0 for automatic TTL. Common values: 300 (5 minutes), 3600 (1 hour), 86400 (1 day).
        """
        return pulumi.get(self, "ttl")

    @ttl.setter
    def ttl(self, value: Optional[pulumi.Input[_builtins.int]]):
        pulumi.set(self, "ttl", value)

    @_builtins.property
    @pulumi.getter
    def type(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The type of DNS record. Valid values are:
          * `A` - Maps a hostname to IPv4 address
          * `AAAA` - Maps a hostname to IPv6 address
          * `CNAME` - Creates an alias for another domain name
          * `MX` - Specifies mail servers for the domain
          * `NS` - Delegates a subdomain to a set of name servers
          * `PTR` - Creates a pointer to a canonical name (reverse DNS)
          * `SOA` - Specifies authoritative information about the domain
          * `SRV` - Specifies location of services (hostname and port)
          * `TXT` - Holds descriptive text
        """
        return pulumi.get(self, "type")

    @type.setter
    def type(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "type", value)

    @_builtins.property
    @pulumi.getter
    def value(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The content of the DNS record. The expected value depends on the record type:
          * For A records: IPv4 address (e.g., '192.168.1.10')
          * For AAAA records: IPv6 address
          * For CNAME records: Canonical name (e.g., 'server1.example.com')
          * For MX records: Mail server hostname
          * For TXT records: Text content (e.g., 'v=spf1 include:_spf.example.com ~all')
        """
        return pulumi.get(self, "value")

    @value.setter
    def value(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "value", value)

    @_builtins.property
    @pulumi.getter
    def weight(self) -> Optional[pulumi.Input[_builtins.int]]:
        """
        A relative weight for SRV records with the same priority. Higher values get proportionally more traffic. Only used with SRV records.
        """
        return pulumi.get(self, "weight")

    @weight.setter
    def weight(self, value: Optional[pulumi.Input[_builtins.int]]):
        pulumi.set(self, "weight", value)


@pulumi.type_token("unifi:dns/record:Record")
class Record(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 enabled: Optional[pulumi.Input[_builtins.bool]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 port: Optional[pulumi.Input[_builtins.int]] = None,
                 priority: Optional[pulumi.Input[_builtins.int]] = None,
                 site: Optional[pulumi.Input[_builtins.str]] = None,
                 ttl: Optional[pulumi.Input[_builtins.int]] = None,
                 type: Optional[pulumi.Input[_builtins.str]] = None,
                 value: Optional[pulumi.Input[_builtins.str]] = None,
                 weight: Optional[pulumi.Input[_builtins.int]] = None,
                 __props__=None):
        """
        The `dns.Record` resource manages DNS records in the UniFi controller's DNS server.

        This resource allows you to configure various types of DNS records for local name resolution. Common use cases include:
          * Creating A records for local servers and devices
          * Setting up CNAME aliases for internal services
          * Configuring MX records for local mail servers
          * Adding TXT records for service verification

        ## Example Usage

        ```python
        import pulumi
        import pulumiverse_unifi as unifi

        a_record = unifi.dns.Record("a_record",
            name="example.mydomain.com",
            type="A",
            value="192.168.1.190")
        cname_record = unifi.dns.Record("cname_record",
            name="example.mydomain.com",
            type="CNAME",
            value="example.com")
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.bool] enabled: Whether the DNS record is active. Defaults to true. Set to false to temporarily disable resolution without removing the record.
        :param pulumi.Input[_builtins.str] name: DNS record name.
        :param pulumi.Input[_builtins.int] port: The port number for SRV records. Valid values are between 1 and 65535. Only used with SRV records.
        :param pulumi.Input[_builtins.int] priority: Priority value for MX and SRV records. Lower values indicate higher priority. Required for MX and SRV records, ignored for other types.
        :param pulumi.Input[_builtins.str] site: The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
        :param pulumi.Input[_builtins.int] ttl: Time To Live (TTL) in seconds, determines how long DNS resolvers should cache this record. Set to 0 for automatic TTL. Common values: 300 (5 minutes), 3600 (1 hour), 86400 (1 day).
        :param pulumi.Input[_builtins.str] type: The type of DNS record. Valid values are:
                 * `A` - Maps a hostname to IPv4 address
                 * `AAAA` - Maps a hostname to IPv6 address
                 * `CNAME` - Creates an alias for another domain name
                 * `MX` - Specifies mail servers for the domain
                 * `NS` - Delegates a subdomain to a set of name servers
                 * `PTR` - Creates a pointer to a canonical name (reverse DNS)
                 * `SOA` - Specifies authoritative information about the domain
                 * `SRV` - Specifies location of services (hostname and port)
                 * `TXT` - Holds descriptive text
        :param pulumi.Input[_builtins.str] value: The content of the DNS record. The expected value depends on the record type:
                 * For A records: IPv4 address (e.g., '192.168.1.10')
                 * For AAAA records: IPv6 address
                 * For CNAME records: Canonical name (e.g., 'server1.example.com')
                 * For MX records: Mail server hostname
                 * For TXT records: Text content (e.g., 'v=spf1 include:_spf.example.com ~all')
        :param pulumi.Input[_builtins.int] weight: A relative weight for SRV records with the same priority. Higher values get proportionally more traffic. Only used with SRV records.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: RecordArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        The `dns.Record` resource manages DNS records in the UniFi controller's DNS server.

        This resource allows you to configure various types of DNS records for local name resolution. Common use cases include:
          * Creating A records for local servers and devices
          * Setting up CNAME aliases for internal services
          * Configuring MX records for local mail servers
          * Adding TXT records for service verification

        ## Example Usage

        ```python
        import pulumi
        import pulumiverse_unifi as unifi

        a_record = unifi.dns.Record("a_record",
            name="example.mydomain.com",
            type="A",
            value="192.168.1.190")
        cname_record = unifi.dns.Record("cname_record",
            name="example.mydomain.com",
            type="CNAME",
            value="example.com")
        ```

        :param str resource_name: The name of the resource.
        :param RecordArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(RecordArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 enabled: Optional[pulumi.Input[_builtins.bool]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 port: Optional[pulumi.Input[_builtins.int]] = None,
                 priority: Optional[pulumi.Input[_builtins.int]] = None,
                 site: Optional[pulumi.Input[_builtins.str]] = None,
                 ttl: Optional[pulumi.Input[_builtins.int]] = None,
                 type: Optional[pulumi.Input[_builtins.str]] = None,
                 value: Optional[pulumi.Input[_builtins.str]] = None,
                 weight: Optional[pulumi.Input[_builtins.int]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = RecordArgs.__new__(RecordArgs)

            __props__.__dict__["enabled"] = enabled
            __props__.__dict__["name"] = name
            __props__.__dict__["port"] = port
            __props__.__dict__["priority"] = priority
            __props__.__dict__["site"] = site
            __props__.__dict__["ttl"] = ttl
            if type is None and not opts.urn:
                raise TypeError("Missing required property 'type'")
            __props__.__dict__["type"] = type
            if value is None and not opts.urn:
                raise TypeError("Missing required property 'value'")
            __props__.__dict__["value"] = value
            __props__.__dict__["weight"] = weight
        super(Record, __self__).__init__(
            'unifi:dns/record:Record',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            enabled: Optional[pulumi.Input[_builtins.bool]] = None,
            name: Optional[pulumi.Input[_builtins.str]] = None,
            port: Optional[pulumi.Input[_builtins.int]] = None,
            priority: Optional[pulumi.Input[_builtins.int]] = None,
            site: Optional[pulumi.Input[_builtins.str]] = None,
            ttl: Optional[pulumi.Input[_builtins.int]] = None,
            type: Optional[pulumi.Input[_builtins.str]] = None,
            value: Optional[pulumi.Input[_builtins.str]] = None,
            weight: Optional[pulumi.Input[_builtins.int]] = None) -> 'Record':
        """
        Get an existing Record resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.bool] enabled: Whether the DNS record is active. Defaults to true. Set to false to temporarily disable resolution without removing the record.
        :param pulumi.Input[_builtins.str] name: DNS record name.
        :param pulumi.Input[_builtins.int] port: The port number for SRV records. Valid values are between 1 and 65535. Only used with SRV records.
        :param pulumi.Input[_builtins.int] priority: Priority value for MX and SRV records. Lower values indicate higher priority. Required for MX and SRV records, ignored for other types.
        :param pulumi.Input[_builtins.str] site: The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
        :param pulumi.Input[_builtins.int] ttl: Time To Live (TTL) in seconds, determines how long DNS resolvers should cache this record. Set to 0 for automatic TTL. Common values: 300 (5 minutes), 3600 (1 hour), 86400 (1 day).
        :param pulumi.Input[_builtins.str] type: The type of DNS record. Valid values are:
                 * `A` - Maps a hostname to IPv4 address
                 * `AAAA` - Maps a hostname to IPv6 address
                 * `CNAME` - Creates an alias for another domain name
                 * `MX` - Specifies mail servers for the domain
                 * `NS` - Delegates a subdomain to a set of name servers
                 * `PTR` - Creates a pointer to a canonical name (reverse DNS)
                 * `SOA` - Specifies authoritative information about the domain
                 * `SRV` - Specifies location of services (hostname and port)
                 * `TXT` - Holds descriptive text
        :param pulumi.Input[_builtins.str] value: The content of the DNS record. The expected value depends on the record type:
                 * For A records: IPv4 address (e.g., '192.168.1.10')
                 * For AAAA records: IPv6 address
                 * For CNAME records: Canonical name (e.g., 'server1.example.com')
                 * For MX records: Mail server hostname
                 * For TXT records: Text content (e.g., 'v=spf1 include:_spf.example.com ~all')
        :param pulumi.Input[_builtins.int] weight: A relative weight for SRV records with the same priority. Higher values get proportionally more traffic. Only used with SRV records.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _RecordState.__new__(_RecordState)

        __props__.__dict__["enabled"] = enabled
        __props__.__dict__["name"] = name
        __props__.__dict__["port"] = port
        __props__.__dict__["priority"] = priority
        __props__.__dict__["site"] = site
        __props__.__dict__["ttl"] = ttl
        __props__.__dict__["type"] = type
        __props__.__dict__["value"] = value
        __props__.__dict__["weight"] = weight
        return Record(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter
    def enabled(self) -> pulumi.Output[_builtins.bool]:
        """
        Whether the DNS record is active. Defaults to true. Set to false to temporarily disable resolution without removing the record.
        """
        return pulumi.get(self, "enabled")

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

    @_builtins.property
    @pulumi.getter
    def port(self) -> pulumi.Output[_builtins.int]:
        """
        The port number for SRV records. Valid values are between 1 and 65535. Only used with SRV records.
        """
        return pulumi.get(self, "port")

    @_builtins.property
    @pulumi.getter
    def priority(self) -> pulumi.Output[_builtins.int]:
        """
        Priority value for MX and SRV records. Lower values indicate higher priority. Required for MX and SRV records, ignored for other types.
        """
        return pulumi.get(self, "priority")

    @_builtins.property
    @pulumi.getter
    def site(self) -> pulumi.Output[_builtins.str]:
        """
        The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
        """
        return pulumi.get(self, "site")

    @_builtins.property
    @pulumi.getter
    def ttl(self) -> pulumi.Output[_builtins.int]:
        """
        Time To Live (TTL) in seconds, determines how long DNS resolvers should cache this record. Set to 0 for automatic TTL. Common values: 300 (5 minutes), 3600 (1 hour), 86400 (1 day).
        """
        return pulumi.get(self, "ttl")

    @_builtins.property
    @pulumi.getter
    def type(self) -> pulumi.Output[_builtins.str]:
        """
        The type of DNS record. Valid values are:
          * `A` - Maps a hostname to IPv4 address
          * `AAAA` - Maps a hostname to IPv6 address
          * `CNAME` - Creates an alias for another domain name
          * `MX` - Specifies mail servers for the domain
          * `NS` - Delegates a subdomain to a set of name servers
          * `PTR` - Creates a pointer to a canonical name (reverse DNS)
          * `SOA` - Specifies authoritative information about the domain
          * `SRV` - Specifies location of services (hostname and port)
          * `TXT` - Holds descriptive text
        """
        return pulumi.get(self, "type")

    @_builtins.property
    @pulumi.getter
    def value(self) -> pulumi.Output[_builtins.str]:
        """
        The content of the DNS record. The expected value depends on the record type:
          * For A records: IPv4 address (e.g., '192.168.1.10')
          * For AAAA records: IPv6 address
          * For CNAME records: Canonical name (e.g., 'server1.example.com')
          * For MX records: Mail server hostname
          * For TXT records: Text content (e.g., 'v=spf1 include:_spf.example.com ~all')
        """
        return pulumi.get(self, "value")

    @_builtins.property
    @pulumi.getter
    def weight(self) -> pulumi.Output[_builtins.int]:
        """
        A relative weight for SRV records with the same priority. Higher values get proportionally more traffic. Only used with SRV records.
        """
        return pulumi.get(self, "weight")

