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
Creates a new personal access token for the authenticated user. The request body includes a description for the token and an optional expiration time. The response includes the token ID and the tokenValue (prefixed with ‘pul-’). The token value is only returned once at creation time and cannot be retrieved later.
Create PersonalToken Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PersonalToken(name: string, args: PersonalTokenArgs, opts?: CustomResourceOptions);@overload
def PersonalToken(resource_name: str,
args: PersonalTokenArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PersonalToken(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
expires: Optional[int] = None,
reason: Optional[str] = None)func NewPersonalToken(ctx *Context, name string, args PersonalTokenArgs, opts ...ResourceOption) (*PersonalToken, error)public PersonalToken(string name, PersonalTokenArgs args, CustomResourceOptions? opts = null)
public PersonalToken(String name, PersonalTokenArgs args)
public PersonalToken(String name, PersonalTokenArgs args, CustomResourceOptions options)
type: pulumiservice:api/tokens:PersonalToken
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "pulumiservice_api_tokens_personaltoken" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args PersonalTokenArgs
- 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 PersonalTokenArgs
- 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 PersonalTokenArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PersonalTokenArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PersonalTokenArgs
- 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 personalTokenResource = new PulumiService.Api.Tokens.PersonalToken("personalTokenResource", new()
{
Description = "string",
Expires = 0,
Reason = "string",
});
example, err := tokens.NewPersonalToken(ctx, "personalTokenResource", &tokens.PersonalTokenArgs{
Description: pulumi.String("string"),
Expires: pulumi.Int(0),
Reason: pulumi.String("string"),
})
resource "pulumiservice_api_tokens_personaltoken" "personalTokenResource" {
description = "string"
expires = 0
reason = "string"
}
var personalTokenResource = new PersonalToken("personalTokenResource", PersonalTokenArgs.builder()
.description("string")
.expires(0)
.reason("string")
.build());
personal_token_resource = pulumiservice.api.tokens.PersonalToken("personalTokenResource",
description="string",
expires=0,
reason="string")
const personalTokenResource = new pulumiservice.api.tokens.PersonalToken("personalTokenResource", {
description: "string",
expires: 0,
reason: "string",
});
type: pulumiservice:api/tokens:PersonalToken
properties:
description: string
expires: 0
reason: string
PersonalToken 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 PersonalToken resource accepts the following input properties:
- Description string
- The description
- Expires int
- The expiration time
- Reason string
- Tracks the context that triggered token creation (e.g., redirect URL or referral source)
- Description string
- The description
- Expires int
- The expiration time
- Reason string
- Tracks the context that triggered token creation (e.g., redirect URL or referral source)
- description string
- The description
- expires number
- The expiration time
- reason string
- Tracks the context that triggered token creation (e.g., redirect URL or referral source)
- description String
- The description
- expires Integer
- The expiration time
- reason String
- Tracks the context that triggered token creation (e.g., redirect URL or referral source)
- description string
- The description
- expires number
- The expiration time
- reason string
- Tracks the context that triggered token creation (e.g., redirect URL or referral source)
- description str
- The description
- expires int
- The expiration time
- reason str
- Tracks the context that triggered token creation (e.g., redirect URL or referral source)
- description String
- The description
- expires Number
- The expiration time
- reason String
- Tracks the context that triggered token creation (e.g., redirect URL or referral source)
Outputs
All input properties are implicitly available as output properties. Additionally, the PersonalToken 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