# 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__ = [
    'GetWafStageResult',
    'AwaitableGetWafStageResult',
    'get_waf_stage',
    'get_waf_stage_output',
]

@pulumi.output_type
class GetWafStageResult:
    """
    A collection of values returned by getWafStage.
    """
    def __init__(__self__, backend_stage_id=None, created_at=None, id=None, mode=None, paranoia_level=None, pipeline_id=None, project_id=None, updated_at=None, waf_stage_id=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 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 id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if mode and not isinstance(mode, str):
            raise TypeError("Expected argument 'mode' to be a str")
        pulumi.set(__self__, "mode", mode)
        if paranoia_level and not isinstance(paranoia_level, int):
            raise TypeError("Expected argument 'paranoia_level' to be a int")
        pulumi.set(__self__, "paranoia_level", paranoia_level)
        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 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 waf_stage_id and not isinstance(waf_stage_id, str):
            raise TypeError("Expected argument 'waf_stage_id' to be a str")
        pulumi.set(__self__, "waf_stage_id", waf_stage_id)

    @_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="createdAt")
    def created_at(self) -> _builtins.str:
        return pulumi.get(self, "created_at")

    @_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
    def mode(self) -> _builtins.str:
        return pulumi.get(self, "mode")

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

    @_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="updatedAt")
    def updated_at(self) -> _builtins.str:
        return pulumi.get(self, "updated_at")

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


class AwaitableGetWafStageResult(GetWafStageResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetWafStageResult(
            backend_stage_id=self.backend_stage_id,
            created_at=self.created_at,
            id=self.id,
            mode=self.mode,
            paranoia_level=self.paranoia_level,
            pipeline_id=self.pipeline_id,
            project_id=self.project_id,
            updated_at=self.updated_at,
            waf_stage_id=self.waf_stage_id)


def get_waf_stage(pipeline_id: Optional[_builtins.str] = None,
                  waf_stage_id: Optional[_builtins.str] = None,
                  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetWafStageResult:
    """
    Gets information about an Edge Services WAF (Web Application Firewall) stage.

    A WAF stage provides web application firewall protection for an Edge Services pipeline, inspecting HTTP requests and blocking malicious traffic based on a configurable paranoia level.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Retrieve an Edge Services WAF stage by its ID
    by_id = scaleway.edgeservices.get_waf_stage(waf_stage_id="11111111-1111-1111-1111-111111111111")
    ```

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Retrieve an Edge Services WAF stage by pipeline ID
    by_pipeline = scaleway.edgeservices.get_waf_stage(pipeline_id=main["id"])
    ```


    :param _builtins.str pipeline_id: The ID of the pipeline.
    :param _builtins.str waf_stage_id: The ID of the WAF stage. Conflicts with all filter arguments below.
           
           The following filter arguments are supported (cannot be used with `waf_stage_id`):
    """
    __args__ = dict()
    __args__['pipelineId'] = pipeline_id
    __args__['wafStageId'] = waf_stage_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('scaleway:edgeservices/getWafStage:getWafStage', __args__, opts=opts, typ=GetWafStageResult).value

    return AwaitableGetWafStageResult(
        backend_stage_id=pulumi.get(__ret__, 'backend_stage_id'),
        created_at=pulumi.get(__ret__, 'created_at'),
        id=pulumi.get(__ret__, 'id'),
        mode=pulumi.get(__ret__, 'mode'),
        paranoia_level=pulumi.get(__ret__, 'paranoia_level'),
        pipeline_id=pulumi.get(__ret__, 'pipeline_id'),
        project_id=pulumi.get(__ret__, 'project_id'),
        updated_at=pulumi.get(__ret__, 'updated_at'),
        waf_stage_id=pulumi.get(__ret__, 'waf_stage_id'))
def get_waf_stage_output(pipeline_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                         waf_stage_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                         opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetWafStageResult]:
    """
    Gets information about an Edge Services WAF (Web Application Firewall) stage.

    A WAF stage provides web application firewall protection for an Edge Services pipeline, inspecting HTTP requests and blocking malicious traffic based on a configurable paranoia level.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Retrieve an Edge Services WAF stage by its ID
    by_id = scaleway.edgeservices.get_waf_stage(waf_stage_id="11111111-1111-1111-1111-111111111111")
    ```

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Retrieve an Edge Services WAF stage by pipeline ID
    by_pipeline = scaleway.edgeservices.get_waf_stage(pipeline_id=main["id"])
    ```


    :param _builtins.str pipeline_id: The ID of the pipeline.
    :param _builtins.str waf_stage_id: The ID of the WAF stage. Conflicts with all filter arguments below.
           
           The following filter arguments are supported (cannot be used with `waf_stage_id`):
    """
    __args__ = dict()
    __args__['pipelineId'] = pipeline_id
    __args__['wafStageId'] = waf_stage_id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('scaleway:edgeservices/getWafStage:getWafStage', __args__, opts=opts, typ=GetWafStageResult)
    return __ret__.apply(lambda __response__: GetWafStageResult(
        backend_stage_id=pulumi.get(__response__, 'backend_stage_id'),
        created_at=pulumi.get(__response__, 'created_at'),
        id=pulumi.get(__response__, 'id'),
        mode=pulumi.get(__response__, 'mode'),
        paranoia_level=pulumi.get(__response__, 'paranoia_level'),
        pipeline_id=pulumi.get(__response__, 'pipeline_id'),
        project_id=pulumi.get(__response__, 'project_id'),
        updated_at=pulumi.get(__response__, 'updated_at'),
        waf_stage_id=pulumi.get(__response__, 'waf_stage_id')))
