Show / Hide Table of Contents

Class ResourceHook

A resource hook is a callback that can be registered to run at specific points in the resource lifecycle.

Inheritance
object
ResourceHook
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 ResourceHook

Constructors

View Source

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

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 Source

Callback

The callback to invoke when the resource hook is triggered.

Declaration
public ResourceHookCallback Callback { get; }
Property Value
Type Description
ResourceHookCallback
View Source

Name

The name of the resource hook. This must be unique within a program.

Declaration
public string Name { get; }
Property Value
Type Description
string
View Source

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