1. Packages
  2. Packages
  3. Auth0 Provider
  4. API Docs
  5. getResourceServer
Viewing docs for Auth0 v2.24.3 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
auth0 logo
Viewing docs for Auth0 v2.24.3 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Data source to retrieve a specific Auth0 resource server by resource_server_id or identifier.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Auth0 = Pulumi.Auth0;
    
    return await Deployment.RunAsync(() => 
    {
        var some_resource_server_by_identifier = Auth0.GetResourceServer.Invoke(new()
        {
            Identifier = "https://my-api.com/v1",
        });
    
        var some_resource_server_by_id = Auth0.GetResourceServer.Invoke(new()
        {
            ResourceServerId = "abcdefghkijklmnopqrstuvwxyz0123456789",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-auth0/sdk/v2/go/auth0"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := auth0.LookupResourceServer(ctx, &auth0.LookupResourceServerArgs{
    			Identifier: pulumi.StringRef("https://my-api.com/v1"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = auth0.LookupResourceServer(ctx, &auth0.LookupResourceServerArgs{
    			ResourceServerId: pulumi.StringRef("abcdefghkijklmnopqrstuvwxyz0123456789"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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.GetResourceServerArgs;
    import java.util.List;
    import java.util.ArrayList;
    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) {
            final var some-resource-server-by-identifier = Auth0Functions.getResourceServer(GetResourceServerArgs.builder()
                .identifier("https://my-api.com/v1")
                .build());
    
            final var some-resource-server-by-id = Auth0Functions.getResourceServer(GetResourceServerArgs.builder()
                .resourceServerId("abcdefghkijklmnopqrstuvwxyz0123456789")
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as auth0 from "@pulumi/auth0";
    
    const some-resource-server-by-identifier = auth0.getResourceServer({
        identifier: "https://my-api.com/v1",
    });
    const some-resource-server-by-id = auth0.getResourceServer({
        resourceServerId: "abcdefghkijklmnopqrstuvwxyz0123456789",
    });
    
    import pulumi
    import pulumi_auth0 as auth0
    
    some_resource_server_by_identifier = auth0.get_resource_server(identifier="https://my-api.com/v1")
    some_resource_server_by_id = auth0.get_resource_server(resource_server_id="abcdefghkijklmnopqrstuvwxyz0123456789")
    
    variables:
      some-resource-server-by-identifier:
        fn::invoke:
          Function: auth0:getResourceServer
          Arguments:
            identifier: https://my-api.com/v1
      some-resource-server-by-id:
        fn::invoke:
          Function: auth0:getResourceServer
          Arguments:
            resourceServerId: abcdefghkijklmnopqrstuvwxyz0123456789
    

    Using getResourceServer

    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 getResourceServer(args: GetResourceServerArgs, opts?: InvokeOptions): Promise<GetResourceServerResult>
    function getResourceServerOutput(args: GetResourceServerOutputArgs, opts?: InvokeOptions): Output<GetResourceServerResult>
    def get_resource_server(identifier: Optional[str] = None,
                            resource_server_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetResourceServerResult
    def get_resource_server_output(identifier: Optional[pulumi.Input[str]] = None,
                            resource_server_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetResourceServerResult]
    func LookupResourceServer(ctx *Context, args *LookupResourceServerArgs, opts ...InvokeOption) (*LookupResourceServerResult, error)
    func LookupResourceServerOutput(ctx *Context, args *LookupResourceServerOutputArgs, opts ...InvokeOption) LookupResourceServerResultOutput

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

    public static class GetResourceServer 
    {
        public static Task<GetResourceServerResult> InvokeAsync(GetResourceServerArgs args, InvokeOptions? opts = null)
        public static Output<GetResourceServerResult> Invoke(GetResourceServerInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetResourceServerResult> getResourceServer(GetResourceServerArgs args, InvokeOptions options)
    public static Output<GetResourceServerResult> getResourceServer(GetResourceServerArgs args, InvokeOptions options)
    
    fn::invoke:
      function: auth0:index/getResourceServer:getResourceServer
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Identifier string
    The unique identifier for the resource server. If not provided, resource_server_id must be set.
    ResourceServerId string
    The ID of the resource server. If not provided, identifier must be set.
    Identifier string
    The unique identifier for the resource server. If not provided, resource_server_id must be set.
    ResourceServerId string
    The ID of the resource server. If not provided, identifier must be set.
    identifier String
    The unique identifier for the resource server. If not provided, resource_server_id must be set.
    resourceServerId String
    The ID of the resource server. If not provided, identifier must be set.
    identifier string
    The unique identifier for the resource server. If not provided, resource_server_id must be set.
    resourceServerId string
    The ID of the resource server. If not provided, identifier must be set.
    identifier str
    The unique identifier for the resource server. If not provided, resource_server_id must be set.
    resource_server_id str
    The ID of the resource server. If not provided, identifier must be set.
    identifier String
    The unique identifier for the resource server. If not provided, resource_server_id must be set.
    resourceServerId String
    The ID of the resource server. If not provided, identifier must be set.

    getResourceServer Result

    The following output properties are available:

    AllowOfflineAccess bool
    Indicates whether refresh tokens can be issued for this resource server.
    EnforcePolicies bool
    If this setting is enabled, RBAC authorization policies will be enforced for this API. Role and permission assignments will be evaluated during the login transaction.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Friendly name for the resource server. Cannot include < or > characters.
    Scopes List<GetResourceServerScope>
    List of permissions (scopes) used by this resource server.
    SigningAlg string
    Algorithm used to sign JWTs. Options include HS256 and RS256.
    SigningSecret string
    Secret used to sign tokens when using symmetric algorithms (HS256).
    SkipConsentForVerifiableFirstPartyClients bool
    Indicates whether to skip user consent for applications flagged as first party.
    TokenDialect string
    Dialect of access tokens that should be issued for this resource server. Options include access_token or access_token_authz. If this setting is set to access_token_authz, the Permissions claim will be added to the access token. Only available if RBAC (enforce_policies) is enabled for this API.
    TokenLifetime int
    Number of seconds during which access tokens issued for this resource server from the token endpoint remain valid.
    TokenLifetimeForWeb int
    Number of seconds during which access tokens issued for this resource server via implicit or hybrid flows remain valid. Cannot be greater than the token_lifetime value.
    VerificationLocation string
    URL from which to retrieve JWKs for this resource server. Used for verifying the JWT sent to Auth0 for token introspection.
    Identifier string
    The unique identifier for the resource server. If not provided, resource_server_id must be set.
    ResourceServerId string
    The ID of the resource server. If not provided, identifier must be set.
    AllowOfflineAccess bool
    Indicates whether refresh tokens can be issued for this resource server.
    EnforcePolicies bool
    If this setting is enabled, RBAC authorization policies will be enforced for this API. Role and permission assignments will be evaluated during the login transaction.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Friendly name for the resource server. Cannot include < or > characters.
    Scopes []GetResourceServerScopeType
    List of permissions (scopes) used by this resource server.
    SigningAlg string
    Algorithm used to sign JWTs. Options include HS256 and RS256.
    SigningSecret string
    Secret used to sign tokens when using symmetric algorithms (HS256).
    SkipConsentForVerifiableFirstPartyClients bool
    Indicates whether to skip user consent for applications flagged as first party.
    TokenDialect string
    Dialect of access tokens that should be issued for this resource server. Options include access_token or access_token_authz. If this setting is set to access_token_authz, the Permissions claim will be added to the access token. Only available if RBAC (enforce_policies) is enabled for this API.
    TokenLifetime int
    Number of seconds during which access tokens issued for this resource server from the token endpoint remain valid.
    TokenLifetimeForWeb int
    Number of seconds during which access tokens issued for this resource server via implicit or hybrid flows remain valid. Cannot be greater than the token_lifetime value.
    VerificationLocation string
    URL from which to retrieve JWKs for this resource server. Used for verifying the JWT sent to Auth0 for token introspection.
    Identifier string
    The unique identifier for the resource server. If not provided, resource_server_id must be set.
    ResourceServerId string
    The ID of the resource server. If not provided, identifier must be set.
    allowOfflineAccess Boolean
    Indicates whether refresh tokens can be issued for this resource server.
    enforcePolicies Boolean
    If this setting is enabled, RBAC authorization policies will be enforced for this API. Role and permission assignments will be evaluated during the login transaction.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Friendly name for the resource server. Cannot include < or > characters.
    scopes List<GetResourceServerScope>
    List of permissions (scopes) used by this resource server.
    signingAlg String
    Algorithm used to sign JWTs. Options include HS256 and RS256.
    signingSecret String
    Secret used to sign tokens when using symmetric algorithms (HS256).
    skipConsentForVerifiableFirstPartyClients Boolean
    Indicates whether to skip user consent for applications flagged as first party.
    tokenDialect String
    Dialect of access tokens that should be issued for this resource server. Options include access_token or access_token_authz. If this setting is set to access_token_authz, the Permissions claim will be added to the access token. Only available if RBAC (enforce_policies) is enabled for this API.
    tokenLifetime Integer
    Number of seconds during which access tokens issued for this resource server from the token endpoint remain valid.
    tokenLifetimeForWeb Integer
    Number of seconds during which access tokens issued for this resource server via implicit or hybrid flows remain valid. Cannot be greater than the token_lifetime value.
    verificationLocation String
    URL from which to retrieve JWKs for this resource server. Used for verifying the JWT sent to Auth0 for token introspection.
    identifier String
    The unique identifier for the resource server. If not provided, resource_server_id must be set.
    resourceServerId String
    The ID of the resource server. If not provided, identifier must be set.
    allowOfflineAccess boolean
    Indicates whether refresh tokens can be issued for this resource server.
    enforcePolicies boolean
    If this setting is enabled, RBAC authorization policies will be enforced for this API. Role and permission assignments will be evaluated during the login transaction.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Friendly name for the resource server. Cannot include < or > characters.
    scopes GetResourceServerScope[]
    List of permissions (scopes) used by this resource server.
    signingAlg string
    Algorithm used to sign JWTs. Options include HS256 and RS256.
    signingSecret string
    Secret used to sign tokens when using symmetric algorithms (HS256).
    skipConsentForVerifiableFirstPartyClients boolean
    Indicates whether to skip user consent for applications flagged as first party.
    tokenDialect string
    Dialect of access tokens that should be issued for this resource server. Options include access_token or access_token_authz. If this setting is set to access_token_authz, the Permissions claim will be added to the access token. Only available if RBAC (enforce_policies) is enabled for this API.
    tokenLifetime number
    Number of seconds during which access tokens issued for this resource server from the token endpoint remain valid.
    tokenLifetimeForWeb number
    Number of seconds during which access tokens issued for this resource server via implicit or hybrid flows remain valid. Cannot be greater than the token_lifetime value.
    verificationLocation string
    URL from which to retrieve JWKs for this resource server. Used for verifying the JWT sent to Auth0 for token introspection.
    identifier string
    The unique identifier for the resource server. If not provided, resource_server_id must be set.
    resourceServerId string
    The ID of the resource server. If not provided, identifier must be set.
    allow_offline_access bool
    Indicates whether refresh tokens can be issued for this resource server.
    enforce_policies bool
    If this setting is enabled, RBAC authorization policies will be enforced for this API. Role and permission assignments will be evaluated during the login transaction.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Friendly name for the resource server. Cannot include < or > characters.
    scopes Sequence[GetResourceServerScope]
    List of permissions (scopes) used by this resource server.
    signing_alg str
    Algorithm used to sign JWTs. Options include HS256 and RS256.
    signing_secret str
    Secret used to sign tokens when using symmetric algorithms (HS256).
    skip_consent_for_verifiable_first_party_clients bool
    Indicates whether to skip user consent for applications flagged as first party.
    token_dialect str
    Dialect of access tokens that should be issued for this resource server. Options include access_token or access_token_authz. If this setting is set to access_token_authz, the Permissions claim will be added to the access token. Only available if RBAC (enforce_policies) is enabled for this API.
    token_lifetime int
    Number of seconds during which access tokens issued for this resource server from the token endpoint remain valid.
    token_lifetime_for_web int
    Number of seconds during which access tokens issued for this resource server via implicit or hybrid flows remain valid. Cannot be greater than the token_lifetime value.
    verification_location str
    URL from which to retrieve JWKs for this resource server. Used for verifying the JWT sent to Auth0 for token introspection.
    identifier str
    The unique identifier for the resource server. If not provided, resource_server_id must be set.
    resource_server_id str
    The ID of the resource server. If not provided, identifier must be set.
    allowOfflineAccess Boolean
    Indicates whether refresh tokens can be issued for this resource server.
    enforcePolicies Boolean
    If this setting is enabled, RBAC authorization policies will be enforced for this API. Role and permission assignments will be evaluated during the login transaction.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Friendly name for the resource server. Cannot include < or > characters.
    scopes List<Property Map>
    List of permissions (scopes) used by this resource server.
    signingAlg String
    Algorithm used to sign JWTs. Options include HS256 and RS256.
    signingSecret String
    Secret used to sign tokens when using symmetric algorithms (HS256).
    skipConsentForVerifiableFirstPartyClients Boolean
    Indicates whether to skip user consent for applications flagged as first party.
    tokenDialect String
    Dialect of access tokens that should be issued for this resource server. Options include access_token or access_token_authz. If this setting is set to access_token_authz, the Permissions claim will be added to the access token. Only available if RBAC (enforce_policies) is enabled for this API.
    tokenLifetime Number
    Number of seconds during which access tokens issued for this resource server from the token endpoint remain valid.
    tokenLifetimeForWeb Number
    Number of seconds during which access tokens issued for this resource server via implicit or hybrid flows remain valid. Cannot be greater than the token_lifetime value.
    verificationLocation String
    URL from which to retrieve JWKs for this resource server. Used for verifying the JWT sent to Auth0 for token introspection.
    identifier String
    The unique identifier for the resource server. If not provided, resource_server_id must be set.
    resourceServerId String
    The ID of the resource server. If not provided, identifier must be set.

    Supporting Types

    GetResourceServerScope

    Description string
    Value string
    Description string
    Value string
    description String
    value String
    description string
    value string
    description String
    value String

    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 v2.24.3 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.