runway.cfngin.hooks.utils module

Hook utils.

class runway.cfngin.hooks.utils.BlankBlueprint[source]

Bases: Blueprint

Blueprint that can be built programmatically.

create_template() None[source]

Create template without raising NotImplementedError.

pydantic model runway.cfngin.hooks.utils.TagDataModel[source]

Bases: BaseModel

AWS Resource Tag data model.

Show JSON schema
{
   "title": "TagDataModel",
   "description": "AWS Resource Tag data model.",
   "type": "object",
   "properties": {
      "Key": {
         "title": "Key",
         "type": "string"
      },
      "Value": {
         "title": "Value",
         "type": "string"
      }
   },
   "additionalProperties": false,
   "required": [
      "Key",
      "Value"
   ]
}

field key: Annotated[str, pydantic.Field(alias='Key')] = PydanticUndefined (alias 'Key')
field value: Annotated[str, pydantic.Field(alias='Value')] = PydanticUndefined (alias 'Value')
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) None[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.