import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * The `vsphere.EntityPermissions` resource can be used to create and manage * entity permissions. Permissions can be created on an entity for a given user or * group with the specified role. * * ## Example Usage * * This example creates entity permissions on the virtual machine VM1 for the user * group DCClients with role Datastore consumer and for user group ExternalIDPUsers * with role my_terraform_role. The `entityId` can be the managed object id (or * uuid for some resources). The `entityType` is one of the managed object types * which can be found from the managed object types section * [here](https://developer.broadcom.com/xapis/vsphere-web-services-api/latest/). * Keep the permissions sorted alphabetically, ignoring case on `userOrGroup` for * a better user experience. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const datacenter = vsphere.getDatacenter({ * name: "Sample_DC_2", * }); * const vm = datacenter.then(datacenter => vsphere.getVirtualMachine({ * name: "VM1", * datacenterId: datacenter.id, * })); * const role1 = vsphere.getRole({ * label: "Datastore consumer (sample)", * }); * const role2 = new vsphere.Role("role2", { * name: "my_terraform_role", * rolePrivileges: [ * "Alarm.Acknowledge", * "Alarm.Create", * "Datacenter.Move", * ], * }); * const p1 = new vsphere.EntityPermissions("p1", { * entityId: vm.then(vm => vm.id), * entityType: "VirtualMachine", * permissions: [ * { * userOrGroup: "vsphere.local\\DCClients", * propagate: true, * isGroup: true, * roleId: role1.then(role1 => role1.id), * }, * { * userOrGroup: "vsphere.local\\ExternalIDPUsers", * propagate: true, * isGroup: true, * roleId: role2.id, * }, * ], * }); * ``` */ export declare class EntityPermissions extends pulumi.CustomResource { /** * Get an existing EntityPermissions 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?: EntityPermissionsState, opts?: pulumi.CustomResourceOptions): EntityPermissions; /** * Returns true if the given object is an instance of EntityPermissions. 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 EntityPermissions; /** * The managed object id (uuid for some entities) on * which permissions are to be created. */ readonly entityId: pulumi.Output; /** * The managed object type, types can be found in the * managed object type section * [here](https://developer.broadcom.com/xapis/vsphere-web-services-api/latest/). */ readonly entityType: pulumi.Output; /** * The permissions to be given on this entity. Keep * the permissions sorted alphabetically on `userOrGroup` for a better user * experience. */ readonly permissions: pulumi.Output; /** * Create a EntityPermissions 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: EntityPermissionsArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering EntityPermissions resources. */ export interface EntityPermissionsState { /** * The managed object id (uuid for some entities) on * which permissions are to be created. */ entityId?: pulumi.Input; /** * The managed object type, types can be found in the * managed object type section * [here](https://developer.broadcom.com/xapis/vsphere-web-services-api/latest/). */ entityType?: pulumi.Input; /** * The permissions to be given on this entity. Keep * the permissions sorted alphabetically on `userOrGroup` for a better user * experience. */ permissions?: pulumi.Input[]>; } /** * The set of arguments for constructing a EntityPermissions resource. */ export interface EntityPermissionsArgs { /** * The managed object id (uuid for some entities) on * which permissions are to be created. */ entityId: pulumi.Input; /** * The managed object type, types can be found in the * managed object type section * [here](https://developer.broadcom.com/xapis/vsphere-web-services-api/latest/). */ entityType: pulumi.Input; /** * The permissions to be given on this entity. Keep * the permissions sorted alphabetically on `userOrGroup` for a better user * experience. */ permissions: pulumi.Input[]>; }