Show / Hide Table of Contents

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.

Inheritance
object
ResourceHookBinding
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Pulumi
Assembly: Pulumi.dll
Syntax
public class ResourceHookBinding

Properties

View Source

AfterCreate

Hooks to be invoked after the resource is created.

Declaration
public List<ResourceHook> AfterCreate { get; set; }
Property Value
Type Description
List<ResourceHook>
View Source

AfterDelete

Hooks to be invoked after the resource is deleted.

Declaration
public List<ResourceHook> AfterDelete { get; set; }
Property Value
Type Description
List<ResourceHook>
View Source

AfterUpdate

Hooks to be invoked after the resource is updated.

Declaration
public List<ResourceHook> AfterUpdate { get; set; }
Property Value
Type Description
List<ResourceHook>
View Source

BeforeCreate

Hooks to be invoked before the resource is created.

Declaration
public List<ResourceHook> BeforeCreate { get; set; }
Property Value
Type Description
List<ResourceHook>
View Source

BeforeDelete

Hooks to be invoked before the resource is deleted.

Declaration
public List<ResourceHook> BeforeDelete { get; set; }
Property Value
Type Description
List<ResourceHook>
View Source

BeforeUpdate

Hooks to be invoked before the resource is updated.

Declaration
public List<ResourceHook> BeforeUpdate { get; set; }
Property Value
Type Description
List<ResourceHook>
View Source

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
View Source

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 Source

Clone()

Creates a deep copy of this ResourceHookBinding instance.

Declaration
public ResourceHookBinding Clone()
Returns
Type Description
ResourceHookBinding
View Source

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
  • View Source
Back to top Copyright 2016-2023, Pulumi Corporation.