moto/moto/logs/exceptions.py
Anton Grübel e73a694219
Add CloudWatch logs subscription filters (#2982)
* Add logs.describe_subscription_filters

* Add logs.put_subscription_filter

* Add logs.delete_subscription_filter

* Change to usage of ACCOUNT_ID
2020-05-12 13:34:10 +01:00

39 lines
1.1 KiB
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(ResourceNotFoundException, self).__init__(
"ResourceNotFoundException", msg or "The specified log group does not exist"
)
class InvalidParameterException(LogsClientError):
def __init__(self, msg=None):
self.code = 400
super(InvalidParameterException, self).__init__(
"InvalidParameterException", msg or "A parameter is specified incorrectly."
)
class ResourceAlreadyExistsException(LogsClientError):
def __init__(self):
self.code = 400
super(ResourceAlreadyExistsException, self).__init__(
"ResourceAlreadyExistsException", "The specified log group already exists"
)
class LimitExceededException(LogsClientError):
def __init__(self):
self.code = 400
super(LimitExceededException, self).__init__(
"LimitExceededException", "Resource limit exceeded."
)