moto/moto/logs/exceptions.py
kbalk 6b880003c6
Add Log Service describe_resource_policies, delete_resource_policy (#4150)
Co-authored-by: Karri Balk <kbalk@users.noreply.github.com>
2021-08-07 09:04:15 +01:00

37 lines
1015 B
Python

from __future__ import unicode_literals
from moto.core.exceptions import JsonRESTError
class LogsClientError(JsonRESTError):
code = 400
class ResourceNotFoundException(LogsClientError):
def __init__(self, msg=None):
self.code = 400
super().__init__(
"ResourceNotFoundException", msg or "The specified log group does not exist"
)
class InvalidParameterException(LogsClientError):
def __init__(self, msg=None):
self.code = 400
super().__init__(
"InvalidParameterException", msg or "A parameter is specified incorrectly."
)
class ResourceAlreadyExistsException(LogsClientError):
def __init__(self):
self.code = 400
super().__init__(
"ResourceAlreadyExistsException", "The specified log group already exists"
)
class LimitExceededException(LogsClientError):
def __init__(self):
self.code = 400
super().__init__("LimitExceededException", "Resource limit exceeded.")