Class Rule
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.
Example Usage
using Pulumi;
using Auth0 = Pulumi.Auth0;
class MyStack : Stack
{
public MyStack()
{
var myRule = new Auth0.Rule("myRule", new Auth0.RuleArgs
{
Enabled = true,
Script = @"function (user, context, callback) {
callback(null, user, context);
}
",
});
var myRuleConfig = new Auth0.RuleConfig("myRuleConfig", new Auth0.RuleConfigArgs
{
Key = "foo",
Value = "bar",
});
}
}
Inheritance
Inherited Members
Namespace: Pulumi.Auth0
Assembly: Pulumi.Auth0.dll
Syntax
public class Rule : CustomResource
Constructors
View SourceRule(String, RuleArgs, CustomResourceOptions)
Create a Rule resource with the given unique name, arguments, and options.
Declaration
public Rule(string name, RuleArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| RuleArgs | args | The arguments used to populate this resource's properties |
| Pulumi.CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceEnabled
Boolean. Indicates whether the rule is enabled.
Declaration
public Output<bool?> Enabled { get; }
Property Value
| Type | Description |
|---|---|
| Pulumi.Output<System.Nullable<System.Boolean>> |
Name
String. Name of the rule. May only contain alphanumeric characters, spaces, and hyphens. May neither start nor end with hyphens or spaces.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Pulumi.Output<System.String> |
Order
Integer. Order in which the rule executes relative to other rules. Lower-valued rules execute first.
Declaration
public Output<int> Order { get; }
Property Value
| Type | Description |
|---|---|
| Pulumi.Output<System.Int32> |
Script
String. Code to be executed when the rule runs.
Declaration
public Output<string> Script { get; }
Property Value
| Type | Description |
|---|---|
| Pulumi.Output<System.String> |
Methods
View SourceGet(String, Input<String>, RuleState, CustomResourceOptions)
Get an existing Rule resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Rule Get(string name, Input<string> id, RuleState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Pulumi.Input<System.String> | id | The unique provider ID of the resource to lookup. |
| RuleState | state | Any extra arguments used during the lookup. |
| Pulumi.CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Rule |