import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; 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"; * * const superUser = new grafana.Role("superUser", { * description: "My Super User description", * global: true, * permissions: [ * { * action: "org.users:add", * scope: "users:*", * }, * { * action: "org.users:write", * scope: "users:*", * }, * { * action: "org.users:read", * scope: "users:*", * }, * ], * uid: "superuseruid", * version: 1, * }); * ``` * * ## Import * * ```sh * $ pulumi import grafana:index/role:Role role_name {{uid}} * ``` */ export declare class Role extends pulumi.CustomResource { /** * Get an existing Role 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, state?: RoleState, opts?: pulumi.CustomResourceOptions): Role; /** * Returns true if the given object is an instance of Role. 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 Role; /** * Whether the role version should be incremented automatically on updates (and set to 1 on creation). This field or `version` should be set. */ readonly autoIncrementVersion: pulumi.Output; /** * Description of the role. */ readonly description: pulumi.Output; /** * Display name of the role. Available with Grafana 8.5+. */ readonly displayName: pulumi.Output; /** * Boolean to state whether the role is available across all organizations or not. Defaults to `false`. */ readonly global: pulumi.Output; /** * Group of the role. Available with Grafana 8.5+. */ readonly group: pulumi.Output; /** * Boolean to state whether the role should be visible in the Grafana UI or not. Available with Grafana 8.5+. Defaults to `false`. */ readonly hidden: pulumi.Output; /** * Name of the role */ readonly name: pulumi.Output; /** * The Organization ID. If not set, the Org ID defined in the provider block will be used. */ readonly orgId: pulumi.Output; /** * Specific set of actions granted by the role. */ readonly permissions: pulumi.Output; /** * Unique identifier of the role. Used for assignments. */ readonly uid: pulumi.Output; /** * Version of the role. A role is updated only on version increase. This field or `autoIncrementVersion` should be set. */ readonly version: pulumi.Output; /** * Create a Role 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?: RoleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Role resources. */ export interface RoleState { /** * Whether the role version should be incremented automatically on updates (and set to 1 on creation). This field or `version` should be set. */ autoIncrementVersion?: pulumi.Input; /** * Description of the role. */ description?: pulumi.Input; /** * Display name of the role. Available with Grafana 8.5+. */ displayName?: pulumi.Input; /** * Boolean to state whether the role is available across all organizations or not. Defaults to `false`. */ global?: pulumi.Input; /** * Group of the role. Available with Grafana 8.5+. */ group?: pulumi.Input; /** * Boolean to state whether the role should be visible in the Grafana UI or not. Available with Grafana 8.5+. Defaults to `false`. */ hidden?: pulumi.Input; /** * Name of the role */ name?: pulumi.Input; /** * The Organization ID. If not set, the Org ID defined in the provider block will be used. */ orgId?: pulumi.Input; /** * Specific set of actions granted by the role. */ permissions?: pulumi.Input[]>; /** * Unique identifier of the role. Used for assignments. */ uid?: pulumi.Input; /** * Version of the role. A role is updated only on version increase. This field or `autoIncrementVersion` should be set. */ version?: pulumi.Input; } /** * The set of arguments for constructing a Role resource. */ export interface RoleArgs { /** * Whether the role version should be incremented automatically on updates (and set to 1 on creation). This field or `version` should be set. */ autoIncrementVersion?: pulumi.Input; /** * Description of the role. */ description?: pulumi.Input; /** * Display name of the role. Available with Grafana 8.5+. */ displayName?: pulumi.Input; /** * Boolean to state whether the role is available across all organizations or not. Defaults to `false`. */ global?: pulumi.Input; /** * Group of the role. Available with Grafana 8.5+. */ group?: pulumi.Input; /** * Boolean to state whether the role should be visible in the Grafana UI or not. Available with Grafana 8.5+. Defaults to `false`. */ hidden?: pulumi.Input; /** * Name of the role */ name?: pulumi.Input; /** * The Organization ID. If not set, the Org ID defined in the provider block will be used. */ orgId?: pulumi.Input; /** * Specific set of actions granted by the role. */ permissions?: pulumi.Input[]>; /** * Unique identifier of the role. Used for assignments. */ uid?: pulumi.Input; /** * Version of the role. A role is updated only on version increase. This field or `autoIncrementVersion` should be set. */ version?: pulumi.Input; }