Class ResourceHookBinding
Binds ResourceHooks to a resource. The resource hooks will be invoked at specific points in the lifecycle of the resource.
Before* hooks that raise an exception will cause the resource operation to fail. After* hooks that
raise an exception will log a warning, but do not cause the action or the deployment to fail.
When running pulumi destroy, BeforeDelete and AfterDelete resource hooks require the
operation to run with --run-program, to ensure that the program which defines the hooks is available.
Inherited Members
Namespace: Pulumi
Assembly: Pulumi.dll
Syntax
public class ResourceHookBinding
Properties
View SourceAfterCreate
Hooks to be invoked after the resource is created.
Declaration
public List<ResourceHook> AfterCreate { get; set; }
Property Value
| Type | Description |
|---|---|
| List<ResourceHook> |
AfterDelete
Hooks to be invoked after the resource is deleted.
Declaration
public List<ResourceHook> AfterDelete { get; set; }
Property Value
| Type | Description |
|---|---|
| List<ResourceHook> |
AfterUpdate
Hooks to be invoked after the resource is updated.
Declaration
public List<ResourceHook> AfterUpdate { get; set; }
Property Value
| Type | Description |
|---|---|
| List<ResourceHook> |
BeforeCreate
Hooks to be invoked before the resource is created.
Declaration
public List<ResourceHook> BeforeCreate { get; set; }
Property Value
| Type | Description |
|---|---|
| List<ResourceHook> |
BeforeDelete
Hooks to be invoked before the resource is deleted.
Declaration
public List<ResourceHook> BeforeDelete { get; set; }
Property Value
| Type | Description |
|---|---|
| List<ResourceHook> |
BeforeUpdate
Hooks to be invoked before the resource is updated.
Declaration
public List<ResourceHook> BeforeUpdate { get; set; }
Property Value
| Type | Description |
|---|---|
| List<ResourceHook> |
IsEmpty
IsEmpty is true if and only if no hooks have been bound to any of the lifecycle events.
Declaration
public bool IsEmpty { get; }
Property Value
| Type | Description |
|---|---|
| bool |
OnError
Hooks to be invoked when a resource operation fails. Return true to retry, false to not retry.
Declaration
public List<ErrorHook> OnError { get; set; }
Property Value
| Type | Description |
|---|---|
| List<ErrorHook> |
Methods
View SourceClone()
Creates a deep copy of this ResourceHookBinding instance.
Declaration
public ResourceHookBinding Clone()
Returns
| Type | Description |
|---|---|
| ResourceHookBinding |
Concat(ResourceHookBinding)
Concatenates this ResourceHookBinding with another , merging their hooks.
Declaration
public ResourceHookBinding Concat(ResourceHookBinding other)
Parameters
| Type | Name | Description |
|---|---|---|
| ResourceHookBinding | other |
Returns
| Type | Description |
|---|---|
| ResourceHookBinding |