rollbar.ProjectAccessToken
Explore with Pulumi AI
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:
- Project
Id 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
, andpost_client_server
. - Name string
- The human readable name for the token.
project_Id
- (Required) ID of the Rollbar project to which this token belongs.
- Project
Access stringToken Id - Rate
Limit doubleWindow Count - Total number of calls allowed within the rate limit window
- Rate
Limit doubleWindow Size - Total number of seconds that makes up the rate limit window
- Status string
- Status of the token. Possible values are
enabled
anddisabled
. - Token
Type string - Access token type for Rollbar API
- Project
Id 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
, andpost_client_server
. - Name string
- The human readable name for the token.
project_Id
- (Required) ID of the Rollbar project to which this token belongs.
- Project
Access stringToken Id - Rate
Limit float64Window Count - Total number of calls allowed within the rate limit window
- Rate
Limit float64Window Size - Total number of seconds that makes up the rate limit window
- Status string
- Status of the token. Possible values are
enabled
anddisabled
. - Token
Type string - Access token type for Rollbar API
- project
Id 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
, andpost_client_server
. - name String
- The human readable name for the token.
project_Id
- (Required) ID of the Rollbar project to which this token belongs.
- project
Access StringToken Id - rate
Limit DoubleWindow Count - Total number of calls allowed within the rate limit window
- rate
Limit DoubleWindow Size - Total number of seconds that makes up the rate limit window
- status String
- Status of the token. Possible values are
enabled
anddisabled
. - token
Type String - Access token type for Rollbar API
- project
Id 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
, andpost_client_server
. - name string
- The human readable name for the token.
project_Id
- (Required) ID of the Rollbar project to which this token belongs.
- project
Access stringToken Id - rate
Limit numberWindow Count - Total number of calls allowed within the rate limit window
- rate
Limit numberWindow Size - Total number of seconds that makes up the rate limit window
- status string
- Status of the token. Possible values are
enabled
anddisabled
. - token
Type 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
, andpost_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_ strtoken_ id - rate_
limit_ floatwindow_ count - Total number of calls allowed within the rate limit window
- rate_
limit_ floatwindow_ size - Total number of seconds that makes up the rate limit window
- status str
- Status of the token. Possible values are
enabled
anddisabled
. - token_
type str - Access token type for Rollbar API
- project
Id 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
, andpost_client_server
. - name String
- The human readable name for the token.
project_Id
- (Required) ID of the Rollbar project to which this token belongs.
- project
Access StringToken Id - rate
Limit NumberWindow Count - Total number of calls allowed within the rate limit window
- rate
Limit NumberWindow Size - Total number of seconds that makes up the rate limit window
- status String
- Status of the token. Possible values are
enabled
anddisabled
. - token
Type 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:
- Access
Token string - Access token for Rollbar API
- Cur
Rate doubleLimit Window Count - Count of calls in the current window
- Cur
Rate doubleLimit Window Start - Time when the current window began
- Date
Created double - Date the project was created
- Date
Modified double - Date the project was last modified
- Id string
- The provider-assigned unique ID for this managed resource.
- Public
Id string - Public ID for Access token
- Access
Token string - Access token for Rollbar API
- Cur
Rate float64Limit Window Count - Count of calls in the current window
- Cur
Rate float64Limit Window Start - Time when the current window began
- Date
Created float64 - Date the project was created
- Date
Modified float64 - Date the project was last modified
- Id string
- The provider-assigned unique ID for this managed resource.
- Public
Id string - Public ID for Access token
- access
Token String - Access token for Rollbar API
- cur
Rate DoubleLimit Window Count - Count of calls in the current window
- cur
Rate DoubleLimit Window Start - Time when the current window began
- date
Created Double - Date the project was created
- date
Modified Double - Date the project was last modified
- id String
- The provider-assigned unique ID for this managed resource.
- public
Id String - Public ID for Access token
- access
Token string - Access token for Rollbar API
- cur
Rate numberLimit Window Count - Count of calls in the current window
- cur
Rate numberLimit Window Start - Time when the current window began
- date
Created number - Date the project was created
- date
Modified number - Date the project was last modified
- id string
- The provider-assigned unique ID for this managed resource.
- public
Id string - Public ID for Access token
- access_
token str - Access token for Rollbar API
- cur_
rate_ floatlimit_ window_ count - Count of calls in the current window
- cur_
rate_ floatlimit_ window_ start - 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
- access
Token String - Access token for Rollbar API
- cur
Rate NumberLimit Window Count - Count of calls in the current window
- cur
Rate NumberLimit Window Start - Time when the current window began
- date
Created Number - Date the project was created
- date
Modified Number - Date the project was last modified
- id String
- The provider-assigned unique ID for this managed resource.
- public
Id 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.
- Access
Token string - Access token for Rollbar API
- Cur
Rate doubleLimit Window Count - Count of calls in the current window
- Cur
Rate doubleLimit Window Start - Time when the current window began
- Date
Created double - Date the project was created
- Date
Modified 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.
- Project
Access stringToken Id - Project
Id double - ID of the Rollbar project to which this token belongs
- Public
Id string - Public ID for Access token
- Rate
Limit doubleWindow Count - Total number of calls allowed within the rate limit window
- Rate
Limit doubleWindow Size - 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
, andpost_client_server
. - Status string
- Status of the token. Possible values are
enabled
anddisabled
. - Token
Type string - Access token type for Rollbar API
- Access
Token string - Access token for Rollbar API
- Cur
Rate float64Limit Window Count - Count of calls in the current window
- Cur
Rate float64Limit Window Start - Time when the current window began
- Date
Created float64 - Date the project was created
- Date
Modified 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.
- Project
Access stringToken Id - Project
Id float64 - ID of the Rollbar project to which this token belongs
- Public
Id string - Public ID for Access token
- Rate
Limit float64Window Count - Total number of calls allowed within the rate limit window
- Rate
Limit float64Window Size - 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
, andpost_client_server
. - Status string
- Status of the token. Possible values are
enabled
anddisabled
. - Token
Type string - Access token type for Rollbar API
- access
Token String - Access token for Rollbar API
- cur
Rate DoubleLimit Window Count - Count of calls in the current window
- cur
Rate DoubleLimit Window Start - Time when the current window began
- date
Created Double - Date the project was created
- date
Modified 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.
- project
Access StringToken Id - project
Id Double - ID of the Rollbar project to which this token belongs
- public
Id String - Public ID for Access token
- rate
Limit DoubleWindow Count - Total number of calls allowed within the rate limit window
- rate
Limit DoubleWindow Size - 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
, andpost_client_server
. - status String
- Status of the token. Possible values are
enabled
anddisabled
. - token
Type String - Access token type for Rollbar API
- access
Token string - Access token for Rollbar API
- cur
Rate numberLimit Window Count - Count of calls in the current window
- cur
Rate numberLimit Window Start - Time when the current window began
- date
Created number - Date the project was created
- date
Modified 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.
- project
Access stringToken Id - project
Id number - ID of the Rollbar project to which this token belongs
- public
Id string - Public ID for Access token
- rate
Limit numberWindow Count - Total number of calls allowed within the rate limit window
- rate
Limit numberWindow Size - 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
, andpost_client_server
. - status string
- Status of the token. Possible values are
enabled
anddisabled
. - token
Type string - Access token type for Rollbar API
- access_
token str - Access token for Rollbar API
- cur_
rate_ floatlimit_ window_ count - Count of calls in the current window
- cur_
rate_ floatlimit_ window_ start - 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_ strtoken_ id - project_
id float - ID of the Rollbar project to which this token belongs
- public_
id str - Public ID for Access token
- rate_
limit_ floatwindow_ count - Total number of calls allowed within the rate limit window
- rate_
limit_ floatwindow_ size - 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
, andpost_client_server
. - status str
- Status of the token. Possible values are
enabled
anddisabled
. - token_
type str - Access token type for Rollbar API
- access
Token String - Access token for Rollbar API
- cur
Rate NumberLimit Window Count - Count of calls in the current window
- cur
Rate NumberLimit Window Start - Time when the current window began
- date
Created Number - Date the project was created
- date
Modified 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.
- project
Access StringToken Id - project
Id Number - ID of the Rollbar project to which this token belongs
- public
Id String - Public ID for Access token
- rate
Limit NumberWindow Count - Total number of calls allowed within the rate limit window
- rate
Limit NumberWindow Size - 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
, andpost_client_server
. - status String
- Status of the token. Possible values are
enabled
anddisabled
. - token
Type 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.