# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs

__all__ = [
    'EnvironmentLastUpdated',
    'EnvironmentLastUpdatedError',
    'EnvironmentLoggingConfiguration',
    'EnvironmentLoggingConfigurationDagProcessingLogs',
    'EnvironmentLoggingConfigurationSchedulerLogs',
    'EnvironmentLoggingConfigurationTaskLogs',
    'EnvironmentLoggingConfigurationWebserverLogs',
    'EnvironmentLoggingConfigurationWorkerLogs',
    'EnvironmentNetworkConfiguration',
]

@pulumi.output_type
class EnvironmentLastUpdated(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "createdAt":
            suggest = "created_at"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in EnvironmentLastUpdated. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        EnvironmentLastUpdated.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        EnvironmentLastUpdated.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 created_at: Optional[str] = None,
                 errors: Optional[Sequence['outputs.EnvironmentLastUpdatedError']] = None,
                 status: Optional[str] = None):
        """
        :param str created_at: The Created At date of the MWAA Environment
               * `logging_configuration[0].<LOG_CONFIGURATION_TYPE>[0].cloud_watch_log_group_arn` - Provides the ARN for the CloudWatch group where the logs will be published
        :param str status: The status of the Amazon MWAA Environment
        """
        if created_at is not None:
            pulumi.set(__self__, "created_at", created_at)
        if errors is not None:
            pulumi.set(__self__, "errors", errors)
        if status is not None:
            pulumi.set(__self__, "status", status)

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> Optional[str]:
        """
        The Created At date of the MWAA Environment
        * `logging_configuration[0].<LOG_CONFIGURATION_TYPE>[0].cloud_watch_log_group_arn` - Provides the ARN for the CloudWatch group where the logs will be published
        """
        return pulumi.get(self, "created_at")

    @property
    @pulumi.getter
    def errors(self) -> Optional[Sequence['outputs.EnvironmentLastUpdatedError']]:
        return pulumi.get(self, "errors")

    @property
    @pulumi.getter
    def status(self) -> Optional[str]:
        """
        The status of the Amazon MWAA Environment
        """
        return pulumi.get(self, "status")


@pulumi.output_type
class EnvironmentLastUpdatedError(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "errorCode":
            suggest = "error_code"
        elif key == "errorMessage":
            suggest = "error_message"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in EnvironmentLastUpdatedError. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        EnvironmentLastUpdatedError.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        EnvironmentLastUpdatedError.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 error_code: Optional[str] = None,
                 error_message: Optional[str] = None):
        if error_code is not None:
            pulumi.set(__self__, "error_code", error_code)
        if error_message is not None:
            pulumi.set(__self__, "error_message", error_message)

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

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


@pulumi.output_type
class EnvironmentLoggingConfiguration(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "dagProcessingLogs":
            suggest = "dag_processing_logs"
        elif key == "schedulerLogs":
            suggest = "scheduler_logs"
        elif key == "taskLogs":
            suggest = "task_logs"
        elif key == "webserverLogs":
            suggest = "webserver_logs"
        elif key == "workerLogs":
            suggest = "worker_logs"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in EnvironmentLoggingConfiguration. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        EnvironmentLoggingConfiguration.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        EnvironmentLoggingConfiguration.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 dag_processing_logs: Optional['outputs.EnvironmentLoggingConfigurationDagProcessingLogs'] = None,
                 scheduler_logs: Optional['outputs.EnvironmentLoggingConfigurationSchedulerLogs'] = None,
                 task_logs: Optional['outputs.EnvironmentLoggingConfigurationTaskLogs'] = None,
                 webserver_logs: Optional['outputs.EnvironmentLoggingConfigurationWebserverLogs'] = None,
                 worker_logs: Optional['outputs.EnvironmentLoggingConfigurationWorkerLogs'] = None):
        """
        :param 'EnvironmentLoggingConfigurationDagProcessingLogsArgs' dag_processing_logs: (Optional) Log configuration options for processing DAGs. See Module logging configuration for more information. Disabled by default.
        :param 'EnvironmentLoggingConfigurationSchedulerLogsArgs' scheduler_logs: Log configuration options for the schedulers. See Module logging configuration for more information. Disabled by default.
        :param 'EnvironmentLoggingConfigurationTaskLogsArgs' task_logs: Log configuration options for DAG tasks. See Module logging configuration for more information. Enabled by default with `INFO` log level.
        :param 'EnvironmentLoggingConfigurationWebserverLogsArgs' webserver_logs: Log configuration options for the webservers. See Module logging configuration for more information. Disabled by default.
        :param 'EnvironmentLoggingConfigurationWorkerLogsArgs' worker_logs: Log configuration options for the workers. See Module logging configuration for more information. Disabled by default.
        """
        if dag_processing_logs is not None:
            pulumi.set(__self__, "dag_processing_logs", dag_processing_logs)
        if scheduler_logs is not None:
            pulumi.set(__self__, "scheduler_logs", scheduler_logs)
        if task_logs is not None:
            pulumi.set(__self__, "task_logs", task_logs)
        if webserver_logs is not None:
            pulumi.set(__self__, "webserver_logs", webserver_logs)
        if worker_logs is not None:
            pulumi.set(__self__, "worker_logs", worker_logs)

    @property
    @pulumi.getter(name="dagProcessingLogs")
    def dag_processing_logs(self) -> Optional['outputs.EnvironmentLoggingConfigurationDagProcessingLogs']:
        """
        (Optional) Log configuration options for processing DAGs. See Module logging configuration for more information. Disabled by default.
        """
        return pulumi.get(self, "dag_processing_logs")

    @property
    @pulumi.getter(name="schedulerLogs")
    def scheduler_logs(self) -> Optional['outputs.EnvironmentLoggingConfigurationSchedulerLogs']:
        """
        Log configuration options for the schedulers. See Module logging configuration for more information. Disabled by default.
        """
        return pulumi.get(self, "scheduler_logs")

    @property
    @pulumi.getter(name="taskLogs")
    def task_logs(self) -> Optional['outputs.EnvironmentLoggingConfigurationTaskLogs']:
        """
        Log configuration options for DAG tasks. See Module logging configuration for more information. Enabled by default with `INFO` log level.
        """
        return pulumi.get(self, "task_logs")

    @property
    @pulumi.getter(name="webserverLogs")
    def webserver_logs(self) -> Optional['outputs.EnvironmentLoggingConfigurationWebserverLogs']:
        """
        Log configuration options for the webservers. See Module logging configuration for more information. Disabled by default.
        """
        return pulumi.get(self, "webserver_logs")

    @property
    @pulumi.getter(name="workerLogs")
    def worker_logs(self) -> Optional['outputs.EnvironmentLoggingConfigurationWorkerLogs']:
        """
        Log configuration options for the workers. See Module logging configuration for more information. Disabled by default.
        """
        return pulumi.get(self, "worker_logs")


@pulumi.output_type
class EnvironmentLoggingConfigurationDagProcessingLogs(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "cloudWatchLogGroupArn":
            suggest = "cloud_watch_log_group_arn"
        elif key == "logLevel":
            suggest = "log_level"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in EnvironmentLoggingConfigurationDagProcessingLogs. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        EnvironmentLoggingConfigurationDagProcessingLogs.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        EnvironmentLoggingConfigurationDagProcessingLogs.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 cloud_watch_log_group_arn: Optional[str] = None,
                 enabled: Optional[bool] = None,
                 log_level: Optional[str] = None):
        """
        :param bool enabled: Enabling or disabling the collection of logs
        :param str log_level: Logging level. Valid values: `CRITICAL`, `ERROR`, `WARNING`, `INFO`, `DEBUG`. Will be `INFO` by default.
        """
        if cloud_watch_log_group_arn is not None:
            pulumi.set(__self__, "cloud_watch_log_group_arn", cloud_watch_log_group_arn)
        if enabled is not None:
            pulumi.set(__self__, "enabled", enabled)
        if log_level is not None:
            pulumi.set(__self__, "log_level", log_level)

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

    @property
    @pulumi.getter
    def enabled(self) -> Optional[bool]:
        """
        Enabling or disabling the collection of logs
        """
        return pulumi.get(self, "enabled")

    @property
    @pulumi.getter(name="logLevel")
    def log_level(self) -> Optional[str]:
        """
        Logging level. Valid values: `CRITICAL`, `ERROR`, `WARNING`, `INFO`, `DEBUG`. Will be `INFO` by default.
        """
        return pulumi.get(self, "log_level")


@pulumi.output_type
class EnvironmentLoggingConfigurationSchedulerLogs(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "cloudWatchLogGroupArn":
            suggest = "cloud_watch_log_group_arn"
        elif key == "logLevel":
            suggest = "log_level"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in EnvironmentLoggingConfigurationSchedulerLogs. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        EnvironmentLoggingConfigurationSchedulerLogs.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        EnvironmentLoggingConfigurationSchedulerLogs.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 cloud_watch_log_group_arn: Optional[str] = None,
                 enabled: Optional[bool] = None,
                 log_level: Optional[str] = None):
        """
        :param bool enabled: Enabling or disabling the collection of logs
        :param str log_level: Logging level. Valid values: `CRITICAL`, `ERROR`, `WARNING`, `INFO`, `DEBUG`. Will be `INFO` by default.
        """
        if cloud_watch_log_group_arn is not None:
            pulumi.set(__self__, "cloud_watch_log_group_arn", cloud_watch_log_group_arn)
        if enabled is not None:
            pulumi.set(__self__, "enabled", enabled)
        if log_level is not None:
            pulumi.set(__self__, "log_level", log_level)

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

    @property
    @pulumi.getter
    def enabled(self) -> Optional[bool]:
        """
        Enabling or disabling the collection of logs
        """
        return pulumi.get(self, "enabled")

    @property
    @pulumi.getter(name="logLevel")
    def log_level(self) -> Optional[str]:
        """
        Logging level. Valid values: `CRITICAL`, `ERROR`, `WARNING`, `INFO`, `DEBUG`. Will be `INFO` by default.
        """
        return pulumi.get(self, "log_level")


@pulumi.output_type
class EnvironmentLoggingConfigurationTaskLogs(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "cloudWatchLogGroupArn":
            suggest = "cloud_watch_log_group_arn"
        elif key == "logLevel":
            suggest = "log_level"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in EnvironmentLoggingConfigurationTaskLogs. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        EnvironmentLoggingConfigurationTaskLogs.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        EnvironmentLoggingConfigurationTaskLogs.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 cloud_watch_log_group_arn: Optional[str] = None,
                 enabled: Optional[bool] = None,
                 log_level: Optional[str] = None):
        """
        :param bool enabled: Enabling or disabling the collection of logs
        :param str log_level: Logging level. Valid values: `CRITICAL`, `ERROR`, `WARNING`, `INFO`, `DEBUG`. Will be `INFO` by default.
        """
        if cloud_watch_log_group_arn is not None:
            pulumi.set(__self__, "cloud_watch_log_group_arn", cloud_watch_log_group_arn)
        if enabled is not None:
            pulumi.set(__self__, "enabled", enabled)
        if log_level is not None:
            pulumi.set(__self__, "log_level", log_level)

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

    @property
    @pulumi.getter
    def enabled(self) -> Optional[bool]:
        """
        Enabling or disabling the collection of logs
        """
        return pulumi.get(self, "enabled")

    @property
    @pulumi.getter(name="logLevel")
    def log_level(self) -> Optional[str]:
        """
        Logging level. Valid values: `CRITICAL`, `ERROR`, `WARNING`, `INFO`, `DEBUG`. Will be `INFO` by default.
        """
        return pulumi.get(self, "log_level")


@pulumi.output_type
class EnvironmentLoggingConfigurationWebserverLogs(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "cloudWatchLogGroupArn":
            suggest = "cloud_watch_log_group_arn"
        elif key == "logLevel":
            suggest = "log_level"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in EnvironmentLoggingConfigurationWebserverLogs. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        EnvironmentLoggingConfigurationWebserverLogs.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        EnvironmentLoggingConfigurationWebserverLogs.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 cloud_watch_log_group_arn: Optional[str] = None,
                 enabled: Optional[bool] = None,
                 log_level: Optional[str] = None):
        """
        :param bool enabled: Enabling or disabling the collection of logs
        :param str log_level: Logging level. Valid values: `CRITICAL`, `ERROR`, `WARNING`, `INFO`, `DEBUG`. Will be `INFO` by default.
        """
        if cloud_watch_log_group_arn is not None:
            pulumi.set(__self__, "cloud_watch_log_group_arn", cloud_watch_log_group_arn)
        if enabled is not None:
            pulumi.set(__self__, "enabled", enabled)
        if log_level is not None:
            pulumi.set(__self__, "log_level", log_level)

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

    @property
    @pulumi.getter
    def enabled(self) -> Optional[bool]:
        """
        Enabling or disabling the collection of logs
        """
        return pulumi.get(self, "enabled")

    @property
    @pulumi.getter(name="logLevel")
    def log_level(self) -> Optional[str]:
        """
        Logging level. Valid values: `CRITICAL`, `ERROR`, `WARNING`, `INFO`, `DEBUG`. Will be `INFO` by default.
        """
        return pulumi.get(self, "log_level")


@pulumi.output_type
class EnvironmentLoggingConfigurationWorkerLogs(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "cloudWatchLogGroupArn":
            suggest = "cloud_watch_log_group_arn"
        elif key == "logLevel":
            suggest = "log_level"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in EnvironmentLoggingConfigurationWorkerLogs. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        EnvironmentLoggingConfigurationWorkerLogs.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        EnvironmentLoggingConfigurationWorkerLogs.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 cloud_watch_log_group_arn: Optional[str] = None,
                 enabled: Optional[bool] = None,
                 log_level: Optional[str] = None):
        """
        :param bool enabled: Enabling or disabling the collection of logs
        :param str log_level: Logging level. Valid values: `CRITICAL`, `ERROR`, `WARNING`, `INFO`, `DEBUG`. Will be `INFO` by default.
        """
        if cloud_watch_log_group_arn is not None:
            pulumi.set(__self__, "cloud_watch_log_group_arn", cloud_watch_log_group_arn)
        if enabled is not None:
            pulumi.set(__self__, "enabled", enabled)
        if log_level is not None:
            pulumi.set(__self__, "log_level", log_level)

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

    @property
    @pulumi.getter
    def enabled(self) -> Optional[bool]:
        """
        Enabling or disabling the collection of logs
        """
        return pulumi.get(self, "enabled")

    @property
    @pulumi.getter(name="logLevel")
    def log_level(self) -> Optional[str]:
        """
        Logging level. Valid values: `CRITICAL`, `ERROR`, `WARNING`, `INFO`, `DEBUG`. Will be `INFO` by default.
        """
        return pulumi.get(self, "log_level")


@pulumi.output_type
class EnvironmentNetworkConfiguration(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "securityGroupIds":
            suggest = "security_group_ids"
        elif key == "subnetIds":
            suggest = "subnet_ids"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in EnvironmentNetworkConfiguration. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        EnvironmentNetworkConfiguration.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        EnvironmentNetworkConfiguration.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 security_group_ids: Sequence[str],
                 subnet_ids: Sequence[str]):
        """
        :param Sequence[str] security_group_ids: Security groups IDs for the environment. At least one of the security group needs to allow MWAA resources to talk to each other, otherwise MWAA cannot be provisioned.
        :param Sequence[str] subnet_ids: The private subnet IDs in which the environment should be created. MWAA requires two subnets.
        """
        pulumi.set(__self__, "security_group_ids", security_group_ids)
        pulumi.set(__self__, "subnet_ids", subnet_ids)

    @property
    @pulumi.getter(name="securityGroupIds")
    def security_group_ids(self) -> Sequence[str]:
        """
        Security groups IDs for the environment. At least one of the security group needs to allow MWAA resources to talk to each other, otherwise MWAA cannot be provisioned.
        """
        return pulumi.get(self, "security_group_ids")

    @property
    @pulumi.getter(name="subnetIds")
    def subnet_ids(self) -> Sequence[str]:
        """
        The private subnet IDs in which the environment should be created. MWAA requires two subnets.
        """
        return pulumi.get(self, "subnet_ids")


