Class ResourceHook
A resource hook is a callback that can be registered to run at specific points in the resource lifecycle.
Inherited Members
Namespace: Pulumi
Assembly: Pulumi.dll
Syntax
public class ResourceHook
Constructors
View SourceResourceHook(string, ResourceHookCallback, ResourceHookOptions?)
Creates a new ResourceHook with the specified name, callback, and options.
Declaration
public ResourceHook(string name, ResourceHookCallback callback, ResourceHookOptions? options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | |
| ResourceHookCallback | callback | |
| ResourceHookOptions | options |
ResourceHook(string, ResourceHookCallback, ResourceHookOptions, Task)
Creates a new ResourceHook with the specified name, callback, and options. The task determining whether or not the hook has been registered must also be provided. Typically this will be a registration task attached to the current deployment, but subclasses may use this constructor to initialize hooks with custom registration logic.
Declaration
protected ResourceHook(string name, ResourceHookCallback callback, ResourceHookOptions options, Task registered)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | |
| ResourceHookCallback | callback | |
| ResourceHookOptions | options | |
| Task | registered |
Properties
View SourceCallback
The callback to invoke when the resource hook is triggered.
Declaration
public ResourceHookCallback Callback { get; }
Property Value
| Type | Description |
|---|---|
| ResourceHookCallback |
Name
The name of the resource hook. This must be unique within a program.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Options
Options for the resource hook, such as whether it should run during a dry-run operation
(e.g. preview).
Declaration
public ResourceHookOptions Options { get; }
Property Value
| Type | Description |
|---|---|
| ResourceHookOptions |