rollbar 1.16.0 published on Wednesday, Apr 30, 2025 by rollbar
rollbar.getProjectAccessToken
Explore with Pulumi AI
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:
- project_
id float - ID of a Rollbar project
- id str
- name str
- Name of the token
- token_
type str
getProjectAccessToken Result
The following output properties are available:
- Access
Token string - API token
- Cur
Rate doubleLimit Window Count - Number of API hits that occurred in the current rate limit window
- Cur
Rate doubleLimit Window Start - Time when the current rate limit window began
- Date
Created double - Date the token was created
- Date
Modified double - Date the token was last modified
- Id string
- Project
Id double - Public
Id string - Rate
Limit doubleWindow Count - Maximum allowed API hits during a rate limit window
- Rate
Limit doubleWindow Size - Duration of a rate limit window
- Scopes List<string>
- Project access scopes for the token. Possible values are
read
,write
,post_server_item
, orpost_client_item
. - Status string
- Status of the token
- Token
Type string - Name string
- Access
Token string - API token
- Cur
Rate float64Limit Window Count - Number of API hits that occurred in the current rate limit window
- Cur
Rate float64Limit Window Start - Time when the current rate limit window began
- Date
Created float64 - Date the token was created
- Date
Modified float64 - Date the token was last modified
- Id string
- Project
Id float64 - Public
Id string - Rate
Limit float64Window Count - Maximum allowed API hits during a rate limit window
- Rate
Limit float64Window Size - Duration of a rate limit window
- Scopes []string
- Project access scopes for the token. Possible values are
read
,write
,post_server_item
, orpost_client_item
. - Status string
- Status of the token
- Token
Type string - Name string
- access
Token String - API token
- cur
Rate DoubleLimit Window Count - Number of API hits that occurred in the current rate limit window
- cur
Rate DoubleLimit Window Start - Time when the current rate limit window began
- date
Created Double - Date the token was created
- date
Modified Double - Date the token was last modified
- id String
- project
Id Double - public
Id String - rate
Limit DoubleWindow Count - Maximum allowed API hits during a rate limit window
- rate
Limit DoubleWindow Size - Duration of a rate limit window
- scopes List<String>
- Project access scopes for the token. Possible values are
read
,write
,post_server_item
, orpost_client_item
. - status String
- Status of the token
- token
Type String - name String
- access
Token string - API token
- cur
Rate numberLimit Window Count - Number of API hits that occurred in the current rate limit window
- cur
Rate numberLimit Window Start - Time when the current rate limit window began
- date
Created number - Date the token was created
- date
Modified number - Date the token was last modified
- id string
- project
Id number - public
Id string - rate
Limit numberWindow Count - Maximum allowed API hits during a rate limit window
- rate
Limit numberWindow Size - Duration of a rate limit window
- scopes string[]
- Project access scopes for the token. Possible values are
read
,write
,post_server_item
, orpost_client_item
. - status string
- Status of the token
- token
Type string - name string
- access_
token str - API token
- cur_
rate_ floatlimit_ window_ count - Number of API hits that occurred in the current rate limit window
- cur_
rate_ floatlimit_ window_ start - 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_ floatwindow_ count - Maximum allowed API hits during a rate limit window
- rate_
limit_ floatwindow_ size - Duration of a rate limit window
- scopes Sequence[str]
- Project access scopes for the token. Possible values are
read
,write
,post_server_item
, orpost_client_item
. - status str
- Status of the token
- token_
type str - name str
- access
Token String - API token
- cur
Rate NumberLimit Window Count - Number of API hits that occurred in the current rate limit window
- cur
Rate NumberLimit Window Start - Time when the current rate limit window began
- date
Created Number - Date the token was created
- date
Modified Number - Date the token was last modified
- id String
- project
Id Number - public
Id String - rate
Limit NumberWindow Count - Maximum allowed API hits during a rate limit window
- rate
Limit NumberWindow Size - Duration of a rate limit window
- scopes List<String>
- Project access scopes for the token. Possible values are
read
,write
,post_server_item
, orpost_client_item
. - status String
- Status of the token
- token
Type String - name String
Package Details
- Repository
- rollbar rollbar/terraform-provider-rollbar
- License
- Notes
- This Pulumi package is based on the
rollbar
Terraform Provider.