UNPKG

@lbrlabs/pulumi-grafana

Version:

A Pulumi package for creating and managing grafana.

148 lines (147 loc) 4.17 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "./types/output"; /** * **Note:** This resource is available only with Grafana Enterprise 8.+. * * * [Official documentation](https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/) * * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/access_control/) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@lbrlabs/pulumi-grafana"; * import * as grafana from "@pulumi/grafana"; * * const test = new grafana.Role("test", { * description: "test-role description", * uid: "test-ds-role-uid", * version: 1, * global: true, * permissions: [ * { * action: "org.users:add", * scope: "users:*", * }, * { * action: "org.users:write", * scope: "users:*", * }, * { * action: "org.users:read", * scope: "users:*", * }, * ], * }); * const fromName = grafana.getRoleOutput({ * name: test.name, * }); * ``` */ export declare function getRole(args: GetRoleArgs, opts?: pulumi.InvokeOptions): Promise<GetRoleResult>; /** * A collection of arguments for invoking getRole. */ export interface GetRoleArgs { /** * Name of the role */ name: string; } /** * A collection of values returned by getRole. */ export interface GetRoleResult { /** * Description of the role. */ readonly description: string; /** * Display name of the role. Available with Grafana 8.5+. */ readonly displayName: string; /** * Boolean to state whether the role is available across all organizations or not. */ readonly global: boolean; /** * Group of the role. Available with Grafana 8.5+. */ readonly group: string; /** * Boolean to state whether the role should be visible in the Grafana UI or not. Available with Grafana 8.5+. */ readonly hidden: boolean; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * Name of the role */ readonly name: string; /** * The Organization ID. If not set, the Org ID defined in the provider block will be used. */ readonly orgId: string; /** * Specific set of actions granted by the role. */ readonly permissions: outputs.GetRolePermission[]; /** * Unique identifier of the role. Used for assignments. */ readonly uid: string; /** * Version of the role. A role is updated only on version increase. This field or `autoIncrementVersion` should be set. */ readonly version: number; } /** * **Note:** This resource is available only with Grafana Enterprise 8.+. * * * [Official documentation](https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/) * * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/access_control/) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@lbrlabs/pulumi-grafana"; * import * as grafana from "@pulumi/grafana"; * * const test = new grafana.Role("test", { * description: "test-role description", * uid: "test-ds-role-uid", * version: 1, * global: true, * permissions: [ * { * action: "org.users:add", * scope: "users:*", * }, * { * action: "org.users:write", * scope: "users:*", * }, * { * action: "org.users:read", * scope: "users:*", * }, * ], * }); * const fromName = grafana.getRoleOutput({ * name: test.name, * }); * ``` */ export declare function getRoleOutput(args: GetRoleOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetRoleResult>; /** * A collection of arguments for invoking getRole. */ export interface GetRoleOutputArgs { /** * Name of the role */ name: pulumi.Input<string>; }