@muhlba91/pulumi-proxmoxve
Version:
A Pulumi package for creating and managing Proxmox Virtual Environment cloud resources.
140 lines (139 loc) • 4.44 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* User API tokens.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as proxmoxve from "@muhlba91/pulumi-proxmoxve";
*
* // if creating a user token, the user must be created first
* const user = new proxmoxve.permission.User("user", {
* comment: "Managed by Pulumi",
* email: "user@pve",
* enabled: true,
* expirationDate: "2034-01-01T22:00:00Z",
* userId: "user@pve",
* });
* const userToken = new proxmoxve.user.Token("userToken", {
* comment: "Managed by Pulumi",
* expirationDate: "2033-01-01T22:00:00Z",
* tokenName: "tk1",
* userId: user.userId,
* });
* ```
*
* ## Import
*
* #!/usr/bin/env sh
*
* #Tokens can be imported using they identifiers in format `user_id!token_name` format, e.g.:
*
* ```sh
* $ pulumi import proxmoxve:User/token:Token token1 user@pve!token1
* ```
*/
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<pulumi.ID>, 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;
/**
* Comment for the token.
*/
readonly comment: pulumi.Output<string | undefined>;
/**
* Expiration date for the token.
*/
readonly expirationDate: pulumi.Output<string | undefined>;
/**
* Restrict API token privileges with separate ACLs (default), or give full privileges of corresponding user.
*/
readonly privilegesSeparation: pulumi.Output<boolean>;
/**
* User-specific token identifier.
*/
readonly tokenName: pulumi.Output<string>;
/**
* User identifier.
*/
readonly userId: pulumi.Output<string>;
/**
* API token value used for authentication. It is populated only when creating a new token, and can't be retrieved at import.
*/
readonly value: pulumi.Output<string>;
/**
* 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 {
/**
* Comment for the token.
*/
comment?: pulumi.Input<string>;
/**
* Expiration date for the token.
*/
expirationDate?: pulumi.Input<string>;
/**
* Restrict API token privileges with separate ACLs (default), or give full privileges of corresponding user.
*/
privilegesSeparation?: pulumi.Input<boolean>;
/**
* User-specific token identifier.
*/
tokenName?: pulumi.Input<string>;
/**
* User identifier.
*/
userId?: pulumi.Input<string>;
/**
* API token value used for authentication. It is populated only when creating a new token, and can't be retrieved at import.
*/
value?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Token resource.
*/
export interface TokenArgs {
/**
* Comment for the token.
*/
comment?: pulumi.Input<string>;
/**
* Expiration date for the token.
*/
expirationDate?: pulumi.Input<string>;
/**
* Restrict API token privileges with separate ACLs (default), or give full privileges of corresponding user.
*/
privilegesSeparation?: pulumi.Input<boolean>;
/**
* User-specific token identifier.
*/
tokenName: pulumi.Input<string>;
/**
* User identifier.
*/
userId: pulumi.Input<string>;
}