runway.cfngin.hooks.utils module

Hook utils.

class runway.cfngin.hooks.utils.BlankBlueprint(name: str, context: CfnginContext, mappings: Optional[Dict[str, Dict[str, Any]]] = None, description: Optional[str] = None)[source]

Bases: runway.cfngin.blueprints.base.Blueprint

Blueprint that can be built programatically.

Instantiate class.

Parameters
  • name – A name for the blueprint.

  • context – Context the blueprint is being executed under.

  • mappings – CloudFormation Mappings to be used in the template.

  • description – Used to describe the resulting CloudFormation template.

create_template()None[source]

Create template without raising NotImplementedError.

VARIABLES: Dict[str, BlueprintVariableTypeDef]
context: CfnginContext
description: Optional[str]
mappings: Optional[Dict[str, Dict[str, Any]]]
name: str
outputs: Dict[str, Any]
resolved_variables: Optional[Dict[str, Any]]
runway.cfngin.hooks.utils.full_path(path: str)str[source]

Return full path.

runway.cfngin.hooks.utils.handle_hooks(stage: str, hooks: List[CfnginHookDefinitionModel], provider: Provider, context: CfnginContext)[source]

Handle pre/post_deploy hooks.

These are pieces of code that we want to run before/after deploying stacks.

Parameters
  • stage – The current stage (pre_run, post_run, etc).

  • hooks – Hooks to execute.

  • provider – Provider instance.

  • context – Context instance.