This provider is currently in preview.
published on Thursday, May 21, 2026 by Pulumi
This provider is currently in preview.
published on Thursday, May 21, 2026 by Pulumi
Generates a new access token scoped to the organization for use in CI/CD pipelines and automated workflows. Organization tokens belong to the organization rather than individual users, ensuring that access is not disrupted when team members leave.
The name field must be unique across the organization (including deleted tokens) and cannot exceed 40 characters. The expires field accepts a unix epoch timestamp up to two years from the present, or 0 for no expiry (default).
Important: The token value in the response is only returned once at creation time and cannot be retrieved later. Audit logs for actions performed with organization tokens are attributed to the organization rather than an individual user.
Create OrgToken Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new OrgToken(name: string, args: OrgTokenArgs, opts?: CustomResourceOptions);@overload
def OrgToken(resource_name: str,
args: OrgTokenArgs,
opts: Optional[ResourceOptions] = None)
@overload
def OrgToken(resource_name: str,
opts: Optional[ResourceOptions] = None,
admin: Optional[bool] = None,
description: Optional[str] = None,
expires: Optional[int] = None,
name: Optional[str] = None,
org_name: Optional[str] = None,
reason: Optional[str] = None,
role_id: Optional[str] = None)func NewOrgToken(ctx *Context, name string, args OrgTokenArgs, opts ...ResourceOption) (*OrgToken, error)public OrgToken(string name, OrgTokenArgs args, CustomResourceOptions? opts = null)
public OrgToken(String name, OrgTokenArgs args)
public OrgToken(String name, OrgTokenArgs args, CustomResourceOptions options)
type: pulumiservice:api/tokens:OrgToken
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "pulumiservice_api_tokens_orgtoken" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args OrgTokenArgs
- 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 OrgTokenArgs
- 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 OrgTokenArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OrgTokenArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OrgTokenArgs
- 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 orgTokenResource = new PulumiService.Api.Tokens.OrgToken("orgTokenResource", new()
{
Admin = false,
Description = "string",
Expires = 0,
Name = "string",
OrgName = "string",
Reason = "string",
RoleID = "string",
});
example, err := tokens.NewOrgToken(ctx, "orgTokenResource", &tokens.OrgTokenArgs{
Admin: pulumi.Bool(false),
Description: pulumi.String("string"),
Expires: pulumi.Int(0),
Name: pulumi.String("string"),
OrgName: pulumi.String("string"),
Reason: pulumi.String("string"),
RoleID: pulumi.String("string"),
})
resource "pulumiservice_api_tokens_orgtoken" "orgTokenResource" {
admin = false
description = "string"
expires = 0
name = "string"
org_name = "string"
reason = "string"
role_id = "string"
}
var orgTokenResource = new OrgToken("orgTokenResource", OrgTokenArgs.builder()
.admin(false)
.description("string")
.expires(0)
.name("string")
.orgName("string")
.reason("string")
.roleID("string")
.build());
org_token_resource = pulumiservice.api.tokens.OrgToken("orgTokenResource",
admin=False,
description="string",
expires=0,
name="string",
org_name="string",
reason="string",
role_id="string")
const orgTokenResource = new pulumiservice.api.tokens.OrgToken("orgTokenResource", {
admin: false,
description: "string",
expires: 0,
name: "string",
orgName: "string",
reason: "string",
roleID: "string",
});
type: pulumiservice:api/tokens:OrgToken
properties:
admin: false
description: string
expires: 0
name: string
orgName: string
reason: string
roleID: string
OrgToken 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 OrgToken resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the OrgToken resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Token
Id string - The unique identifier
- Token
Value string - The token value
- Id string
- The provider-assigned unique ID for this managed resource.
- Token
Id string - The unique identifier
- Token
Value string - The token value
- id string
- The provider-assigned unique ID for this managed resource.
- token_
id string - The unique identifier
- token_
value string - The token value
- id String
- The provider-assigned unique ID for this managed resource.
- token
Id String - The unique identifier
- token
Value String - The token value
- id string
- The provider-assigned unique ID for this managed resource.
- token
Id string - The unique identifier
- token
Value string - The token value
- id str
- The provider-assigned unique ID for this managed resource.
- token_
id str - The unique identifier
- token_
value str - The token value
- id String
- The provider-assigned unique ID for this managed resource.
- token
Id String - The unique identifier
- token
Value String - The token value
Package Details
- Repository
- pulumiservice pulumi/pulumi-pulumiservice
- License
- Apache-2.0
This provider is currently in preview.
published on Thursday, May 21, 2026 by Pulumi