# 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__ = [
    'GetDnsStageResult',
    'AwaitableGetDnsStageResult',
    'get_dns_stage',
    'get_dns_stage_output',
]

@pulumi.output_type
class GetDnsStageResult:
    """
    A collection of values returned by getDnsStage.
    """
    def __init__(__self__, backend_stage_id=None, cache_stage_id=None, created_at=None, default_fqdn=None, dns_stage_id=None, fqdn=None, fqdns=None, id=None, pipeline_id=None, project_id=None, tls_stage_id=None, type=None, updated_at=None):
        if backend_stage_id and not isinstance(backend_stage_id, str):
            raise TypeError("Expected argument 'backend_stage_id' to be a str")
        pulumi.set(__self__, "backend_stage_id", backend_stage_id)
        if cache_stage_id and not isinstance(cache_stage_id, str):
            raise TypeError("Expected argument 'cache_stage_id' to be a str")
        pulumi.set(__self__, "cache_stage_id", cache_stage_id)
        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 default_fqdn and not isinstance(default_fqdn, str):
            raise TypeError("Expected argument 'default_fqdn' to be a str")
        pulumi.set(__self__, "default_fqdn", default_fqdn)
        if dns_stage_id and not isinstance(dns_stage_id, str):
            raise TypeError("Expected argument 'dns_stage_id' to be a str")
        pulumi.set(__self__, "dns_stage_id", dns_stage_id)
        if fqdn and not isinstance(fqdn, str):
            raise TypeError("Expected argument 'fqdn' to be a str")
        pulumi.set(__self__, "fqdn", fqdn)
        if fqdns and not isinstance(fqdns, list):
            raise TypeError("Expected argument 'fqdns' to be a list")
        pulumi.set(__self__, "fqdns", fqdns)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if pipeline_id and not isinstance(pipeline_id, str):
            raise TypeError("Expected argument 'pipeline_id' to be a str")
        pulumi.set(__self__, "pipeline_id", pipeline_id)
        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 tls_stage_id and not isinstance(tls_stage_id, str):
            raise TypeError("Expected argument 'tls_stage_id' to be a str")
        pulumi.set(__self__, "tls_stage_id", tls_stage_id)
        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)

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

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

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

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

    @_builtins.property
    @pulumi.getter(name="dnsStageId")
    def dns_stage_id(self) -> Optional[_builtins.str]:
        return pulumi.get(self, "dns_stage_id")

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

    @_builtins.property
    @pulumi.getter
    def fqdns(self) -> Sequence[_builtins.str]:
        return pulumi.get(self, "fqdns")

    @_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="pipelineId")
    def pipeline_id(self) -> Optional[_builtins.str]:
        return pulumi.get(self, "pipeline_id")

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

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

    @_builtins.property
    @pulumi.getter
    def type(self) -> _builtins.str:
        return pulumi.get(self, "type")

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


class AwaitableGetDnsStageResult(GetDnsStageResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetDnsStageResult(
            backend_stage_id=self.backend_stage_id,
            cache_stage_id=self.cache_stage_id,
            created_at=self.created_at,
            default_fqdn=self.default_fqdn,
            dns_stage_id=self.dns_stage_id,
            fqdn=self.fqdn,
            fqdns=self.fqdns,
            id=self.id,
            pipeline_id=self.pipeline_id,
            project_id=self.project_id,
            tls_stage_id=self.tls_stage_id,
            type=self.type,
            updated_at=self.updated_at)


def get_dns_stage(dns_stage_id: Optional[_builtins.str] = None,
                  fqdn: Optional[_builtins.str] = None,
                  pipeline_id: Optional[_builtins.str] = None,
                  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDnsStageResult:
    """
    Gets information about an Edge Services DNS stage.

    A DNS stage defines the Fully Qualified Domain Names (FQDNs) attached to an Edge Services pipeline and links them to the next processing stage.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Retrieve an Edge Services DNS stage by its ID
    by_id = scaleway.edgeservices.get_dns_stage(dns_stage_id="11111111-1111-1111-1111-111111111111")
    ```

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Retrieve an Edge Services DNS stage by pipeline ID and FQDN
    by_fqdn = scaleway.edgeservices.get_dns_stage(pipeline_id=main["id"],
        fqdn="cdn.example.com")
    ```


    :param _builtins.str dns_stage_id: The ID of the DNS stage. Conflicts with all filter arguments below.
           
           The following filter arguments are supported (cannot be used with `dns_stage_id`):
    :param _builtins.str fqdn: FQDN to filter for (in the format subdomain.example.com).
    :param _builtins.str pipeline_id: The ID of the pipeline.
    """
    __args__ = dict()
    __args__['dnsStageId'] = dns_stage_id
    __args__['fqdn'] = fqdn
    __args__['pipelineId'] = pipeline_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('scaleway:edgeservices/getDnsStage:getDnsStage', __args__, opts=opts, typ=GetDnsStageResult).value

    return AwaitableGetDnsStageResult(
        backend_stage_id=pulumi.get(__ret__, 'backend_stage_id'),
        cache_stage_id=pulumi.get(__ret__, 'cache_stage_id'),
        created_at=pulumi.get(__ret__, 'created_at'),
        default_fqdn=pulumi.get(__ret__, 'default_fqdn'),
        dns_stage_id=pulumi.get(__ret__, 'dns_stage_id'),
        fqdn=pulumi.get(__ret__, 'fqdn'),
        fqdns=pulumi.get(__ret__, 'fqdns'),
        id=pulumi.get(__ret__, 'id'),
        pipeline_id=pulumi.get(__ret__, 'pipeline_id'),
        project_id=pulumi.get(__ret__, 'project_id'),
        tls_stage_id=pulumi.get(__ret__, 'tls_stage_id'),
        type=pulumi.get(__ret__, 'type'),
        updated_at=pulumi.get(__ret__, 'updated_at'))
def get_dns_stage_output(dns_stage_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                         fqdn: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                         pipeline_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                         opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetDnsStageResult]:
    """
    Gets information about an Edge Services DNS stage.

    A DNS stage defines the Fully Qualified Domain Names (FQDNs) attached to an Edge Services pipeline and links them to the next processing stage.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Retrieve an Edge Services DNS stage by its ID
    by_id = scaleway.edgeservices.get_dns_stage(dns_stage_id="11111111-1111-1111-1111-111111111111")
    ```

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Retrieve an Edge Services DNS stage by pipeline ID and FQDN
    by_fqdn = scaleway.edgeservices.get_dns_stage(pipeline_id=main["id"],
        fqdn="cdn.example.com")
    ```


    :param _builtins.str dns_stage_id: The ID of the DNS stage. Conflicts with all filter arguments below.
           
           The following filter arguments are supported (cannot be used with `dns_stage_id`):
    :param _builtins.str fqdn: FQDN to filter for (in the format subdomain.example.com).
    :param _builtins.str pipeline_id: The ID of the pipeline.
    """
    __args__ = dict()
    __args__['dnsStageId'] = dns_stage_id
    __args__['fqdn'] = fqdn
    __args__['pipelineId'] = pipeline_id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('scaleway:edgeservices/getDnsStage:getDnsStage', __args__, opts=opts, typ=GetDnsStageResult)
    return __ret__.apply(lambda __response__: GetDnsStageResult(
        backend_stage_id=pulumi.get(__response__, 'backend_stage_id'),
        cache_stage_id=pulumi.get(__response__, 'cache_stage_id'),
        created_at=pulumi.get(__response__, 'created_at'),
        default_fqdn=pulumi.get(__response__, 'default_fqdn'),
        dns_stage_id=pulumi.get(__response__, 'dns_stage_id'),
        fqdn=pulumi.get(__response__, 'fqdn'),
        fqdns=pulumi.get(__response__, 'fqdns'),
        id=pulumi.get(__response__, 'id'),
        pipeline_id=pulumi.get(__response__, 'pipeline_id'),
        project_id=pulumi.get(__response__, 'project_id'),
        tls_stage_id=pulumi.get(__response__, 'tls_stage_id'),
        type=pulumi.get(__response__, 'type'),
        updated_at=pulumi.get(__response__, 'updated_at')))
