Data source to retrieve all published versions of a specific Auth0 action module.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as auth0 from "@pulumi/auth0";
// Example: Retrieve all published versions of an 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 + \\"!\\";
}
};
`,
});
// Retrieve all published versions of the module
const myModuleVersions = auth0.getActionModuleVersionsOutput({
moduleId: myModule.id,
});
export const totalVersions = myModuleVersions.apply(myModuleVersions => myModuleVersions.versions).length;
export const latestVersionNumber = myModuleVersions.apply(myModuleVersions => myModuleVersions.versions?.[0]?.versionNumber);
export const versionIds = myModuleVersions.apply(myModuleVersions => .map(v => (v.id)));
import pulumi
import pulumi_auth0 as auth0
# Example: Retrieve all published versions of an 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 + \"!\";
}
};
""")
# Retrieve all published versions of the module
my_module_versions = auth0.get_action_module_versions_output(module_id=my_module.id)
pulumi.export("totalVersions", len(my_module_versions.versions))
pulumi.export("latestVersionNumber", my_module_versions.versions[0].version_number)
pulumi.export("versionIds", my_module_versions.apply(lambda my_module_versions: [v.id for v in my_module_versions.versions]))
Example coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Auth0 = Pulumi.Auth0;
return await Deployment.RunAsync(() =>
{
// Example: Retrieve all published versions of an 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 + \""!\"";
}
};
",
});
// Retrieve all published versions of the module
var myModuleVersions = Auth0.GetActionModuleVersions.Invoke(new()
{
ModuleId = myModule.Id,
});
return new Dictionary<string, object?>
{
["totalVersions"] = myModuleVersions.Apply(getActionModuleVersionsResult => getActionModuleVersionsResult.Versions).Length,
["latestVersionNumber"] = myModuleVersions.Apply(getActionModuleVersionsResult => getActionModuleVersionsResult.Versions[0]?.VersionNumber),
["versionIds"] = .Select(v =>
{
return v.Id;
}).ToList(),
};
});
Example coming soon!
Example coming soon!
Using getActionModuleVersions
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 getActionModuleVersions(args: GetActionModuleVersionsArgs, opts?: InvokeOptions): Promise<GetActionModuleVersionsResult>
function getActionModuleVersionsOutput(args: GetActionModuleVersionsOutputArgs, opts?: InvokeOptions): Output<GetActionModuleVersionsResult>def get_action_module_versions(module_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetActionModuleVersionsResult
def get_action_module_versions_output(module_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetActionModuleVersionsResult]func GetActionModuleVersions(ctx *Context, args *GetActionModuleVersionsArgs, opts ...InvokeOption) (*GetActionModuleVersionsResult, error)
func GetActionModuleVersionsOutput(ctx *Context, args *GetActionModuleVersionsOutputArgs, opts ...InvokeOption) GetActionModuleVersionsResultOutput> Note: This function is named GetActionModuleVersions in the Go SDK.
public static class GetActionModuleVersions
{
public static Task<GetActionModuleVersionsResult> InvokeAsync(GetActionModuleVersionsArgs args, InvokeOptions? opts = null)
public static Output<GetActionModuleVersionsResult> Invoke(GetActionModuleVersionsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetActionModuleVersionsResult> getActionModuleVersions(GetActionModuleVersionsArgs args, InvokeOptions options)
public static Output<GetActionModuleVersionsResult> getActionModuleVersions(GetActionModuleVersionsArgs args, InvokeOptions options)
fn::invoke:
function: auth0:index/getActionModuleVersions:getActionModuleVersions
arguments:
# arguments dictionaryThe following arguments are supported:
- Module
Id string - The ID of the action module.
- Module
Id string - The ID of the action module.
- module
Id String - The ID of the action module.
- module
Id string - The ID of the action module.
- module_
id str - The ID of the action module.
- module
Id String - The ID of the action module.
getActionModuleVersions Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Module
Id string - The ID of the action module.
- Versions
List<Get
Action Module Versions Version> - List of all published versions of the action module.
- Id string
- The provider-assigned unique ID for this managed resource.
- Module
Id string - The ID of the action module.
- Versions
[]Get
Action Module Versions Version - List of all published versions of the action module.
- id String
- The provider-assigned unique ID for this managed resource.
- module
Id String - The ID of the action module.
- versions
List<Get
Action Module Versions Version> - List of all published versions of the action module.
- id string
- The provider-assigned unique ID for this managed resource.
- module
Id string - The ID of the action module.
- versions
Get
Action Module Versions Version[] - List of all published versions of the action module.
- id str
- The provider-assigned unique ID for this managed resource.
- module_
id str - The ID of the action module.
- versions
Sequence[Get
Action Module Versions Version] - List of all published versions of the action module.
- id String
- The provider-assigned unique ID for this managed resource.
- module
Id String - The ID of the action module.
- versions List<Property Map>
- List of all published versions of the action module.
Supporting Types
GetActionModuleVersionsVersion
- Code string
- The exact source code that was published with this version.
- Created
At string - The timestamp when this version was created.
- Dependencies
List<Get
Action Module Versions Version Dependency> - Dependencies locked to this version.
- Id string
- The unique identifier of the version.
- Module
Id string - The ID of the parent module.
- Secrets
List<Get
Action Module Versions Version Secret> - Secrets available to this version (name and updated_at only, values never returned).
- Version
Number int - The sequential version number.
- Code string
- The exact source code that was published with this version.
- Created
At string - The timestamp when this version was created.
- Dependencies
[]Get
Action Module Versions Version Dependency - Dependencies locked to this version.
- Id string
- The unique identifier of the version.
- Module
Id string - The ID of the parent module.
- Secrets
[]Get
Action Module Versions Version Secret - Secrets available to this version (name and updated_at only, values never returned).
- Version
Number int - The sequential version number.
- code String
- The exact source code that was published with this version.
- created
At String - The timestamp when this version was created.
- dependencies
List<Get
Action Module Versions Version Dependency> - Dependencies locked to this version.
- id String
- The unique identifier of the version.
- module
Id String - The ID of the parent module.
- secrets
List<Get
Action Module Versions Version Secret> - Secrets available to this version (name and updated_at only, values never returned).
- version
Number Integer - The sequential version number.
- code string
- The exact source code that was published with this version.
- created
At string - The timestamp when this version was created.
- dependencies
Get
Action Module Versions Version Dependency[] - Dependencies locked to this version.
- id string
- The unique identifier of the version.
- module
Id string - The ID of the parent module.
- secrets
Get
Action Module Versions Version Secret[] - Secrets available to this version (name and updated_at only, values never returned).
- version
Number number - The sequential version number.
- code str
- The exact source code that was published with this version.
- created_
at str - The timestamp when this version was created.
- dependencies
Sequence[Get
Action Module Versions Version Dependency] - Dependencies locked to this version.
- id str
- The unique identifier of the version.
- module_
id str - The ID of the parent module.
- secrets
Sequence[Get
Action Module Versions Version Secret] - Secrets available to this version (name and updated_at only, values never returned).
- version_
number int - The sequential version number.
- code String
- The exact source code that was published with this version.
- created
At String - The timestamp when this version was created.
- dependencies List<Property Map>
- Dependencies locked to this version.
- id String
- The unique identifier of the version.
- module
Id String - The ID of the parent module.
- secrets List<Property Map>
- Secrets available to this version (name and updated_at only, values never returned).
- version
Number Number - The sequential version number.
GetActionModuleVersionsVersionDependency
GetActionModuleVersionsVersionSecret
- name str
- Secret name.
- updated_
at str - The time when this secret was last updated.
Package Details
- Repository
- Auth0 pulumi/pulumi-auth0
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
auth0Terraform Provider.
