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