@pulumi/openstack
Version:
A Pulumi package for creating and managing OpenStack cloud resources.
155 lines (154 loc) • 5.22 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages a V3 Role assignment within OpenStack Keystone.
*
* > **Note:** You _must_ have admin privileges in your OpenStack cloud to use
* this resource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as openstack from "@pulumi/openstack";
*
* const project1 = new openstack.identity.Project("project_1", {name: "project_1"});
* const user1 = new openstack.identity.User("user_1", {
* name: "user_1",
* defaultProjectId: project1.id,
* });
* const role1 = new openstack.identity.Role("role_1", {name: "role_1"});
* const roleAssignment1 = new openstack.identity.RoleAssignment("role_assignment_1", {
* userId: user1.id,
* projectId: project1.id,
* roleId: role1.id,
* });
* ```
*
* ## Import
*
* Role assignments can be imported using a constructed id. The id should have the form of
* `domainID/projectID/groupID/userID/roleID`. When something is not used then leave blank.
*
* For example this will import the role assignment for:
* projectID: 014395cd-89fc-4c9b-96b7-13d1ee79dad2,
* userID: 4142e64b-1b35-44a0-9b1e-5affc7af1106,
* roleID: ea257959-eeb1-4c10-8d33-26f0409a755d
* ( domainID and groupID are left blank)
*
* ```sh
* $ pulumi import openstack:identity/roleAssignment:RoleAssignment role_assignment_1 /014395cd-89fc-4c9b-96b7-13d1ee79dad2//4142e64b-1b35-44a0-9b1e-5affc7af1106/ea257959-eeb1-4c10-8d33-26f0409a755d
* ```
*/
export declare class RoleAssignment extends pulumi.CustomResource {
/**
* Get an existing RoleAssignment 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?: RoleAssignmentState, opts?: pulumi.CustomResourceOptions): RoleAssignment;
/**
* Returns true if the given object is an instance of RoleAssignment. 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 RoleAssignment;
/**
* The domain to assign the role in.
*/
readonly domainId: pulumi.Output<string | undefined>;
/**
* The group to assign the role to.
*/
readonly groupId: pulumi.Output<string | undefined>;
/**
* The project to assign the role in.
*/
readonly projectId: pulumi.Output<string | undefined>;
/**
* The region in which to obtain the V3 Keystone client.
* If omitted, the `region` argument of the provider is used. Changing this
* creates a new role assignment.
*/
readonly region: pulumi.Output<string>;
/**
* The role to assign.
*/
readonly roleId: pulumi.Output<string>;
/**
* The user to assign the role to.
*/
readonly userId: pulumi.Output<string | undefined>;
/**
* Create a RoleAssignment 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: RoleAssignmentArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering RoleAssignment resources.
*/
export interface RoleAssignmentState {
/**
* The domain to assign the role in.
*/
domainId?: pulumi.Input<string>;
/**
* The group to assign the role to.
*/
groupId?: pulumi.Input<string>;
/**
* The project to assign the role in.
*/
projectId?: pulumi.Input<string>;
/**
* The region in which to obtain the V3 Keystone client.
* If omitted, the `region` argument of the provider is used. Changing this
* creates a new role assignment.
*/
region?: pulumi.Input<string>;
/**
* The role to assign.
*/
roleId?: pulumi.Input<string>;
/**
* The user to assign the role to.
*/
userId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a RoleAssignment resource.
*/
export interface RoleAssignmentArgs {
/**
* The domain to assign the role in.
*/
domainId?: pulumi.Input<string>;
/**
* The group to assign the role to.
*/
groupId?: pulumi.Input<string>;
/**
* The project to assign the role in.
*/
projectId?: pulumi.Input<string>;
/**
* The region in which to obtain the V3 Keystone client.
* If omitted, the `region` argument of the provider is used. Changing this
* creates a new role assignment.
*/
region?: pulumi.Input<string>;
/**
* The role to assign.
*/
roleId: pulumi.Input<string>;
/**
* The user to assign the role to.
*/
userId?: pulumi.Input<string>;
}