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 datasource. Permissions that aren't specified when applying this resource will be removed.
 * * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/datasource_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 foo = new grafana.oss.DataSource("foo", {
 *     type: "cloudwatch",
 *     name: "cw-example",
 *     jsonDataEncoded: JSON.stringify({
 *         defaultRegion: "us-east-1",
 *         authType: "keys",
 *     }),
 *     secureJsonDataEncoded: JSON.stringify({
 *         accessKey: "123",
 *         secretKey: "456",
 *     }),
 * });
 * const user = new grafana.oss.User("user", {
 *     name: "test-ds-permissions",
 *     email: "test-ds-permissions@example.com",
 *     login: "test-ds-permissions",
 *     password: "hunter2",
 * });
 * const sa = new grafana.oss.ServiceAccount("sa", {
 *     name: "test-ds-permissions",
 *     role: "Viewer",
 * });
 * const fooPermissions = new grafana.enterprise.DataSourcePermission("fooPermissions", {
 *     datasourceUid: foo.uid,
 *     permissions: [
 *         {
 *             teamId: team.id,
 *             permission: "Edit",
 *         },
 *         {
 *             userId: user.id,
 *             permission: "Edit",
 *         },
 *         {
 *             builtInRole: "Viewer",
 *             permission: "Query",
 *         },
 *         {
 *             userId: sa.id,
 *             permission: "Query",
 *         },
 *     ],
 * });
 * ```
 *
 * ## Import
 *
 * ```sh
 * $ pulumi import grafana:index/dataSourcePermission:DataSourcePermission name "{{ datasourceID }}"
 * ```
 *
 * ```sh
 * $ pulumi import grafana:index/dataSourcePermission:DataSourcePermission name "{{ orgID }}:{{ datasourceID }}"
 * ```
 *
 * @deprecated grafana.index/datasourcepermission.DataSourcePermission has been deprecated in favor of grafana.enterprise/datasourcepermission.DataSourcePermission
 */
export declare class DataSourcePermission extends pulumi.CustomResource {
    /**
     * Get an existing DataSourcePermission 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?: DataSourcePermissionState, opts?: pulumi.CustomResourceOptions): DataSourcePermission;
    /**
     * Returns true if the given object is an instance of DataSourcePermission.  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 DataSourcePermission;
    /**
     * UID of the datasource to apply permissions to.
     */
    readonly datasourceUid: 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.DataSourcePermissionPermission[] | undefined>;
    /**
     * Create a DataSourcePermission 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/datasourcepermission.DataSourcePermission has been deprecated in favor of grafana.enterprise/datasourcepermission.DataSourcePermission */
    constructor(name: string, args: DataSourcePermissionArgs, opts?: pulumi.CustomResourceOptions);
}
/**
 * Input properties used for looking up and filtering DataSourcePermission resources.
 */
export interface DataSourcePermissionState {
    /**
     * UID of the datasource to apply permissions to.
     */
    datasourceUid?: 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.DataSourcePermissionPermission>[]>;
}
/**
 * The set of arguments for constructing a DataSourcePermission resource.
 */
export interface DataSourcePermissionArgs {
    /**
     * UID of the datasource to apply permissions to.
     */
    datasourceUid: 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.DataSourcePermissionPermission>[]>;
}
