-
Notifications
You must be signed in to change notification settings - Fork 4.3k
/
Copy pathexceptions.py
59 lines (40 loc) · 2.09 KB
/
exceptions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
class CloudFormationCommandError(Exception):
fmt = 'An unspecified error occurred'
def __init__(self, **kwargs):
msg = self.fmt.format(**kwargs)
Exception.__init__(self, msg)
self.kwargs = kwargs
class InvalidTemplatePathError(CloudFormationCommandError):
fmt = "Invalid template path {template_path}"
class ChangeEmptyError(CloudFormationCommandError):
fmt = "No changes to deploy. Stack {stack_name} is up to date"
class InvalidLocalPathError(CloudFormationCommandError):
fmt = ("Parameter {property_name} of resource {resource_id} refers "
"to a file or folder that does not exist {local_path}")
class InvalidTemplateUrlParameterError(CloudFormationCommandError):
fmt = ("{property_name} parameter of {resource_id} resource is invalid. "
"It must be a S3 URL or path to CloudFormation "
"template file. Actual: {template_path}")
class ExportFailedError(CloudFormationCommandError):
fmt = ("Unable to upload artifact {property_value} referenced "
"by {property_name} parameter of {resource_id} resource."
"\n"
"{ex}")
class InvalidKeyValuePairArgumentError(CloudFormationCommandError):
fmt = ("{value} value passed to --{argname} must be of format "
"Key=Value")
class DeployFailedError(CloudFormationCommandError):
fmt = \
("Failed to create/update the stack. Run the following command"
"\n"
"to fetch the list of events leading up to the failure"
"\n"
"aws cloudformation describe-stack-events --stack-name {stack_name}")
class DeployBucketRequiredError(CloudFormationCommandError):
fmt = \
("Templates with a size greater than 51,200 bytes must be deployed "
"via an S3 Bucket. Please add the --s3-bucket parameter to your "
"command. The local template will be copied to that S3 bucket and "
"then deployed.")
class InvalidForEachIntrinsicFunctionError(CloudFormationCommandError):
fmt = 'The value of {resource_id} has an invalid "Fn::ForEach::" format: Must be a list of three entries'