1. Registry
  2. Packages
  3. Logfire
  4. API Docs
  5. ApiKey
Viewing docs for Logfire v0.1.21
published on Wednesday, Sep 9, 2026 by Pydantic
logfire logo
Viewing docs for Logfire v0.1.21
published on Wednesday, Sep 9, 2026 by Pydantic

    Manages a Logfire API key. Write tokens (project:write_otlp), read tokens (project:read_otlp), gateway keys (project:gateway_proxy), and management keys are all API keys with different scopes. The new key can never exceed the provider credential’s own grant: its scopes must be a subset of the provider api_key scopes, so the provider key needs organization:create_api_key plus every scope it delegates.

    Create ApiKey Resource

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

    Constructor syntax

    new ApiKey(name: string, args: ApiKeyArgs, opts?: CustomResourceOptions);
    @overload
    def ApiKey(resource_name: str,
               args: ApiKeyArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApiKey(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               scopes: Optional[Sequence[str]] = None,
               description: Optional[str] = None,
               expires_at: Optional[str] = None,
               gateway: Optional[ApiKeyGatewayArgs] = None,
               name: Optional[str] = None,
               project_id: Optional[str] = None)
    func NewApiKey(ctx *Context, name string, args ApiKeyArgs, opts ...ResourceOption) (*ApiKey, error)
    public ApiKey(string name, ApiKeyArgs args, CustomResourceOptions? opts = null)
    public ApiKey(String name, ApiKeyArgs args)
    public ApiKey(String name, ApiKeyArgs args, CustomResourceOptions options)
    
    type: logfire:ApiKey
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "logfire_api_key" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ApiKeyArgs
    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 ApiKeyArgs
    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 ApiKeyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApiKeyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApiKeyArgs
    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 apiKeyResource = new Logfire.ApiKey("apiKeyResource", new()
    {
        Scopes = new[]
        {
            "string",
        },
        Description = "string",
        ExpiresAt = "string",
        Gateway = new Logfire.Inputs.ApiKeyGatewayArgs
        {
            CacheEnabled = false,
            SpendingLimitDaily = 0,
            SpendingLimitMonthly = 0,
            SpendingLimitTotal = 0,
            SpendingLimitWeekly = 0,
        },
        Name = "string",
        ProjectId = "string",
    });
    
    example, err := logfire.NewApiKey(ctx, "apiKeyResource", &logfire.ApiKeyArgs{
    	Scopes: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	ExpiresAt:   pulumi.String("string"),
    	Gateway: &logfire.ApiKeyGatewayArgs{
    		CacheEnabled:         pulumi.Bool(false),
    		SpendingLimitDaily:   pulumi.Int(0),
    		SpendingLimitMonthly: pulumi.Int(0),
    		SpendingLimitTotal:   pulumi.Int(0),
    		SpendingLimitWeekly:  pulumi.Int(0),
    	},
    	Name:      pulumi.String("string"),
    	ProjectId: pulumi.String("string"),
    })
    
    resource "logfire_api_key" "apiKeyResource" {
      lifecycle {
        create_before_destroy = true
      }
      scopes      = ["string"]
      description = "string"
      expires_at  = "string"
      gateway = {
        cache_enabled          = false
        spending_limit_daily   = 0
        spending_limit_monthly = 0
        spending_limit_total   = 0
        spending_limit_weekly  = 0
      }
      name       = "string"
      project_id = "string"
    }
    
    var apiKeyResource = new ApiKey("apiKeyResource", ApiKeyArgs.builder()
        .scopes("string")
        .description("string")
        .expiresAt("string")
        .gateway(ApiKeyGatewayArgs.builder()
            .cacheEnabled(false)
            .spendingLimitDaily(0)
            .spendingLimitMonthly(0)
            .spendingLimitTotal(0)
            .spendingLimitWeekly(0)
            .build())
        .name("string")
        .projectId("string")
        .build());
    
    api_key_resource = logfire.ApiKey("apiKeyResource",
        scopes=["string"],
        description="string",
        expires_at="string",
        gateway={
            "cache_enabled": False,
            "spending_limit_daily": 0,
            "spending_limit_monthly": 0,
            "spending_limit_total": 0,
            "spending_limit_weekly": 0,
        },
        name="string",
        project_id="string")
    
    const apiKeyResource = new logfire.ApiKey("apiKeyResource", {
        scopes: ["string"],
        description: "string",
        expiresAt: "string",
        gateway: {
            cacheEnabled: false,
            spendingLimitDaily: 0,
            spendingLimitMonthly: 0,
            spendingLimitTotal: 0,
            spendingLimitWeekly: 0,
        },
        name: "string",
        projectId: "string",
    });
    
    type: logfire:ApiKey
    properties:
        description: string
        expiresAt: string
        gateway:
            cacheEnabled: false
            spendingLimitDaily: 0
            spendingLimitMonthly: 0
            spendingLimitTotal: 0
            spendingLimitWeekly: 0
        name: string
        projectId: string
        scopes:
            - string
    

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

    Scopes List<string>
    OAuth scopes granted to the key (for example project:write_otlp). Changing scopes replaces the key: scopes cannot be updated in place.
    Description string
    Free-form description. Can be updated in place; setting it to null clears it.
    ExpiresAt string
    Optional RFC3339 expiration timestamp (for example 2026-12-31T23:59:59Z). If omitted, the key does not expire. Changing it replaces the key: expiry cannot be updated in place (an expired key cannot be re-enabled; create a new key instead).
    Gateway ApiKeyGateway
    Gateway per-scope settings for keys with the project:gateway_proxy scope. Updatable in place. Removing the block clears every cap the key carries.
    Name string
    Display name for the key. Can be updated in place.
    ProjectId string
    UUID of the project the key is scoped to. Omit for an org-wide key. Changing the project replaces the key. Scopes project:read_otlp, project:write_otlp, and project:gateway_proxy require a project.
    Scopes []string
    OAuth scopes granted to the key (for example project:write_otlp). Changing scopes replaces the key: scopes cannot be updated in place.
    Description string
    Free-form description. Can be updated in place; setting it to null clears it.
    ExpiresAt string
    Optional RFC3339 expiration timestamp (for example 2026-12-31T23:59:59Z). If omitted, the key does not expire. Changing it replaces the key: expiry cannot be updated in place (an expired key cannot be re-enabled; create a new key instead).
    Gateway ApiKeyGatewayArgs
    Gateway per-scope settings for keys with the project:gateway_proxy scope. Updatable in place. Removing the block clears every cap the key carries.
    Name string
    Display name for the key. Can be updated in place.
    ProjectId string
    UUID of the project the key is scoped to. Omit for an org-wide key. Changing the project replaces the key. Scopes project:read_otlp, project:write_otlp, and project:gateway_proxy require a project.
    scopes list(string)
    OAuth scopes granted to the key (for example project:write_otlp). Changing scopes replaces the key: scopes cannot be updated in place.
    description string
    Free-form description. Can be updated in place; setting it to null clears it.
    expires_at string
    Optional RFC3339 expiration timestamp (for example 2026-12-31T23:59:59Z). If omitted, the key does not expire. Changing it replaces the key: expiry cannot be updated in place (an expired key cannot be re-enabled; create a new key instead).
    gateway object
    Gateway per-scope settings for keys with the project:gateway_proxy scope. Updatable in place. Removing the block clears every cap the key carries.
    name string
    Display name for the key. Can be updated in place.
    project_id string
    UUID of the project the key is scoped to. Omit for an org-wide key. Changing the project replaces the key. Scopes project:read_otlp, project:write_otlp, and project:gateway_proxy require a project.
    scopes List<String>
    OAuth scopes granted to the key (for example project:write_otlp). Changing scopes replaces the key: scopes cannot be updated in place.
    description String
    Free-form description. Can be updated in place; setting it to null clears it.
    expiresAt String
    Optional RFC3339 expiration timestamp (for example 2026-12-31T23:59:59Z). If omitted, the key does not expire. Changing it replaces the key: expiry cannot be updated in place (an expired key cannot be re-enabled; create a new key instead).
    gateway ApiKeyGateway
    Gateway per-scope settings for keys with the project:gateway_proxy scope. Updatable in place. Removing the block clears every cap the key carries.
    name String
    Display name for the key. Can be updated in place.
    projectId String
    UUID of the project the key is scoped to. Omit for an org-wide key. Changing the project replaces the key. Scopes project:read_otlp, project:write_otlp, and project:gateway_proxy require a project.
    scopes string[]
    OAuth scopes granted to the key (for example project:write_otlp). Changing scopes replaces the key: scopes cannot be updated in place.
    description string
    Free-form description. Can be updated in place; setting it to null clears it.
    expiresAt string
    Optional RFC3339 expiration timestamp (for example 2026-12-31T23:59:59Z). If omitted, the key does not expire. Changing it replaces the key: expiry cannot be updated in place (an expired key cannot be re-enabled; create a new key instead).
    gateway ApiKeyGateway
    Gateway per-scope settings for keys with the project:gateway_proxy scope. Updatable in place. Removing the block clears every cap the key carries.
    name string
    Display name for the key. Can be updated in place.
    projectId string
    UUID of the project the key is scoped to. Omit for an org-wide key. Changing the project replaces the key. Scopes project:read_otlp, project:write_otlp, and project:gateway_proxy require a project.
    scopes Sequence[str]
    OAuth scopes granted to the key (for example project:write_otlp). Changing scopes replaces the key: scopes cannot be updated in place.
    description str
    Free-form description. Can be updated in place; setting it to null clears it.
    expires_at str
    Optional RFC3339 expiration timestamp (for example 2026-12-31T23:59:59Z). If omitted, the key does not expire. Changing it replaces the key: expiry cannot be updated in place (an expired key cannot be re-enabled; create a new key instead).
    gateway ApiKeyGatewayArgs
    Gateway per-scope settings for keys with the project:gateway_proxy scope. Updatable in place. Removing the block clears every cap the key carries.
    name str
    Display name for the key. Can be updated in place.
    project_id str
    UUID of the project the key is scoped to. Omit for an org-wide key. Changing the project replaces the key. Scopes project:read_otlp, project:write_otlp, and project:gateway_proxy require a project.
    scopes List<String>
    OAuth scopes granted to the key (for example project:write_otlp). Changing scopes replaces the key: scopes cannot be updated in place.
    description String
    Free-form description. Can be updated in place; setting it to null clears it.
    expiresAt String
    Optional RFC3339 expiration timestamp (for example 2026-12-31T23:59:59Z). If omitted, the key does not expire. Changing it replaces the key: expiry cannot be updated in place (an expired key cannot be re-enabled; create a new key instead).
    gateway Property Map
    Gateway per-scope settings for keys with the project:gateway_proxy scope. Updatable in place. Removing the block clears every cap the key carries.
    name String
    Display name for the key. Can be updated in place.
    projectId String
    UUID of the project the key is scoped to. Omit for an org-wide key. Changing the project replaces the key. Scopes project:read_otlp, project:write_otlp, and project:gateway_proxy require a project.

    Outputs

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

    Active bool
    AllProjects bool
    True for org-wide keys with no project scope.
    CreatedAt string
    Timestamp when the key was created.
    CreatedByName string
    Display name of the user that created the key, when known.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProjectName string
    Name of the project the key is scoped to, if any.
    Token string
    The plaintext API key. Only returned on creation; never returned again by the API.
    Active bool
    AllProjects bool
    True for org-wide keys with no project scope.
    CreatedAt string
    Timestamp when the key was created.
    CreatedByName string
    Display name of the user that created the key, when known.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProjectName string
    Name of the project the key is scoped to, if any.
    Token string
    The plaintext API key. Only returned on creation; never returned again by the API.
    active bool
    all_projects bool
    True for org-wide keys with no project scope.
    created_at string
    Timestamp when the key was created.
    created_by_name string
    Display name of the user that created the key, when known.
    id string
    The provider-assigned unique ID for this managed resource.
    project_name string
    Name of the project the key is scoped to, if any.
    token string
    The plaintext API key. Only returned on creation; never returned again by the API.
    active Boolean
    allProjects Boolean
    True for org-wide keys with no project scope.
    createdAt String
    Timestamp when the key was created.
    createdByName String
    Display name of the user that created the key, when known.
    id String
    The provider-assigned unique ID for this managed resource.
    projectName String
    Name of the project the key is scoped to, if any.
    token String
    The plaintext API key. Only returned on creation; never returned again by the API.
    active boolean
    allProjects boolean
    True for org-wide keys with no project scope.
    createdAt string
    Timestamp when the key was created.
    createdByName string
    Display name of the user that created the key, when known.
    id string
    The provider-assigned unique ID for this managed resource.
    projectName string
    Name of the project the key is scoped to, if any.
    token string
    The plaintext API key. Only returned on creation; never returned again by the API.
    active bool
    all_projects bool
    True for org-wide keys with no project scope.
    created_at str
    Timestamp when the key was created.
    created_by_name str
    Display name of the user that created the key, when known.
    id str
    The provider-assigned unique ID for this managed resource.
    project_name str
    Name of the project the key is scoped to, if any.
    token str
    The plaintext API key. Only returned on creation; never returned again by the API.
    active Boolean
    allProjects Boolean
    True for org-wide keys with no project scope.
    createdAt String
    Timestamp when the key was created.
    createdByName String
    Display name of the user that created the key, when known.
    id String
    The provider-assigned unique ID for this managed resource.
    projectName String
    Name of the project the key is scoped to, if any.
    token String
    The plaintext API key. Only returned on creation; never returned again by the API.

    Look up Existing ApiKey Resource

    Get an existing ApiKey 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?: ApiKeyState, opts?: CustomResourceOptions): ApiKey
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            active: Optional[bool] = None,
            all_projects: Optional[bool] = None,
            created_at: Optional[str] = None,
            created_by_name: Optional[str] = None,
            description: Optional[str] = None,
            expires_at: Optional[str] = None,
            gateway: Optional[ApiKeyGatewayArgs] = None,
            name: Optional[str] = None,
            project_id: Optional[str] = None,
            project_name: Optional[str] = None,
            scopes: Optional[Sequence[str]] = None,
            token: Optional[str] = None) -> ApiKey
    func GetApiKey(ctx *Context, name string, id IDInput, state *ApiKeyState, opts ...ResourceOption) (*ApiKey, error)
    public static ApiKey Get(string name, Input<string> id, ApiKeyState? state, CustomResourceOptions? opts = null)
    public static ApiKey get(String name, Output<String> id, ApiKeyState state, CustomResourceOptions options)
    resources:  _:    type: logfire:ApiKey    get:      id: ${id}
    import {
      to = logfire_api_key.example
      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:
    Active bool
    AllProjects bool
    True for org-wide keys with no project scope.
    CreatedAt string
    Timestamp when the key was created.
    CreatedByName string
    Display name of the user that created the key, when known.
    Description string
    Free-form description. Can be updated in place; setting it to null clears it.
    ExpiresAt string
    Optional RFC3339 expiration timestamp (for example 2026-12-31T23:59:59Z). If omitted, the key does not expire. Changing it replaces the key: expiry cannot be updated in place (an expired key cannot be re-enabled; create a new key instead).
    Gateway ApiKeyGateway
    Gateway per-scope settings for keys with the project:gateway_proxy scope. Updatable in place. Removing the block clears every cap the key carries.
    Name string
    Display name for the key. Can be updated in place.
    ProjectId string
    UUID of the project the key is scoped to. Omit for an org-wide key. Changing the project replaces the key. Scopes project:read_otlp, project:write_otlp, and project:gateway_proxy require a project.
    ProjectName string
    Name of the project the key is scoped to, if any.
    Scopes List<string>
    OAuth scopes granted to the key (for example project:write_otlp). Changing scopes replaces the key: scopes cannot be updated in place.
    Token string
    The plaintext API key. Only returned on creation; never returned again by the API.
    Active bool
    AllProjects bool
    True for org-wide keys with no project scope.
    CreatedAt string
    Timestamp when the key was created.
    CreatedByName string
    Display name of the user that created the key, when known.
    Description string
    Free-form description. Can be updated in place; setting it to null clears it.
    ExpiresAt string
    Optional RFC3339 expiration timestamp (for example 2026-12-31T23:59:59Z). If omitted, the key does not expire. Changing it replaces the key: expiry cannot be updated in place (an expired key cannot be re-enabled; create a new key instead).
    Gateway ApiKeyGatewayArgs
    Gateway per-scope settings for keys with the project:gateway_proxy scope. Updatable in place. Removing the block clears every cap the key carries.
    Name string
    Display name for the key. Can be updated in place.
    ProjectId string
    UUID of the project the key is scoped to. Omit for an org-wide key. Changing the project replaces the key. Scopes project:read_otlp, project:write_otlp, and project:gateway_proxy require a project.
    ProjectName string
    Name of the project the key is scoped to, if any.
    Scopes []string
    OAuth scopes granted to the key (for example project:write_otlp). Changing scopes replaces the key: scopes cannot be updated in place.
    Token string
    The plaintext API key. Only returned on creation; never returned again by the API.
    active bool
    all_projects bool
    True for org-wide keys with no project scope.
    created_at string
    Timestamp when the key was created.
    created_by_name string
    Display name of the user that created the key, when known.
    description string
    Free-form description. Can be updated in place; setting it to null clears it.
    expires_at string
    Optional RFC3339 expiration timestamp (for example 2026-12-31T23:59:59Z). If omitted, the key does not expire. Changing it replaces the key: expiry cannot be updated in place (an expired key cannot be re-enabled; create a new key instead).
    gateway object
    Gateway per-scope settings for keys with the project:gateway_proxy scope. Updatable in place. Removing the block clears every cap the key carries.
    name string
    Display name for the key. Can be updated in place.
    project_id string
    UUID of the project the key is scoped to. Omit for an org-wide key. Changing the project replaces the key. Scopes project:read_otlp, project:write_otlp, and project:gateway_proxy require a project.
    project_name string
    Name of the project the key is scoped to, if any.
    scopes list(string)
    OAuth scopes granted to the key (for example project:write_otlp). Changing scopes replaces the key: scopes cannot be updated in place.
    token string
    The plaintext API key. Only returned on creation; never returned again by the API.
    active Boolean
    allProjects Boolean
    True for org-wide keys with no project scope.
    createdAt String
    Timestamp when the key was created.
    createdByName String
    Display name of the user that created the key, when known.
    description String
    Free-form description. Can be updated in place; setting it to null clears it.
    expiresAt String
    Optional RFC3339 expiration timestamp (for example 2026-12-31T23:59:59Z). If omitted, the key does not expire. Changing it replaces the key: expiry cannot be updated in place (an expired key cannot be re-enabled; create a new key instead).
    gateway ApiKeyGateway
    Gateway per-scope settings for keys with the project:gateway_proxy scope. Updatable in place. Removing the block clears every cap the key carries.
    name String
    Display name for the key. Can be updated in place.
    projectId String
    UUID of the project the key is scoped to. Omit for an org-wide key. Changing the project replaces the key. Scopes project:read_otlp, project:write_otlp, and project:gateway_proxy require a project.
    projectName String
    Name of the project the key is scoped to, if any.
    scopes List<String>
    OAuth scopes granted to the key (for example project:write_otlp). Changing scopes replaces the key: scopes cannot be updated in place.
    token String
    The plaintext API key. Only returned on creation; never returned again by the API.
    active boolean
    allProjects boolean
    True for org-wide keys with no project scope.
    createdAt string
    Timestamp when the key was created.
    createdByName string
    Display name of the user that created the key, when known.
    description string
    Free-form description. Can be updated in place; setting it to null clears it.
    expiresAt string
    Optional RFC3339 expiration timestamp (for example 2026-12-31T23:59:59Z). If omitted, the key does not expire. Changing it replaces the key: expiry cannot be updated in place (an expired key cannot be re-enabled; create a new key instead).
    gateway ApiKeyGateway
    Gateway per-scope settings for keys with the project:gateway_proxy scope. Updatable in place. Removing the block clears every cap the key carries.
    name string
    Display name for the key. Can be updated in place.
    projectId string
    UUID of the project the key is scoped to. Omit for an org-wide key. Changing the project replaces the key. Scopes project:read_otlp, project:write_otlp, and project:gateway_proxy require a project.
    projectName string
    Name of the project the key is scoped to, if any.
    scopes string[]
    OAuth scopes granted to the key (for example project:write_otlp). Changing scopes replaces the key: scopes cannot be updated in place.
    token string
    The plaintext API key. Only returned on creation; never returned again by the API.
    active bool
    all_projects bool
    True for org-wide keys with no project scope.
    created_at str
    Timestamp when the key was created.
    created_by_name str
    Display name of the user that created the key, when known.
    description str
    Free-form description. Can be updated in place; setting it to null clears it.
    expires_at str
    Optional RFC3339 expiration timestamp (for example 2026-12-31T23:59:59Z). If omitted, the key does not expire. Changing it replaces the key: expiry cannot be updated in place (an expired key cannot be re-enabled; create a new key instead).
    gateway ApiKeyGatewayArgs
    Gateway per-scope settings for keys with the project:gateway_proxy scope. Updatable in place. Removing the block clears every cap the key carries.
    name str
    Display name for the key. Can be updated in place.
    project_id str
    UUID of the project the key is scoped to. Omit for an org-wide key. Changing the project replaces the key. Scopes project:read_otlp, project:write_otlp, and project:gateway_proxy require a project.
    project_name str
    Name of the project the key is scoped to, if any.
    scopes Sequence[str]
    OAuth scopes granted to the key (for example project:write_otlp). Changing scopes replaces the key: scopes cannot be updated in place.
    token str
    The plaintext API key. Only returned on creation; never returned again by the API.
    active Boolean
    allProjects Boolean
    True for org-wide keys with no project scope.
    createdAt String
    Timestamp when the key was created.
    createdByName String
    Display name of the user that created the key, when known.
    description String
    Free-form description. Can be updated in place; setting it to null clears it.
    expiresAt String
    Optional RFC3339 expiration timestamp (for example 2026-12-31T23:59:59Z). If omitted, the key does not expire. Changing it replaces the key: expiry cannot be updated in place (an expired key cannot be re-enabled; create a new key instead).
    gateway Property Map
    Gateway per-scope settings for keys with the project:gateway_proxy scope. Updatable in place. Removing the block clears every cap the key carries.
    name String
    Display name for the key. Can be updated in place.
    projectId String
    UUID of the project the key is scoped to. Omit for an org-wide key. Changing the project replaces the key. Scopes project:read_otlp, project:write_otlp, and project:gateway_proxy require a project.
    projectName String
    Name of the project the key is scoped to, if any.
    scopes List<String>
    OAuth scopes granted to the key (for example project:write_otlp). Changing scopes replaces the key: scopes cannot be updated in place.
    token String
    The plaintext API key. Only returned on creation; never returned again by the API.

    Supporting Types

    ApiKeyGateway, ApiKeyGatewayArgs

    CacheEnabled bool
    Whether gateway responses are cached. Null inherits the project default.
    SpendingLimitDaily int
    Maximum gateway spend in whole US dollars per day. Null means no limit.
    SpendingLimitMonthly int
    Maximum gateway spend in whole US dollars per month. Null means no limit.
    SpendingLimitTotal int
    Maximum lifetime gateway spend in whole US dollars. Null means no limit.
    SpendingLimitWeekly int
    Maximum gateway spend in whole US dollars per week. Null means no limit.
    CacheEnabled bool
    Whether gateway responses are cached. Null inherits the project default.
    SpendingLimitDaily int
    Maximum gateway spend in whole US dollars per day. Null means no limit.
    SpendingLimitMonthly int
    Maximum gateway spend in whole US dollars per month. Null means no limit.
    SpendingLimitTotal int
    Maximum lifetime gateway spend in whole US dollars. Null means no limit.
    SpendingLimitWeekly int
    Maximum gateway spend in whole US dollars per week. Null means no limit.
    cache_enabled bool
    Whether gateway responses are cached. Null inherits the project default.
    spending_limit_daily number
    Maximum gateway spend in whole US dollars per day. Null means no limit.
    spending_limit_monthly number
    Maximum gateway spend in whole US dollars per month. Null means no limit.
    spending_limit_total number
    Maximum lifetime gateway spend in whole US dollars. Null means no limit.
    spending_limit_weekly number
    Maximum gateway spend in whole US dollars per week. Null means no limit.
    cacheEnabled Boolean
    Whether gateway responses are cached. Null inherits the project default.
    spendingLimitDaily Integer
    Maximum gateway spend in whole US dollars per day. Null means no limit.
    spendingLimitMonthly Integer
    Maximum gateway spend in whole US dollars per month. Null means no limit.
    spendingLimitTotal Integer
    Maximum lifetime gateway spend in whole US dollars. Null means no limit.
    spendingLimitWeekly Integer
    Maximum gateway spend in whole US dollars per week. Null means no limit.
    cacheEnabled boolean
    Whether gateway responses are cached. Null inherits the project default.
    spendingLimitDaily number
    Maximum gateway spend in whole US dollars per day. Null means no limit.
    spendingLimitMonthly number
    Maximum gateway spend in whole US dollars per month. Null means no limit.
    spendingLimitTotal number
    Maximum lifetime gateway spend in whole US dollars. Null means no limit.
    spendingLimitWeekly number
    Maximum gateway spend in whole US dollars per week. Null means no limit.
    cache_enabled bool
    Whether gateway responses are cached. Null inherits the project default.
    spending_limit_daily int
    Maximum gateway spend in whole US dollars per day. Null means no limit.
    spending_limit_monthly int
    Maximum gateway spend in whole US dollars per month. Null means no limit.
    spending_limit_total int
    Maximum lifetime gateway spend in whole US dollars. Null means no limit.
    spending_limit_weekly int
    Maximum gateway spend in whole US dollars per week. Null means no limit.
    cacheEnabled Boolean
    Whether gateway responses are cached. Null inherits the project default.
    spendingLimitDaily Number
    Maximum gateway spend in whole US dollars per day. Null means no limit.
    spendingLimitMonthly Number
    Maximum gateway spend in whole US dollars per month. Null means no limit.
    spendingLimitTotal Number
    Maximum lifetime gateway spend in whole US dollars. Null means no limit.
    spendingLimitWeekly Number
    Maximum gateway spend in whole US dollars per week. Null means no limit.

    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.21
    published on Wednesday, Sep 9, 2026 by Pydantic

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial