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

rollbar.getProjectAccessToken

Explore with Pulumi AI

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

    rollbar.ProjectAccessToken Data Source

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

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

    Example Usage


    To retrieve info about a token:

    import * as pulumi from "@pulumi/pulumi";
    import * as rollbar from "@pulumi/rollbar";
    
    const testProject = new rollbar.Project("testProject", {});
    const testProjectAccessToken = testProject.projectId.apply(projectId => rollbar.getProjectAccessTokenOutput({
        projectId: projectId,
        name: "post_item_client",
    }));
    export const token = data.rollbar_project_access_tokens.test;
    
    import pulumi
    import pulumi_rollbar as rollbar
    
    test_project = rollbar.Project("testProject")
    test_project_access_token = test_project.project_id.apply(lambda project_id: rollbar.get_project_access_token_output(project_id=project_id,
        name="post_item_client"))
    pulumi.export("token", data["rollbar_project_access_tokens"]["test"])
    
    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
    		}
    		_ = testProject.ProjectId.ApplyT(func(projectId string) (rollbar.GetProjectAccessTokenResult, error) {
    			return rollbar.GetProjectAccessTokenResult(interface{}(rollbar.LookupProjectAccessTokenOutput(ctx, rollbar.GetProjectAccessTokenOutputArgs{
    				ProjectId: projectId,
    				Name:      "post_item_client",
    			}, nil))), nil
    		}).(rollbar.GetProjectAccessTokenResultOutput)
    		ctx.Export("token", data.Rollbar_project_access_tokens.Test)
    		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 testProjectAccessToken = Rollbar.GetProjectAccessToken.Invoke(new()
        {
            ProjectId = testProject.ProjectId,
            Name = "post_item_client",
        });
    
        return new Dictionary<string, object?>
        {
            ["token"] = data.Rollbar_project_access_tokens.Test,
        };
    });
    
    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.GetProjectAccessTokenArgs;
    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 testProjectAccessToken = RollbarFunctions.getProjectAccessToken(GetProjectAccessTokenArgs.builder()
                .projectId(testProject.projectId())
                .name("post_item_client")
                .build());
    
            ctx.export("token", data.rollbar_project_access_tokens().test());
        }
    }
    
    resources:
      testProject:
        type: rollbar:Project
    variables:
      testProjectAccessToken:
        fn::invoke:
          function: rollbar:getProjectAccessToken
          arguments:
            projectId: ${testProject.projectId}
            name: post_item_client
    outputs:
      token: ${data.rollbar_project_access_tokens.test}
    

    Using getProjectAccessToken

    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 getProjectAccessToken(args: GetProjectAccessTokenArgs, opts?: InvokeOptions): Promise<GetProjectAccessTokenResult>
    function getProjectAccessTokenOutput(args: GetProjectAccessTokenOutputArgs, opts?: InvokeOptions): Output<GetProjectAccessTokenResult>
    def get_project_access_token(id: Optional[str] = None,
                                 name: Optional[str] = None,
                                 project_id: Optional[float] = None,
                                 token_type: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetProjectAccessTokenResult
    def get_project_access_token_output(id: Optional[pulumi.Input[str]] = None,
                                 name: Optional[pulumi.Input[str]] = None,
                                 project_id: Optional[pulumi.Input[float]] = None,
                                 token_type: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetProjectAccessTokenResult]
    func LookupProjectAccessToken(ctx *Context, args *LookupProjectAccessTokenArgs, opts ...InvokeOption) (*LookupProjectAccessTokenResult, error)
    func LookupProjectAccessTokenOutput(ctx *Context, args *LookupProjectAccessTokenOutputArgs, opts ...InvokeOption) LookupProjectAccessTokenResultOutput

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

    public static class GetProjectAccessToken 
    {
        public static Task<GetProjectAccessTokenResult> InvokeAsync(GetProjectAccessTokenArgs args, InvokeOptions? opts = null)
        public static Output<GetProjectAccessTokenResult> Invoke(GetProjectAccessTokenInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetProjectAccessTokenResult> getProjectAccessToken(GetProjectAccessTokenArgs args, InvokeOptions options)
    public static Output<GetProjectAccessTokenResult> getProjectAccessToken(GetProjectAccessTokenArgs args, InvokeOptions options)
    
    fn::invoke:
      function: rollbar:index/getProjectAccessToken:getProjectAccessToken
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ProjectId double
    ID of a Rollbar project
    Id string
    Name string
    Name of the token
    TokenType string
    ProjectId float64
    ID of a Rollbar project
    Id string
    Name string
    Name of the token
    TokenType string
    projectId Double
    ID of a Rollbar project
    id String
    name String
    Name of the token
    tokenType String
    projectId number
    ID of a Rollbar project
    id string
    name string
    Name of the token
    tokenType string
    project_id float
    ID of a Rollbar project
    id str
    name str
    Name of the token
    token_type str
    projectId Number
    ID of a Rollbar project
    id String
    name String
    Name of the token
    tokenType String

    getProjectAccessToken Result

    The following output properties are available:

    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
    Id string
    ProjectId double
    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
    Name 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
    Id string
    ProjectId float64
    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
    Name 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
    id String
    projectId Double
    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
    name 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
    id string
    projectId number
    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
    name 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
    id str
    project_id float
    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
    name 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
    id String
    projectId Number
    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
    name 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