Path: blob/develop/awscli/customizations/cloudformation/exceptions.py
1567 views
1class CloudFormationCommandError(Exception):2fmt = 'An unspecified error occurred'34def __init__(self, **kwargs):5msg = self.fmt.format(**kwargs)6Exception.__init__(self, msg)7self.kwargs = kwargs8910class InvalidTemplatePathError(CloudFormationCommandError):11fmt = "Invalid template path {template_path}"121314class ChangeEmptyError(CloudFormationCommandError):15fmt = "No changes to deploy. Stack {stack_name} is up to date"161718class InvalidLocalPathError(CloudFormationCommandError):19fmt = ("Parameter {property_name} of resource {resource_id} refers "20"to a file or folder that does not exist {local_path}")212223class InvalidTemplateUrlParameterError(CloudFormationCommandError):24fmt = ("{property_name} parameter of {resource_id} resource is invalid. "25"It must be a S3 URL or path to CloudFormation "26"template file. Actual: {template_path}")272829class ExportFailedError(CloudFormationCommandError):30fmt = ("Unable to upload artifact {property_value} referenced "31"by {property_name} parameter of {resource_id} resource."32"\n"33"{ex}")343536class InvalidKeyValuePairArgumentError(CloudFormationCommandError):37fmt = ("{value} value passed to --{argname} must be of format "38"Key=Value")394041class DeployFailedError(CloudFormationCommandError):42fmt = \43("Failed to create/update the stack. Run the following command"44"\n"45"to fetch the list of events leading up to the failure"46"\n"47"aws cloudformation describe-stack-events --stack-name {stack_name}")4849class DeployBucketRequiredError(CloudFormationCommandError):50fmt = \51("Templates with a size greater than 51,200 bytes must be deployed "52"via an S3 Bucket. Please add the --s3-bucket parameter to your "53"command. The local template will be copied to that S3 bucket and "54"then deployed.")555657class InvalidForEachIntrinsicFunctionError(CloudFormationCommandError):58fmt = 'The value of {resource_id} has an invalid "Fn::ForEach::" format: Must be a list of three entries'596061