runway.cfngin.exceptions module

CFNgin exceptions.

exception runway.cfngin.exceptions.CfnginError(*args: typing.Any, **kwargs: typing.Any)[source]

Bases: runway.exceptions.RunwayError

Base class for custom exceptions raised by Runway.

Instantiate class.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.CancelExecution(*args: typing.Any, **kwargs: typing.Any)[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised when we want to cancel executing the plan.

Instantiate class.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.CfnginBucketAccessDenied(*, bucket_name: str)[source]

Bases: runway.cfngin.exceptions.CfnginError

Access denied to CFNgin bucket.

This can occur when the bucket exists in another AWS account and/or the credentials being used do not have adequate permissions to access the bucket.

Instantiate class.

Parameters

bucket_name – Name of the CFNgin bucket.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.CfnginBucketNotFound(*, bucket_name: str)[source]

Bases: runway.cfngin.exceptions.CfnginError

CFNgin bucket specified or default bucket being used but it does not exist.

This can occur when using a custom stack to deploy the CFNgin bucket but the custom stack does not create bucket that is expected.

Instantiate class.

Parameters

bucket_name – Name of the CFNgin bucket.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.CfnginBucketRequired(*, config_path: Optional[AnyPath] = None, reason: Optional[str] = None)[source]

Bases: runway.cfngin.exceptions.CfnginError

CFNgin bucket is required to use a feature but it not provided/disabled.

Instantiate class.

Parameters
  • config_path – Path to the CFNgin config file.

  • reason – Reason why CFNgin bucket is needed.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.ChangesetDidNotStabilize(change_set_id: str)[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised when the applying a changeset fails.

Instantiate class.

Parameters

change_set_id – The changeset that failed.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.GraphError(exception: Exception, stack: str, dependency: str)[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised when the graph is invalid (e.g. acyclic dependencies).

Instantiate class.

Parameters
  • exception – The exception that was raised by the invalid graph.

  • stack – Name of the stack causing the error.

  • dependency – Name of the dependency causing the error.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.ImproperlyConfigured(kls: typing.Any, error: Exception, *args: typing.Any, **kwargs: typing.Any)[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised when a componenet is improperly configured.

Instantiate class.

Parameters
  • kls – The class that was improperly configured.

  • error – The exception that was raised when trying to use cls.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.InvalidConfig(errors: Union[str, List[Union[Exception, str]]])[source]

Bases: runway.cfngin.exceptions.CfnginError

Provided config file is invalid.

Instantiate class.

Parameters

errors – Errors or error messages that are raised to identify that a config is invalid.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.InvalidDockerizePipConfiguration(msg: str)[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised when the provided configuration for dockerized pip is invalid.

Instantiate class.

Parameters

msg – The reason for the error being raised.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.InvalidUserdataPlaceholder(blueprint_name: str, exception_message: str, *args: typing.Any, **kwargs: typing.Any)[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised when a placeholder name in raw_user_data is not valid.

E.g ${100} would raise this.

Instantiate class.

Parameters
  • blueprint_name – Name of the blueprint with invalid userdata placeholder.

  • exception_message – Message from the exception that was raised while parsing the userdata.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.MissingEnvironment(key: str, *args: typing.Any, **kwargs: typing.Any)[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised when an environment lookup is used but the key doesn’t exist.

Instantiate class.

Parameters

key – The key that was used but doesn’t exist in the environment.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.MissingParameterException(parameters: List[str], *args: Any, **kwargs: Any)[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised if a required parameter with no default is missing.

Instantiate class.

Parameters

parameters – A list of the parameters that are missing.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.MissingVariable(blueprint_name: str, variable_name: str, *args: typing.Any, **kwargs: typing.Any)[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised when a variable with no default is not provided a value.

Instantiate class.

Parameters
  • blueprint_name – Name of the blueprint.

  • variable_name – Name of the variable missing a value.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.PipError[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised when pip returns a non-zero exit code.

Instantiate class.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.PipenvError[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised when pipenv returns a non-zero exit code.

Instantiate class.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.PersistentGraphCannotLock(reason: str)[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised when the persistent graph in S3 cannot be locked.

Instantiate class.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.PersistentGraphCannotUnlock(reason: Union[Exception, str])[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised when the persistent graph in S3 cannot be unlocked.

Instantiate class.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.PersistentGraphLocked(*, message: Optional[str] = None, reason: Optional[str] = None)[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised when the persistent graph in S3 is lock.

The action being executed requires it to be unlocked before attempted.

Instantiate class.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.PersistentGraphLockCodeMissmatch(provided_code: str, s3_code: Optional[str])[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised when the provided persistent graph lock code does not match.

The code used to unlock the persistent graph must match the s3 object lock code.

Instantiate class.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.PersistentGraphUnlocked(message: Optional[str] = None, reason: Optional[str] = None)[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised when the persistent graph in S3 is unlock.

The action being executed requires it to be locked before attempted.

Instantiate class.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.PlanFailed(failed_steps: List[Step], *args: Any, **kwargs: Any)[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised if any step of a plan fails.

Instantiate class.

Parameters

failed_steps – The steps that failed.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.StackDidNotChange(*args: typing.Any, **kwargs: typing.Any)[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised when there are no changes to be made by the provider.

Instantiate class.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.StackDoesNotExist(stack_name: str, *args: typing.Any, **kwargs: typing.Any)[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised when a stack does not exist in AWS.

Instantiate class.

Parameters

stack_name – Name of the stack that does not exist.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.StackUpdateBadStatus(stack_name: str, stack_status: str, reason: str, *args: typing.Any, **kwargs: typing.Any)[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised if the state of a stack can’t be handled.

Instantiate class.

Parameters
  • stack_name – Name of the stack.

  • stack_status – The stack’s status.

  • reason – The reason for the current status.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.StackFailed(stack_name: str, status_reason: Optional[str] = None)[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised when a stack action fails.

Primarily used with hooks that act on stacks.

Instantiate class.

Parameters
  • stack_name – Name of the stack.

  • status_reason – The reason for the current status.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.UnableToExecuteChangeSet(stack_name: str, change_set_id: str, execution_status: str)[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised if changeset execution status is not AVAILABLE.

Instantiate class.

Parameters
  • stack_name – Name of the stack.

  • change_set_id – The changeset that failed.

  • execution_status – The value of the changeset’s ExecutionStatus attribute.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.UnhandledChangeSetStatus(stack_name: str, change_set_id: str, status: str, status_reason: str)[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised when creating a changeset failed for an unhandled reason.

Handled failure reasons include: no changes

Instantiate class.

Parameters
  • stack_name – Name of the stack.

  • change_set_id – The changeset that failed.

  • status – The state that could not be handled.

  • status_reason – Cause of the current state.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.UnresolvedBlueprintVariable(blueprint_name: str, variable: Variable, *args: Any, **kwargs: Any)[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised when trying to use a variable before it has been resolved.

Instantiate class.

Parameters
  • blueprint_name – Name of the blueprint that tried to use the unresolved variables.

  • variable – The unresolved variable.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.UnresolvedBlueprintVariables(blueprint_name: str, *args: typing.Any, **kwargs: typing.Any)[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised when trying to use variables before they has been resolved.

Instantiate class.

Parameters

blueprint_name – Name of the blueprint that tried to use the unresolved variables.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.exceptions.ValidatorError(variable: str, validator: str, value: str, exception: Optional[Exception] = None)[source]

Bases: runway.cfngin.exceptions.CfnginError

Used for errors raised by custom validators of blueprint variables.

Instantiate class.

Parameters
  • variable – The variable that failed validation.

  • validator – The validator that was not passed.

  • value – The value of the variable that did not pass the validator.

  • exception – The exception raised by the validator.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

__str__()[source]

Return the exception’s message when converting to a string.

exception runway.cfngin.exceptions.VariableTypeRequired(blueprint_name: str, variable_name: str, *args: typing.Any, **kwargs: typing.Any)[source]

Bases: runway.cfngin.exceptions.CfnginError

Raised when a variable defined in a blueprint is missing a type.

Instantiate class.

Parameters
  • blueprint_name – Name of the blueprint.

  • variable_name – Name of the variable missing a type.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.