All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.okta.EventHook Maven / Gradle / Ivy

// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.okta;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.okta.EventHookArgs;
import com.pulumi.okta.Utilities;
import com.pulumi.okta.inputs.EventHookState;
import com.pulumi.okta.outputs.EventHookHeader;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Creates an event hook. This resource allows you to create and configure an event hook.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * ```sh * $ pulumi import okta:index/eventHook:EventHook example <hook_id> * ``` * */ @ResourceType(type="okta:index/eventHook:EventHook") public class EventHook extends com.pulumi.resources.CustomResource { /** * 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'. * */ @Export(name="auth", refs={Map.class,String.class}, tree="[0,1,1]") private Output> auth; /** * @return 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'. * */ public Output>> auth() { return Codegen.optional(this.auth); } /** * Details of the endpoint the event hook will hit. * */ @Export(name="channel", refs={Map.class,String.class}, tree="[0,1,1]") private Output> channel; /** * @return Details of the endpoint the event hook will hit. * */ public Output> channel() { return this.channel; } /** * The events that will be delivered to this hook. [See here for a list of supported * events](https://developer.okta.com/docs/reference/api/event-types/?q=event-hook-eligible). * */ @Export(name="events", refs={List.class,String.class}, tree="[0,1]") private Output> events; /** * @return The events that will be delivered to this hook. [See here for a list of supported * events](https://developer.okta.com/docs/reference/api/event-types/?q=event-hook-eligible). * */ public Output> events() { return this.events; } /** * Map of headers to send along in event hook request. * */ @Export(name="headers", refs={List.class,EventHookHeader.class}, tree="[0,1]") private Output> headers; /** * @return Map of headers to send along in event hook request. * */ public Output>> headers() { return Codegen.optional(this.headers); } /** * The event hook display name. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The event hook display name. * */ public Output name() { return this.name; } /** * Default to `ACTIVE` * */ @Export(name="status", refs={String.class}, tree="[0]") private Output status; /** * @return Default to `ACTIVE` * */ public Output> status() { return Codegen.optional(this.status); } /** * * @param name The _unique_ name of the resulting resource. */ public EventHook(java.lang.String name) { this(name, EventHookArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public EventHook(java.lang.String name, EventHookArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public EventHook(java.lang.String name, EventHookArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("okta:index/eventHook:EventHook", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private EventHook(java.lang.String name, Output id, @Nullable EventHookState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("okta:index/eventHook:EventHook", name, state, makeResourceOptions(options, id), false); } private static EventHookArgs makeArgs(EventHookArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? EventHookArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static EventHook get(java.lang.String name, Output id, @Nullable EventHookState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new EventHook(name, id, state, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy