1. Packages
  2. Rollbar Provider
  3. API Docs
  4. getProjectAccessTokens
rollbar 1.16.0 published on Wednesday, Apr 30, 2025 by rollbar

rollbar.getProjectAccessTokens

Explore with Pulumi AI

rollbar logo
rollbar 1.16.0 published on Wednesday, Apr 30, 2025 by rollbar

    rollbar.getProjectAccessTokens Data Source

    ===========================================

    Use this data source to retrieve information about all project access tokens belonging to a Rollbar project.

    Example Usage


    To retrieve info about all tokens:

    import * as pulumi from "@pulumi/pulumi";
    import * as rollbar from "@pulumi/rollbar";
    
    const testProject = new rollbar.Project("testProject", {});
    const testProjectAccessTokens = testProject.projectId.apply(projectId => rollbar.getProjectAccessTokensOutput({
        projectId: projectId,
        prefix: "post_item",
    }));
    export const tokens = testProjectAccessTokens.apply(testProjectAccessTokens => testProjectAccessTokens.accessTokens);
    
    import pulumi
    import pulumi_rollbar as rollbar
    
    test_project = rollbar.Project("testProject")
    test_project_access_tokens = test_project.project_id.apply(lambda project_id: rollbar.get_project_access_tokens_output(project_id=project_id,
        prefix="post_item"))
    pulumi.export("tokens", test_project_access_tokens.access_tokens)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/rollbar/rollbar"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		testProject, err := rollbar.NewProject(ctx, "testProject", nil)
    		if err != nil {
    			return err
    		}
    		testProjectAccessTokens := testProject.ProjectId.ApplyT(func(projectId string) (rollbar.GetProjectAccessTokensResult, error) {
    			return rollbar.GetProjectAccessTokensResult(interface{}(rollbar.GetProjectAccessTokensOutput(ctx, rollbar.GetProjectAccessTokensOutputArgs{
    				ProjectId: projectId,
    				Prefix:    "post_item",
    			}, nil))), nil
    		}).(rollbar.GetProjectAccessTokensResultOutput)
    		ctx.Export("tokens", testProjectAccessTokens.ApplyT(func(testProjectAccessTokens rollbar.GetProjectAccessTokensResult) ([]rollbar.GetProjectAccessTokensAccessToken, error) {
    			return []rollbar.GetProjectAccessTokensAccessToken(testProjectAccessTokens.AccessTokens), nil
    		}).([]rollbar.GetProjectAccessTokensAccessTokenOutput))
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Rollbar = Pulumi.Rollbar;
    
    return await Deployment.RunAsync(() => 
    {
        var testProject = new Rollbar.Project("testProject");
    
        var testProjectAccessTokens = Rollbar.GetProjectAccessTokens.Invoke(new()
        {
            ProjectId = testProject.ProjectId,
            Prefix = "post_item",
        });
    
        return new Dictionary<string, object?>
        {
            ["tokens"] = testProjectAccessTokens.Apply(getProjectAccessTokensResult => getProjectAccessTokensResult.AccessTokens),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.rollbar.Project;
    import com.pulumi.rollbar.RollbarFunctions;
    import com.pulumi.rollbar.inputs.GetProjectAccessTokensArgs;
    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 testProject = new Project("testProject");
    
            final var testProjectAccessTokens = RollbarFunctions.getProjectAccessTokens(GetProjectAccessTokensArgs.builder()
                .projectId(testProject.projectId())
                .prefix("post_item")
                .build());
    
            ctx.export("tokens", testProjectAccessTokens.applyValue(getProjectAccessTokensResult -> getProjectAccessTokensResult).applyValue(testProjectAccessTokens -> testProjectAccessTokens.applyValue(getProjectAccessTokensResult -> getProjectAccessTokensResult.accessTokens())));
        }
    }
    
    resources:
      testProject:
        type: rollbar:Project
    variables:
      testProjectAccessTokens:
        fn::invoke:
          function: rollbar:getProjectAccessTokens
          arguments:
            projectId: ${testProject.projectId}
            prefix: post_item
    outputs:
      tokens: ${testProjectAccessTokens.accessTokens}
    

    Using getProjectAccessTokens

    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 getProjectAccessTokens(args: GetProjectAccessTokensArgs, opts?: InvokeOptions): Promise<GetProjectAccessTokensResult>
    function getProjectAccessTokensOutput(args: GetProjectAccessTokensOutputArgs, opts?: InvokeOptions): Output<GetProjectAccessTokensResult>
    def get_project_access_tokens(id: Optional[str] = None,
                                  prefix: Optional[str] = None,
                                  project_id: Optional[float] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetProjectAccessTokensResult
    def get_project_access_tokens_output(id: Optional[pulumi.Input[str]] = None,
                                  prefix: Optional[pulumi.Input[str]] = None,
                                  project_id: Optional[pulumi.Input[float]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetProjectAccessTokensResult]
    func GetProjectAccessTokens(ctx *Context, args *GetProjectAccessTokensArgs, opts ...InvokeOption) (*GetProjectAccessTokensResult, error)
    func GetProjectAccessTokensOutput(ctx *Context, args *GetProjectAccessTokensOutputArgs, opts ...InvokeOption) GetProjectAccessTokensResultOutput

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

    public static class GetProjectAccessTokens 
    {
        public static Task<GetProjectAccessTokensResult> InvokeAsync(GetProjectAccessTokensArgs args, InvokeOptions? opts = null)
        public static Output<GetProjectAccessTokensResult> Invoke(GetProjectAccessTokensInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetProjectAccessTokensResult> getProjectAccessTokens(GetProjectAccessTokensArgs args, InvokeOptions options)
    public static Output<GetProjectAccessTokensResult> getProjectAccessTokens(GetProjectAccessTokensArgs args, InvokeOptions options)
    
    fn::invoke:
      function: rollbar:index/getProjectAccessTokens:getProjectAccessTokens
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ProjectId double
    ID of a Rollbar project
    Id string
    Prefix string
    Name of the token begins with this prefix
    ProjectId float64
    ID of a Rollbar project
    Id string
    Prefix string
    Name of the token begins with this prefix
    projectId Double
    ID of a Rollbar project
    id String
    prefix String
    Name of the token begins with this prefix
    projectId number
    ID of a Rollbar project
    id string
    prefix string
    Name of the token begins with this prefix
    project_id float
    ID of a Rollbar project
    id str
    prefix str
    Name of the token begins with this prefix
    projectId Number
    ID of a Rollbar project
    id String
    prefix String
    Name of the token begins with this prefix

    getProjectAccessTokens Result

    The following output properties are available:

    AccessTokens List<GetProjectAccessTokensAccessToken>
    An array of Rollbar project access tokens. Each item in the access_tokens block consists of the fields documented below.
    Id string
    ProjectId double
    ID of the project that owns the token
    Prefix string
    AccessTokens []GetProjectAccessTokensAccessToken
    An array of Rollbar project access tokens. Each item in the access_tokens block consists of the fields documented below.
    Id string
    ProjectId float64
    ID of the project that owns the token
    Prefix string
    accessTokens List<GetProjectAccessTokensAccessToken>
    An array of Rollbar project access tokens. Each item in the access_tokens block consists of the fields documented below.
    id String
    projectId Double
    ID of the project that owns the token
    prefix String
    accessTokens GetProjectAccessTokensAccessToken[]
    An array of Rollbar project access tokens. Each item in the access_tokens block consists of the fields documented below.
    id string
    projectId number
    ID of the project that owns the token
    prefix string
    access_tokens Sequence[GetProjectAccessTokensAccessToken]
    An array of Rollbar project access tokens. Each item in the access_tokens block consists of the fields documented below.
    id str
    project_id float
    ID of the project that owns the token
    prefix str
    accessTokens List<Property Map>
    An array of Rollbar project access tokens. Each item in the access_tokens block consists of the fields documented below.
    id String
    projectId Number
    ID of the project that owns the token
    prefix String

    Supporting Types

    GetProjectAccessTokensAccessToken

    AccessToken string
    API token
    CurRateLimitWindowCount double
    Number of API hits that occurred in the current rate limit window
    CurRateLimitWindowStart double
    Time when the current rate limit window began
    DateCreated double
    Date the token was created
    DateModified double
    Date the token was last modified
    Name string
    Name of the token
    ProjectId double
    ID of a Rollbar project
    PublicId string
    RateLimitWindowCount double
    Maximum allowed API hits during a rate limit window
    RateLimitWindowSize double
    Duration of a rate limit window
    Scopes List<string>
    Project access scopes for the token. Possible values are read, write, post_server_item, or post_client_item.
    Status string
    Status of the token
    TokenType string
    AccessToken string
    API token
    CurRateLimitWindowCount float64
    Number of API hits that occurred in the current rate limit window
    CurRateLimitWindowStart float64
    Time when the current rate limit window began
    DateCreated float64
    Date the token was created
    DateModified float64
    Date the token was last modified
    Name string
    Name of the token
    ProjectId float64
    ID of a Rollbar project
    PublicId string
    RateLimitWindowCount float64
    Maximum allowed API hits during a rate limit window
    RateLimitWindowSize float64
    Duration of a rate limit window
    Scopes []string
    Project access scopes for the token. Possible values are read, write, post_server_item, or post_client_item.
    Status string
    Status of the token
    TokenType string
    accessToken String
    API token
    curRateLimitWindowCount Double
    Number of API hits that occurred in the current rate limit window
    curRateLimitWindowStart Double
    Time when the current rate limit window began
    dateCreated Double
    Date the token was created
    dateModified Double
    Date the token was last modified
    name String
    Name of the token
    projectId Double
    ID of a Rollbar project
    publicId String
    rateLimitWindowCount Double
    Maximum allowed API hits during a rate limit window
    rateLimitWindowSize Double
    Duration of a rate limit window
    scopes List<String>
    Project access scopes for the token. Possible values are read, write, post_server_item, or post_client_item.
    status String
    Status of the token
    tokenType String
    accessToken string
    API token
    curRateLimitWindowCount number
    Number of API hits that occurred in the current rate limit window
    curRateLimitWindowStart number
    Time when the current rate limit window began
    dateCreated number
    Date the token was created
    dateModified number
    Date the token was last modified
    name string
    Name of the token
    projectId number
    ID of a Rollbar project
    publicId string
    rateLimitWindowCount number
    Maximum allowed API hits during a rate limit window
    rateLimitWindowSize number
    Duration of a rate limit window
    scopes string[]
    Project access scopes for the token. Possible values are read, write, post_server_item, or post_client_item.
    status string
    Status of the token
    tokenType string
    access_token str
    API token
    cur_rate_limit_window_count float
    Number of API hits that occurred in the current rate limit window
    cur_rate_limit_window_start float
    Time when the current rate limit window began
    date_created float
    Date the token was created
    date_modified float
    Date the token was last modified
    name str
    Name of the token
    project_id float
    ID of a Rollbar project
    public_id str
    rate_limit_window_count float
    Maximum allowed API hits during a rate limit window
    rate_limit_window_size float
    Duration of a rate limit window
    scopes Sequence[str]
    Project access scopes for the token. Possible values are read, write, post_server_item, or post_client_item.
    status str
    Status of the token
    token_type str
    accessToken String
    API token
    curRateLimitWindowCount Number
    Number of API hits that occurred in the current rate limit window
    curRateLimitWindowStart Number
    Time when the current rate limit window began
    dateCreated Number
    Date the token was created
    dateModified Number
    Date the token was last modified
    name String
    Name of the token
    projectId Number
    ID of a Rollbar project
    publicId String
    rateLimitWindowCount Number
    Maximum allowed API hits during a rate limit window
    rateLimitWindowSize Number
    Duration of a rate limit window
    scopes List<String>
    Project access scopes for the token. Possible values are read, write, post_server_item, or post_client_item.
    status String
    Status of the token
    tokenType String

    Package Details

    Repository
    rollbar rollbar/terraform-provider-rollbar
    License
    Notes
    This Pulumi package is based on the rollbar Terraform Provider.
    rollbar logo
    rollbar 1.16.0 published on Wednesday, Apr 30, 2025 by rollbar