@lbrlabs/pulumi-grafana
Version:
A Pulumi package for creating and managing grafana.
107 lines (106 loc) • 4.06 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* * [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 "@lbrlabs/pulumi-grafana";
*
* const team = new grafana.Team("team", {});
* const user = new grafana.User("user", {email: "user.name@example.com"});
* const collection = new grafana.Folder("collection", {title: "Folder Title"});
* const collectionPermission = new grafana.FolderPermission("collectionPermission", {
* folderUid: collection.uid,
* permissions: [
* {
* role: "Editor",
* permission: "Edit",
* },
* {
* teamId: team.id,
* permission: "View",
* },
* {
* userId: user.id,
* permission: "Admin",
* },
* ],
* });
* ```
*/
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<pulumi.ID>, 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<string>;
/**
* The Organization ID. If not set, the Org ID defined in the provider block will be used.
*/
readonly orgId: pulumi.Output<string | undefined>;
/**
* The permission items to add/update. Items that are omitted from the list will be removed.
*/
readonly permissions: pulumi.Output<outputs.FolderPermissionPermission[]>;
/**
* 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.
*/
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<string>;
/**
* The Organization ID. If not set, the Org ID defined in the provider block will be used.
*/
orgId?: pulumi.Input<string>;
/**
* The permission items to add/update. Items that are omitted from the list will be removed.
*/
permissions?: pulumi.Input<pulumi.Input<inputs.FolderPermissionPermission>[]>;
}
/**
* The set of arguments for constructing a FolderPermission resource.
*/
export interface FolderPermissionArgs {
/**
* The UID of the folder.
*/
folderUid: pulumi.Input<string>;
/**
* The Organization ID. If not set, the Org ID defined in the provider block will be used.
*/
orgId?: pulumi.Input<string>;
/**
* The permission items to add/update. Items that are omitted from the list will be removed.
*/
permissions: pulumi.Input<pulumi.Input<inputs.FolderPermissionPermission>[]>;
}