import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Actions are secure, tenant-specific, versioned functions written in Node.js that execute at certain points during the Auth0 runtime. Actions are used to customize and extend Auth0's capabilities with custom logic. * * > An action bound to a trigger cannot be deleted. To destroy such an action, the trigger binding must first be deleted. * A binding is usually managed by auth0.TriggerAction resource. * The provider also supports a 1:many variant auth0_trigger_actions. * If by any means, a binding is missing is the state file, it can be imported to the state and deleted, before attempting to delete the action. * * > Values provided in the sensitive values shall be stored in the raw state as plain text: secrets. * Read more about sensitive data in state. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * import * as std from "@pulumi/std"; * * const myAction = new auth0.Action("my_action", { * name: std.index.format({ * input: "Test Action %s", * args: [std.index.timestamp({}).result], * }).result, * runtime: "node22", * deploy: true, * code: `/** * * Handler that will be called during the execution of a PostLogin flow. * * * * @param {Event} event - Details about the user and the context in which they are logging in. * * @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login. * */ * exports.onExecutePostLogin = async (event, api) => { * console.log(event); * }; * `, * supportedTriggers: { * id: "post-login", * version: "v3", * }, * dependencies: [ * { * name: "lodash", * version: "latest", * }, * { * name: "request", * version: "latest", * }, * ], * secrets: [ * { * name: "FOO", * value: "Foo", * }, * { * name: "BAR", * value: "Bar", * }, * ], * }); * ``` * * ## Import * * This resource can be imported by specifying the action ID. * * Example: * * ```sh * $ pulumi import auth0:index/action:Action my_action "12f4f21b-017a-319d-92e7-2291c1ca36c4" * ``` * * ~> For security reasons importing `secrets` is not allowed. Therefore, it is advised to import * * the action without secrets and adding them back after the action has been imported. */ export declare class Action extends pulumi.CustomResource { /** * Get an existing Action 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 Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ActionState, opts?: pulumi.CustomResourceOptions): Action; /** * Returns true if the given object is an instance of Action. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Action; /** * The source code of the action. */ readonly code: pulumi.Output; /** * List of third party npm modules, and their versions, that this action depends on. */ readonly dependencies: pulumi.Output; /** * Deploying an action will create a new immutable version of the action. If the action is currently bound to a trigger, then the system will begin executing the newly deployed version of the action immediately. */ readonly deploy: pulumi.Output; /** * The name of the action. */ readonly name: pulumi.Output; /** * The Node runtime. Possible values are: `node12`, `node16` (not recommended), `node18`, `node22` */ readonly runtime: pulumi.Output; /** * List of secrets that are included in an action or a version of an action. Partial management of secrets is not supported. If the secret block is edited, the whole object is re-provisioned. */ readonly secrets: pulumi.Output; /** * List of triggers that this action supports. At this time, an action can only target a single trigger at a time. Read Retrieving the set of triggers available within actions to retrieve the latest trigger versions supported. */ readonly supportedTriggers: pulumi.Output; /** * Version ID of the action. This value is available if `deploy` is set to true. */ readonly versionId: pulumi.Output; /** * Create a Action resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ActionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Action resources. */ export interface ActionState { /** * The source code of the action. */ code?: pulumi.Input; /** * List of third party npm modules, and their versions, that this action depends on. */ dependencies?: pulumi.Input[]>; /** * Deploying an action will create a new immutable version of the action. If the action is currently bound to a trigger, then the system will begin executing the newly deployed version of the action immediately. */ deploy?: pulumi.Input; /** * The name of the action. */ name?: pulumi.Input; /** * The Node runtime. Possible values are: `node12`, `node16` (not recommended), `node18`, `node22` */ runtime?: pulumi.Input; /** * List of secrets that are included in an action or a version of an action. Partial management of secrets is not supported. If the secret block is edited, the whole object is re-provisioned. */ secrets?: pulumi.Input[]>; /** * List of triggers that this action supports. At this time, an action can only target a single trigger at a time. Read Retrieving the set of triggers available within actions to retrieve the latest trigger versions supported. */ supportedTriggers?: pulumi.Input; /** * Version ID of the action. This value is available if `deploy` is set to true. */ versionId?: pulumi.Input; } /** * The set of arguments for constructing a Action resource. */ export interface ActionArgs { /** * The source code of the action. */ code: pulumi.Input; /** * List of third party npm modules, and their versions, that this action depends on. */ dependencies?: pulumi.Input[]>; /** * Deploying an action will create a new immutable version of the action. If the action is currently bound to a trigger, then the system will begin executing the newly deployed version of the action immediately. */ deploy?: pulumi.Input; /** * The name of the action. */ name?: pulumi.Input; /** * The Node runtime. Possible values are: `node12`, `node16` (not recommended), `node18`, `node22` */ runtime?: pulumi.Input; /** * List of secrets that are included in an action or a version of an action. Partial management of secrets is not supported. If the secret block is edited, the whole object is re-provisioned. */ secrets?: pulumi.Input[]>; /** * List of triggers that this action supports. At this time, an action can only target a single trigger at a time. Read Retrieving the set of triggers available within actions to retrieve the latest trigger versions supported. */ supportedTriggers: pulumi.Input; }