2018-07-14 00:39:19 -07:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
from moto.core.exceptions import JsonRESTError
|
|
|
|
|
|
|
|
|
|
|
|
class SecretsManagerClientError(JsonRESTError):
|
|
|
|
code = 400
|
|
|
|
|
|
|
|
|
|
|
|
class ResourceNotFoundException(SecretsManagerClientError):
|
|
|
|
def __init__(self):
|
|
|
|
self.code = 404
|
|
|
|
super(ResourceNotFoundException, self).__init__(
|
|
|
|
"ResourceNotFoundException",
|
|
|
|
"Secrets Manager can't find the specified secret"
|
|
|
|
)
|
2018-07-16 12:39:59 -07:00
|
|
|
|
|
|
|
|
|
|
|
class ClientError(SecretsManagerClientError):
|
|
|
|
def __init__(self, message):
|
|
|
|
super(ClientError, self).__init__(
|
|
|
|
'InvalidParameterValue',
|
|
|
|
message)
|
|
|
|
|
|
|
|
|
|
|
|
class InvalidParameterException(SecretsManagerClientError):
|
|
|
|
def __init__(self, message):
|
|
|
|
super(InvalidParameterException, self).__init__(
|
|
|
|
'InvalidParameterException',
|
|
|
|
message)
|
2019-04-18 12:58:50 +01:00
|
|
|
|
|
|
|
|
2019-05-22 05:45:22 -04:00
|
|
|
class ResourceExistsException(SecretsManagerClientError):
|
|
|
|
def __init__(self, message):
|
|
|
|
super(ResourceExistsException, self).__init__(
|
|
|
|
'ResourceExistsException',
|
|
|
|
message
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2019-04-18 12:58:50 +01:00
|
|
|
class InvalidRequestException(SecretsManagerClientError):
|
|
|
|
def __init__(self, message):
|
|
|
|
super(InvalidRequestException, self).__init__(
|
|
|
|
'InvalidRequestException',
|
2019-04-18 16:53:27 +01:00
|
|
|
message)
|