Class InheritRoleAssignment


  • public class InheritRoleAssignment
    extends com.pulumi.resources.CustomResource
    Manages a V3 Inherit Role assignment within OpenStack Keystone. This uses the Openstack keystone `OS-INHERIT` api to created inherit roles within domains and parent projects for users and groups. > **Note:** You _must_ have admin privileges in your OpenStack cloud to use this resource. ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.openstack.identity.User; import com.pulumi.openstack.identity.UserArgs; import com.pulumi.openstack.identity.Role; import com.pulumi.openstack.identity.RoleArgs; import com.pulumi.openstack.identity.InheritRoleAssignment; import com.pulumi.openstack.identity.InheritRoleAssignmentArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var user1 = new User("user1", UserArgs.builder() .domainId("default") .build()); var role1 = new Role("role1", RoleArgs.builder() .domainId("default") .build()); var roleAssignment1 = new InheritRoleAssignment("roleAssignment1", InheritRoleAssignmentArgs.builder() .userId(user1.id()) .domainId("default") .roleId(role1.id()) .build()); } } ``` ## Import Inherit 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 inherit role assignment forprojectID014395cd-89fc-4c9b-96b7-13d1ee79dad2, userID4142e64b-1b35-44a0-9b1e-5affc7af1106, roleIDea257959-eeb1-4c10-8d33-26f0409a755d ( domainID and groupID are left blank) ```sh $ pulumi import openstack:identity/inheritRoleAssignment:InheritRoleAssignment role_assignment_1 /014395cd-89fc-4c9b-96b7-13d1ee79dad2//4142e64b-1b35-44a0-9b1e-5affc7af1106/ea257959-eeb1-4c10-8d33-26f0409a755d ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> domainId()  
      static InheritRoleAssignment get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, InheritRoleAssignmentState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> groupId()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> projectId()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.lang.String> roleId()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> userId()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InheritRoleAssignment

        public InheritRoleAssignment​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • InheritRoleAssignment

        public InheritRoleAssignment​(java.lang.String name,
                                     InheritRoleAssignmentArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • InheritRoleAssignment

        public InheritRoleAssignment​(java.lang.String name,
                                     InheritRoleAssignmentArgs args,
                                     @Nullable
                                     com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • domainId

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> domainId()
        Returns:
        The domain to assign the role in.
      • groupId

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> groupId()
        Returns:
        The group to assign the role to.
      • projectId

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> projectId()
        Returns:
        The project to assign the role in. The project should be able to containt child projects.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
      • roleId

        public com.pulumi.core.Output<java.lang.String> roleId()
        Returns:
        The role to assign.
      • userId

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> userId()
        Returns:
        The user to assign the role to.
      • get

        public static InheritRoleAssignment get​(java.lang.String name,
                                                com.pulumi.core.Output<java.lang.String> id,
                                                @Nullable
                                                InheritRoleAssignmentState state,
                                                @Nullable
                                                com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.