@lbrlabs/pulumi-harness
Version:
A Pulumi package for creating and managing Harness resources.
288 lines (287 loc) • 7.95 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Resource for creating tokens.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as harness from "@lbrlabs/pulumi-harness";
*
* // Create token for project level apikey
* const test = new harness.platform.Token("test", {
* accountId: "account_id",
* apikeyId: "apikey_id",
* apikeyType: "USER",
* identifier: "test_token",
* orgId: "org_id",
* parentId: "apikey_parent_id",
* projectId: "project_id",
* });
* ```
*
* ## Import
*
* Import account level token
*
* ```sh
* $ pulumi import harness:platform/token:Token harness_platform_token <parent_id>/<apikey_id>/<apikey_type>/<token_id>
* ```
*
* Import org level token
*
* ```sh
* $ pulumi import harness:platform/token:Token harness_platform_token <org_id>/<parent_id>/<apikey_id>/<apikey_type>/<token_id>
* ```
*
* Import project level token
*
* ```sh
* $ pulumi import harness:platform/token:Token harness_platform_token <org_id>/<project_id>/<parent_id>/<apikey_id>/<apikey_type>/<token_id>
* ```
*/
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;
/**
* Account Identifier for the Entity
*/
readonly accountId: pulumi.Output<string>;
/**
* Identifier of the API Key
*/
readonly apikeyId: pulumi.Output<string>;
/**
* Type of the API Key
*/
readonly apikeyType: pulumi.Output<string>;
/**
* Description of the Token
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Email Id of the user who created the Token
*/
readonly email: pulumi.Output<string | undefined>;
/**
* Encoded password of the Token
*/
readonly encodedPassword: pulumi.Output<string | undefined>;
/**
* Identifier of the Token
*/
readonly identifier: pulumi.Output<string>;
/**
* Name of the Token
*/
readonly name: pulumi.Output<string>;
/**
* Organization Identifier for the Entity
*/
readonly orgId: pulumi.Output<string | undefined>;
/**
* Parent Entity Identifier of the API Key
*/
readonly parentId: pulumi.Output<string>;
/**
* Project Identifier for the Entity
*/
readonly projectId: pulumi.Output<string | undefined>;
/**
* Scheduled expiry time in milliseconds
*/
readonly scheduledExpireTime: pulumi.Output<number>;
/**
* Tags for the Token
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Name of the user who created the Token
*/
readonly username: pulumi.Output<string | undefined>;
/**
* Boolean value to indicate if Token is valid or not.
*/
readonly valid: pulumi.Output<boolean>;
/**
* This is the time from which the Token is valid. The time is in milliseconds
*/
readonly validFrom: pulumi.Output<number>;
/**
* This is the time till which the Token is valid. The time is in milliseconds
*/
readonly validTo: pulumi.Output<number>;
/**
* 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 {
/**
* Account Identifier for the Entity
*/
accountId?: pulumi.Input<string>;
/**
* Identifier of the API Key
*/
apikeyId?: pulumi.Input<string>;
/**
* Type of the API Key
*/
apikeyType?: pulumi.Input<string>;
/**
* Description of the Token
*/
description?: pulumi.Input<string>;
/**
* Email Id of the user who created the Token
*/
email?: pulumi.Input<string>;
/**
* Encoded password of the Token
*/
encodedPassword?: pulumi.Input<string>;
/**
* Identifier of the Token
*/
identifier?: pulumi.Input<string>;
/**
* Name of the Token
*/
name?: pulumi.Input<string>;
/**
* Organization Identifier for the Entity
*/
orgId?: pulumi.Input<string>;
/**
* Parent Entity Identifier of the API Key
*/
parentId?: pulumi.Input<string>;
/**
* Project Identifier for the Entity
*/
projectId?: pulumi.Input<string>;
/**
* Scheduled expiry time in milliseconds
*/
scheduledExpireTime?: pulumi.Input<number>;
/**
* Tags for the Token
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Name of the user who created the Token
*/
username?: pulumi.Input<string>;
/**
* Boolean value to indicate if Token is valid or not.
*/
valid?: pulumi.Input<boolean>;
/**
* This is the time from which the Token is valid. The time is in milliseconds
*/
validFrom?: pulumi.Input<number>;
/**
* This is the time till which the Token is valid. The time is in milliseconds
*/
validTo?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a Token resource.
*/
export interface TokenArgs {
/**
* Account Identifier for the Entity
*/
accountId: pulumi.Input<string>;
/**
* Identifier of the API Key
*/
apikeyId: pulumi.Input<string>;
/**
* Type of the API Key
*/
apikeyType: pulumi.Input<string>;
/**
* Description of the Token
*/
description?: pulumi.Input<string>;
/**
* Email Id of the user who created the Token
*/
email?: pulumi.Input<string>;
/**
* Encoded password of the Token
*/
encodedPassword?: pulumi.Input<string>;
/**
* Identifier of the Token
*/
identifier: pulumi.Input<string>;
/**
* Name of the Token
*/
name?: pulumi.Input<string>;
/**
* Organization Identifier for the Entity
*/
orgId?: pulumi.Input<string>;
/**
* Parent Entity Identifier of the API Key
*/
parentId: pulumi.Input<string>;
/**
* Project Identifier for the Entity
*/
projectId?: pulumi.Input<string>;
/**
* Scheduled expiry time in milliseconds
*/
scheduledExpireTime?: pulumi.Input<number>;
/**
* Tags for the Token
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Name of the user who created the Token
*/
username?: pulumi.Input<string>;
/**
* Boolean value to indicate if Token is valid or not.
*/
valid?: pulumi.Input<boolean>;
/**
* This is the time from which the Token is valid. The time is in milliseconds
*/
validFrom?: pulumi.Input<number>;
/**
* This is the time till which the Token is valid. The time is in milliseconds
*/
validTo?: pulumi.Input<number>;
}