import * as pulumi from "@pulumi/pulumi"; /** * With Auth0, you can create custom Javascript snippets that run in a secure, isolated sandbox as part of your authentication pipeline, which are otherwise known as rules. This resource allows you to create and manage rules. You can create global variable for use with rules by using the `auth0.RuleConfig` resource. * * !> This resource is deprecated. Refer to the [guide on how to migrate from rules to actions](https://auth0.com/docs/customize/actions/migrate/migrate-from-rules-to-actions) and manage your actions using the `auth0.Action` resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * * const myRule = new auth0.Rule("my_rule", { * name: "empty-rule", * script: ` function (user, context, callback) { * callback(null, user, context); * } * `, * enabled: true, * }); * ``` * * ## Import * * Existing rules can be imported using their ID. * * Example: * * ```sh * $ pulumi import auth0:index/rule:Rule my_rule "rul_XXXXXXXXXXXXX" * ``` */ export declare class Rule extends pulumi.CustomResource { /** * Get an existing Rule 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?: RuleState, opts?: pulumi.CustomResourceOptions): Rule; /** * Returns true if the given object is an instance of Rule. 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 Rule; /** * Indicates whether the rule is enabled. */ readonly enabled: pulumi.Output; /** * Name of the rule. May only contain alphanumeric characters, spaces, and hyphens. May neither start nor end with hyphens or spaces. */ readonly name: pulumi.Output; /** * Order in which the rule executes relative to other rules. Lower-valued rules execute first. */ readonly order: pulumi.Output; /** * Code to be executed when the rule runs. */ readonly script: pulumi.Output; /** * Create a Rule 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: RuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Rule resources. */ export interface RuleState { /** * Indicates whether the rule is enabled. */ enabled?: pulumi.Input; /** * Name of the rule. May only contain alphanumeric characters, spaces, and hyphens. May neither start nor end with hyphens or spaces. */ name?: pulumi.Input; /** * Order in which the rule executes relative to other rules. Lower-valued rules execute first. */ order?: pulumi.Input; /** * Code to be executed when the rule runs. */ script?: pulumi.Input; } /** * The set of arguments for constructing a Rule resource. */ export interface RuleArgs { /** * Indicates whether the rule is enabled. */ enabled?: pulumi.Input; /** * Name of the rule. May only contain alphanumeric characters, spaces, and hyphens. May neither start nor end with hyphens or spaces. */ name?: pulumi.Input; /** * Order in which the rule executes relative to other rules. Lower-valued rules execute first. */ order?: pulumi.Input; /** * Code to be executed when the rule runs. */ script: pulumi.Input; }