import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Manages the entire set of permissions for a folder. Permissions that aren't specified when applying this resource will be removed. * * [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/folder_permissions/) * * ## 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", * login: "user.name", * password: "my-password", * }); * const collection = new grafana.oss.Folder("collection", {title: "Folder Title"}); * const collectionPermission = new grafana.oss.FolderPermission("collectionPermission", { * folderUid: collection.uid, * permissions: [ * { * role: "Editor", * permission: "Edit", * }, * { * teamId: team.id, * permission: "View", * }, * { * userId: user.id, * permission: "Admin", * }, * ], * }); * ``` * * ## Import * * ```sh * $ pulumi import grafana:index/folderPermission:FolderPermission name "{{ folderUID }}" * ``` * * ```sh * $ pulumi import grafana:index/folderPermission:FolderPermission name "{{ orgID }}:{{ folderUID }}" * ``` * * @deprecated grafana.index/folderpermission.FolderPermission has been deprecated in favor of grafana.oss/folderpermission.FolderPermission */ export declare class FolderPermission extends pulumi.CustomResource { /** * Get an existing FolderPermission 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?: FolderPermissionState, opts?: pulumi.CustomResourceOptions): FolderPermission; /** * Returns true if the given object is an instance of FolderPermission. 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 FolderPermission; /** * The UID of the folder. */ readonly folderUid: pulumi.Output; /** * The Organization ID. If not set, the Org ID defined in the provider block will be used. */ readonly orgId: pulumi.Output; /** * The permission items to add/update. Items that are omitted from the list will be removed. */ readonly permissions: pulumi.Output; /** * Create a FolderPermission 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/folderpermission.FolderPermission has been deprecated in favor of grafana.oss/folderpermission.FolderPermission */ constructor(name: string, args: FolderPermissionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering FolderPermission resources. */ export interface FolderPermissionState { /** * The UID of the folder. */ folderUid?: pulumi.Input; /** * The Organization ID. If not set, the Org ID defined in the provider block will be used. */ orgId?: pulumi.Input; /** * The permission items to add/update. Items that are omitted from the list will be removed. */ permissions?: pulumi.Input[]>; } /** * The set of arguments for constructing a FolderPermission resource. */ export interface FolderPermissionArgs { /** * The UID of the folder. */ folderUid: pulumi.Input; /** * The Organization ID. If not set, the Org ID defined in the provider block will be used. */ orgId?: pulumi.Input; /** * The permission items to add/update. Items that are omitted from the list will be removed. */ permissions?: pulumi.Input[]>; }