1. Packages
  2. Okta Provider
  3. API Docs
  4. EventHookVerification
Okta v4.17.0 published on Wednesday, Apr 23, 2025 by Pulumi

okta.EventHookVerification

Explore with Pulumi AI

Verifies the Event Hook. The resource won’t be created unless the URI provided in the event hook returns a valid JSON object with verification. See Event Hooks documentation for details.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";

const example = new okta.EventHook("example", {
    name: "example",
    events: [
        "user.lifecycle.create",
        "user.lifecycle.delete.initiated",
    ],
    channel: {
        type: "HTTP",
        version: "1.0.0",
        uri: "https://example.com/test",
    },
    auth: {
        type: "HEADER",
        key: "Authorization",
        value: "123",
    },
});
const exampleEventHookVerification = new okta.EventHookVerification("example", {eventHookId: example.id});
Copy
import pulumi
import pulumi_okta as okta

example = okta.EventHook("example",
    name="example",
    events=[
        "user.lifecycle.create",
        "user.lifecycle.delete.initiated",
    ],
    channel={
        "type": "HTTP",
        "version": "1.0.0",
        "uri": "https://example.com/test",
    },
    auth={
        "type": "HEADER",
        "key": "Authorization",
        "value": "123",
    })
example_event_hook_verification = okta.EventHookVerification("example", event_hook_id=example.id)
Copy
package main

import (
	"github.com/pulumi/pulumi-okta/sdk/v4/go/okta"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := okta.NewEventHook(ctx, "example", &okta.EventHookArgs{
			Name: pulumi.String("example"),
			Events: pulumi.StringArray{
				pulumi.String("user.lifecycle.create"),
				pulumi.String("user.lifecycle.delete.initiated"),
			},
			Channel: pulumi.StringMap{
				"type":    pulumi.String("HTTP"),
				"version": pulumi.String("1.0.0"),
				"uri":     pulumi.String("https://example.com/test"),
			},
			Auth: pulumi.StringMap{
				"type":  pulumi.String("HEADER"),
				"key":   pulumi.String("Authorization"),
				"value": pulumi.String("123"),
			},
		})
		if err != nil {
			return err
		}
		_, err = okta.NewEventHookVerification(ctx, "example", &okta.EventHookVerificationArgs{
			EventHookId: example.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Okta = Pulumi.Okta;

return await Deployment.RunAsync(() => 
{
    var example = new Okta.EventHook("example", new()
    {
        Name = "example",
        Events = new[]
        {
            "user.lifecycle.create",
            "user.lifecycle.delete.initiated",
        },
        Channel = 
        {
            { "type", "HTTP" },
            { "version", "1.0.0" },
            { "uri", "https://example.com/test" },
        },
        Auth = 
        {
            { "type", "HEADER" },
            { "key", "Authorization" },
            { "value", "123" },
        },
    });

    var exampleEventHookVerification = new Okta.EventHookVerification("example", new()
    {
        EventHookId = example.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.okta.EventHook;
import com.pulumi.okta.EventHookArgs;
import com.pulumi.okta.EventHookVerification;
import com.pulumi.okta.EventHookVerificationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new EventHook("example", EventHookArgs.builder()
            .name("example")
            .events(            
                "user.lifecycle.create",
                "user.lifecycle.delete.initiated")
            .channel(Map.ofEntries(
                Map.entry("type", "HTTP"),
                Map.entry("version", "1.0.0"),
                Map.entry("uri", "https://example.com/test")
            ))
            .auth(Map.ofEntries(
                Map.entry("type", "HEADER"),
                Map.entry("key", "Authorization"),
                Map.entry("value", "123")
            ))
            .build());

        var exampleEventHookVerification = new EventHookVerification("exampleEventHookVerification", EventHookVerificationArgs.builder()
            .eventHookId(example.id())
            .build());

    }
}
Copy
resources:
  example:
    type: okta:EventHook
    properties:
      name: example
      events:
        - user.lifecycle.create
        - user.lifecycle.delete.initiated
      channel:
        type: HTTP
        version: 1.0.0
        uri: https://example.com/test
      auth:
        type: HEADER
        key: Authorization
        value: '123'
  exampleEventHookVerification:
    type: okta:EventHookVerification
    name: example
    properties:
      eventHookId: ${example.id}
Copy

Create EventHookVerification Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new EventHookVerification(name: string, args: EventHookVerificationArgs, opts?: CustomResourceOptions);
@overload
def EventHookVerification(resource_name: str,
                          args: EventHookVerificationArgs,
                          opts: Optional[ResourceOptions] = None)

@overload
def EventHookVerification(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          event_hook_id: Optional[str] = None)
func NewEventHookVerification(ctx *Context, name string, args EventHookVerificationArgs, opts ...ResourceOption) (*EventHookVerification, error)
public EventHookVerification(string name, EventHookVerificationArgs args, CustomResourceOptions? opts = null)
public EventHookVerification(String name, EventHookVerificationArgs args)
public EventHookVerification(String name, EventHookVerificationArgs args, CustomResourceOptions options)
type: okta:EventHookVerification
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. EventHookVerificationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. EventHookVerificationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. EventHookVerificationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. EventHookVerificationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. EventHookVerificationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var eventHookVerificationResource = new Okta.EventHookVerification("eventHookVerificationResource", new()
{
    EventHookId = "string",
});
Copy
example, err := okta.NewEventHookVerification(ctx, "eventHookVerificationResource", &okta.EventHookVerificationArgs{
	EventHookId: pulumi.String("string"),
})
Copy
var eventHookVerificationResource = new EventHookVerification("eventHookVerificationResource", EventHookVerificationArgs.builder()
    .eventHookId("string")
    .build());
Copy
event_hook_verification_resource = okta.EventHookVerification("eventHookVerificationResource", event_hook_id="string")
Copy
const eventHookVerificationResource = new okta.EventHookVerification("eventHookVerificationResource", {eventHookId: "string"});
Copy
type: okta:EventHookVerification
properties:
    eventHookId: string
Copy

EventHookVerification Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The EventHookVerification resource accepts the following input properties:

EventHookId
This property is required.
Changes to this property will trigger replacement.
string
Event hook ID
EventHookId
This property is required.
Changes to this property will trigger replacement.
string
Event hook ID
eventHookId
This property is required.
Changes to this property will trigger replacement.
String
Event hook ID
eventHookId
This property is required.
Changes to this property will trigger replacement.
string
Event hook ID
event_hook_id
This property is required.
Changes to this property will trigger replacement.
str
Event hook ID
eventHookId
This property is required.
Changes to this property will trigger replacement.
String
Event hook ID

Outputs

All input properties are implicitly available as output properties. Additionally, the EventHookVerification resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing EventHookVerification Resource

Get an existing EventHookVerification resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: EventHookVerificationState, opts?: CustomResourceOptions): EventHookVerification
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        event_hook_id: Optional[str] = None) -> EventHookVerification
func GetEventHookVerification(ctx *Context, name string, id IDInput, state *EventHookVerificationState, opts ...ResourceOption) (*EventHookVerification, error)
public static EventHookVerification Get(string name, Input<string> id, EventHookVerificationState? state, CustomResourceOptions? opts = null)
public static EventHookVerification get(String name, Output<String> id, EventHookVerificationState state, CustomResourceOptions options)
resources:  _:    type: okta:EventHookVerification    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
EventHookId Changes to this property will trigger replacement. string
Event hook ID
EventHookId Changes to this property will trigger replacement. string
Event hook ID
eventHookId Changes to this property will trigger replacement. String
Event hook ID
eventHookId Changes to this property will trigger replacement. string
Event hook ID
event_hook_id Changes to this property will trigger replacement. str
Event hook ID
eventHookId Changes to this property will trigger replacement. String
Event hook ID

Package Details

Repository
Okta pulumi/pulumi-okta
License
Apache-2.0
Notes
This Pulumi package is based on the okta Terraform Provider.