1. Packages
  2. Onelogin Provider
  3. API Docs
  4. AuthServers
onelogin 0.11.0 published on Friday, Aug 29, 2025 by onelogin

onelogin.AuthServers

Explore with Pulumi AI

onelogin logo
onelogin 0.11.0 published on Friday, Aug 29, 2025 by onelogin

    Creates an Authentication Server Resource.

    This resource allows you to create and configure an Authentication Server.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as onelogin from "@pulumi/onelogin";
    
    const example = new onelogin.AuthServers("example", {
        configuration: {
            accessTokenExpirationMinutes: 10,
            audiences: ["https://example.com/contacts"],
            refreshTokenExpirationMinutes: 30,
            resourceIdentifier: "https://example.com/contacts",
        },
        description: "This is an api",
    });
    
    import pulumi
    import pulumi_onelogin as onelogin
    
    example = onelogin.AuthServers("example",
        configuration={
            "access_token_expiration_minutes": 10,
            "audiences": ["https://example.com/contacts"],
            "refresh_token_expiration_minutes": 30,
            "resource_identifier": "https://example.com/contacts",
        },
        description="This is an api")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/onelogin/onelogin"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := onelogin.NewAuthServers(ctx, "example", &onelogin.AuthServersArgs{
    			Configuration: &onelogin.AuthServersConfigurationArgs{
    				AccessTokenExpirationMinutes: pulumi.Float64(10),
    				Audiences: pulumi.StringArray{
    					pulumi.String("https://example.com/contacts"),
    				},
    				RefreshTokenExpirationMinutes: pulumi.Float64(30),
    				ResourceIdentifier:            pulumi.String("https://example.com/contacts"),
    			},
    			Description: pulumi.String("This is an api"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Onelogin = Pulumi.Onelogin;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Onelogin.AuthServers("example", new()
        {
            Configuration = new Onelogin.Inputs.AuthServersConfigurationArgs
            {
                AccessTokenExpirationMinutes = 10,
                Audiences = new[]
                {
                    "https://example.com/contacts",
                },
                RefreshTokenExpirationMinutes = 30,
                ResourceIdentifier = "https://example.com/contacts",
            },
            Description = "This is an api",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.onelogin.AuthServers;
    import com.pulumi.onelogin.AuthServersArgs;
    import com.pulumi.onelogin.inputs.AuthServersConfigurationArgs;
    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) {
            var example = new AuthServers("example", AuthServersArgs.builder()
                .configuration(AuthServersConfigurationArgs.builder()
                    .accessTokenExpirationMinutes(10)
                    .audiences("https://example.com/contacts")
                    .refreshTokenExpirationMinutes(30)
                    .resourceIdentifier("https://example.com/contacts")
                    .build())
                .description("This is an api")
                .build());
    
        }
    }
    
    resources:
      example:
        type: onelogin:AuthServers
        properties:
          configuration:
            accessTokenExpirationMinutes: 10
            audiences:
              - https://example.com/contacts
            refreshTokenExpirationMinutes: 30
            resourceIdentifier: https://example.com/contacts
          description: This is an api
    

    Create AuthServers Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AuthServers(name: string, args: AuthServersArgs, opts?: CustomResourceOptions);
    @overload
    def AuthServers(resource_name: str,
                    args: AuthServersArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def AuthServers(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    configuration: Optional[AuthServersConfigurationArgs] = None,
                    description: Optional[str] = None,
                    auth_servers_id: Optional[str] = None,
                    name: Optional[str] = None)
    func NewAuthServers(ctx *Context, name string, args AuthServersArgs, opts ...ResourceOption) (*AuthServers, error)
    public AuthServers(string name, AuthServersArgs args, CustomResourceOptions? opts = null)
    public AuthServers(String name, AuthServersArgs args)
    public AuthServers(String name, AuthServersArgs args, CustomResourceOptions options)
    
    type: onelogin:AuthServers
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AuthServersArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AuthServersArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AuthServersArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AuthServersArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AuthServersArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var authServersResource = new Onelogin.AuthServers("authServersResource", new()
    {
        Configuration = new Onelogin.Inputs.AuthServersConfigurationArgs
        {
            Audiences = new[]
            {
                "string",
            },
            ResourceIdentifier = "string",
            AccessTokenExpirationMinutes = 0,
            RefreshTokenExpirationMinutes = 0,
        },
        Description = "string",
        AuthServersId = "string",
        Name = "string",
    });
    
    example, err := onelogin.NewAuthServers(ctx, "authServersResource", &onelogin.AuthServersArgs{
    	Configuration: &onelogin.AuthServersConfigurationArgs{
    		Audiences: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		ResourceIdentifier:            pulumi.String("string"),
    		AccessTokenExpirationMinutes:  pulumi.Float64(0),
    		RefreshTokenExpirationMinutes: pulumi.Float64(0),
    	},
    	Description:   pulumi.String("string"),
    	AuthServersId: pulumi.String("string"),
    	Name:          pulumi.String("string"),
    })
    
    var authServersResource = new AuthServers("authServersResource", AuthServersArgs.builder()
        .configuration(AuthServersConfigurationArgs.builder()
            .audiences("string")
            .resourceIdentifier("string")
            .accessTokenExpirationMinutes(0.0)
            .refreshTokenExpirationMinutes(0.0)
            .build())
        .description("string")
        .authServersId("string")
        .name("string")
        .build());
    
    auth_servers_resource = onelogin.AuthServers("authServersResource",
        configuration={
            "audiences": ["string"],
            "resource_identifier": "string",
            "access_token_expiration_minutes": 0,
            "refresh_token_expiration_minutes": 0,
        },
        description="string",
        auth_servers_id="string",
        name="string")
    
    const authServersResource = new onelogin.AuthServers("authServersResource", {
        configuration: {
            audiences: ["string"],
            resourceIdentifier: "string",
            accessTokenExpirationMinutes: 0,
            refreshTokenExpirationMinutes: 0,
        },
        description: "string",
        authServersId: "string",
        name: "string",
    });
    
    type: onelogin:AuthServers
    properties:
        authServersId: string
        configuration:
            accessTokenExpirationMinutes: 0
            audiences:
                - string
            refreshTokenExpirationMinutes: 0
            resourceIdentifier: string
        description: string
        name: string
    

    AuthServers Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The AuthServers resource accepts the following input properties:

    Configuration AuthServersConfiguration
    Configuration parameters
    Description string
    A brief description about the resource.
    AuthServersId string
    Name string
    The resource's name.
    Configuration AuthServersConfigurationArgs
    Configuration parameters
    Description string
    A brief description about the resource.
    AuthServersId string
    Name string
    The resource's name.
    configuration AuthServersConfiguration
    Configuration parameters
    description String
    A brief description about the resource.
    authServersId String
    name String
    The resource's name.
    configuration AuthServersConfiguration
    Configuration parameters
    description string
    A brief description about the resource.
    authServersId string
    name string
    The resource's name.
    configuration AuthServersConfigurationArgs
    Configuration parameters
    description str
    A brief description about the resource.
    auth_servers_id str
    name str
    The resource's name.
    configuration Property Map
    Configuration parameters
    description String
    A brief description about the resource.
    authServersId String
    name String
    The resource's name.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AuthServers resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing AuthServers Resource

    Get an existing AuthServers resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: AuthServersState, opts?: CustomResourceOptions): AuthServers
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auth_servers_id: Optional[str] = None,
            configuration: Optional[AuthServersConfigurationArgs] = None,
            description: Optional[str] = None,
            name: Optional[str] = None) -> AuthServers
    func GetAuthServers(ctx *Context, name string, id IDInput, state *AuthServersState, opts ...ResourceOption) (*AuthServers, error)
    public static AuthServers Get(string name, Input<string> id, AuthServersState? state, CustomResourceOptions? opts = null)
    public static AuthServers get(String name, Output<String> id, AuthServersState state, CustomResourceOptions options)
    resources:  _:    type: onelogin:AuthServers    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AuthServersId string
    Configuration AuthServersConfiguration
    Configuration parameters
    Description string
    A brief description about the resource.
    Name string
    The resource's name.
    AuthServersId string
    Configuration AuthServersConfigurationArgs
    Configuration parameters
    Description string
    A brief description about the resource.
    Name string
    The resource's name.
    authServersId String
    configuration AuthServersConfiguration
    Configuration parameters
    description String
    A brief description about the resource.
    name String
    The resource's name.
    authServersId string
    configuration AuthServersConfiguration
    Configuration parameters
    description string
    A brief description about the resource.
    name string
    The resource's name.
    auth_servers_id str
    configuration AuthServersConfigurationArgs
    Configuration parameters
    description str
    A brief description about the resource.
    name str
    The resource's name.
    authServersId String
    configuration Property Map
    Configuration parameters
    description String
    A brief description about the resource.
    name String
    The resource's name.

    Supporting Types

    AuthServersConfiguration, AuthServersConfigurationArgs

    Audiences List<string>
    List of API endpoints that will be returned in Access Tokens.
    ResourceIdentifier string
    Unique identifier for the API that the Authorization Server will issue Access Tokens for.
    AccessTokenExpirationMinutes double
    The number of minutes until the token expires
    RefreshTokenExpirationMinutes double
    The number of minutes until the token expires
    Audiences []string
    List of API endpoints that will be returned in Access Tokens.
    ResourceIdentifier string
    Unique identifier for the API that the Authorization Server will issue Access Tokens for.
    AccessTokenExpirationMinutes float64
    The number of minutes until the token expires
    RefreshTokenExpirationMinutes float64
    The number of minutes until the token expires
    audiences List<String>
    List of API endpoints that will be returned in Access Tokens.
    resourceIdentifier String
    Unique identifier for the API that the Authorization Server will issue Access Tokens for.
    accessTokenExpirationMinutes Double
    The number of minutes until the token expires
    refreshTokenExpirationMinutes Double
    The number of minutes until the token expires
    audiences string[]
    List of API endpoints that will be returned in Access Tokens.
    resourceIdentifier string
    Unique identifier for the API that the Authorization Server will issue Access Tokens for.
    accessTokenExpirationMinutes number
    The number of minutes until the token expires
    refreshTokenExpirationMinutes number
    The number of minutes until the token expires
    audiences Sequence[str]
    List of API endpoints that will be returned in Access Tokens.
    resource_identifier str
    Unique identifier for the API that the Authorization Server will issue Access Tokens for.
    access_token_expiration_minutes float
    The number of minutes until the token expires
    refresh_token_expiration_minutes float
    The number of minutes until the token expires
    audiences List<String>
    List of API endpoints that will be returned in Access Tokens.
    resourceIdentifier String
    Unique identifier for the API that the Authorization Server will issue Access Tokens for.
    accessTokenExpirationMinutes Number
    The number of minutes until the token expires
    refreshTokenExpirationMinutes Number
    The number of minutes until the token expires

    Import

    An Auth Server can be imported via the OneLogin Auth Server ID.

    $ pulumi import onelogin:index/authServers:AuthServers example <auth_server_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    onelogin onelogin/terraform-provider-onelogin
    License
    Notes
    This Pulumi package is based on the onelogin Terraform Provider.
    onelogin logo
    onelogin 0.11.0 published on Friday, Aug 29, 2025 by onelogin