# 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
from . import outputs

__all__ = [
    'GetRegistrationResult',
    'AwaitableGetRegistrationResult',
    'get_registration',
    'get_registration_output',
]

@pulumi.output_type
class GetRegistrationResult:
    """
    A collection of values returned by getRegistration.
    """
    def __init__(__self__, administrative_contacts=None, auto_renew=None, dnssec=None, domain_name=None, domain_names=None, ds_records=None, duration_in_years=None, id=None, owner_contact_id=None, owner_contacts=None, project_id=None, task_id=None, technical_contacts=None):
        if administrative_contacts and not isinstance(administrative_contacts, list):
            raise TypeError("Expected argument 'administrative_contacts' to be a list")
        pulumi.set(__self__, "administrative_contacts", administrative_contacts)
        if auto_renew and not isinstance(auto_renew, bool):
            raise TypeError("Expected argument 'auto_renew' to be a bool")
        pulumi.set(__self__, "auto_renew", auto_renew)
        if dnssec and not isinstance(dnssec, bool):
            raise TypeError("Expected argument 'dnssec' to be a bool")
        pulumi.set(__self__, "dnssec", dnssec)
        if domain_name and not isinstance(domain_name, str):
            raise TypeError("Expected argument 'domain_name' to be a str")
        pulumi.set(__self__, "domain_name", domain_name)
        if domain_names and not isinstance(domain_names, list):
            raise TypeError("Expected argument 'domain_names' to be a list")
        pulumi.set(__self__, "domain_names", domain_names)
        if ds_records and not isinstance(ds_records, list):
            raise TypeError("Expected argument 'ds_records' to be a list")
        pulumi.set(__self__, "ds_records", ds_records)
        if duration_in_years and not isinstance(duration_in_years, int):
            raise TypeError("Expected argument 'duration_in_years' to be a int")
        pulumi.set(__self__, "duration_in_years", duration_in_years)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if owner_contact_id and not isinstance(owner_contact_id, str):
            raise TypeError("Expected argument 'owner_contact_id' to be a str")
        pulumi.set(__self__, "owner_contact_id", owner_contact_id)
        if owner_contacts and not isinstance(owner_contacts, list):
            raise TypeError("Expected argument 'owner_contacts' to be a list")
        pulumi.set(__self__, "owner_contacts", owner_contacts)
        if project_id and not isinstance(project_id, str):
            raise TypeError("Expected argument 'project_id' to be a str")
        pulumi.set(__self__, "project_id", project_id)
        if task_id and not isinstance(task_id, str):
            raise TypeError("Expected argument 'task_id' to be a str")
        pulumi.set(__self__, "task_id", task_id)
        if technical_contacts and not isinstance(technical_contacts, list):
            raise TypeError("Expected argument 'technical_contacts' to be a list")
        pulumi.set(__self__, "technical_contacts", technical_contacts)

    @_builtins.property
    @pulumi.getter(name="administrativeContacts")
    def administrative_contacts(self) -> Sequence['outputs.GetRegistrationAdministrativeContactResult']:
        """
        Administrative contact details.
        """
        return pulumi.get(self, "administrative_contacts")

    @_builtins.property
    @pulumi.getter(name="autoRenew")
    def auto_renew(self) -> _builtins.bool:
        """
        Whether auto-renewal is enabled.
        """
        return pulumi.get(self, "auto_renew")

    @_builtins.property
    @pulumi.getter
    def dnssec(self) -> _builtins.bool:
        """
        Whether DNSSEC is enabled.
        """
        return pulumi.get(self, "dnssec")

    @_builtins.property
    @pulumi.getter(name="domainName")
    def domain_name(self) -> _builtins.str:
        return pulumi.get(self, "domain_name")

    @_builtins.property
    @pulumi.getter(name="domainNames")
    def domain_names(self) -> Sequence[_builtins.str]:
        """
        List of domain names in the registration.
        """
        return pulumi.get(self, "domain_names")

    @_builtins.property
    @pulumi.getter(name="dsRecords")
    def ds_records(self) -> Sequence['outputs.GetRegistrationDsRecordResult']:
        """
        DNSSEC DS record configuration.
        """
        return pulumi.get(self, "ds_records")

    @_builtins.property
    @pulumi.getter(name="durationInYears")
    def duration_in_years(self) -> _builtins.int:
        return pulumi.get(self, "duration_in_years")

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter(name="ownerContactId")
    def owner_contact_id(self) -> _builtins.str:
        """
        ID of the owner contact.
        """
        return pulumi.get(self, "owner_contact_id")

    @_builtins.property
    @pulumi.getter(name="ownerContacts")
    def owner_contacts(self) -> Sequence['outputs.GetRegistrationOwnerContactResult']:
        """
        Owner contact details (when lastname is API-compatible).
        """
        return pulumi.get(self, "owner_contacts")

    @_builtins.property
    @pulumi.getter(name="projectId")
    def project_id(self) -> Optional[_builtins.str]:
        """
        The project ID of the domain registration.
        """
        return pulumi.get(self, "project_id")

    @_builtins.property
    @pulumi.getter(name="taskId")
    def task_id(self) -> _builtins.str:
        """
        The task ID of the domain registration.
        """
        return pulumi.get(self, "task_id")

    @_builtins.property
    @pulumi.getter(name="technicalContacts")
    def technical_contacts(self) -> Sequence['outputs.GetRegistrationTechnicalContactResult']:
        """
        Technical contact details.
        """
        return pulumi.get(self, "technical_contacts")


class AwaitableGetRegistrationResult(GetRegistrationResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetRegistrationResult(
            administrative_contacts=self.administrative_contacts,
            auto_renew=self.auto_renew,
            dnssec=self.dnssec,
            domain_name=self.domain_name,
            domain_names=self.domain_names,
            ds_records=self.ds_records,
            duration_in_years=self.duration_in_years,
            id=self.id,
            owner_contact_id=self.owner_contact_id,
            owner_contacts=self.owner_contacts,
            project_id=self.project_id,
            task_id=self.task_id,
            technical_contacts=self.technical_contacts)


def get_registration(domain_name: Optional[_builtins.str] = None,
                     project_id: Optional[_builtins.str] = None,
                     opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRegistrationResult:
    """
    ## Example Usage

    ### Get task_id for import

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    example = scaleway.domain.get_registration(domain_name="example.com")
    pulumi.export("importCommand", f"terraform import scaleway_domain_registration.example {example.project_id}/{example.task_id}")
    ```

    ### With project_id filter

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    example = scaleway.domain.get_registration(domain_name="example.com",
        project_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
    ```


    :param _builtins.str domain_name: The domain name to look up (e.g. example.com).
    :param _builtins.str project_id: The project ID to filter by. Defaults to the project ID in the provider configuration.
    """
    __args__ = dict()
    __args__['domainName'] = domain_name
    __args__['projectId'] = project_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('scaleway:domain/getRegistration:getRegistration', __args__, opts=opts, typ=GetRegistrationResult).value

    return AwaitableGetRegistrationResult(
        administrative_contacts=pulumi.get(__ret__, 'administrative_contacts'),
        auto_renew=pulumi.get(__ret__, 'auto_renew'),
        dnssec=pulumi.get(__ret__, 'dnssec'),
        domain_name=pulumi.get(__ret__, 'domain_name'),
        domain_names=pulumi.get(__ret__, 'domain_names'),
        ds_records=pulumi.get(__ret__, 'ds_records'),
        duration_in_years=pulumi.get(__ret__, 'duration_in_years'),
        id=pulumi.get(__ret__, 'id'),
        owner_contact_id=pulumi.get(__ret__, 'owner_contact_id'),
        owner_contacts=pulumi.get(__ret__, 'owner_contacts'),
        project_id=pulumi.get(__ret__, 'project_id'),
        task_id=pulumi.get(__ret__, 'task_id'),
        technical_contacts=pulumi.get(__ret__, 'technical_contacts'))
def get_registration_output(domain_name: Optional[pulumi.Input[_builtins.str]] = None,
                            project_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                            opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetRegistrationResult]:
    """
    ## Example Usage

    ### Get task_id for import

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    example = scaleway.domain.get_registration(domain_name="example.com")
    pulumi.export("importCommand", f"terraform import scaleway_domain_registration.example {example.project_id}/{example.task_id}")
    ```

    ### With project_id filter

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    example = scaleway.domain.get_registration(domain_name="example.com",
        project_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
    ```


    :param _builtins.str domain_name: The domain name to look up (e.g. example.com).
    :param _builtins.str project_id: The project ID to filter by. Defaults to the project ID in the provider configuration.
    """
    __args__ = dict()
    __args__['domainName'] = domain_name
    __args__['projectId'] = project_id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('scaleway:domain/getRegistration:getRegistration', __args__, opts=opts, typ=GetRegistrationResult)
    return __ret__.apply(lambda __response__: GetRegistrationResult(
        administrative_contacts=pulumi.get(__response__, 'administrative_contacts'),
        auto_renew=pulumi.get(__response__, 'auto_renew'),
        dnssec=pulumi.get(__response__, 'dnssec'),
        domain_name=pulumi.get(__response__, 'domain_name'),
        domain_names=pulumi.get(__response__, 'domain_names'),
        ds_records=pulumi.get(__response__, 'ds_records'),
        duration_in_years=pulumi.get(__response__, 'duration_in_years'),
        id=pulumi.get(__response__, 'id'),
        owner_contact_id=pulumi.get(__response__, 'owner_contact_id'),
        owner_contacts=pulumi.get(__response__, 'owner_contacts'),
        project_id=pulumi.get(__response__, 'project_id'),
        task_id=pulumi.get(__response__, 'task_id'),
        technical_contacts=pulumi.get(__response__, 'technical_contacts')))
