@pulumiverse/grafana
Version:
A Pulumi package for creating and managing grafana.
152 lines (151 loc) • 5.6 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages a single permission item for a dashboard. Conflicts with the "grafana.oss.DashboardPermission" resource which manages the entire set of permissions for a dashboard.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as grafana from "@pulumiverse/grafana";
*
* const team = new grafana.oss.Team("team", {name: "Team Name"});
* const user = new grafana.oss.User("user", {
* email: "user.name@example.com",
* password: "my-password",
* login: "user.name",
* });
* const dashboard = new grafana.oss.Dashboard("dashboard", {configJson: JSON.stringify({
* title: "My Dashboard",
* uid: "my-dashboard-uid",
* })});
* const role = new grafana.oss.DashboardPermissionItem("role", {
* dashboardUid: dashboard.uid,
* role: "Viewer",
* permission: "View",
* });
* const userDashboardPermissionItem = new grafana.oss.DashboardPermissionItem("user", {
* dashboardUid: dashboard.uid,
* user: user.id,
* permission: "Admin",
* });
* const teamDashboardPermissionItem = new grafana.oss.DashboardPermissionItem("team", {
* dashboardUid: dashboard.uid,
* team: team.id,
* permission: "Edit",
* });
* ```
*
* ## Import
*
* ```sh
* terraform import grafana_dashboard_permission_item.name "{{ dashboardUID }}:{{ type (role, team, or user) }}:{{ identifier }}"
* terraform import grafana_dashboard_permission_item.name "{{ orgID }}:{{ dashboardUID }}:{{ type (role, team, or user) }}:{{ identifier }}"
* ```
*/
export declare class DashboardPermissionItem extends pulumi.CustomResource {
/**
* Get an existing DashboardPermissionItem 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?: DashboardPermissionItemState, opts?: pulumi.CustomResourceOptions): DashboardPermissionItem;
/**
* Returns true if the given object is an instance of DashboardPermissionItem. 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 DashboardPermissionItem;
/**
* The UID of the dashboard.
*/
readonly dashboardUid: pulumi.Output<string>;
/**
* The Organization ID. If not set, the default organization is used for basic authentication, or the one that owns your service account for token authentication.
*/
readonly orgId: pulumi.Output<string>;
/**
* the permission to be assigned
*/
readonly permission: pulumi.Output<string>;
/**
* the role onto which the permission is to be assigned
*/
readonly role: pulumi.Output<string | undefined>;
/**
* the team onto which the permission is to be assigned
*/
readonly team: pulumi.Output<string | undefined>;
/**
* the user or service account onto which the permission is to be assigned
*/
readonly user: pulumi.Output<string | undefined>;
/**
* Create a DashboardPermissionItem 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: DashboardPermissionItemArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering DashboardPermissionItem resources.
*/
export interface DashboardPermissionItemState {
/**
* The UID of the dashboard.
*/
dashboardUid?: pulumi.Input<string>;
/**
* The Organization ID. If not set, the default organization is used for basic authentication, or the one that owns your service account for token authentication.
*/
orgId?: pulumi.Input<string>;
/**
* the permission to be assigned
*/
permission?: pulumi.Input<string>;
/**
* the role onto which the permission is to be assigned
*/
role?: pulumi.Input<string>;
/**
* the team onto which the permission is to be assigned
*/
team?: pulumi.Input<string>;
/**
* the user or service account onto which the permission is to be assigned
*/
user?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a DashboardPermissionItem resource.
*/
export interface DashboardPermissionItemArgs {
/**
* The UID of the dashboard.
*/
dashboardUid: pulumi.Input<string>;
/**
* The Organization ID. If not set, the default organization is used for basic authentication, or the one that owns your service account for token authentication.
*/
orgId?: pulumi.Input<string>;
/**
* the permission to be assigned
*/
permission: pulumi.Input<string>;
/**
* the role onto which the permission is to be assigned
*/
role?: pulumi.Input<string>;
/**
* the team onto which the permission is to be assigned
*/
team?: pulumi.Input<string>;
/**
* the user or service account onto which the permission is to be assigned
*/
user?: pulumi.Input<string>;
}