@pulumiverse/dynatrace
Version:
A Pulumi package for creating and managing Dynatrace cloud resources.
84 lines (83 loc) • 2.67 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* The API token data source allows a single access token to be retrieved by its name, note the token value is not included in the response.
*
* If multiple tokens match the given name, the first result will be retrieved. To retrieve multiple tokens of the same name, please utilize the `dynatrace.getApiTokens` data source.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as dynatrace from "@pulumi/dynatrace";
*
* const exampleApiToken = dynatrace.getApiToken({
* name: "Terraform",
* });
* export const example = exampleApiToken;
* ```
*/
export declare function getApiToken(args: GetApiTokenArgs, opts?: pulumi.InvokeOptions): Promise<GetApiTokenResult>;
/**
* A collection of arguments for invoking getApiToken.
*/
export interface GetApiTokenArgs {
name: string;
}
/**
* A collection of values returned by getApiToken.
*/
export interface GetApiTokenResult {
/**
* Token creation date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
*/
readonly creationDate: string;
/**
* The token is enabled (true) or disabled (false), default disabled (false).
*/
readonly enabled: boolean;
/**
* The expiration date of the token.
*/
readonly expirationDate: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly name: string;
/**
* The owner of the token
*/
readonly owner: string;
/**
* The token is a personal access token (true) or an API token (false).
*/
readonly personalAccessToken: boolean;
/**
* A list of the scopes to be assigned to the token.
*/
readonly scopes: string[];
}
/**
* The API token data source allows a single access token to be retrieved by its name, note the token value is not included in the response.
*
* If multiple tokens match the given name, the first result will be retrieved. To retrieve multiple tokens of the same name, please utilize the `dynatrace.getApiTokens` data source.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as dynatrace from "@pulumi/dynatrace";
*
* const exampleApiToken = dynatrace.getApiToken({
* name: "Terraform",
* });
* export const example = exampleApiToken;
* ```
*/
export declare function getApiTokenOutput(args: GetApiTokenOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetApiTokenResult>;
/**
* A collection of arguments for invoking getApiToken.
*/
export interface GetApiTokenOutputArgs {
name: pulumi.Input<string>;
}