1. Packages
  2. Okta
  3. API Docs
  4. EventHook
Okta v4.8.0 published on Saturday, Mar 2, 2024 by Pulumi

okta.EventHook

Explore with Pulumi AI

okta logo
Okta v4.8.0 published on Saturday, Mar 2, 2024 by Pulumi

    Creates an event hook.

    This resource allows you to create and configure an event hook.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Okta = Pulumi.Okta;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Okta.EventHook("example", new()
        {
            Auth = 
            {
                { "key", "Authorization" },
                { "type", "HEADER" },
                { "value", "123" },
            },
            Channel = 
            {
                { "type", "HTTP" },
                { "uri", "https://example.com/test" },
                { "version", "1.0.0" },
            },
            Events = new[]
            {
                "user.lifecycle.create",
                "user.lifecycle.delete.initiated",
            },
        });
    
    });
    
    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 {
    		_, err := okta.NewEventHook(ctx, "example", &okta.EventHookArgs{
    			Auth: pulumi.StringMap{
    				"key":   pulumi.String("Authorization"),
    				"type":  pulumi.String("HEADER"),
    				"value": pulumi.String("123"),
    			},
    			Channel: pulumi.StringMap{
    				"type":    pulumi.String("HTTP"),
    				"uri":     pulumi.String("https://example.com/test"),
    				"version": pulumi.String("1.0.0"),
    			},
    			Events: pulumi.StringArray{
    				pulumi.String("user.lifecycle.create"),
    				pulumi.String("user.lifecycle.delete.initiated"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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 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()        
                .auth(Map.ofEntries(
                    Map.entry("key", "Authorization"),
                    Map.entry("type", "HEADER"),
                    Map.entry("value", "123")
                ))
                .channel(Map.ofEntries(
                    Map.entry("type", "HTTP"),
                    Map.entry("uri", "https://example.com/test"),
                    Map.entry("version", "1.0.0")
                ))
                .events(            
                    "user.lifecycle.create",
                    "user.lifecycle.delete.initiated")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_okta as okta
    
    example = okta.EventHook("example",
        auth={
            "key": "Authorization",
            "type": "HEADER",
            "value": "123",
        },
        channel={
            "type": "HTTP",
            "uri": "https://example.com/test",
            "version": "1.0.0",
        },
        events=[
            "user.lifecycle.create",
            "user.lifecycle.delete.initiated",
        ])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as okta from "@pulumi/okta";
    
    const example = new okta.EventHook("example", {
        auth: {
            key: "Authorization",
            type: "HEADER",
            value: "123",
        },
        channel: {
            type: "HTTP",
            uri: "https://example.com/test",
            version: "1.0.0",
        },
        events: [
            "user.lifecycle.create",
            "user.lifecycle.delete.initiated",
        ],
    });
    
    resources:
      example:
        type: okta:EventHook
        properties:
          auth:
            key: Authorization
            type: HEADER
            value: '123'
          channel:
            type: HTTP
            uri: https://example.com/test
            version: 1.0.0
          events:
            - user.lifecycle.create
            - user.lifecycle.delete.initiated
    

    Create EventHook Resource

    new EventHook(name: string, args: EventHookArgs, opts?: CustomResourceOptions);
    @overload
    def EventHook(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  auth: Optional[Mapping[str, str]] = None,
                  channel: Optional[Mapping[str, str]] = None,
                  events: Optional[Sequence[str]] = None,
                  headers: Optional[Sequence[EventHookHeaderArgs]] = None,
                  name: Optional[str] = None,
                  status: Optional[str] = None)
    @overload
    def EventHook(resource_name: str,
                  args: EventHookArgs,
                  opts: Optional[ResourceOptions] = None)
    func NewEventHook(ctx *Context, name string, args EventHookArgs, opts ...ResourceOption) (*EventHook, error)
    public EventHook(string name, EventHookArgs args, CustomResourceOptions? opts = null)
    public EventHook(String name, EventHookArgs args)
    public EventHook(String name, EventHookArgs args, CustomResourceOptions options)
    
    type: okta:EventHook
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args EventHookArgs
    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 EventHookArgs
    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 EventHookArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EventHookArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EventHookArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    EventHook 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 EventHook resource accepts the following input properties:

    Channel Dictionary<string, string>
    Details of the endpoint the event hook will hit.
    Events List<string>
    The events that will be delivered to this hook. See here for a list of supported events.
    Auth Dictionary<string, string>
    Authentication required for event hook request.
    Headers List<EventHookHeader>
    Map of headers to send along in event hook request.
    Name string
    The event hook display name.
    Status string
    Channel map[string]string
    Details of the endpoint the event hook will hit.
    Events []string
    The events that will be delivered to this hook. See here for a list of supported events.
    Auth map[string]string
    Authentication required for event hook request.
    Headers []EventHookHeaderArgs
    Map of headers to send along in event hook request.
    Name string
    The event hook display name.
    Status string
    channel Map<String,String>
    Details of the endpoint the event hook will hit.
    events List<String>
    The events that will be delivered to this hook. See here for a list of supported events.
    auth Map<String,String>
    Authentication required for event hook request.
    headers List<EventHookHeader>
    Map of headers to send along in event hook request.
    name String
    The event hook display name.
    status String
    channel {[key: string]: string}
    Details of the endpoint the event hook will hit.
    events string[]
    The events that will be delivered to this hook. See here for a list of supported events.
    auth {[key: string]: string}
    Authentication required for event hook request.
    headers EventHookHeader[]
    Map of headers to send along in event hook request.
    name string
    The event hook display name.
    status string
    channel Mapping[str, str]
    Details of the endpoint the event hook will hit.
    events Sequence[str]
    The events that will be delivered to this hook. See here for a list of supported events.
    auth Mapping[str, str]
    Authentication required for event hook request.
    headers Sequence[EventHookHeaderArgs]
    Map of headers to send along in event hook request.
    name str
    The event hook display name.
    status str
    channel Map<String>
    Details of the endpoint the event hook will hit.
    events List<String>
    The events that will be delivered to this hook. See here for a list of supported events.
    auth Map<String>
    Authentication required for event hook request.
    headers List<Property Map>
    Map of headers to send along in event hook request.
    name String
    The event hook display name.
    status String

    Outputs

    All input properties are implicitly available as output properties. Additionally, the EventHook 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 EventHook Resource

    Get an existing EventHook 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?: EventHookState, opts?: CustomResourceOptions): EventHook
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auth: Optional[Mapping[str, str]] = None,
            channel: Optional[Mapping[str, str]] = None,
            events: Optional[Sequence[str]] = None,
            headers: Optional[Sequence[EventHookHeaderArgs]] = None,
            name: Optional[str] = None,
            status: Optional[str] = None) -> EventHook
    func GetEventHook(ctx *Context, name string, id IDInput, state *EventHookState, opts ...ResourceOption) (*EventHook, error)
    public static EventHook Get(string name, Input<string> id, EventHookState? state, CustomResourceOptions? opts = null)
    public static EventHook get(String name, Output<String> id, EventHookState 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:
    Auth Dictionary<string, string>
    Authentication required for event hook request.
    Channel Dictionary<string, string>
    Details of the endpoint the event hook will hit.
    Events List<string>
    The events that will be delivered to this hook. See here for a list of supported events.
    Headers List<EventHookHeader>
    Map of headers to send along in event hook request.
    Name string
    The event hook display name.
    Status string
    Auth map[string]string
    Authentication required for event hook request.
    Channel map[string]string
    Details of the endpoint the event hook will hit.
    Events []string
    The events that will be delivered to this hook. See here for a list of supported events.
    Headers []EventHookHeaderArgs
    Map of headers to send along in event hook request.
    Name string
    The event hook display name.
    Status string
    auth Map<String,String>
    Authentication required for event hook request.
    channel Map<String,String>
    Details of the endpoint the event hook will hit.
    events List<String>
    The events that will be delivered to this hook. See here for a list of supported events.
    headers List<EventHookHeader>
    Map of headers to send along in event hook request.
    name String
    The event hook display name.
    status String
    auth {[key: string]: string}
    Authentication required for event hook request.
    channel {[key: string]: string}
    Details of the endpoint the event hook will hit.
    events string[]
    The events that will be delivered to this hook. See here for a list of supported events.
    headers EventHookHeader[]
    Map of headers to send along in event hook request.
    name string
    The event hook display name.
    status string
    auth Mapping[str, str]
    Authentication required for event hook request.
    channel Mapping[str, str]
    Details of the endpoint the event hook will hit.
    events Sequence[str]
    The events that will be delivered to this hook. See here for a list of supported events.
    headers Sequence[EventHookHeaderArgs]
    Map of headers to send along in event hook request.
    name str
    The event hook display name.
    status str
    auth Map<String>
    Authentication required for event hook request.
    channel Map<String>
    Details of the endpoint the event hook will hit.
    events List<String>
    The events that will be delivered to this hook. See here for a list of supported events.
    headers List<Property Map>
    Map of headers to send along in event hook request.
    name String
    The event hook display name.
    status String

    Supporting Types

    EventHookHeader, EventHookHeaderArgs

    Key string
    Key to use for authentication, usually the header name, for example "Authorization".
    Value string
    Authentication secret.
    Key string
    Key to use for authentication, usually the header name, for example "Authorization".
    Value string
    Authentication secret.
    key String
    Key to use for authentication, usually the header name, for example "Authorization".
    value String
    Authentication secret.
    key string
    Key to use for authentication, usually the header name, for example "Authorization".
    value string
    Authentication secret.
    key str
    Key to use for authentication, usually the header name, for example "Authorization".
    value str
    Authentication secret.
    key String
    Key to use for authentication, usually the header name, for example "Authorization".
    value String
    Authentication secret.

    Import

    An event hook can be imported via the Okta ID.

    $ pulumi import okta:index/eventHook:EventHook example &#60;hook id&#62;
    

    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.0 published on Saturday, Mar 2, 2024 by Pulumi