zitadel.PersonalAccessToken
Explore with Pulumi AI
Resource representing a personal access token of a user
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Zitadel = Pulumiverse.Zitadel;
return await Deployment.RunAsync(() =>
{
var @default = new Zitadel.PersonalAccessToken("default", new()
{
OrgId = defaultZitadelOrg.Id,
UserId = defaultZitadelMachineUser.Id,
ExpirationDate = "2519-04-01T08:45:00Z",
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-zitadel/sdk/go/zitadel"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := zitadel.NewPersonalAccessToken(ctx, "default", &zitadel.PersonalAccessTokenArgs{
OrgId: pulumi.Any(defaultZitadelOrg.Id),
UserId: pulumi.Any(defaultZitadelMachineUser.Id),
ExpirationDate: pulumi.String("2519-04-01T08:45:00Z"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zitadel.PersonalAccessToken;
import com.pulumi.zitadel.PersonalAccessTokenArgs;
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) {
var default_ = new PersonalAccessToken("default", PersonalAccessTokenArgs.builder()
.orgId(defaultZitadelOrg.id())
.userId(defaultZitadelMachineUser.id())
.expirationDate("2519-04-01T08:45:00Z")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as zitadel from "@pulumiverse/zitadel";
const _default = new zitadel.PersonalAccessToken("default", {
orgId: defaultZitadelOrg.id,
userId: defaultZitadelMachineUser.id,
expirationDate: "2519-04-01T08:45:00Z",
});
import pulumi
import pulumiverse_zitadel as zitadel
default = zitadel.PersonalAccessToken("default",
org_id=default_zitadel_org["id"],
user_id=default_zitadel_machine_user["id"],
expiration_date="2519-04-01T08:45:00Z")
resources:
default:
type: zitadel:PersonalAccessToken
properties:
orgId: ${defaultZitadelOrg.id}
userId: ${defaultZitadelMachineUser.id}
expirationDate: 2519-04-01T08:45:00Z
Create PersonalAccessToken Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PersonalAccessToken(name: string, args: PersonalAccessTokenArgs, opts?: CustomResourceOptions);
@overload
def PersonalAccessToken(resource_name: str,
args: PersonalAccessTokenArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PersonalAccessToken(resource_name: str,
opts: Optional[ResourceOptions] = None,
user_id: Optional[str] = None,
expiration_date: Optional[str] = None,
org_id: Optional[str] = None)
func NewPersonalAccessToken(ctx *Context, name string, args PersonalAccessTokenArgs, opts ...ResourceOption) (*PersonalAccessToken, error)
public PersonalAccessToken(string name, PersonalAccessTokenArgs args, CustomResourceOptions? opts = null)
public PersonalAccessToken(String name, PersonalAccessTokenArgs args)
public PersonalAccessToken(String name, PersonalAccessTokenArgs args, CustomResourceOptions options)
type: zitadel:PersonalAccessToken
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name
This property is required. string - The unique name of the resource.
- args
This property is required. PersonalAccessTokenArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. PersonalAccessTokenArgs - The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. PersonalAccessTokenArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. PersonalAccessTokenArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. PersonalAccessTokenArgs - 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 personalAccessTokenResource = new Zitadel.PersonalAccessToken("personalAccessTokenResource", new()
{
UserId = "string",
ExpirationDate = "string",
OrgId = "string",
});
example, err := zitadel.NewPersonalAccessToken(ctx, "personalAccessTokenResource", &zitadel.PersonalAccessTokenArgs{
UserId: pulumi.String("string"),
ExpirationDate: pulumi.String("string"),
OrgId: pulumi.String("string"),
})
var personalAccessTokenResource = new PersonalAccessToken("personalAccessTokenResource", PersonalAccessTokenArgs.builder()
.userId("string")
.expirationDate("string")
.orgId("string")
.build());
personal_access_token_resource = zitadel.PersonalAccessToken("personalAccessTokenResource",
user_id="string",
expiration_date="string",
org_id="string")
const personalAccessTokenResource = new zitadel.PersonalAccessToken("personalAccessTokenResource", {
userId: "string",
expirationDate: "string",
orgId: "string",
});
type: zitadel:PersonalAccessToken
properties:
expirationDate: string
orgId: string
userId: string
PersonalAccessToken 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 PersonalAccessToken resource accepts the following input properties:
- User
Id This property is required. Changes to this property will trigger replacement.
- ID of the user
- Expiration
Date Changes to this property will trigger replacement.
- Expiration date of the token in the RFC3339 format
- Org
Id Changes to this property will trigger replacement.
- ID of the organization
- User
Id This property is required. Changes to this property will trigger replacement.
- ID of the user
- Expiration
Date Changes to this property will trigger replacement.
- Expiration date of the token in the RFC3339 format
- Org
Id Changes to this property will trigger replacement.
- ID of the organization
- user
Id This property is required. Changes to this property will trigger replacement.
- ID of the user
- expiration
Date Changes to this property will trigger replacement.
- Expiration date of the token in the RFC3339 format
- org
Id Changes to this property will trigger replacement.
- ID of the organization
- user
Id This property is required. Changes to this property will trigger replacement.
- ID of the user
- expiration
Date Changes to this property will trigger replacement.
- Expiration date of the token in the RFC3339 format
- org
Id Changes to this property will trigger replacement.
- ID of the organization
- user_
id This property is required. Changes to this property will trigger replacement.
- ID of the user
- expiration_
date Changes to this property will trigger replacement.
- Expiration date of the token in the RFC3339 format
- org_
id Changes to this property will trigger replacement.
- ID of the organization
- user
Id This property is required. Changes to this property will trigger replacement.
- ID of the user
- expiration
Date Changes to this property will trigger replacement.
- Expiration date of the token in the RFC3339 format
- org
Id Changes to this property will trigger replacement.
- ID of the organization
Outputs
All input properties are implicitly available as output properties. Additionally, the PersonalAccessToken resource produces the following output properties:
Look up Existing PersonalAccessToken Resource
Get an existing PersonalAccessToken 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?: PersonalAccessTokenState, opts?: CustomResourceOptions): PersonalAccessToken
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
expiration_date: Optional[str] = None,
org_id: Optional[str] = None,
token: Optional[str] = None,
user_id: Optional[str] = None) -> PersonalAccessToken
func GetPersonalAccessToken(ctx *Context, name string, id IDInput, state *PersonalAccessTokenState, opts ...ResourceOption) (*PersonalAccessToken, error)
public static PersonalAccessToken Get(string name, Input<string> id, PersonalAccessTokenState? state, CustomResourceOptions? opts = null)
public static PersonalAccessToken get(String name, Output<String> id, PersonalAccessTokenState state, CustomResourceOptions options)
resources: _: type: zitadel:PersonalAccessToken get: id: ${id}
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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.
- Expiration
Date Changes to this property will trigger replacement.
- Expiration date of the token in the RFC3339 format
- Org
Id Changes to this property will trigger replacement.
- ID of the organization
- Token string
- Value of the token
- User
Id Changes to this property will trigger replacement.
- ID of the user
- Expiration
Date Changes to this property will trigger replacement.
- Expiration date of the token in the RFC3339 format
- Org
Id Changes to this property will trigger replacement.
- ID of the organization
- Token string
- Value of the token
- User
Id Changes to this property will trigger replacement.
- ID of the user
- expiration
Date Changes to this property will trigger replacement.
- Expiration date of the token in the RFC3339 format
- org
Id Changes to this property will trigger replacement.
- ID of the organization
- token String
- Value of the token
- user
Id Changes to this property will trigger replacement.
- ID of the user
- expiration
Date Changes to this property will trigger replacement.
- Expiration date of the token in the RFC3339 format
- org
Id Changes to this property will trigger replacement.
- ID of the organization
- token string
- Value of the token
- user
Id Changes to this property will trigger replacement.
- ID of the user
- expiration_
date Changes to this property will trigger replacement.
- Expiration date of the token in the RFC3339 format
- org_
id Changes to this property will trigger replacement.
- ID of the organization
- token str
- Value of the token
- user_
id Changes to this property will trigger replacement.
- ID of the user
- expiration
Date Changes to this property will trigger replacement.
- Expiration date of the token in the RFC3339 format
- org
Id Changes to this property will trigger replacement.
- ID of the organization
- token String
- Value of the token
- user
Id Changes to this property will trigger replacement.
- ID of the user
Import
bash The resource can be imported using the ID format <id:user_id[:org_id][:token]>
, e.g.
$ pulumi import zitadel:index/personalAccessToken:PersonalAccessToken imported '123456789012345678:123456789012345678:123456789012345678:LHt79...'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- zitadel pulumiverse/pulumi-zitadel
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
zitadel
Terraform Provider.