import * as pulumi from "@pulumi/pulumi"; /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vault from "@pulumi/vault"; * * const example = new vault.Token("example", { * roleName: "app", * policies: [ * "policy1", * "policy2", * ], * renewable: true, * ttl: "24h", * renewMinLease: 43200, * renewIncrement: 86400, * metadata: { * purpose: "service-account", * }, * }); * ``` * * ## Import * * Tokens can be imported using its `id` as accessor id, e.g. * * ```sh * $ pulumi import vault:index/token:Token example * ``` */ export declare class Token extends pulumi.CustomResource { /** * Get an existing Token resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: TokenState, opts?: pulumi.CustomResourceOptions): Token; /** * Returns true if the given object is an instance of Token. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Token; /** * String containing the client token if stored in present file */ readonly clientToken: pulumi.Output; /** * String containing the token display name */ readonly displayName: pulumi.Output; /** * The explicit max TTL of this token. This is specified as a numeric string with suffix like "30s" ro "5m" */ readonly explicitMaxTtl: pulumi.Output; /** * String containing the token lease duration if present in state file */ readonly leaseDuration: pulumi.Output; /** * String containing the token lease started time if present in state file */ readonly leaseStarted: pulumi.Output; /** * Metadata to be set on this token */ readonly metadata: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The namespace to provision the resource in. * The value should not contain leading or trailing forward slashes. * The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace). * *Available only for Vault Enterprise*. */ readonly namespace: pulumi.Output; /** * Flag to not attach the default policy to this token */ readonly noDefaultPolicy: pulumi.Output; /** * Flag to create a token without parent */ readonly noParent: pulumi.Output; /** * The number of allowed uses of this token */ readonly numUses: pulumi.Output; /** * The period of this token. This is specified as a numeric string with suffix like "30s" ro "5m" */ readonly period: pulumi.Output; /** * List of policies to attach to this token */ readonly policies: pulumi.Output; /** * The renew increment. This is specified in seconds */ readonly renewIncrement: pulumi.Output; /** * The minimal lease to renew this token */ readonly renewMinLease: pulumi.Output; /** * Flag to allow to renew this token */ readonly renewable: pulumi.Output; /** * The token role name */ readonly roleName: pulumi.Output; /** * The TTL period of this token. This is specified as a numeric string with suffix like "30s" ro "5m" */ readonly ttl: pulumi.Output; /** * The client wrapped token. */ readonly wrappedToken: pulumi.Output; /** * The client wrapping accessor. */ readonly wrappingAccessor: pulumi.Output; /** * The TTL period of the wrapped token. */ readonly wrappingTtl: pulumi.Output; /** * Create a Token resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: TokenArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Token resources. */ export interface TokenState { /** * String containing the client token if stored in present file */ clientToken?: pulumi.Input; /** * String containing the token display name */ displayName?: pulumi.Input; /** * The explicit max TTL of this token. This is specified as a numeric string with suffix like "30s" ro "5m" */ explicitMaxTtl?: pulumi.Input; /** * String containing the token lease duration if present in state file */ leaseDuration?: pulumi.Input; /** * String containing the token lease started time if present in state file */ leaseStarted?: pulumi.Input; /** * Metadata to be set on this token */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The namespace to provision the resource in. * The value should not contain leading or trailing forward slashes. * The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace). * *Available only for Vault Enterprise*. */ namespace?: pulumi.Input; /** * Flag to not attach the default policy to this token */ noDefaultPolicy?: pulumi.Input; /** * Flag to create a token without parent */ noParent?: pulumi.Input; /** * The number of allowed uses of this token */ numUses?: pulumi.Input; /** * The period of this token. This is specified as a numeric string with suffix like "30s" ro "5m" */ period?: pulumi.Input; /** * List of policies to attach to this token */ policies?: pulumi.Input[]>; /** * The renew increment. This is specified in seconds */ renewIncrement?: pulumi.Input; /** * The minimal lease to renew this token */ renewMinLease?: pulumi.Input; /** * Flag to allow to renew this token */ renewable?: pulumi.Input; /** * The token role name */ roleName?: pulumi.Input; /** * The TTL period of this token. This is specified as a numeric string with suffix like "30s" ro "5m" */ ttl?: pulumi.Input; /** * The client wrapped token. */ wrappedToken?: pulumi.Input; /** * The client wrapping accessor. */ wrappingAccessor?: pulumi.Input; /** * The TTL period of the wrapped token. */ wrappingTtl?: pulumi.Input; } /** * The set of arguments for constructing a Token resource. */ export interface TokenArgs { /** * String containing the token display name */ displayName?: pulumi.Input; /** * The explicit max TTL of this token. This is specified as a numeric string with suffix like "30s" ro "5m" */ explicitMaxTtl?: pulumi.Input; /** * Metadata to be set on this token */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The namespace to provision the resource in. * The value should not contain leading or trailing forward slashes. * The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace). * *Available only for Vault Enterprise*. */ namespace?: pulumi.Input; /** * Flag to not attach the default policy to this token */ noDefaultPolicy?: pulumi.Input; /** * Flag to create a token without parent */ noParent?: pulumi.Input; /** * The number of allowed uses of this token */ numUses?: pulumi.Input; /** * The period of this token. This is specified as a numeric string with suffix like "30s" ro "5m" */ period?: pulumi.Input; /** * List of policies to attach to this token */ policies?: pulumi.Input[]>; /** * The renew increment. This is specified in seconds */ renewIncrement?: pulumi.Input; /** * The minimal lease to renew this token */ renewMinLease?: pulumi.Input; /** * Flag to allow to renew this token */ renewable?: pulumi.Input; /** * The token role name */ roleName?: pulumi.Input; /** * The TTL period of this token. This is specified as a numeric string with suffix like "30s" ro "5m" */ ttl?: pulumi.Input; /** * The TTL period of the wrapped token. */ wrappingTtl?: pulumi.Input; }