1. Packages
  2. Logfire
  3. API Docs
  4. ReadToken
Viewing docs for Logfire v0.1.9
published on Wednesday, Apr 8, 2026 by Pydantic
logfire logo
Viewing docs for Logfire v0.1.9
published on Wednesday, Apr 8, 2026 by Pydantic

    Manages a Logfire read token.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as logfire from "@pydantic/pulumi-logfire";
    
    const exampleProject = new logfire.Project("exampleProject", {});
    const exampleReadToken = new logfire.ReadToken("exampleReadToken", {
        projectId: exampleProject.id,
        expiresAt: "2099-12-31T23:59:59Z",
    });
    
    import pulumi
    import pulumi_logfire as logfire
    
    example_project = logfire.Project("exampleProject")
    example_read_token = logfire.ReadToken("exampleReadToken",
        project_id=example_project.id,
        expires_at="2099-12-31T23:59:59Z")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pydantic/pulumi-logfire/sdk/go/logfire"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleProject, err := logfire.NewProject(ctx, "exampleProject", nil)
    		if err != nil {
    			return err
    		}
    		_, err = logfire.NewReadToken(ctx, "exampleReadToken", &logfire.ReadTokenArgs{
    			ProjectId: exampleProject.ID(),
    			ExpiresAt: pulumi.String("2099-12-31T23:59:59Z"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Logfire = Pulumi.Logfire;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleProject = new Logfire.Project("exampleProject");
    
        var exampleReadToken = new Logfire.ReadToken("exampleReadToken", new()
        {
            ProjectId = exampleProject.Id,
            ExpiresAt = "2099-12-31T23:59:59Z",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.logfire.Project;
    import com.pulumi.logfire.ReadToken;
    import com.pulumi.logfire.ReadTokenArgs;
    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 exampleProject = new Project("exampleProject");
    
            var exampleReadToken = new ReadToken("exampleReadToken", ReadTokenArgs.builder()
                .projectId(exampleProject.id())
                .expiresAt("2099-12-31T23:59:59Z")
                .build());
    
        }
    }
    
    resources:
      exampleProject:
        type: logfire:Project
      exampleReadToken:
        type: logfire:ReadToken
        properties:
          projectId: ${exampleProject.id}
          expiresAt: 2099-12-31T23:59:59Z
    

    Create ReadToken Resource

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

    Constructor syntax

    new ReadToken(name: string, args: ReadTokenArgs, opts?: CustomResourceOptions);
    @overload
    def ReadToken(resource_name: str,
                  args: ReadTokenArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def ReadToken(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  project_id: Optional[str] = None,
                  expires_at: Optional[str] = None)
    func NewReadToken(ctx *Context, name string, args ReadTokenArgs, opts ...ResourceOption) (*ReadToken, error)
    public ReadToken(string name, ReadTokenArgs args, CustomResourceOptions? opts = null)
    public ReadToken(String name, ReadTokenArgs args)
    public ReadToken(String name, ReadTokenArgs args, CustomResourceOptions options)
    
    type: logfire:ReadToken
    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 ReadTokenArgs
    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 ReadTokenArgs
    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 ReadTokenArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ReadTokenArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ReadTokenArgs
    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 readTokenResource = new Logfire.Index.ReadToken("readTokenResource", new()
    {
        ProjectId = "string",
        ExpiresAt = "string",
    });
    
    example, err := logfire.NewReadToken(ctx, "readTokenResource", &logfire.ReadTokenArgs{
    	ProjectId: pulumi.String("string"),
    	ExpiresAt: pulumi.String("string"),
    })
    
    var readTokenResource = new ReadToken("readTokenResource", ReadTokenArgs.builder()
        .projectId("string")
        .expiresAt("string")
        .build());
    
    read_token_resource = logfire.ReadToken("readTokenResource",
        project_id="string",
        expires_at="string")
    
    const readTokenResource = new logfire.ReadToken("readTokenResource", {
        projectId: "string",
        expiresAt: "string",
    });
    
    type: logfire:ReadToken
    properties:
        expiresAt: string
        projectId: string
    

    ReadToken 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 ReadToken resource accepts the following input properties:

    ProjectId string
    UUID of the project that owns the token.
    ExpiresAt string
    Optional RFC3339 expiration timestamp for the token (for example 2026-12-31T23:59:59Z). If omitted, the token does not expire.
    ProjectId string
    UUID of the project that owns the token.
    ExpiresAt string
    Optional RFC3339 expiration timestamp for the token (for example 2026-12-31T23:59:59Z). If omitted, the token does not expire.
    projectId String
    UUID of the project that owns the token.
    expiresAt String
    Optional RFC3339 expiration timestamp for the token (for example 2026-12-31T23:59:59Z). If omitted, the token does not expire.
    projectId string
    UUID of the project that owns the token.
    expiresAt string
    Optional RFC3339 expiration timestamp for the token (for example 2026-12-31T23:59:59Z). If omitted, the token does not expire.
    project_id str
    UUID of the project that owns the token.
    expires_at str
    Optional RFC3339 expiration timestamp for the token (for example 2026-12-31T23:59:59Z). If omitted, the token does not expire.
    projectId String
    UUID of the project that owns the token.
    expiresAt String
    Optional RFC3339 expiration timestamp for the token (for example 2026-12-31T23:59:59Z). If omitted, the token does not expire.

    Outputs

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

    CreatedAt string
    Timestamp when the token was created.
    CreatedByName string
    Display name of the user that created the token.
    Description string
    Description is fixed to "Created by Public API" for provider-managed tokens.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProjectName string
    Name of the project that owns the token.
    Token string
    The generated read token. Only returned on creation.
    TokenPrefix string
    Prefix of the generated read token.
    CreatedAt string
    Timestamp when the token was created.
    CreatedByName string
    Display name of the user that created the token.
    Description string
    Description is fixed to "Created by Public API" for provider-managed tokens.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProjectName string
    Name of the project that owns the token.
    Token string
    The generated read token. Only returned on creation.
    TokenPrefix string
    Prefix of the generated read token.
    createdAt String
    Timestamp when the token was created.
    createdByName String
    Display name of the user that created the token.
    description String
    Description is fixed to "Created by Public API" for provider-managed tokens.
    id String
    The provider-assigned unique ID for this managed resource.
    projectName String
    Name of the project that owns the token.
    token String
    The generated read token. Only returned on creation.
    tokenPrefix String
    Prefix of the generated read token.
    createdAt string
    Timestamp when the token was created.
    createdByName string
    Display name of the user that created the token.
    description string
    Description is fixed to "Created by Public API" for provider-managed tokens.
    id string
    The provider-assigned unique ID for this managed resource.
    projectName string
    Name of the project that owns the token.
    token string
    The generated read token. Only returned on creation.
    tokenPrefix string
    Prefix of the generated read token.
    created_at str
    Timestamp when the token was created.
    created_by_name str
    Display name of the user that created the token.
    description str
    Description is fixed to "Created by Public API" for provider-managed tokens.
    id str
    The provider-assigned unique ID for this managed resource.
    project_name str
    Name of the project that owns the token.
    token str
    The generated read token. Only returned on creation.
    token_prefix str
    Prefix of the generated read token.
    createdAt String
    Timestamp when the token was created.
    createdByName String
    Display name of the user that created the token.
    description String
    Description is fixed to "Created by Public API" for provider-managed tokens.
    id String
    The provider-assigned unique ID for this managed resource.
    projectName String
    Name of the project that owns the token.
    token String
    The generated read token. Only returned on creation.
    tokenPrefix String
    Prefix of the generated read token.

    Look up Existing ReadToken Resource

    Get an existing ReadToken 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?: ReadTokenState, opts?: CustomResourceOptions): ReadToken
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            created_by_name: Optional[str] = None,
            description: Optional[str] = None,
            expires_at: Optional[str] = None,
            project_id: Optional[str] = None,
            project_name: Optional[str] = None,
            token: Optional[str] = None,
            token_prefix: Optional[str] = None) -> ReadToken
    func GetReadToken(ctx *Context, name string, id IDInput, state *ReadTokenState, opts ...ResourceOption) (*ReadToken, error)
    public static ReadToken Get(string name, Input<string> id, ReadTokenState? state, CustomResourceOptions? opts = null)
    public static ReadToken get(String name, Output<String> id, ReadTokenState state, CustomResourceOptions options)
    resources:  _:    type: logfire:ReadToken    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:
    CreatedAt string
    Timestamp when the token was created.
    CreatedByName string
    Display name of the user that created the token.
    Description string
    Description is fixed to "Created by Public API" for provider-managed tokens.
    ExpiresAt string
    Optional RFC3339 expiration timestamp for the token (for example 2026-12-31T23:59:59Z). If omitted, the token does not expire.
    ProjectId string
    UUID of the project that owns the token.
    ProjectName string
    Name of the project that owns the token.
    Token string
    The generated read token. Only returned on creation.
    TokenPrefix string
    Prefix of the generated read token.
    CreatedAt string
    Timestamp when the token was created.
    CreatedByName string
    Display name of the user that created the token.
    Description string
    Description is fixed to "Created by Public API" for provider-managed tokens.
    ExpiresAt string
    Optional RFC3339 expiration timestamp for the token (for example 2026-12-31T23:59:59Z). If omitted, the token does not expire.
    ProjectId string
    UUID of the project that owns the token.
    ProjectName string
    Name of the project that owns the token.
    Token string
    The generated read token. Only returned on creation.
    TokenPrefix string
    Prefix of the generated read token.
    createdAt String
    Timestamp when the token was created.
    createdByName String
    Display name of the user that created the token.
    description String
    Description is fixed to "Created by Public API" for provider-managed tokens.
    expiresAt String
    Optional RFC3339 expiration timestamp for the token (for example 2026-12-31T23:59:59Z). If omitted, the token does not expire.
    projectId String
    UUID of the project that owns the token.
    projectName String
    Name of the project that owns the token.
    token String
    The generated read token. Only returned on creation.
    tokenPrefix String
    Prefix of the generated read token.
    createdAt string
    Timestamp when the token was created.
    createdByName string
    Display name of the user that created the token.
    description string
    Description is fixed to "Created by Public API" for provider-managed tokens.
    expiresAt string
    Optional RFC3339 expiration timestamp for the token (for example 2026-12-31T23:59:59Z). If omitted, the token does not expire.
    projectId string
    UUID of the project that owns the token.
    projectName string
    Name of the project that owns the token.
    token string
    The generated read token. Only returned on creation.
    tokenPrefix string
    Prefix of the generated read token.
    created_at str
    Timestamp when the token was created.
    created_by_name str
    Display name of the user that created the token.
    description str
    Description is fixed to "Created by Public API" for provider-managed tokens.
    expires_at str
    Optional RFC3339 expiration timestamp for the token (for example 2026-12-31T23:59:59Z). If omitted, the token does not expire.
    project_id str
    UUID of the project that owns the token.
    project_name str
    Name of the project that owns the token.
    token str
    The generated read token. Only returned on creation.
    token_prefix str
    Prefix of the generated read token.
    createdAt String
    Timestamp when the token was created.
    createdByName String
    Display name of the user that created the token.
    description String
    Description is fixed to "Created by Public API" for provider-managed tokens.
    expiresAt String
    Optional RFC3339 expiration timestamp for the token (for example 2026-12-31T23:59:59Z). If omitted, the token does not expire.
    projectId String
    UUID of the project that owns the token.
    projectName String
    Name of the project that owns the token.
    token String
    The generated read token. Only returned on creation.
    tokenPrefix String
    Prefix of the generated read token.

    Package Details

    Repository
    logfire pydantic/pulumi-logfire
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the logfire Terraform Provider.
    logfire logo
    Viewing docs for Logfire v0.1.9
    published on Wednesday, Apr 8, 2026 by Pydantic
      Try Pulumi Cloud free. Your team will thank you.