1from moto.core.exceptions import RESTError, JsonRESTError 2 3 4class ServiceNotFoundException(RESTError): 5 code = 400 6 7 def __init__(self): 8 super(ServiceNotFoundException, self).__init__( 9 error_type="ServiceNotFoundException", message="Service not found." 10 ) 11 12 13class TaskDefinitionNotFoundException(JsonRESTError): 14 code = 400 15 16 def __init__(self): 17 super(TaskDefinitionNotFoundException, self).__init__( 18 error_type="ClientException", 19 message="The specified task definition does not exist.", 20 ) 21 22 23class RevisionNotFoundException(JsonRESTError): 24 code = 400 25 26 def __init__(self): 27 super(RevisionNotFoundException, self).__init__( 28 error_type="ClientException", message="Revision is missing.", 29 ) 30 31 32class TaskSetNotFoundException(JsonRESTError): 33 code = 400 34 35 def __init__(self): 36 super(TaskSetNotFoundException, self).__init__( 37 error_type="ClientException", 38 message="The specified task set does not exist.", 39 ) 40 41 42class ClusterNotFoundException(JsonRESTError): 43 code = 400 44 45 def __init__(self): 46 super(ClusterNotFoundException, self).__init__( 47 error_type="ClusterNotFoundException", message="Cluster not found.", 48 ) 49 50 51class EcsClientException(JsonRESTError): 52 code = 400 53 54 def __init__(self, message): 55 super(EcsClientException, self).__init__( 56 error_type="ClientException", message=message, 57 ) 58 59 60class InvalidParameterException(JsonRESTError): 61 code = 400 62 63 def __init__(self, message): 64 super(InvalidParameterException, self).__init__( 65 error_type="InvalidParameterException", message=message, 66 ) 67 68 69class UnknownAccountSettingException(InvalidParameterException): 70 def __init__(self): 71 super().__init__( 72 "unknown should be one of [serviceLongArnFormat,taskLongArnFormat,containerInstanceLongArnFormat,containerLongArnFormat,awsvpcTrunking,containerInsights,dualStackIPv6]" 73 ) 74