runway.cfngin.hooks.base module¶
Base class for CFNgin hooks.
-
class
runway.cfngin.hooks.base.
Hook
(context, provider, **kwargs)[source]¶ Bases:
object
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.
- Type
-
blueprint
¶ Blueprint generated by the hook if it will be deploying a stack.
- Type
Optional[Blueprint]
-
provider
¶ Provider instance. (passed in by CFNgin)
- Type
Instantiate class.
- Parameters
context (
runway.cfngin.context.Context
) – Context instance. (passed in by CFNgin)provider (
runway.cfngin.providers.base.BaseProvider
) – Provider instance. (passed in by CFNgin)
Return tags that should be applied to any resource being created.
- Returns
troposphere.Tags
-
-
class
runway.cfngin.hooks.base.
HookBuildAction
(context, provider)[source]¶ Bases:
runway.cfngin.actions.build.Action
Build action that can be used from hooks.
Instantiate class.
- Parameters
context (
runway.cfngin.context.Context
) – The context for the current run.provider (
runway.cfngin.providers.base.BaseProvider
) – The provider instance.
-
property
provider
¶ Override the inherited property to return the local provider.
-
class
runway.cfngin.hooks.base.
HookDestroyAction
(context, provider)[source]¶ Bases:
runway.cfngin.hooks.base.HookBuildAction
Destroy action that can be used from hooks.
Instantiate class.
- Parameters
context (
runway.cfngin.context.Context
) – The context for the current run.provider (
runway.cfngin.providers.base.BaseProvider
) – The provider instance.
-
class
runway.cfngin.hooks.base.
HookStackDefinition
(name, **kwargs)[source]¶ Bases:
collections.UserDict
,object
Stack definition for use in hooks to avoid cyclic imports.
Instantiate class.