1. Packages
  2. Auth0 Provider
  3. API Docs
  4. getActionModuleActions
Viewing docs for Auth0 v3.38.0
published on Friday, Feb 20, 2026 by Pulumi
auth0 logo
Viewing docs for Auth0 v3.38.0
published on Friday, Feb 20, 2026 by Pulumi

    Data source to retrieve all actions that are using a specific Auth0 action module.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as auth0 from "@pulumi/auth0";
    
    // Example: Retrieve all actions using a specific action module
    // Create and publish an action module
    const myModule = new auth0.ActionModule("my_module", {
        name: "My Shared Module",
        publish: true,
        code: `module.exports = {
      greet: function(name) {
        return \\"Hello, \\" + name + \\"!\\";
      }
    };
    `,
    });
    // Get the published versions of the module
    const myModuleVersions = auth0.getActionModuleVersionsOutput({
        moduleId: myModule.id,
    });
    // Create an action that uses the module
    const myAction1 = new auth0.Action("my_action_1", {
        name: "My Action Using Module 1",
        deploy: true,
        code: `const myModule = require('my-module');
    exports.onExecutePostLogin = async (event, api) => {
      console.log(myModule.greet(event.user.name));
    };
    `,
        supportedTriggers: {
            id: "post-login",
            version: "v3",
        },
        modules: [{
            moduleId: myModule.id,
            moduleVersionId: myModuleVersions.apply(myModuleVersions => myModuleVersions.versions?.[0]?.id),
        }],
    });
    // Create another action that uses the same module
    const myAction2 = new auth0.Action("my_action_2", {
        name: "My Action Using Module 2",
        deploy: true,
        code: `const myModule = require('my-module');
    exports.onExecutePostLogin = async (event, api) => {
      api.idToken.setCustomClaim(\\"greeting\\", myModule.greet(event.user.name));
    };
    `,
        supportedTriggers: {
            id: "post-login",
            version: "v3",
        },
        modules: [{
            moduleId: myModule.id,
            moduleVersionId: myModuleVersions.apply(myModuleVersions => myModuleVersions.versions?.[0]?.id),
        }],
    });
    // Retrieve all actions that are using this module
    const myModuleActions = auth0.getActionModuleActionsOutput({
        moduleId: myModule.id,
    });
    export const actionsUsingModule = myModuleActions.apply(myModuleActions => myModuleActions.total);
    export const actionNames = myModuleActions.apply(myModuleActions => .map(action => (action.actionName)));
    
    import pulumi
    import pulumi_auth0 as auth0
    
    # Example: Retrieve all actions using a specific action module
    # Create and publish an action module
    my_module = auth0.ActionModule("my_module",
        name="My Shared Module",
        publish=True,
        code="""module.exports = {
      greet: function(name) {
        return \"Hello, \" + name + \"!\";
      }
    };
    """)
    # Get the published versions of the module
    my_module_versions = auth0.get_action_module_versions_output(module_id=my_module.id)
    # Create an action that uses the module
    my_action1 = auth0.Action("my_action_1",
        name="My Action Using Module 1",
        deploy=True,
        code="""const myModule = require('my-module');
    exports.onExecutePostLogin = async (event, api) => {
      console.log(myModule.greet(event.user.name));
    };
    """,
        supported_triggers={
            "id": "post-login",
            "version": "v3",
        },
        modules=[{
            "module_id": my_module.id,
            "module_version_id": my_module_versions.versions[0].id,
        }])
    # Create another action that uses the same module
    my_action2 = auth0.Action("my_action_2",
        name="My Action Using Module 2",
        deploy=True,
        code="""const myModule = require('my-module');
    exports.onExecutePostLogin = async (event, api) => {
      api.idToken.setCustomClaim(\"greeting\", myModule.greet(event.user.name));
    };
    """,
        supported_triggers={
            "id": "post-login",
            "version": "v3",
        },
        modules=[{
            "module_id": my_module.id,
            "module_version_id": my_module_versions.versions[0].id,
        }])
    # Retrieve all actions that are using this module
    my_module_actions = auth0.get_action_module_actions_output(module_id=my_module.id)
    pulumi.export("actionsUsingModule", my_module_actions.total)
    pulumi.export("actionNames", my_module_actions.apply(lambda my_module_actions: [action.action_name for action in my_module_actions.actions]))
    
    Example coming soon!
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Auth0 = Pulumi.Auth0;
    
    return await Deployment.RunAsync(() => 
    {
        // Example: Retrieve all actions using a specific action module
        // Create and publish an action module
        var myModule = new Auth0.ActionModule("my_module", new()
        {
            Name = "My Shared Module",
            Publish = true,
            Code = @"module.exports = {
      greet: function(name) {
        return \""Hello, \"" + name + \""!\"";
      }
    };
    ",
        });
    
        // Get the published versions of the module
        var myModuleVersions = Auth0.GetActionModuleVersions.Invoke(new()
        {
            ModuleId = myModule.Id,
        });
    
        // Create an action that uses the module
        var myAction1 = new Auth0.Action("my_action_1", new()
        {
            Name = "My Action Using Module 1",
            Deploy = true,
            Code = @"const myModule = require('my-module');
    exports.onExecutePostLogin = async (event, api) => {
      console.log(myModule.greet(event.user.name));
    };
    ",
            SupportedTriggers = new Auth0.Inputs.ActionSupportedTriggersArgs
            {
                Id = "post-login",
                Version = "v3",
            },
            Modules = new[]
            {
                new Auth0.Inputs.ActionModuleArgs
                {
                    ModuleId = myModule.Id,
                    ModuleVersionId = myModuleVersions.Apply(getActionModuleVersionsResult => getActionModuleVersionsResult.Versions[0]?.Id),
                },
            },
        });
    
        // Create another action that uses the same module
        var myAction2 = new Auth0.Action("my_action_2", new()
        {
            Name = "My Action Using Module 2",
            Deploy = true,
            Code = @"const myModule = require('my-module');
    exports.onExecutePostLogin = async (event, api) => {
      api.idToken.setCustomClaim(\""greeting\"", myModule.greet(event.user.name));
    };
    ",
            SupportedTriggers = new Auth0.Inputs.ActionSupportedTriggersArgs
            {
                Id = "post-login",
                Version = "v3",
            },
            Modules = new[]
            {
                new Auth0.Inputs.ActionModuleArgs
                {
                    ModuleId = myModule.Id,
                    ModuleVersionId = myModuleVersions.Apply(getActionModuleVersionsResult => getActionModuleVersionsResult.Versions[0]?.Id),
                },
            },
        });
    
        // Retrieve all actions that are using this module
        var myModuleActions = Auth0.GetActionModuleActions.Invoke(new()
        {
            ModuleId = myModule.Id,
        });
    
        return new Dictionary<string, object?>
        {
            ["actionsUsingModule"] = myModuleActions.Apply(getActionModuleActionsResult => getActionModuleActionsResult.Total),
            ["actionNames"] = .Select(action => 
            {
                return action.ActionName;
            }).ToList(),
        };
    });
    
    Example coming soon!
    
    Example coming soon!
    

    Using getActionModuleActions

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getActionModuleActions(args: GetActionModuleActionsArgs, opts?: InvokeOptions): Promise<GetActionModuleActionsResult>
    function getActionModuleActionsOutput(args: GetActionModuleActionsOutputArgs, opts?: InvokeOptions): Output<GetActionModuleActionsResult>
    def get_action_module_actions(module_id: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetActionModuleActionsResult
    def get_action_module_actions_output(module_id: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetActionModuleActionsResult]
    func GetActionModuleActions(ctx *Context, args *GetActionModuleActionsArgs, opts ...InvokeOption) (*GetActionModuleActionsResult, error)
    func GetActionModuleActionsOutput(ctx *Context, args *GetActionModuleActionsOutputArgs, opts ...InvokeOption) GetActionModuleActionsResultOutput

    > Note: This function is named GetActionModuleActions in the Go SDK.

    public static class GetActionModuleActions 
    {
        public static Task<GetActionModuleActionsResult> InvokeAsync(GetActionModuleActionsArgs args, InvokeOptions? opts = null)
        public static Output<GetActionModuleActionsResult> Invoke(GetActionModuleActionsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetActionModuleActionsResult> getActionModuleActions(GetActionModuleActionsArgs args, InvokeOptions options)
    public static Output<GetActionModuleActionsResult> getActionModuleActions(GetActionModuleActionsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: auth0:index/getActionModuleActions:getActionModuleActions
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ModuleId string
    The ID of the action module.
    ModuleId string
    The ID of the action module.
    moduleId String
    The ID of the action module.
    moduleId string
    The ID of the action module.
    module_id str
    The ID of the action module.
    moduleId String
    The ID of the action module.

    getActionModuleActions Result

    The following output properties are available:

    Actions List<GetActionModuleActionsAction>
    List of actions using this module.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModuleId string
    The ID of the action module.
    Total int
    The total number of actions using this module.
    Actions []GetActionModuleActionsAction
    List of actions using this module.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModuleId string
    The ID of the action module.
    Total int
    The total number of actions using this module.
    actions List<GetActionModuleActionsAction>
    List of actions using this module.
    id String
    The provider-assigned unique ID for this managed resource.
    moduleId String
    The ID of the action module.
    total Integer
    The total number of actions using this module.
    actions GetActionModuleActionsAction[]
    List of actions using this module.
    id string
    The provider-assigned unique ID for this managed resource.
    moduleId string
    The ID of the action module.
    total number
    The total number of actions using this module.
    actions Sequence[GetActionModuleActionsAction]
    List of actions using this module.
    id str
    The provider-assigned unique ID for this managed resource.
    module_id str
    The ID of the action module.
    total int
    The total number of actions using this module.
    actions List<Property Map>
    List of actions using this module.
    id String
    The provider-assigned unique ID for this managed resource.
    moduleId String
    The ID of the action module.
    total Number
    The total number of actions using this module.

    Supporting Types

    GetActionModuleActionsAction

    ActionId string
    The ID of the action.
    ActionName string
    The name of the action.
    ModuleVersionId string
    The ID of the module version this action is using.
    ModuleVersionNumber int
    The version number of the module this action is using.
    SupportedTriggers List<GetActionModuleActionsActionSupportedTrigger>
    The triggers that this action supports.
    ActionId string
    The ID of the action.
    ActionName string
    The name of the action.
    ModuleVersionId string
    The ID of the module version this action is using.
    ModuleVersionNumber int
    The version number of the module this action is using.
    SupportedTriggers []GetActionModuleActionsActionSupportedTrigger
    The triggers that this action supports.
    actionId String
    The ID of the action.
    actionName String
    The name of the action.
    moduleVersionId String
    The ID of the module version this action is using.
    moduleVersionNumber Integer
    The version number of the module this action is using.
    supportedTriggers List<GetActionModuleActionsActionSupportedTrigger>
    The triggers that this action supports.
    actionId string
    The ID of the action.
    actionName string
    The name of the action.
    moduleVersionId string
    The ID of the module version this action is using.
    moduleVersionNumber number
    The version number of the module this action is using.
    supportedTriggers GetActionModuleActionsActionSupportedTrigger[]
    The triggers that this action supports.
    action_id str
    The ID of the action.
    action_name str
    The name of the action.
    module_version_id str
    The ID of the module version this action is using.
    module_version_number int
    The version number of the module this action is using.
    supported_triggers Sequence[GetActionModuleActionsActionSupportedTrigger]
    The triggers that this action supports.
    actionId String
    The ID of the action.
    actionName String
    The name of the action.
    moduleVersionId String
    The ID of the module version this action is using.
    moduleVersionNumber Number
    The version number of the module this action is using.
    supportedTriggers List<Property Map>
    The triggers that this action supports.

    GetActionModuleActionsActionSupportedTrigger

    Id string
    The trigger ID.
    Version string
    The trigger version.
    Id string
    The trigger ID.
    Version string
    The trigger version.
    id String
    The trigger ID.
    version String
    The trigger version.
    id string
    The trigger ID.
    version string
    The trigger version.
    id str
    The trigger ID.
    version str
    The trigger version.
    id String
    The trigger ID.
    version String
    The trigger version.

    Package Details

    Repository
    Auth0 pulumi/pulumi-auth0
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the auth0 Terraform Provider.
    auth0 logo
    Viewing docs for Auth0 v3.38.0
    published on Friday, Feb 20, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.