1. Packages
  2. Okta Provider
  3. API Docs
  4. EventHook
Okta v4.11.3 published on Monday, Oct 21, 2024 by Pulumi

okta.EventHook

Explore with Pulumi AI

okta logo
Okta v4.11.3 published on Monday, Oct 21, 2024 by Pulumi

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

    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",
        },
    });
    
    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",
        })
    
    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{
    			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
    		}
    		return nil
    	})
    }
    
    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" },
            },
        });
    
    });
    
    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()
                .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());
    
        }
    }
    
    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'
    

    Create EventHook Resource

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

    Constructor syntax

    new EventHook(name: string, args: EventHookArgs, opts?: CustomResourceOptions);
    @overload
    def EventHook(resource_name: str,
                  args: EventHookArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def EventHook(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  channel: Optional[Mapping[str, str]] = None,
                  events: Optional[Sequence[str]] = None,
                  auth: Optional[Mapping[str, str]] = None,
                  headers: Optional[Sequence[EventHookHeaderArgs]] = None,
                  name: Optional[str] = None,
                  status: Optional[str] = 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.
    
    

    Parameters

    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.

    Constructor example

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

    var eventHookResource = new Okta.EventHook("eventHookResource", new()
    {
        Channel = 
        {
            { "string", "string" },
        },
        Events = new[]
        {
            "string",
        },
        Auth = 
        {
            { "string", "string" },
        },
        Headers = new[]
        {
            new Okta.Inputs.EventHookHeaderArgs
            {
                Key = "string",
                Value = "string",
            },
        },
        Name = "string",
        Status = "string",
    });
    
    example, err := okta.NewEventHook(ctx, "eventHookResource", &okta.EventHookArgs{
    	Channel: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Events: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Auth: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Headers: okta.EventHookHeaderArray{
    		&okta.EventHookHeaderArgs{
    			Key:   pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    	Name:   pulumi.String("string"),
    	Status: pulumi.String("string"),
    })
    
    var eventHookResource = new EventHook("eventHookResource", EventHookArgs.builder()
        .channel(Map.of("string", "string"))
        .events("string")
        .auth(Map.of("string", "string"))
        .headers(EventHookHeaderArgs.builder()
            .key("string")
            .value("string")
            .build())
        .name("string")
        .status("string")
        .build());
    
    event_hook_resource = okta.EventHook("eventHookResource",
        channel={
            "string": "string",
        },
        events=["string"],
        auth={
            "string": "string",
        },
        headers=[{
            "key": "string",
            "value": "string",
        }],
        name="string",
        status="string")
    
    const eventHookResource = new okta.EventHook("eventHookResource", {
        channel: {
            string: "string",
        },
        events: ["string"],
        auth: {
            string: "string",
        },
        headers: [{
            key: "string",
            value: "string",
        }],
        name: "string",
        status: "string",
    });
    
    type: okta:EventHook
    properties:
        auth:
            string: string
        channel:
            string: string
        events:
            - string
        headers:
            - key: string
              value: string
        name: string
        status: string
    

    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

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

    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>
    Details of the endpoint the event hook will hit. - 'version' - (Required) The version of the channel. The currently-supported version is '1.0.0'. - 'uri' - (Required) The URI the hook will hit. - 'type' - (Optional) The type of hook to trigger. Currently, the only supported type is 'HTTP'.
    Headers List<EventHookHeader>
    Map of headers to send along in event hook request.
    Name string
    The event hook display name.
    Status string
    Default to ACTIVE
    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
    Details of the endpoint the event hook will hit. - 'version' - (Required) The version of the channel. The currently-supported version is '1.0.0'. - 'uri' - (Required) The URI the hook will hit. - 'type' - (Optional) The type of hook to trigger. Currently, the only supported type is 'HTTP'.
    Headers []EventHookHeaderArgs
    Map of headers to send along in event hook request.
    Name string
    The event hook display name.
    Status string
    Default to ACTIVE
    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>
    Details of the endpoint the event hook will hit. - 'version' - (Required) The version of the channel. The currently-supported version is '1.0.0'. - 'uri' - (Required) The URI the hook will hit. - 'type' - (Optional) The type of hook to trigger. Currently, the only supported type is 'HTTP'.
    headers List<EventHookHeader>
    Map of headers to send along in event hook request.
    name String
    The event hook display name.
    status String
    Default to ACTIVE
    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}
    Details of the endpoint the event hook will hit. - 'version' - (Required) The version of the channel. The currently-supported version is '1.0.0'. - 'uri' - (Required) The URI the hook will hit. - 'type' - (Optional) The type of hook to trigger. Currently, the only supported type is 'HTTP'.
    headers EventHookHeader[]
    Map of headers to send along in event hook request.
    name string
    The event hook display name.
    status string
    Default to ACTIVE
    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]
    Details of the endpoint the event hook will hit. - 'version' - (Required) The version of the channel. The currently-supported version is '1.0.0'. - 'uri' - (Required) The URI the hook will hit. - 'type' - (Optional) The type of hook to trigger. Currently, the only supported type is 'HTTP'.
    headers Sequence[EventHookHeaderArgs]
    Map of headers to send along in event hook request.
    name str
    The event hook display name.
    status str
    Default to ACTIVE
    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>
    Details of the endpoint the event hook will hit. - 'version' - (Required) The version of the channel. The currently-supported version is '1.0.0'. - 'uri' - (Required) The URI the hook will hit. - 'type' - (Optional) The type of hook to trigger. Currently, the only supported type is 'HTTP'.
    headers List<Property Map>
    Map of headers to send along in event hook request.
    name String
    The event hook display name.
    status String
    Default to ACTIVE

    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>
    Details of the endpoint the event hook will hit. - 'version' - (Required) The version of the channel. The currently-supported version is '1.0.0'. - 'uri' - (Required) The URI the hook will hit. - 'type' - (Optional) The type of hook to trigger. Currently, the only supported type is 'HTTP'.
    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
    Default to ACTIVE
    Auth map[string]string
    Details of the endpoint the event hook will hit. - 'version' - (Required) The version of the channel. The currently-supported version is '1.0.0'. - 'uri' - (Required) The URI the hook will hit. - 'type' - (Optional) The type of hook to trigger. Currently, the only supported type is 'HTTP'.
    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
    Default to ACTIVE
    auth Map<String,String>
    Details of the endpoint the event hook will hit. - 'version' - (Required) The version of the channel. The currently-supported version is '1.0.0'. - 'uri' - (Required) The URI the hook will hit. - 'type' - (Optional) The type of hook to trigger. Currently, the only supported type is 'HTTP'.
    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
    Default to ACTIVE
    auth {[key: string]: string}
    Details of the endpoint the event hook will hit. - 'version' - (Required) The version of the channel. The currently-supported version is '1.0.0'. - 'uri' - (Required) The URI the hook will hit. - 'type' - (Optional) The type of hook to trigger. Currently, the only supported type is 'HTTP'.
    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
    Default to ACTIVE
    auth Mapping[str, str]
    Details of the endpoint the event hook will hit. - 'version' - (Required) The version of the channel. The currently-supported version is '1.0.0'. - 'uri' - (Required) The URI the hook will hit. - 'type' - (Optional) The type of hook to trigger. Currently, the only supported type is 'HTTP'.
    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
    Default to ACTIVE
    auth Map<String>
    Details of the endpoint the event hook will hit. - 'version' - (Required) The version of the channel. The currently-supported version is '1.0.0'. - 'uri' - (Required) The URI the hook will hit. - 'type' - (Optional) The type of hook to trigger. Currently, the only supported type is 'HTTP'.
    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
    Default to ACTIVE

    Supporting Types

    EventHookHeader, EventHookHeaderArgs

    Key string
    Value string
    Key string
    Value string
    key String
    value String
    key string
    value string
    key str
    value str
    key String
    value String

    Import

    $ pulumi import okta:index/eventHook:EventHook example <hook_id>
    

    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.11.3 published on Monday, Oct 21, 2024 by Pulumi