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

rollbar.ProjectAccessToken

Explore with Pulumi AI

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

    rollbar.ProjectAccessToken Resource

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

    Rollbar project access token resource.

    Example Usage


    import * as pulumi from "@pulumi/pulumi";
    import * as rollbar from "@pulumi/rollbar";
    
    // Create a project
    const foo = new rollbar.Project("foo", {});
    // Create an access token for the project
    const bar = new rollbar.ProjectAccessToken("bar", {
        projectId: foo.projectId,
        scopes: [
            "read",
            "post_server_item",
        ],
        tokenType: "v2",
    }, {
        dependsOn: [foo],
    });
    
    import pulumi
    import pulumi_rollbar as rollbar
    
    # Create a project
    foo = rollbar.Project("foo")
    # Create an access token for the project
    bar = rollbar.ProjectAccessToken("bar",
        project_id=foo.project_id,
        scopes=[
            "read",
            "post_server_item",
        ],
        token_type="v2",
        opts = pulumi.ResourceOptions(depends_on=[foo]))
    
    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 {
    		// Create a project
    		foo, err := rollbar.NewProject(ctx, "foo", nil)
    		if err != nil {
    			return err
    		}
    		// Create an access token for the project
    		_, err = rollbar.NewProjectAccessToken(ctx, "bar", &rollbar.ProjectAccessTokenArgs{
    			ProjectId: foo.ProjectId,
    			Scopes: pulumi.StringArray{
    				pulumi.String("read"),
    				pulumi.String("post_server_item"),
    			},
    			TokenType: pulumi.String("v2"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			foo,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Rollbar = Pulumi.Rollbar;
    
    return await Deployment.RunAsync(() => 
    {
        // Create a project
        var foo = new Rollbar.Project("foo");
    
        // Create an access token for the project
        var bar = new Rollbar.ProjectAccessToken("bar", new()
        {
            ProjectId = foo.ProjectId,
            Scopes = new[]
            {
                "read",
                "post_server_item",
            },
            TokenType = "v2",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                foo,
            },
        });
    
    });
    
    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.ProjectAccessToken;
    import com.pulumi.rollbar.ProjectAccessTokenArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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) {
            // Create a project
            var foo = new Project("foo");
    
            // Create an access token for the project
            var bar = new ProjectAccessToken("bar", ProjectAccessTokenArgs.builder()
                .projectId(foo.projectId())
                .scopes(            
                    "read",
                    "post_server_item")
                .tokenType("v2")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(foo)
                    .build());
    
        }
    }
    
    resources:
      # Create a project
      foo:
        type: rollbar:Project
      # Create an access token for the project
      bar:
        type: rollbar:ProjectAccessToken
        properties:
          projectId: ${foo.projectId}
          scopes:
            - read
            - post_server_item
          tokenType: v2
        options:
          dependsOn:
            - ${foo}
    

    Create ProjectAccessToken Resource

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

    Constructor syntax

    new ProjectAccessToken(name: string, args: ProjectAccessTokenArgs, opts?: CustomResourceOptions);
    @overload
    def ProjectAccessToken(resource_name: str,
                           args: ProjectAccessTokenArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def ProjectAccessToken(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           project_id: Optional[float] = None,
                           scopes: Optional[Sequence[str]] = None,
                           name: Optional[str] = None,
                           project_access_token_id: Optional[str] = None,
                           rate_limit_window_count: Optional[float] = None,
                           rate_limit_window_size: Optional[float] = None,
                           status: Optional[str] = None,
                           token_type: Optional[str] = None)
    func NewProjectAccessToken(ctx *Context, name string, args ProjectAccessTokenArgs, opts ...ResourceOption) (*ProjectAccessToken, error)
    public ProjectAccessToken(string name, ProjectAccessTokenArgs args, CustomResourceOptions? opts = null)
    public ProjectAccessToken(String name, ProjectAccessTokenArgs args)
    public ProjectAccessToken(String name, ProjectAccessTokenArgs args, CustomResourceOptions options)
    
    type: rollbar:ProjectAccessToken
    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 ProjectAccessTokenArgs
    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 ProjectAccessTokenArgs
    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 ProjectAccessTokenArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectAccessTokenArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectAccessTokenArgs
    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 projectAccessTokenResource = new Rollbar.ProjectAccessToken("projectAccessTokenResource", new()
    {
        ProjectId = 0,
        Scopes = new[]
        {
            "string",
        },
        Name = "string",
        ProjectAccessTokenId = "string",
        RateLimitWindowCount = 0,
        RateLimitWindowSize = 0,
        Status = "string",
        TokenType = "string",
    });
    
    example, err := rollbar.NewProjectAccessToken(ctx, "projectAccessTokenResource", &rollbar.ProjectAccessTokenArgs{
    	ProjectId: pulumi.Float64(0),
    	Scopes: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name:                 pulumi.String("string"),
    	ProjectAccessTokenId: pulumi.String("string"),
    	RateLimitWindowCount: pulumi.Float64(0),
    	RateLimitWindowSize:  pulumi.Float64(0),
    	Status:               pulumi.String("string"),
    	TokenType:            pulumi.String("string"),
    })
    
    var projectAccessTokenResource = new ProjectAccessToken("projectAccessTokenResource", ProjectAccessTokenArgs.builder()
        .projectId(0)
        .scopes("string")
        .name("string")
        .projectAccessTokenId("string")
        .rateLimitWindowCount(0)
        .rateLimitWindowSize(0)
        .status("string")
        .tokenType("string")
        .build());
    
    project_access_token_resource = rollbar.ProjectAccessToken("projectAccessTokenResource",
        project_id=0,
        scopes=["string"],
        name="string",
        project_access_token_id="string",
        rate_limit_window_count=0,
        rate_limit_window_size=0,
        status="string",
        token_type="string")
    
    const projectAccessTokenResource = new rollbar.ProjectAccessToken("projectAccessTokenResource", {
        projectId: 0,
        scopes: ["string"],
        name: "string",
        projectAccessTokenId: "string",
        rateLimitWindowCount: 0,
        rateLimitWindowSize: 0,
        status: "string",
        tokenType: "string",
    });
    
    type: rollbar:ProjectAccessToken
    properties:
        name: string
        projectAccessTokenId: string
        projectId: 0
        rateLimitWindowCount: 0
        rateLimitWindowSize: 0
        scopes:
            - string
        status: string
        tokenType: string
    

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

    ProjectId double
    ID of the Rollbar project to which this token belongs
    Scopes List<string>
    List of access scopes granted to the token. Possible values are read, write, post_server_item, and post_client_server.
    Name string
    The human readable name for the token.

    • project_Id - (Required) ID of the Rollbar project to which this token belongs.
    ProjectAccessTokenId string
    RateLimitWindowCount double
    Total number of calls allowed within the rate limit window
    RateLimitWindowSize double
    Total number of seconds that makes up the rate limit window
    Status string
    Status of the token. Possible values are enabled and disabled.
    TokenType string
    Access token type for Rollbar API
    ProjectId float64
    ID of the Rollbar project to which this token belongs
    Scopes []string
    List of access scopes granted to the token. Possible values are read, write, post_server_item, and post_client_server.
    Name string
    The human readable name for the token.

    • project_Id - (Required) ID of the Rollbar project to which this token belongs.
    ProjectAccessTokenId string
    RateLimitWindowCount float64
    Total number of calls allowed within the rate limit window
    RateLimitWindowSize float64
    Total number of seconds that makes up the rate limit window
    Status string
    Status of the token. Possible values are enabled and disabled.
    TokenType string
    Access token type for Rollbar API
    projectId Double
    ID of the Rollbar project to which this token belongs
    scopes List<String>
    List of access scopes granted to the token. Possible values are read, write, post_server_item, and post_client_server.
    name String
    The human readable name for the token.

    • project_Id - (Required) ID of the Rollbar project to which this token belongs.
    projectAccessTokenId String
    rateLimitWindowCount Double
    Total number of calls allowed within the rate limit window
    rateLimitWindowSize Double
    Total number of seconds that makes up the rate limit window
    status String
    Status of the token. Possible values are enabled and disabled.
    tokenType String
    Access token type for Rollbar API
    projectId number
    ID of the Rollbar project to which this token belongs
    scopes string[]
    List of access scopes granted to the token. Possible values are read, write, post_server_item, and post_client_server.
    name string
    The human readable name for the token.

    • project_Id - (Required) ID of the Rollbar project to which this token belongs.
    projectAccessTokenId string
    rateLimitWindowCount number
    Total number of calls allowed within the rate limit window
    rateLimitWindowSize number
    Total number of seconds that makes up the rate limit window
    status string
    Status of the token. Possible values are enabled and disabled.
    tokenType string
    Access token type for Rollbar API
    project_id float
    ID of the Rollbar project to which this token belongs
    scopes Sequence[str]
    List of access scopes granted to the token. Possible values are read, write, post_server_item, and post_client_server.
    name str
    The human readable name for the token.

    • project_Id - (Required) ID of the Rollbar project to which this token belongs.
    project_access_token_id str
    rate_limit_window_count float
    Total number of calls allowed within the rate limit window
    rate_limit_window_size float
    Total number of seconds that makes up the rate limit window
    status str
    Status of the token. Possible values are enabled and disabled.
    token_type str
    Access token type for Rollbar API
    projectId Number
    ID of the Rollbar project to which this token belongs
    scopes List<String>
    List of access scopes granted to the token. Possible values are read, write, post_server_item, and post_client_server.
    name String
    The human readable name for the token.

    • project_Id - (Required) ID of the Rollbar project to which this token belongs.
    projectAccessTokenId String
    rateLimitWindowCount Number
    Total number of calls allowed within the rate limit window
    rateLimitWindowSize Number
    Total number of seconds that makes up the rate limit window
    status String
    Status of the token. Possible values are enabled and disabled.
    tokenType String
    Access token type for Rollbar API

    Outputs

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

    AccessToken string
    Access token for Rollbar API
    CurRateLimitWindowCount double
    Count of calls in the current window
    CurRateLimitWindowStart double
    Time when the current window began
    DateCreated double
    Date the project was created
    DateModified double
    Date the project was last modified
    Id string
    The provider-assigned unique ID for this managed resource.
    PublicId string
    Public ID for Access token
    AccessToken string
    Access token for Rollbar API
    CurRateLimitWindowCount float64
    Count of calls in the current window
    CurRateLimitWindowStart float64
    Time when the current window began
    DateCreated float64
    Date the project was created
    DateModified float64
    Date the project was last modified
    Id string
    The provider-assigned unique ID for this managed resource.
    PublicId string
    Public ID for Access token
    accessToken String
    Access token for Rollbar API
    curRateLimitWindowCount Double
    Count of calls in the current window
    curRateLimitWindowStart Double
    Time when the current window began
    dateCreated Double
    Date the project was created
    dateModified Double
    Date the project was last modified
    id String
    The provider-assigned unique ID for this managed resource.
    publicId String
    Public ID for Access token
    accessToken string
    Access token for Rollbar API
    curRateLimitWindowCount number
    Count of calls in the current window
    curRateLimitWindowStart number
    Time when the current window began
    dateCreated number
    Date the project was created
    dateModified number
    Date the project was last modified
    id string
    The provider-assigned unique ID for this managed resource.
    publicId string
    Public ID for Access token
    access_token str
    Access token for Rollbar API
    cur_rate_limit_window_count float
    Count of calls in the current window
    cur_rate_limit_window_start float
    Time when the current window began
    date_created float
    Date the project was created
    date_modified float
    Date the project was last modified
    id str
    The provider-assigned unique ID for this managed resource.
    public_id str
    Public ID for Access token
    accessToken String
    Access token for Rollbar API
    curRateLimitWindowCount Number
    Count of calls in the current window
    curRateLimitWindowStart Number
    Time when the current window began
    dateCreated Number
    Date the project was created
    dateModified Number
    Date the project was last modified
    id String
    The provider-assigned unique ID for this managed resource.
    publicId String
    Public ID for Access token

    Look up Existing ProjectAccessToken Resource

    Get an existing ProjectAccessToken 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?: ProjectAccessTokenState, opts?: CustomResourceOptions): ProjectAccessToken
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_token: Optional[str] = None,
            cur_rate_limit_window_count: Optional[float] = None,
            cur_rate_limit_window_start: Optional[float] = None,
            date_created: Optional[float] = None,
            date_modified: Optional[float] = None,
            name: Optional[str] = None,
            project_access_token_id: Optional[str] = None,
            project_id: Optional[float] = None,
            public_id: Optional[str] = None,
            rate_limit_window_count: Optional[float] = None,
            rate_limit_window_size: Optional[float] = None,
            scopes: Optional[Sequence[str]] = None,
            status: Optional[str] = None,
            token_type: Optional[str] = None) -> ProjectAccessToken
    func GetProjectAccessToken(ctx *Context, name string, id IDInput, state *ProjectAccessTokenState, opts ...ResourceOption) (*ProjectAccessToken, error)
    public static ProjectAccessToken Get(string name, Input<string> id, ProjectAccessTokenState? state, CustomResourceOptions? opts = null)
    public static ProjectAccessToken get(String name, Output<String> id, ProjectAccessTokenState state, CustomResourceOptions options)
    resources:  _:    type: rollbar:ProjectAccessToken    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:
    AccessToken string
    Access token for Rollbar API
    CurRateLimitWindowCount double
    Count of calls in the current window
    CurRateLimitWindowStart double
    Time when the current window began
    DateCreated double
    Date the project was created
    DateModified double
    Date the project was last modified
    Name string
    The human readable name for the token.

    • project_Id - (Required) ID of the Rollbar project to which this token belongs.
    ProjectAccessTokenId string
    ProjectId double
    ID of the Rollbar project to which this token belongs
    PublicId string
    Public ID for Access token
    RateLimitWindowCount double
    Total number of calls allowed within the rate limit window
    RateLimitWindowSize double
    Total number of seconds that makes up the rate limit window
    Scopes List<string>
    List of access scopes granted to the token. Possible values are read, write, post_server_item, and post_client_server.
    Status string
    Status of the token. Possible values are enabled and disabled.
    TokenType string
    Access token type for Rollbar API
    AccessToken string
    Access token for Rollbar API
    CurRateLimitWindowCount float64
    Count of calls in the current window
    CurRateLimitWindowStart float64
    Time when the current window began
    DateCreated float64
    Date the project was created
    DateModified float64
    Date the project was last modified
    Name string
    The human readable name for the token.

    • project_Id - (Required) ID of the Rollbar project to which this token belongs.
    ProjectAccessTokenId string
    ProjectId float64
    ID of the Rollbar project to which this token belongs
    PublicId string
    Public ID for Access token
    RateLimitWindowCount float64
    Total number of calls allowed within the rate limit window
    RateLimitWindowSize float64
    Total number of seconds that makes up the rate limit window
    Scopes []string
    List of access scopes granted to the token. Possible values are read, write, post_server_item, and post_client_server.
    Status string
    Status of the token. Possible values are enabled and disabled.
    TokenType string
    Access token type for Rollbar API
    accessToken String
    Access token for Rollbar API
    curRateLimitWindowCount Double
    Count of calls in the current window
    curRateLimitWindowStart Double
    Time when the current window began
    dateCreated Double
    Date the project was created
    dateModified Double
    Date the project was last modified
    name String
    The human readable name for the token.

    • project_Id - (Required) ID of the Rollbar project to which this token belongs.
    projectAccessTokenId String
    projectId Double
    ID of the Rollbar project to which this token belongs
    publicId String
    Public ID for Access token
    rateLimitWindowCount Double
    Total number of calls allowed within the rate limit window
    rateLimitWindowSize Double
    Total number of seconds that makes up the rate limit window
    scopes List<String>
    List of access scopes granted to the token. Possible values are read, write, post_server_item, and post_client_server.
    status String
    Status of the token. Possible values are enabled and disabled.
    tokenType String
    Access token type for Rollbar API
    accessToken string
    Access token for Rollbar API
    curRateLimitWindowCount number
    Count of calls in the current window
    curRateLimitWindowStart number
    Time when the current window began
    dateCreated number
    Date the project was created
    dateModified number
    Date the project was last modified
    name string
    The human readable name for the token.

    • project_Id - (Required) ID of the Rollbar project to which this token belongs.
    projectAccessTokenId string
    projectId number
    ID of the Rollbar project to which this token belongs
    publicId string
    Public ID for Access token
    rateLimitWindowCount number
    Total number of calls allowed within the rate limit window
    rateLimitWindowSize number
    Total number of seconds that makes up the rate limit window
    scopes string[]
    List of access scopes granted to the token. Possible values are read, write, post_server_item, and post_client_server.
    status string
    Status of the token. Possible values are enabled and disabled.
    tokenType string
    Access token type for Rollbar API
    access_token str
    Access token for Rollbar API
    cur_rate_limit_window_count float
    Count of calls in the current window
    cur_rate_limit_window_start float
    Time when the current window began
    date_created float
    Date the project was created
    date_modified float
    Date the project was last modified
    name str
    The human readable name for the token.

    • project_Id - (Required) ID of the Rollbar project to which this token belongs.
    project_access_token_id str
    project_id float
    ID of the Rollbar project to which this token belongs
    public_id str
    Public ID for Access token
    rate_limit_window_count float
    Total number of calls allowed within the rate limit window
    rate_limit_window_size float
    Total number of seconds that makes up the rate limit window
    scopes Sequence[str]
    List of access scopes granted to the token. Possible values are read, write, post_server_item, and post_client_server.
    status str
    Status of the token. Possible values are enabled and disabled.
    token_type str
    Access token type for Rollbar API
    accessToken String
    Access token for Rollbar API
    curRateLimitWindowCount Number
    Count of calls in the current window
    curRateLimitWindowStart Number
    Time when the current window began
    dateCreated Number
    Date the project was created
    dateModified Number
    Date the project was last modified
    name String
    The human readable name for the token.

    • project_Id - (Required) ID of the Rollbar project to which this token belongs.
    projectAccessTokenId String
    projectId Number
    ID of the Rollbar project to which this token belongs
    publicId String
    Public ID for Access token
    rateLimitWindowCount Number
    Total number of calls allowed within the rate limit window
    rateLimitWindowSize Number
    Total number of seconds that makes up the rate limit window
    scopes List<String>
    List of access scopes granted to the token. Possible values are read, write, post_server_item, and post_client_server.
    status String
    Status of the token. Possible values are enabled and disabled.
    tokenType String
    Access token type for Rollbar API

    Import


    Projects can be imported using a combination of the project_id and

    access_token (or public_id) joined by a /, e.g.

    $ pulumi import rollbar:index/projectAccessToken:ProjectAccessToken baz 411703/d19f7ada16534b1c94e91d9da3dbae5a
    

    To learn more about importing existing cloud resources, see Importing resources.

    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