1. Packages
  2. Okta
  3. API Docs
  4. EventHookVerification
Okta v4.8.1 published on Thursday, Apr 18, 2024 by Pulumi

okta.EventHookVerification

Explore with Pulumi AI

okta logo
Okta v4.8.1 published on Thursday, Apr 18, 2024 by Pulumi

    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 exampleEventHook = new okta.EventHook("exampleEventHook", {
        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("exampleEventHookVerification", {eventHookId: exampleEventHook.id});
    
    import pulumi
    import pulumi_okta as okta
    
    example_event_hook = okta.EventHook("exampleEventHook",
        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("exampleEventHookVerification", event_hook_id=example_event_hook.id)
    
    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 {
    		exampleEventHook, err := okta.NewEventHook(ctx, "exampleEventHook", &okta.EventHookArgs{
    			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, "exampleEventHookVerification", &okta.EventHookVerificationArgs{
    			EventHookId: exampleEventHook.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Okta = Pulumi.Okta;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleEventHook = new Okta.EventHook("exampleEventHook", new()
        {
            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("exampleEventHookVerification", new()
        {
            EventHookId = exampleEventHook.Id,
        });
    
    });
    
    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 exampleEventHook = new EventHook("exampleEventHook", EventHookArgs.builder()        
                .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(exampleEventHook.id())
                .build());
    
        }
    }
    
    resources:
      exampleEventHook:
        type: okta:EventHook
        properties:
          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
        properties:
          eventHookId: ${exampleEventHook.id}
    

    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 string
    The unique name of the resource.
    args EventHookVerificationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args 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 string
    The unique name of the resource.
    args EventHookVerificationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EventHookVerificationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EventHookVerificationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

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

    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

    The EventHookVerification resource accepts the following input properties:

    EventHookId string
    Event Hook ID.
    EventHookId string
    Event Hook ID.
    eventHookId String
    Event Hook ID.
    eventHookId string
    Event Hook ID.
    event_hook_id str
    Event Hook ID.
    eventHookId 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)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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 string
    Event Hook ID.
    EventHookId string
    Event Hook ID.
    eventHookId String
    Event Hook ID.
    eventHookId string
    Event Hook ID.
    event_hook_id str
    Event Hook ID.
    eventHookId String
    Event Hook ID.

    Import

    This resource does not support importing.

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Okta pulumi/pulumi-okta
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the okta Terraform Provider.
    okta logo
    Okta v4.8.1 published on Thursday, Apr 18, 2024 by Pulumi