1. Registry
  2. Packages
  3. Auth0 Provider
  4. API Docs
  5. getAgent
Viewing docs for Auth0 v3.57.0
published on Friday, Nov 13, 2026 by Pulumi
auth0 logo auth0 logo
Viewing docs for Auth0 v3.57.0
published on Friday, Nov 13, 2026 by Pulumi

    Data source to retrieve a specific Auth0 agent by its agentId (EA only).

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as auth0 from "@pulumi/auth0";
    
    // Available in Early Access (EA).
    const myAgent = auth0.getAgent({
        agentId: "agt_XXXXXXXXXXXXXXXXXXXXXX",
    });
    
    import pulumi
    import pulumi_auth0 as auth0
    
    # Available in Early Access (EA).
    my_agent = auth0.get_agent(agent_id="agt_XXXXXXXXXXXXXXXXXXXXXX")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-auth0/sdk/v3/go/auth0"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Available in Early Access (EA).
    		_, err := auth0.GetAgent(ctx, &auth0.LookupAgentArgs{
    			AgentId: "agt_XXXXXXXXXXXXXXXXXXXXXX",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Auth0 = Pulumi.Auth0;
    
    return await Deployment.RunAsync(() => 
    {
        // Available in Early Access (EA).
        var myAgent = Auth0.GetAgent.Invoke(new()
        {
            AgentId = "agt_XXXXXXXXXXXXXXXXXXXXXX",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.auth0.Auth0Functions;
    import com.pulumi.auth0.inputs.GetAgentArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            // Available in Early Access (EA).
            final var myAgent = Auth0Functions.getAgent(GetAgentArgs.builder()
                .agentId("agt_XXXXXXXXXXXXXXXXXXXXXX")
                .build());
    
        }
    }
    
    variables:
      # Available in Early Access (EA).
      myAgent:
        fn::invoke:
          function: auth0:getAgent
          arguments:
            agentId: agt_XXXXXXXXXXXXXXXXXXXXXX
    
    terraform {
      required_providers {
        auth0 = {
          source = "pulumi/auth0"
        }
      }
    }
    
    data "auth0_agent" "myAgent" {
      agent_id = "agt_XXXXXXXXXXXXXXXXXXXXXX"
    }
    
    # Available in Early Access (EA).
    

    Using getAgent

    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 getAgent(args: GetAgentArgs, opts?: InvokeOptions): Promise<GetAgentResult>
    function getAgentOutput(args: GetAgentOutputArgs, opts?: InvokeOutputOptions): Output<GetAgentResult>
    def get_agent(agent_id: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetAgentResult
    def get_agent_output(agent_id: pulumi.Input[Optional[str]] = None,
                  opts: Optional[InvokeOutputOptions] = None) -> Output[GetAgentResult]
    func LookupAgent(ctx *Context, args *LookupAgentArgs, opts ...InvokeOption) (*LookupAgentResult, error)
    func LookupAgentOutput(ctx *Context, args *LookupAgentOutputArgs, opts ...InvokeOption) LookupAgentResultOutput

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

    public static class GetAgent 
    {
        public static Task<GetAgentResult> InvokeAsync(GetAgentArgs args, InvokeOptions? opts = null)
        public static Output<GetAgentResult> Invoke(GetAgentInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetAgentResult> Invoke(GetAgentInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetAgentResult> getAgent(GetAgentArgs args, InvokeOptions options)
    public static Output<GetAgentResult> getAgent(GetAgentArgs args, InvokeOptions options)
    public static Output<GetAgentResult> getAgent(GetAgentArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: auth0:index/getAgent:getAgent
      arguments:
        # arguments dictionary
    data "auth0_get_agent" "name" {
        # arguments
    }

    The following arguments are supported:

    AgentId string
    The ID of the agent.
    AgentId string
    The ID of the agent.
    agent_id string
    The ID of the agent.
    agentId String
    The ID of the agent.
    agentId string
    The ID of the agent.
    agent_id str
    The ID of the agent.
    agentId String
    The ID of the agent.

    getAgent Result

    The following output properties are available:

    AgentId string
    The ID of the agent.
    CreatedAt string
    The time the agent was created, in RFC 3339 format.
    ExternalAgentId string
    An external identifier for the agent. Must be unique within the tenant, 1-128 characters and cannot contain null characters. Changing it forces a new agent to be created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Metadata string
    Arbitrary key-value metadata for the agent, as a JSON object of at most 10240 bytes. Removing the attribute clears the metadata.
    Name string
    The name of the agent. Must be 1-255 characters and cannot contain <, > or null characters.
    UpdatedAt string
    The time the agent was last updated, in RFC 3339 format.
    AgentId string
    The ID of the agent.
    CreatedAt string
    The time the agent was created, in RFC 3339 format.
    ExternalAgentId string
    An external identifier for the agent. Must be unique within the tenant, 1-128 characters and cannot contain null characters. Changing it forces a new agent to be created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Metadata string
    Arbitrary key-value metadata for the agent, as a JSON object of at most 10240 bytes. Removing the attribute clears the metadata.
    Name string
    The name of the agent. Must be 1-255 characters and cannot contain <, > or null characters.
    UpdatedAt string
    The time the agent was last updated, in RFC 3339 format.
    agent_id string
    The ID of the agent.
    created_at string
    The time the agent was created, in RFC 3339 format.
    external_agent_id string
    An external identifier for the agent. Must be unique within the tenant, 1-128 characters and cannot contain null characters. Changing it forces a new agent to be created.
    id string
    The provider-assigned unique ID for this managed resource.
    metadata string
    Arbitrary key-value metadata for the agent, as a JSON object of at most 10240 bytes. Removing the attribute clears the metadata.
    name string
    The name of the agent. Must be 1-255 characters and cannot contain <, > or null characters.
    updated_at string
    The time the agent was last updated, in RFC 3339 format.
    agentId String
    The ID of the agent.
    createdAt String
    The time the agent was created, in RFC 3339 format.
    externalAgentId String
    An external identifier for the agent. Must be unique within the tenant, 1-128 characters and cannot contain null characters. Changing it forces a new agent to be created.
    id String
    The provider-assigned unique ID for this managed resource.
    metadata String
    Arbitrary key-value metadata for the agent, as a JSON object of at most 10240 bytes. Removing the attribute clears the metadata.
    name String
    The name of the agent. Must be 1-255 characters and cannot contain <, > or null characters.
    updatedAt String
    The time the agent was last updated, in RFC 3339 format.
    agentId string
    The ID of the agent.
    createdAt string
    The time the agent was created, in RFC 3339 format.
    externalAgentId string
    An external identifier for the agent. Must be unique within the tenant, 1-128 characters and cannot contain null characters. Changing it forces a new agent to be created.
    id string
    The provider-assigned unique ID for this managed resource.
    metadata string
    Arbitrary key-value metadata for the agent, as a JSON object of at most 10240 bytes. Removing the attribute clears the metadata.
    name string
    The name of the agent. Must be 1-255 characters and cannot contain <, > or null characters.
    updatedAt string
    The time the agent was last updated, in RFC 3339 format.
    agent_id str
    The ID of the agent.
    created_at str
    The time the agent was created, in RFC 3339 format.
    external_agent_id str
    An external identifier for the agent. Must be unique within the tenant, 1-128 characters and cannot contain null characters. Changing it forces a new agent to be created.
    id str
    The provider-assigned unique ID for this managed resource.
    metadata str
    Arbitrary key-value metadata for the agent, as a JSON object of at most 10240 bytes. Removing the attribute clears the metadata.
    name str
    The name of the agent. Must be 1-255 characters and cannot contain <, > or null characters.
    updated_at str
    The time the agent was last updated, in RFC 3339 format.
    agentId String
    The ID of the agent.
    createdAt String
    The time the agent was created, in RFC 3339 format.
    externalAgentId String
    An external identifier for the agent. Must be unique within the tenant, 1-128 characters and cannot contain null characters. Changing it forces a new agent to be created.
    id String
    The provider-assigned unique ID for this managed resource.
    metadata String
    Arbitrary key-value metadata for the agent, as a JSON object of at most 10240 bytes. Removing the attribute clears the metadata.
    name String
    The name of the agent. Must be 1-255 characters and cannot contain <, > or null characters.
    updatedAt String
    The time the agent was last updated, in RFC 3339 format.

    Package Details

    Repository
    Auth0 pulumi/pulumi-auth0
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the auth0 Terraform Provider.
    auth0 logo auth0 logo
    Viewing docs for Auth0 v3.57.0
    published on Friday, Nov 13, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial