@pulumi/pulumi
    Preparing search index...

    Interface ResourceHookBinding

    Binds ResourceHook instances to a resource. The resource hooks will be invoked during certain step of the lifecycle of the resource.

    before_${action} hooks that raise an exception cause the action to fail. after_${action} hooks that raise an exception will log a warning, but do not cause the action or the deployment to fail.

    When running pulumi destroy, before_delete and after_delete resource hooks require the operation to run with --run-program, to ensure that the program which defines the hooks is available.

    Index

    Properties

    Hooks to be invoked after the resource is created.

    afterDelete?: ResourceHook[]

    Hooks to be invoked after the resource is deleted.

    Note that delete hooks require that destroy operations are run with --run-program. Unlike other hook types, this argument requires named ResourceHook instances, and does not accept anonymous ResourceHookFunction. This is because the engine needs to be able to identify a hook when a resource is deleted.

    Hooks to be invoked after the resource is updated.

    beforeCreate?: (ResourceHook | ResourceHookFunction)[]

    Hooks to be invoked before the resource is created.

    beforeDelete?: ResourceHook[]

    Hooks to be invoked before the resource is deleted.

    Note that delete hooks require that destroy operations are run with --run-program. Unlike other hook types, this argument requires named ResourceHook instances, and does not accept anonymous ResourceHookFunction. This is because the engine needs to be able to identify a hook when a resource is deleted.

    beforeUpdate?: (ResourceHook | ResourceHookFunction)[]

    Hooks to be invoked before the resource is updated.

    onError?: ErrorHook[]

    Hooks to be invoked when an operation fails and is retryable.

    Note that error hooks require named ErrorHook instances, and do not accept anonymous functions. The callback can return true to retry the operation, or false to not retry.