# 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
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__ = [
    'GetLogsOutputGraylogStreamResult',
    'AwaitableGetLogsOutputGraylogStreamResult',
    'get_logs_output_graylog_stream',
    'get_logs_output_graylog_stream_output',
]

@pulumi.output_type
class GetLogsOutputGraylogStreamResult:
    """
    A collection of values returned by getLogsOutputGraylogStream.
    """
    def __init__(__self__, can_alert=None, cold_storage_compression=None, cold_storage_content=None, cold_storage_enabled=None, cold_storage_notify_enabled=None, cold_storage_retention=None, cold_storage_target=None, created_at=None, description=None, id=None, indexing_enabled=None, indexing_max_size=None, indexing_notify_enabled=None, is_editable=None, is_shareable=None, nb_alert_condition=None, nb_archive=None, parent_stream_id=None, pause_indexing_on_max_size=None, retention_id=None, service_name=None, stream_id=None, title=None, updated_at=None, web_socket_enabled=None, write_token=None):
        if can_alert and not isinstance(can_alert, bool):
            raise TypeError("Expected argument 'can_alert' to be a bool")
        pulumi.set(__self__, "can_alert", can_alert)
        if cold_storage_compression and not isinstance(cold_storage_compression, str):
            raise TypeError("Expected argument 'cold_storage_compression' to be a str")
        pulumi.set(__self__, "cold_storage_compression", cold_storage_compression)
        if cold_storage_content and not isinstance(cold_storage_content, str):
            raise TypeError("Expected argument 'cold_storage_content' to be a str")
        pulumi.set(__self__, "cold_storage_content", cold_storage_content)
        if cold_storage_enabled and not isinstance(cold_storage_enabled, bool):
            raise TypeError("Expected argument 'cold_storage_enabled' to be a bool")
        pulumi.set(__self__, "cold_storage_enabled", cold_storage_enabled)
        if cold_storage_notify_enabled and not isinstance(cold_storage_notify_enabled, bool):
            raise TypeError("Expected argument 'cold_storage_notify_enabled' to be a bool")
        pulumi.set(__self__, "cold_storage_notify_enabled", cold_storage_notify_enabled)
        if cold_storage_retention and not isinstance(cold_storage_retention, int):
            raise TypeError("Expected argument 'cold_storage_retention' to be a int")
        pulumi.set(__self__, "cold_storage_retention", cold_storage_retention)
        if cold_storage_target and not isinstance(cold_storage_target, str):
            raise TypeError("Expected argument 'cold_storage_target' to be a str")
        pulumi.set(__self__, "cold_storage_target", cold_storage_target)
        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 description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if indexing_enabled and not isinstance(indexing_enabled, bool):
            raise TypeError("Expected argument 'indexing_enabled' to be a bool")
        pulumi.set(__self__, "indexing_enabled", indexing_enabled)
        if indexing_max_size and not isinstance(indexing_max_size, int):
            raise TypeError("Expected argument 'indexing_max_size' to be a int")
        pulumi.set(__self__, "indexing_max_size", indexing_max_size)
        if indexing_notify_enabled and not isinstance(indexing_notify_enabled, bool):
            raise TypeError("Expected argument 'indexing_notify_enabled' to be a bool")
        pulumi.set(__self__, "indexing_notify_enabled", indexing_notify_enabled)
        if is_editable and not isinstance(is_editable, bool):
            raise TypeError("Expected argument 'is_editable' to be a bool")
        pulumi.set(__self__, "is_editable", is_editable)
        if is_shareable and not isinstance(is_shareable, bool):
            raise TypeError("Expected argument 'is_shareable' to be a bool")
        pulumi.set(__self__, "is_shareable", is_shareable)
        if nb_alert_condition and not isinstance(nb_alert_condition, int):
            raise TypeError("Expected argument 'nb_alert_condition' to be a int")
        pulumi.set(__self__, "nb_alert_condition", nb_alert_condition)
        if nb_archive and not isinstance(nb_archive, int):
            raise TypeError("Expected argument 'nb_archive' to be a int")
        pulumi.set(__self__, "nb_archive", nb_archive)
        if parent_stream_id and not isinstance(parent_stream_id, str):
            raise TypeError("Expected argument 'parent_stream_id' to be a str")
        pulumi.set(__self__, "parent_stream_id", parent_stream_id)
        if pause_indexing_on_max_size and not isinstance(pause_indexing_on_max_size, bool):
            raise TypeError("Expected argument 'pause_indexing_on_max_size' to be a bool")
        pulumi.set(__self__, "pause_indexing_on_max_size", pause_indexing_on_max_size)
        if retention_id and not isinstance(retention_id, str):
            raise TypeError("Expected argument 'retention_id' to be a str")
        pulumi.set(__self__, "retention_id", retention_id)
        if service_name and not isinstance(service_name, str):
            raise TypeError("Expected argument 'service_name' to be a str")
        pulumi.set(__self__, "service_name", service_name)
        if stream_id and not isinstance(stream_id, str):
            raise TypeError("Expected argument 'stream_id' to be a str")
        pulumi.set(__self__, "stream_id", stream_id)
        if title and not isinstance(title, str):
            raise TypeError("Expected argument 'title' to be a str")
        pulumi.set(__self__, "title", title)
        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 web_socket_enabled and not isinstance(web_socket_enabled, bool):
            raise TypeError("Expected argument 'web_socket_enabled' to be a bool")
        pulumi.set(__self__, "web_socket_enabled", web_socket_enabled)
        if write_token and not isinstance(write_token, str):
            raise TypeError("Expected argument 'write_token' to be a str")
        pulumi.set(__self__, "write_token", write_token)

    @property
    @pulumi.getter(name="canAlert")
    def can_alert(self) -> builtins.bool:
        return pulumi.get(self, "can_alert")

    @property
    @pulumi.getter(name="coldStorageCompression")
    def cold_storage_compression(self) -> builtins.str:
        """
        Cold storage compression method
        """
        return pulumi.get(self, "cold_storage_compression")

    @property
    @pulumi.getter(name="coldStorageContent")
    def cold_storage_content(self) -> builtins.str:
        """
        ColdStorage content
        """
        return pulumi.get(self, "cold_storage_content")

    @property
    @pulumi.getter(name="coldStorageEnabled")
    def cold_storage_enabled(self) -> builtins.bool:
        """
        Is Cold storage enabled?
        """
        return pulumi.get(self, "cold_storage_enabled")

    @property
    @pulumi.getter(name="coldStorageNotifyEnabled")
    def cold_storage_notify_enabled(self) -> builtins.bool:
        """
        Notify on new Cold storage archive
        """
        return pulumi.get(self, "cold_storage_notify_enabled")

    @property
    @pulumi.getter(name="coldStorageRetention")
    def cold_storage_retention(self) -> builtins.int:
        """
        Cold storage retention in year
        """
        return pulumi.get(self, "cold_storage_retention")

    @property
    @pulumi.getter(name="coldStorageTarget")
    def cold_storage_target(self) -> builtins.str:
        """
        ColdStorage destination
        """
        return pulumi.get(self, "cold_storage_target")

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

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        Stream description
        """
        return pulumi.get(self, "description")

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

    @property
    @pulumi.getter(name="indexingEnabled")
    def indexing_enabled(self) -> builtins.bool:
        """
        Enable ES indexing
        """
        return pulumi.get(self, "indexing_enabled")

    @property
    @pulumi.getter(name="indexingMaxSize")
    def indexing_max_size(self) -> builtins.int:
        """
        Maximum indexing size (in GB)
        """
        return pulumi.get(self, "indexing_max_size")

    @property
    @pulumi.getter(name="indexingNotifyEnabled")
    def indexing_notify_enabled(self) -> builtins.bool:
        """
        If set, notify when size is near 80, 90 or 100 % of the maximum configured setting
        """
        return pulumi.get(self, "indexing_notify_enabled")

    @property
    @pulumi.getter(name="isEditable")
    def is_editable(self) -> builtins.bool:
        """
        Indicates if you are allowed to edit entry
        """
        return pulumi.get(self, "is_editable")

    @property
    @pulumi.getter(name="isShareable")
    def is_shareable(self) -> builtins.bool:
        """
        Indicates if you are allowed to share entry
        """
        return pulumi.get(self, "is_shareable")

    @property
    @pulumi.getter(name="nbAlertCondition")
    def nb_alert_condition(self) -> builtins.int:
        """
        Number of alert condition
        """
        return pulumi.get(self, "nb_alert_condition")

    @property
    @pulumi.getter(name="nbArchive")
    def nb_archive(self) -> builtins.int:
        """
        Number of coldstored archives
        """
        return pulumi.get(self, "nb_archive")

    @property
    @pulumi.getter(name="parentStreamId")
    def parent_stream_id(self) -> builtins.str:
        """
        Parent stream ID
        """
        return pulumi.get(self, "parent_stream_id")

    @property
    @pulumi.getter(name="pauseIndexingOnMaxSize")
    def pause_indexing_on_max_size(self) -> builtins.bool:
        """
        If set, pause indexing when maximum size is reach
        """
        return pulumi.get(self, "pause_indexing_on_max_size")

    @property
    @pulumi.getter(name="retentionId")
    def retention_id(self) -> builtins.str:
        """
        Retention ID
        """
        return pulumi.get(self, "retention_id")

    @property
    @pulumi.getter(name="serviceName")
    def service_name(self) -> builtins.str:
        return pulumi.get(self, "service_name")

    @property
    @pulumi.getter(name="streamId")
    def stream_id(self) -> builtins.str:
        """
        Stream ID
        """
        return pulumi.get(self, "stream_id")

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

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

    @property
    @pulumi.getter(name="webSocketEnabled")
    def web_socket_enabled(self) -> builtins.bool:
        """
        Enable Websocket
        """
        return pulumi.get(self, "web_socket_enabled")

    @property
    @pulumi.getter(name="writeToken")
    def write_token(self) -> builtins.str:
        """
        Write token of the stream (empty if the caller is not the owner of the stream)
        """
        return pulumi.get(self, "write_token")


class AwaitableGetLogsOutputGraylogStreamResult(GetLogsOutputGraylogStreamResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetLogsOutputGraylogStreamResult(
            can_alert=self.can_alert,
            cold_storage_compression=self.cold_storage_compression,
            cold_storage_content=self.cold_storage_content,
            cold_storage_enabled=self.cold_storage_enabled,
            cold_storage_notify_enabled=self.cold_storage_notify_enabled,
            cold_storage_retention=self.cold_storage_retention,
            cold_storage_target=self.cold_storage_target,
            created_at=self.created_at,
            description=self.description,
            id=self.id,
            indexing_enabled=self.indexing_enabled,
            indexing_max_size=self.indexing_max_size,
            indexing_notify_enabled=self.indexing_notify_enabled,
            is_editable=self.is_editable,
            is_shareable=self.is_shareable,
            nb_alert_condition=self.nb_alert_condition,
            nb_archive=self.nb_archive,
            parent_stream_id=self.parent_stream_id,
            pause_indexing_on_max_size=self.pause_indexing_on_max_size,
            retention_id=self.retention_id,
            service_name=self.service_name,
            stream_id=self.stream_id,
            title=self.title,
            updated_at=self.updated_at,
            web_socket_enabled=self.web_socket_enabled,
            write_token=self.write_token)


def get_logs_output_graylog_stream(service_name: Optional[builtins.str] = None,
                                   title: Optional[builtins.str] = None,
                                   opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetLogsOutputGraylogStreamResult:
    """
    Use this data source to retrieve information about a DBaas logs output graylog stream.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_ovh as ovh

    stream = ovh.Dbaas.get_logs_output_graylog_stream(service_name="ldp-xx-xxxxx",
        title="my stream")
    ```


    :param builtins.str service_name: The service name. It's the ID of your Logs Data Platform instance.
    :param builtins.str title: Stream description
    """
    __args__ = dict()
    __args__['serviceName'] = service_name
    __args__['title'] = title
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('ovh:Dbaas/getLogsOutputGraylogStream:getLogsOutputGraylogStream', __args__, opts=opts, typ=GetLogsOutputGraylogStreamResult).value

    return AwaitableGetLogsOutputGraylogStreamResult(
        can_alert=pulumi.get(__ret__, 'can_alert'),
        cold_storage_compression=pulumi.get(__ret__, 'cold_storage_compression'),
        cold_storage_content=pulumi.get(__ret__, 'cold_storage_content'),
        cold_storage_enabled=pulumi.get(__ret__, 'cold_storage_enabled'),
        cold_storage_notify_enabled=pulumi.get(__ret__, 'cold_storage_notify_enabled'),
        cold_storage_retention=pulumi.get(__ret__, 'cold_storage_retention'),
        cold_storage_target=pulumi.get(__ret__, 'cold_storage_target'),
        created_at=pulumi.get(__ret__, 'created_at'),
        description=pulumi.get(__ret__, 'description'),
        id=pulumi.get(__ret__, 'id'),
        indexing_enabled=pulumi.get(__ret__, 'indexing_enabled'),
        indexing_max_size=pulumi.get(__ret__, 'indexing_max_size'),
        indexing_notify_enabled=pulumi.get(__ret__, 'indexing_notify_enabled'),
        is_editable=pulumi.get(__ret__, 'is_editable'),
        is_shareable=pulumi.get(__ret__, 'is_shareable'),
        nb_alert_condition=pulumi.get(__ret__, 'nb_alert_condition'),
        nb_archive=pulumi.get(__ret__, 'nb_archive'),
        parent_stream_id=pulumi.get(__ret__, 'parent_stream_id'),
        pause_indexing_on_max_size=pulumi.get(__ret__, 'pause_indexing_on_max_size'),
        retention_id=pulumi.get(__ret__, 'retention_id'),
        service_name=pulumi.get(__ret__, 'service_name'),
        stream_id=pulumi.get(__ret__, 'stream_id'),
        title=pulumi.get(__ret__, 'title'),
        updated_at=pulumi.get(__ret__, 'updated_at'),
        web_socket_enabled=pulumi.get(__ret__, 'web_socket_enabled'),
        write_token=pulumi.get(__ret__, 'write_token'))
def get_logs_output_graylog_stream_output(service_name: Optional[pulumi.Input[builtins.str]] = None,
                                          title: Optional[pulumi.Input[builtins.str]] = None,
                                          opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetLogsOutputGraylogStreamResult]:
    """
    Use this data source to retrieve information about a DBaas logs output graylog stream.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_ovh as ovh

    stream = ovh.Dbaas.get_logs_output_graylog_stream(service_name="ldp-xx-xxxxx",
        title="my stream")
    ```


    :param builtins.str service_name: The service name. It's the ID of your Logs Data Platform instance.
    :param builtins.str title: Stream description
    """
    __args__ = dict()
    __args__['serviceName'] = service_name
    __args__['title'] = title
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('ovh:Dbaas/getLogsOutputGraylogStream:getLogsOutputGraylogStream', __args__, opts=opts, typ=GetLogsOutputGraylogStreamResult)
    return __ret__.apply(lambda __response__: GetLogsOutputGraylogStreamResult(
        can_alert=pulumi.get(__response__, 'can_alert'),
        cold_storage_compression=pulumi.get(__response__, 'cold_storage_compression'),
        cold_storage_content=pulumi.get(__response__, 'cold_storage_content'),
        cold_storage_enabled=pulumi.get(__response__, 'cold_storage_enabled'),
        cold_storage_notify_enabled=pulumi.get(__response__, 'cold_storage_notify_enabled'),
        cold_storage_retention=pulumi.get(__response__, 'cold_storage_retention'),
        cold_storage_target=pulumi.get(__response__, 'cold_storage_target'),
        created_at=pulumi.get(__response__, 'created_at'),
        description=pulumi.get(__response__, 'description'),
        id=pulumi.get(__response__, 'id'),
        indexing_enabled=pulumi.get(__response__, 'indexing_enabled'),
        indexing_max_size=pulumi.get(__response__, 'indexing_max_size'),
        indexing_notify_enabled=pulumi.get(__response__, 'indexing_notify_enabled'),
        is_editable=pulumi.get(__response__, 'is_editable'),
        is_shareable=pulumi.get(__response__, 'is_shareable'),
        nb_alert_condition=pulumi.get(__response__, 'nb_alert_condition'),
        nb_archive=pulumi.get(__response__, 'nb_archive'),
        parent_stream_id=pulumi.get(__response__, 'parent_stream_id'),
        pause_indexing_on_max_size=pulumi.get(__response__, 'pause_indexing_on_max_size'),
        retention_id=pulumi.get(__response__, 'retention_id'),
        service_name=pulumi.get(__response__, 'service_name'),
        stream_id=pulumi.get(__response__, 'stream_id'),
        title=pulumi.get(__response__, 'title'),
        updated_at=pulumi.get(__response__, 'updated_at'),
        web_socket_enabled=pulumi.get(__response__, 'web_socket_enabled'),
        write_token=pulumi.get(__response__, 'write_token')))
