@lbrlabs/pulumi-grafana
Version:
A Pulumi package for creating and managing grafana.
103 lines (102 loc) • 3.84 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages a single API key on the Grafana Cloud portal (on the organization level)
* * [API documentation](https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#api-keys)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as grafana from "@lbrlabs/pulumi-grafana";
*
* const test = new grafana.CloudApiKey("test", {
* cloudOrgSlug: "myorg",
* role: "Admin",
* });
* ```
*
* ## Import
*
* ```sh
* $ pulumi import grafana:index/cloudApiKey:CloudApiKey resource_name "{{org-name}}-{{api_key_name}}"
* ```
*/
export declare class CloudApiKey extends pulumi.CustomResource {
/**
* Get an existing CloudApiKey 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?: CloudApiKeyState, opts?: pulumi.CustomResourceOptions): CloudApiKey;
/**
* Returns true if the given object is an instance of CloudApiKey. 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 CloudApiKey;
/**
* The slug of the organization to create the API key in. This is the same slug as the organization name in the URL.
*/
readonly cloudOrgSlug: pulumi.Output<string>;
/**
* The generated API key.
*/
readonly key: pulumi.Output<string>;
/**
* Name of the API key.
*/
readonly name: pulumi.Output<string>;
/**
* Role of the API key. Should be one of [Viewer Editor Admin MetricsPublisher PluginPublisher]. See https://grafana.com/docs/grafana-cloud/api/#create-api-key for details.
*/
readonly role: pulumi.Output<string>;
/**
* Create a CloudApiKey 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: CloudApiKeyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering CloudApiKey resources.
*/
export interface CloudApiKeyState {
/**
* The slug of the organization to create the API key in. This is the same slug as the organization name in the URL.
*/
cloudOrgSlug?: pulumi.Input<string>;
/**
* The generated API key.
*/
key?: pulumi.Input<string>;
/**
* Name of the API key.
*/
name?: pulumi.Input<string>;
/**
* Role of the API key. Should be one of [Viewer Editor Admin MetricsPublisher PluginPublisher]. See https://grafana.com/docs/grafana-cloud/api/#create-api-key for details.
*/
role?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a CloudApiKey resource.
*/
export interface CloudApiKeyArgs {
/**
* The slug of the organization to create the API key in. This is the same slug as the organization name in the URL.
*/
cloudOrgSlug: pulumi.Input<string>;
/**
* Name of the API key.
*/
name?: pulumi.Input<string>;
/**
* Role of the API key. Should be one of [Viewer Editor Admin MetricsPublisher PluginPublisher]. See https://grafana.com/docs/grafana-cloud/api/#create-api-key for details.
*/
role: pulumi.Input<string>;
}