UNPKG

@pulumiverse/grafana

Version:

A Pulumi package for creating and managing grafana.

129 lines (128 loc) 5.23 kB
import * as pulumi from "@pulumi/pulumi"; /** * **Note:** This resource is available only with Grafana 9.1+. * * * [Official documentation](https://grafana.com/docs/grafana/latest/administration/service-accounts/) * * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@pulumiverse/grafana"; * * const test = new grafana.oss.ServiceAccount("test", { * name: "test-service-account", * role: "Viewer", * }); * const foo = new grafana.oss.ServiceAccountToken("foo", { * name: "key_foo", * serviceAccountId: test.id, * }); * const bar = new grafana.oss.ServiceAccountToken("bar", { * name: "key_bar", * serviceAccountId: test.id, * secondsToLive: 30, * }); * export const serviceAccountTokenFooKeyOnly = foo.key; * export const serviceAccountTokenBar = bar; * ``` * * @deprecated grafana.index/serviceaccounttoken.ServiceAccountToken has been deprecated in favor of grafana.oss/serviceaccounttoken.ServiceAccountToken */ export declare class ServiceAccountToken extends pulumi.CustomResource { /** * Get an existing ServiceAccountToken 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?: ServiceAccountTokenState, opts?: pulumi.CustomResourceOptions): ServiceAccountToken; /** * Returns true if the given object is an instance of ServiceAccountToken. 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 ServiceAccountToken; /** * The expiration date of the service account token. */ readonly expiration: pulumi.Output<string>; /** * The status of the service account token. */ readonly hasExpired: pulumi.Output<boolean>; /** * The key of the service account token. */ readonly key: pulumi.Output<string>; /** * The name of the service account token. */ readonly name: pulumi.Output<string>; /** * The key expiration in seconds. It is optional. If it is a positive number an expiration date for the key is set. If it is null, zero or is omitted completely (unless `apiKeyMaxSecondsToLive` configuration option is set) the key will never expire. */ readonly secondsToLive: pulumi.Output<number | undefined>; /** * The ID of the service account to which the token belongs. */ readonly serviceAccountId: pulumi.Output<string>; /** * Create a ServiceAccountToken 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. */ /** @deprecated grafana.index/serviceaccounttoken.ServiceAccountToken has been deprecated in favor of grafana.oss/serviceaccounttoken.ServiceAccountToken */ constructor(name: string, args: ServiceAccountTokenArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ServiceAccountToken resources. */ export interface ServiceAccountTokenState { /** * The expiration date of the service account token. */ expiration?: pulumi.Input<string>; /** * The status of the service account token. */ hasExpired?: pulumi.Input<boolean>; /** * The key of the service account token. */ key?: pulumi.Input<string>; /** * The name of the service account token. */ name?: pulumi.Input<string>; /** * The key expiration in seconds. It is optional. If it is a positive number an expiration date for the key is set. If it is null, zero or is omitted completely (unless `apiKeyMaxSecondsToLive` configuration option is set) the key will never expire. */ secondsToLive?: pulumi.Input<number>; /** * The ID of the service account to which the token belongs. */ serviceAccountId?: pulumi.Input<string>; } /** * The set of arguments for constructing a ServiceAccountToken resource. */ export interface ServiceAccountTokenArgs { /** * The name of the service account token. */ name?: pulumi.Input<string>; /** * The key expiration in seconds. It is optional. If it is a positive number an expiration date for the key is set. If it is null, zero or is omitted completely (unless `apiKeyMaxSecondsToLive` configuration option is set) the key will never expire. */ secondsToLive?: pulumi.Input<number>; /** * The ID of the service account to which the token belongs. */ serviceAccountId: pulumi.Input<string>; }