runway.cfngin.hooks.base module¶
Base class for CFNgin hooks.
- class runway.cfngin.hooks.base.Hook[source]¶
Bases:
CfnginHookProtocol
Base class for hooks.
Not all hooks need to be classes and not all classes need to be hooks.
- args¶
Keyword arguments passed to the hook, loaded into a MutableMap object.
- context¶
Context instance. (passed in by CFNgin)
- Type:
- provider Provider instance.
- Type:
passed in by CFNgin
- ARGS_PARSER¶
Class used to parse arguments passed to the hook.
alias of
HookArgsBaseModel
- __init__(context: CfnginContext, provider: Provider, **kwargs: Any) None [source]¶
Instantiate class.
- Parameters:
context – Context instance. (passed in by CFNgin)
provider – Provider instance. (passed in by CFNgin)
**kwargs – Arbitrary keyword arguments.
- deploy_stack(stack: Stack | None = None, wait: bool = False) Status [source]¶
Deploy a stack.
- Parameters:
stack – A stack to act on.
wait – Wither to wait for the stack to complete before returning.
- Returns:
Ending status of the stack.
- destroy_stack(stack: Stack | None = None, wait: bool = False) Status [source]¶
Destroy a stack.
- Parameters:
stack – A stack to act on.
wait – Wither to wait for the stack to complete before returning.
- Returns:
Ending status of the stack.
- get_template_description(suffix: str | None = None) str [source]¶
Generate a template description.
- Parameters:
suffix – Suffix to append to the end of a CloudFormation template description.
- property tags: Tags¶
Return tags that should be applied to any resource being created.
- pydantic model runway.cfngin.hooks.base.HookArgsBaseModel[source]¶
Bases:
BaseModel
Base model for hook args.
Show JSON schema
{ "title": "HookArgsBaseModel", "description": "Base model for hook args.", "type": "object", "properties": { "tags": { "additionalProperties": { "type": "string" }, "default": {}, "title": "Tags", "type": "object" } } }