1. Packages
  2. Packages
  3. Pulumi Cloud (Pulumi Service provider)
  4. API Docs
  5. api
  6. api/tokens
  7. TeamToken

This provider is currently in preview.

Viewing docs for Pulumi Cloud v1.1.0
published on Thursday, May 21, 2026 by Pulumi
pulumiservice logo

This provider is currently in preview.

Viewing docs for Pulumi Cloud v1.1.0
published on Thursday, May 21, 2026 by Pulumi

    Generates a new access token scoped to a specific team within an organization. Team tokens inherit the stack permissions assigned to the team, making them suitable for CI/CD pipelines that need access limited to a specific set of stacks.

    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.

    Create TeamToken Resource

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

    Constructor syntax

    new TeamToken(name: string, args: TeamTokenArgs, opts?: CustomResourceOptions);
    @overload
    def TeamToken(resource_name: str,
                  args: TeamTokenArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def TeamToken(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  description: Optional[str] = None,
                  expires: Optional[int] = None,
                  name: Optional[str] = None,
                  org_name: Optional[str] = None,
                  team_name: Optional[str] = None,
                  reason: Optional[str] = None)
    func NewTeamToken(ctx *Context, name string, args TeamTokenArgs, opts ...ResourceOption) (*TeamToken, error)
    public TeamToken(string name, TeamTokenArgs args, CustomResourceOptions? opts = null)
    public TeamToken(String name, TeamTokenArgs args)
    public TeamToken(String name, TeamTokenArgs args, CustomResourceOptions options)
    
    type: pulumiservice:api/tokens:TeamToken
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "pulumiservice_api_tokens_teamtoken" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args TeamTokenArgs
    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 TeamTokenArgs
    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 TeamTokenArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TeamTokenArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TeamTokenArgs
    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 teamTokenResource = new PulumiService.Api.Tokens.TeamToken("teamTokenResource", new()
    {
        Description = "string",
        Expires = 0,
        Name = "string",
        OrgName = "string",
        TeamName = "string",
        Reason = "string",
    });
    
    example, err := tokens.NewTeamToken(ctx, "teamTokenResource", &tokens.TeamTokenArgs{
    	Description: pulumi.String("string"),
    	Expires:     pulumi.Int(0),
    	Name:        pulumi.String("string"),
    	OrgName:     pulumi.String("string"),
    	TeamName:    pulumi.String("string"),
    	Reason:      pulumi.String("string"),
    })
    
    resource "pulumiservice_api_tokens_teamtoken" "teamTokenResource" {
      description = "string"
      expires     = 0
      name        = "string"
      org_name    = "string"
      team_name   = "string"
      reason      = "string"
    }
    
    var teamTokenResource = new TeamToken("teamTokenResource", TeamTokenArgs.builder()
        .description("string")
        .expires(0)
        .name("string")
        .orgName("string")
        .teamName("string")
        .reason("string")
        .build());
    
    team_token_resource = pulumiservice.api.tokens.TeamToken("teamTokenResource",
        description="string",
        expires=0,
        name="string",
        org_name="string",
        team_name="string",
        reason="string")
    
    const teamTokenResource = new pulumiservice.api.tokens.TeamToken("teamTokenResource", {
        description: "string",
        expires: 0,
        name: "string",
        orgName: "string",
        teamName: "string",
        reason: "string",
    });
    
    type: pulumiservice:api/tokens:TeamToken
    properties:
        description: string
        expires: 0
        name: string
        orgName: string
        reason: string
        teamName: string
    

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

    Description string
    The description
    Expires int
    The expiration time
    Name string
    The name
    OrgName string
    The organization name
    TeamName string
    The team name
    Reason string
    Audit log reason for creating this token
    Description string
    The description
    Expires int
    The expiration time
    Name string
    The name
    OrgName string
    The organization name
    TeamName string
    The team name
    Reason string
    Audit log reason for creating this token
    description string
    The description
    expires number
    The expiration time
    name string
    The name
    org_name string
    The organization name
    team_name string
    The team name
    reason string
    Audit log reason for creating this token
    description String
    The description
    expires Integer
    The expiration time
    name String
    The name
    orgName String
    The organization name
    teamName String
    The team name
    reason String
    Audit log reason for creating this token
    description string
    The description
    expires number
    The expiration time
    name string
    The name
    orgName string
    The organization name
    teamName string
    The team name
    reason string
    Audit log reason for creating this token
    description str
    The description
    expires int
    The expiration time
    name str
    The name
    org_name str
    The organization name
    team_name str
    The team name
    reason str
    Audit log reason for creating this token
    description String
    The description
    expires Number
    The expiration time
    name String
    The name
    orgName String
    The organization name
    teamName String
    The team name
    reason String
    Audit log reason for creating this token

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    TokenId string
    The unique identifier
    TokenValue string
    The token value
    Id string
    The provider-assigned unique ID for this managed resource.
    TokenId string
    The unique identifier
    TokenValue 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.
    tokenId String
    The unique identifier
    tokenValue String
    The token value
    id string
    The provider-assigned unique ID for this managed resource.
    tokenId string
    The unique identifier
    tokenValue 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.
    tokenId String
    The unique identifier
    tokenValue String
    The token value

    Package Details

    Repository
    pulumiservice pulumi/pulumi-pulumiservice
    License
    Apache-2.0
    pulumiservice logo

    This provider is currently in preview.

    Viewing docs for Pulumi Cloud v1.1.0
    published on Thursday, May 21, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial